mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
forbid actions when config not properly done
This commit is contained in:
committed by
Aiden McClelland
parent
6f1cd49b1b
commit
e6518097f2
@@ -49,7 +49,15 @@ export class AppActionsPage {
|
||||
}
|
||||
|
||||
async handleAction (pkg: PackageDataEntry, action: { key: string, value: Action }) {
|
||||
if ((action.value['allowed-statuses'] as PackageMainStatus[]).includes(pkg.installed.status.main.status)) {
|
||||
if (!pkg.installed.status.configured) {
|
||||
const alert = await this.alertCtrl.create({
|
||||
header: 'Forbidden',
|
||||
message: `Service must be properly configured in order to run "${action.value.name}"`,
|
||||
buttons: ['OK'],
|
||||
cssClass: 'alert-error-message enter-click',
|
||||
})
|
||||
await alert.present()
|
||||
} else if ((action.value['allowed-statuses'] as PackageMainStatus[]).includes(pkg.installed.status.main.status)) {
|
||||
if (!isEmptyObject(action.value['input-spec'])) {
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: GenericFormPage,
|
||||
|
||||
Reference in New Issue
Block a user