diff --git a/src/app/enums/app-state.enum.ts b/src/app/enums/app-state.enum.ts index 0194171de5e..83e15a7fb86 100644 --- a/src/app/enums/app-state.enum.ts +++ b/src/app/enums/app-state.enum.ts @@ -4,21 +4,16 @@ export enum AppState { Running = 'RUNNING', Deploying = 'DEPLOYING', Stopped = 'STOPPED', - - // TODO: Assumed that stopping status will be implemented https://ixsystems.atlassian.net/browse/NAS-130482 - Stopping = 'STOPPING', } export const appStateIcons = new Map([ [AppState.Running, 'mdi-check-circle'], [AppState.Deploying, 'mdi-progress-wrench'], - [AppState.Stopping, 'mdi-progress-wrench'], [AppState.Stopped, 'mdi-stop-circle'], ]); export const appStateLabels = new Map([ [AppState.Running, T('Running')], [AppState.Deploying, T('Deploying')], - [AppState.Stopping, T('Stopping')], [AppState.Stopped, T('Stopped')], ]); diff --git a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.html b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.html index 164972a7d39..b599480ed53 100644 --- a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.html +++ b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.html @@ -119,7 +119,7 @@

matTooltipPosition="above" [ixTest]="[app().name, 'stop']" [matTooltip]="'Stop' | translate" - [disabled]="isStartingOrStopping" + [disabled]="inProgress" (click)="stopApp.emit(); $event.stopPropagation()" > {{ 'Stop' | translate }} diff --git a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts index 33aedcf2ad5..2dd4f32a815 100644 --- a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts +++ b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts @@ -52,17 +52,13 @@ export class AppInfoCardComponent { }, { allowSignalWrites: true }); get inProgress(): boolean { - return [AppState.Deploying].includes(this.app().state) || this.isStartingOrStopping; + return [AppState.Deploying].includes(this.app().state); } get isAppStopped(): boolean { return this.app().state === AppState.Stopped; } - get isStartingOrStopping(): boolean { - return [AppState.Deploying, AppState.Stopping].includes(this.app().state); - } - get appDetailsRouterUrl(): string[] { const app = this.app(); return ['/apps', 'available', app.metadata.train, app.id]; diff --git a/src/app/pages/apps/components/installed-apps/app-row/app-row.component.html b/src/app/pages/apps/components/installed-apps/app-row/app-row.component.html index d59b39690c4..750598253ec 100644 --- a/src/app/pages/apps/components/installed-apps/app-row/app-row.component.html +++ b/src/app/pages/apps/components/installed-apps/app-row/app-row.component.html @@ -78,7 +78,7 @@ matTooltipPosition="above" [ixTest]="[app().name, 'stop']" [matTooltip]="'Stop' | translate" - [disabled]="isStartingOrStopping()" + [disabled]="inProgress()" (click)="stop(); $event.stopPropagation()" > diff --git a/src/app/pages/apps/components/installed-apps/app-row/app-row.component.ts b/src/app/pages/apps/components/installed-apps/app-row/app-row.component.ts index a16d9c61354..8e4abe9b253 100644 --- a/src/app/pages/apps/components/installed-apps/app-row/app-row.component.ts +++ b/src/app/pages/apps/components/installed-apps/app-row/app-row.component.ts @@ -35,11 +35,7 @@ export class AppRowComponent { }); readonly inProgress = computed(() => { - return [AppState.Deploying].includes(this.app().state) || this.isStartingOrStopping(); - }); - - readonly isStartingOrStopping = computed(() => { - return [AppState.Deploying, AppState.Stopping].includes(this.app().state); + return [AppState.Deploying].includes(this.app().state); }); readonly incomingTraffic = computed(() => { diff --git a/src/app/pages/apps/components/installed-apps/app-workloads-card/app-workloads-card.component.html b/src/app/pages/apps/components/installed-apps/app-workloads-card/app-workloads-card.component.html index eef8ffea1bc..a8f1e3cc427 100644 --- a/src/app/pages/apps/components/installed-apps/app-workloads-card/app-workloads-card.component.html +++ b/src/app/pages/apps/components/installed-apps/app-workloads-card/app-workloads-card.component.html @@ -46,7 +46,7 @@

{{ container.state | mapValue: appContainerStateLabels | translate }}
- @if (app().state === CatalogAppState.Running || app().state === CatalogAppState.Deploying) { + @if (app().state === AppState.Running || app().state === AppState.Deploying) {
@if (container.state === AppContainerState.Running) {