Only allow service configuration once we have fetched all service states
This commit is contained in:
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||
const i18n = useI18n();
|
||||
const t = i18n.t;
|
||||
|
||||
import { computed, reactive, onMounted, ref, useTemplateRef } from 'vue';
|
||||
import { computed, reactive, onMounted, ref, useTemplateRef, nextTick } from 'vue';
|
||||
import { Button, Menu, TableView, ProgressBar, FormGroup, Checkbox, Dialog } from '@cloudron/pankow';
|
||||
import { prettyBinarySize } from '@cloudron/pankow/utils';
|
||||
import { each } from 'async';
|
||||
@@ -43,6 +43,7 @@ function onActionMenu(service, event) {
|
||||
actionMenuModel.value = [{
|
||||
icon: 'fa-solid fa-pencil-alt',
|
||||
label: t('main.action.configure'),
|
||||
disabled() { return refreshBusy.value; },
|
||||
visible: service.status !== 'disabled' && service.memoryLimit,
|
||||
action: onEdit.bind(null, service),
|
||||
}, {
|
||||
@@ -161,6 +162,9 @@ async function onEdit(service) {
|
||||
for (let i = startTick * 2; i < nearest256m; i *= 2) editMemoryTicks.value.push(i);
|
||||
editMemoryTicks.value.push(nearest256m); // end tick
|
||||
|
||||
// unclear why this is needed for the slider value to update, but well
|
||||
await nextTick();
|
||||
|
||||
dialog.value.open();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user