mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +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 }) {
|
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'])) {
|
if (!isEmptyObject(action.value['input-spec'])) {
|
||||||
const modal = await this.modalCtrl.create({
|
const modal = await this.modalCtrl.create({
|
||||||
component: GenericFormPage,
|
component: GenericFormPage,
|
||||||
|
|||||||
Reference in New Issue
Block a user