diff --git a/static/skywire-manager-src/src/app/app.datatypes.ts b/static/skywire-manager-src/src/app/app.datatypes.ts index d782d62ef3..a65271220f 100644 --- a/static/skywire-manager-src/src/app/app.datatypes.ts +++ b/static/skywire-manager-src/src/app/app.datatypes.ts @@ -23,6 +23,7 @@ export interface Application { autostart: boolean; port: number; status: number; + args?: any[]; } export interface Transport { @@ -31,6 +32,7 @@ export interface Transport { remote_pk: string; type: string; log?: TransportLog; + is_up: boolean; } export interface TransportLog { diff --git a/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.html b/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.html index b5ea44c7b4..0daae8ee4a 100644 --- a/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.html +++ b/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.html @@ -35,7 +35,10 @@ > - + + + {{ sortingArrow }} + {{ 'nodes.label' | translate }} {{ sortingArrow }} diff --git a/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.ts b/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.ts index dcdbf67b45..8c2c18ab25 100644 --- a/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.ts +++ b/static/skywire-manager-src/src/app/components/pages/node-list/node-list.component.ts @@ -21,6 +21,7 @@ import { processServiceError } from 'src/app/utils/errors'; * List of the columns that can be used to sort the data. */ enum SortableColumns { + State = 'transports.state', Label = 'nodes.label', Key = 'nodes.key', } @@ -275,6 +276,13 @@ export class NodeListComponent implements OnInit, OnDestroy { let response: number; if (this.sortBy === SortableColumns.Key) { response = !this.sortReverse ? a.local_pk.localeCompare(b.local_pk) : b.local_pk.localeCompare(a.local_pk); + } else if (this.sortBy === SortableColumns.State) { + if (a.online && !b.online) { + response = -1; + } else if (!a.online && b.online) { + response = 1; + } + response = response * (this.sortReverse ? -1 : 1); } else if (this.sortBy === SortableColumns.Label) { response = !this.sortReverse ? a.label.localeCompare(b.label) : b.label.localeCompare(a.label); } else { diff --git a/static/skywire-manager-src/src/app/components/pages/node/apps/node-apps/node-apps-list/node-apps-list.component.html b/static/skywire-manager-src/src/app/components/pages/node/apps/node-apps/node-apps-list/node-apps-list.component.html index 3950e0b235..898701b7ff 100644 --- a/static/skywire-manager-src/src/app/components/pages/node/apps/node-apps/node-apps-list/node-apps-list.component.html +++ b/static/skywire-manager-src/src/app/components/pages/node/apps/node-apps/node-apps-list/node-apps-list.component.html @@ -51,6 +51,10 @@ + + + {{ sortingArrow }} + {{ 'apps.apps-list.app-name' | translate }} {{ sortingArrow }} @@ -59,10 +63,6 @@ {{ 'apps.apps-list.port' | translate }} {{ sortingArrow }} - - {{ 'apps.apps-list.status' | translate }} - {{ sortingArrow }} - {{ 'apps.apps-list.auto-start' | translate }} {{ sortingArrow }} @@ -77,18 +77,18 @@ (change)="changeSelection(app)"> - - {{ app.name }} - - - {{ app.port }} - + + {{ app.name }} + + + {{ app.port }} +