mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
fixes warning rendering
This commit is contained in:
committed by
Aiden McClelland
parent
aada5755de
commit
2189c5643d
@@ -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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user