From 2189c5643d72451f5d7a3c1067fc13713568beda Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Mon, 1 Mar 2021 16:40:34 -0700 Subject: [PATCH] fixes warning rendering --- .../apps-routes/app-actions/app-actions.page.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts b/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts index a9508203e..af4ce0061 100644 --- a/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts +++ b/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts @@ -21,7 +21,7 @@ export class AppActionsPage extends Cleanup { appId: string app: PropertySubject - constructor ( + constructor( private readonly route: ActivatedRoute, private readonly apiService: ApiService, private readonly alertCtrl: AlertController, @@ -29,19 +29,19 @@ export class AppActionsPage extends Cleanup { private readonly loaderService: LoaderService, ) { super() } - ngOnInit () { + ngOnInit() { this.appId = this.route.snapshot.paramMap.get('appId') markAsLoadingDuring$(this.$loading$, this.preload.appFull(this.appId)).pipe( map(app => this.app = app), - ).subscribe( { error: e => this.error = e.message } ) + ).subscribe({ error: e => this.error = e.message }) } - async handleAction (action: ServiceAction) { + async handleAction(action: ServiceAction) { if (action.allowedStatuses.includes(this.app.status.getValue())) { const alert = await this.alertCtrl.create({ header: 'Confirm', - message: `Are you sure you want to execute action "${action.name}"? ${action.warning}`, + message: `Are you sure you want to execute action "${action.name}"? ${action.warning ? action.warning : ""}`, buttons: [ { text: 'Cancel', @@ -67,7 +67,7 @@ export class AppActionsPage extends Cleanup { } } - private async executeAction (action: ServiceAction) { + private async executeAction(action: ServiceAction) { const res = await this.loaderService.displayDuringP( this.apiService.serviceAction(this.appId, action), )