+
@@ -41,7 +41,7 @@
-
+
{{ $t('commons.button.save') }}
@@ -63,7 +63,7 @@
v-model="dockerConf"
:readOnly="true"
/>
-
+
{{ $t('commons.button.save') }}
@@ -85,6 +85,8 @@ import ConfirmDialog from '@/components/confirm-dialog/index.vue';
import i18n from '@/lang';
import { loadDaemonJson, updateDaemonJson, updateDaemonJsonByfile } from '@/api/modules/container';
+const loading = ref(false);
+
const extensions = [javascript(), oneDark];
const confShowType = ref('base');
@@ -129,8 +131,15 @@ const onSubmitSave = async () => {
file: dockerConf.value,
path: '/opt/1Panel/docker/conf/daemon.json',
};
- await updateDaemonJsonByfile(param);
- ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
+ loading.value = true;
+ await updateDaemonJsonByfile(param)
+ .then(() => {
+ loading.value = false;
+ ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
+ })
+ .catch(() => {
+ loading.value = false;
+ });
return;
}
let itemMirrors = form.mirrors.split('\n');
@@ -147,9 +156,16 @@ const onSubmitSave = async () => {
liveRestore: form.liveRestore,
cgroupDriver: form.cgroupDriver,
};
- await updateDaemonJson(param);
- search();
- ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
+ loading.value = true;
+ await updateDaemonJson(param)
+ .then(() => {
+ loading.value = false;
+ search();
+ ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
+ })
+ .catch(() => {
+ loading.value = false;
+ });
};
const loadMysqlConf = async () => {
diff --git a/frontend/src/views/container/template/index.vue b/frontend/src/views/container/template/index.vue
index c51e07959..c45c67354 100644
--- a/frontend/src/views/container/template/index.vue
+++ b/frontend/src/views/container/template/index.vue
@@ -11,7 +11,7 @@
{{ $t('commons.button.delete') }}
-
+
{{ title }}{{ $t('container.composeTemplate') }}