mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
disable service stop button if critical service
This commit is contained in:
parent
889422ecbd
commit
2eeec4d45e
1 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,7 @@
|
||||||
<icon iname="refresh" /> {{ $t('restart') }}
|
<icon iname="refresh" /> {{ $t('restart') }}
|
||||||
</b-button>
|
</b-button>
|
||||||
<b-button
|
<b-button
|
||||||
variant="danger"
|
variant="danger" :disabled="critical"
|
||||||
@click="action = 'stop'" v-b-modal.action-confirm-modal
|
@click="action = 'stop'" v-b-modal.action-confirm-modal
|
||||||
>
|
>
|
||||||
<icon iname="warning" /> {{ $t('stop') }}
|
<icon iname="warning" /> {{ $t('stop') }}
|
||||||
|
@ -109,7 +109,8 @@ export default {
|
||||||
start_on_boot: undefined,
|
start_on_boot: undefined,
|
||||||
logs: undefined,
|
logs: undefined,
|
||||||
// Modal action
|
// Modal action
|
||||||
action: undefined
|
action: undefined,
|
||||||
|
critical: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -123,6 +124,7 @@ export default {
|
||||||
'services/' + this.name,
|
'services/' + this.name,
|
||||||
`services/${this.name}/log?number=50`
|
`services/${this.name}/log?number=50`
|
||||||
]).then(([service, logs]) => {
|
]).then(([service, logs]) => {
|
||||||
|
this.critical = ['nginx', 'ssh', 'slapd', 'yunohost-api'].includes(this.name)
|
||||||
if (service.last_state_change === 'unknown') {
|
if (service.last_state_change === 'unknown') {
|
||||||
service.last_state_change = 0
|
service.last_state_change = 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue