Skip to content

Commit

Permalink
Fix sorting as in cylc#537
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Nov 26, 2020
1 parent 253e827 commit 7cc65ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/cylc/gscan/GScan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,13 @@ export default {
sortedWorkflows () {
return [...this.filteredWorkflows].sort((left, right) => {
if (left.status !== right.status) {
if (left.status === WorkflowState.STOPPED.name.toLowerCase()) {
return 1
if (left.status === WorkflowState.RUNNING.name) {
return -1
}
if (right.status === WorkflowState.STOPPED.name.toLowerCase()) {
if (left.status === WorkflowState.HELD.name) {
return -1
}
return 1
}
return left.name.toLowerCase()
.localeCompare(
Expand Down

0 comments on commit 7cc65ab

Please sign in to comment.