Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.2] Fixes for console logging. #19381

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/src/components/JobInformation/JobInformation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ describe("JobInformation/JobInformation.vue", () => {
// table should exist
expect(jobInfoTable).toBeTruthy();
const rows = jobInfoTable.findAll("tr");
// should contain 9 rows
expect(rows.length).toBe(9);
// should contain 10 rows
expect(rows.length).toBe(10);
});

it("stdout and stderr should be rendered", async () => {
Expand Down Expand Up @@ -96,5 +96,6 @@ describe("JobInformation/JobInformation.vue", () => {
{ id: "encoded-copied-from-job-id", backend_key: "copied_from_job_id" },
];
verifyValues(rendered_entries, jobInfoTable, jobResponse);
expect(wrapper.find('td[data-description="galaxy-job-state"]').exists()).toBe(true);
});
});
9 changes: 7 additions & 2 deletions client/src/components/JobInformation/JobInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ const stderr_position = computed(() => stderr_text.value.length);
const runTime = computed(() => getJobDuration(job.value));

function jobStateIsTerminal(jobState) {
return jobState && !NON_TERMINAL_STATES.includes(job.value.state);
return jobState && !NON_TERMINAL_STATES.includes(jobState);
}

const jobIsTerminal = computed(() => jobStateIsTerminal(job?.value?.state));
function jobStateIsRunning(jobState) {
return jobState == "running";
}

const jobIsTerminal = computed(() => jobStateIsTerminal(job?.value?.state));
const jobIsRunning = computed(() => jobStateIsRunning(job?.value?.state));
const routeToInvocation = computed(() => `/workflows/invocations/${invocationId.value}`);

const metadataDetail = ref({
Expand Down Expand Up @@ -127,6 +131,7 @@ watch(
<div>
<JobDetailsProvider auto-refresh :job-id="props.job_id" @update:result="updateJob" />
<JobConsoleOutputProvider
v-if="jobIsRunning"
auto-refresh
:job-id="props.job_id"
:stdout_position="stdout_position"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"command_line": "commandline",
"job_messages": ["test-msg1", "test-msg2", "test-msg3", "test-msg4"],
"id": "test_id",
"copied_from_job_id": "test_copied_from_job_id"
"copied_from_job_id": "test_copied_from_job_id",
"state": "running"
}
Loading