fixes warning rendering

This commit is contained in:
Keagan McClelland
2021-03-01 16:40:34 -07:00
committed by Aiden McClelland
parent aada5755de
commit 2189c5643d

View File

@@ -21,7 +21,7 @@ export class AppActionsPage extends Cleanup {
appId: string
app: PropertySubject<AppInstalledFull>
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),
)