Skip to content

Commit b9677fa

Browse files
[UX]: Improve the output of dstack ps #2655 (minor fix)
- In UI, change the icon for sucessful runs to `done`, also change the color to blue; - In `dstack ps`, for multi-node runs, for runs, show latest job submission status message if possible instead of run status
1 parent 8732138 commit b9677fa

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

frontend/src/libs/run.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ export const getStatusIconType = (
1515
switch (status) {
1616
case 'failed':
1717
return 'error';
18+
case 'done':
19+
return 'success';
1820
case 'aborted':
1921
case 'terminated':
20-
case 'done':
2122
return 'stopped';
2223
case 'running':
2324
return 'success';
@@ -46,6 +47,8 @@ export const getStatusIconColor = (
4647
return 'green';
4748
case 'aborted':
4849
return 'yellow';
50+
case 'done':
51+
return 'blue';
4952
default:
5053
return undefined;
5154
}

src/dstack/_internal/cli/utils/run.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ def get_runs_table(
170170
if run.error:
171171
run_row["ERROR"] = run.error
172172
if len(run.jobs) != 1:
173-
run_row["STATUS"] = run.status
173+
run_row["STATUS"] = (
174+
run.latest_job_submission.status_message
175+
if run.latest_job_submission
176+
else run.status
177+
)
174178
add_row_from_dict(table, run_row)
175179

176180
for job in run.jobs:

0 commit comments

Comments
 (0)