mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 22:39:46 +00:00
stop while starting or restarting (#2460)
This commit is contained in:
@@ -15,11 +15,16 @@
|
|||||||
<ion-grid>
|
<ion-grid>
|
||||||
<ion-row style="padding-left: 12px">
|
<ion-row style="padding-left: 12px">
|
||||||
<ion-col>
|
<ion-col>
|
||||||
|
<ion-button
|
||||||
|
*ngIf="canStop"
|
||||||
|
class="action-button"
|
||||||
|
color="danger"
|
||||||
|
(click)="tryStop()"
|
||||||
|
>
|
||||||
|
<ion-icon slot="start" name="stop-outline"></ion-icon>
|
||||||
|
Stop
|
||||||
|
</ion-button>
|
||||||
<ng-container *ngIf="isRunning">
|
<ng-container *ngIf="isRunning">
|
||||||
<ion-button class="action-button" color="danger" (click)="tryStop()">
|
|
||||||
<ion-icon slot="start" name="stop-outline"></ion-icon>
|
|
||||||
Stop
|
|
||||||
</ion-button>
|
|
||||||
<ion-button
|
<ion-button
|
||||||
class="action-button"
|
class="action-button"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
|
|||||||
@@ -61,6 +61,14 @@ export class AppShowStatusComponent {
|
|||||||
return this.status.primary === PrimaryStatus.Running
|
return this.status.primary === PrimaryStatus.Running
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get canStop(): boolean {
|
||||||
|
return [
|
||||||
|
PrimaryStatus.Running,
|
||||||
|
PrimaryStatus.Starting,
|
||||||
|
PrimaryStatus.Restarting,
|
||||||
|
].includes(this.status.primary)
|
||||||
|
}
|
||||||
|
|
||||||
get isStopped(): boolean {
|
get isStopped(): boolean {
|
||||||
return this.status.primary === PrimaryStatus.Stopped
|
return this.status.primary === PrimaryStatus.Stopped
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user