Skip to content

Commit

Permalink
Merge pull request #19381 from jmchilton/fix_console_logging
Browse files Browse the repository at this point in the history
[24.2] Fixes for console logging.
  • Loading branch information
mvdbeek authored Jan 9, 2025
2 parents 670f834 + 01e912a commit 3c9f126
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
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"
}

0 comments on commit 3c9f126

Please sign in to comment.