fix: 弹出提示框增加关闭按钮
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgError } from '@/utils/message';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 校验网络请求状态码
|
* @description: 校验网络请求状态码
|
||||||
@@ -10,19 +10,19 @@ import router from '@/routers';
|
|||||||
export const checkStatus = (status: number): void => {
|
export const checkStatus = (status: number): void => {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 400:
|
case 400:
|
||||||
ElMessage.error(i18n.global.t('commons.res.paramError'));
|
MsgError(i18n.global.t('commons.res.paramError'));
|
||||||
break;
|
break;
|
||||||
case 404:
|
case 404:
|
||||||
ElMessage.error(i18n.global.t('commons.res.notFound'));
|
MsgError(i18n.global.t('commons.res.notFound'));
|
||||||
break;
|
break;
|
||||||
case 403:
|
case 403:
|
||||||
router.replace({ path: '/login' });
|
router.replace({ path: '/login' });
|
||||||
ElMessage.error(i18n.global.t('commons.res.forbidden'));
|
MsgError(i18n.global.t('commons.res.forbidden'));
|
||||||
break;
|
break;
|
||||||
case 500:
|
case 500:
|
||||||
ElMessage.error(i18n.global.t('commons.res.serverError'));
|
MsgError(i18n.global.t('commons.res.serverError'));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ElMessage.error(i18n.global.t('commons.res.commonError'));
|
MsgError(i18n.global.t('commons.res.commonError'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, AxiosResponse } f
|
|||||||
import { ResultData } from '@/api/interface';
|
import { ResultData } from '@/api/interface';
|
||||||
import { ResultEnum } from '@/enums/http-enum';
|
import { ResultEnum } from '@/enums/http-enum';
|
||||||
import { checkStatus } from './helper/check-status';
|
import { checkStatus } from './helper/check-status';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
|
import { MsgError } from '@/utils/message';
|
||||||
|
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
@@ -71,14 +71,14 @@ class RequestHttp {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
||||||
ElMessage.error(data.message);
|
MsgError(data.message);
|
||||||
return Promise.reject(data);
|
return Promise.reject(data);
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
async (error: AxiosError) => {
|
async (error: AxiosError) => {
|
||||||
const { response } = error;
|
const { response } = error;
|
||||||
if (error.message.indexOf('timeout') !== -1) ElMessage.error('请求超时!请您稍后重试');
|
if (error.message.indexOf('timeout') !== -1) MsgError('请求超时!请您稍后重试');
|
||||||
if (response) checkStatus(response.status);
|
if (response) checkStatus(response.status);
|
||||||
if (!window.navigator.onLine) router.replace({ path: '/500' });
|
if (!window.navigator.onLine) router.replace({ path: '/500' });
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
|||||||
@@ -43,8 +43,9 @@ import SubItem from './components/sub-item.vue';
|
|||||||
import router, { menuList } from '@/routers/router';
|
import router, { menuList } from '@/routers/router';
|
||||||
import { logOutApi } from '@/api/modules/auth';
|
import { logOutApi } from '@/api/modules/auth';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const menuStore = MenuStore();
|
const menuStore = MenuStore();
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@@ -80,10 +81,7 @@ const logout = () => {
|
|||||||
systemLogOut();
|
systemLogOut();
|
||||||
router.push({ name: 'login' });
|
router.push({ name: 'login' });
|
||||||
globalStore.setLogStatus(false);
|
globalStore.setLogStatus(false);
|
||||||
ElMessage({
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
type: 'success',
|
|
||||||
message: i18n.global.t('commons.msg.operationSuccess'),
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,9 +56,10 @@ import { CheckAppInstalled, InstalledOp } from '@/api/modules/app';
|
|||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import Status from '@/components/status/index.vue';
|
import Status from '@/components/status/index.vue';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
appKey: {
|
appKey: {
|
||||||
@@ -116,7 +117,7 @@ const onOperate = async (operation: string) => {
|
|||||||
InstalledOp(operateReq)
|
InstalledOp(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
em('update:loading', false);
|
em('update:loading', false);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
onCheck();
|
onCheck();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
* 复制某个值至剪贴板
|
* 复制某个值至剪贴板
|
||||||
* 接收参数:string类型/Ref<string>类型/Reactive<string>类型
|
* 接收参数:string类型/Ref<string>类型/Reactive<string>类型
|
||||||
*/
|
*/
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import type { Directive, DirectiveBinding } from 'vue';
|
import type { Directive, DirectiveBinding } from 'vue';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
interface ElType extends HTMLElement {
|
interface ElType extends HTMLElement {
|
||||||
copyData: string | number;
|
copyData: string | number;
|
||||||
__handleClick__: any;
|
__handleClick__: any;
|
||||||
@@ -29,10 +29,7 @@ function handleClick(this: any) {
|
|||||||
input.select();
|
input.select();
|
||||||
document.execCommand('Copy');
|
document.execCommand('Copy');
|
||||||
document.body.removeChild(input);
|
document.body.removeChild(input);
|
||||||
ElMessage({
|
MsgSuccess('复制成功');
|
||||||
type: 'success',
|
|
||||||
message: '复制成功',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default copy;
|
export default copy;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { HandleData } from './interface';
|
import { HandleData } from './interface';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 删除操作使用
|
* @description 删除操作使用
|
||||||
@@ -35,10 +36,7 @@ export const useDeleteData = <P = any, R = any>(
|
|||||||
done();
|
done();
|
||||||
if (!res) return reject(false);
|
if (!res) return reject(false);
|
||||||
resolve(true);
|
resolve(true);
|
||||||
ElMessage({
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
type: 'success',
|
|
||||||
message: i18n.global.t('commons.msg.operationSuccess'),
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
instance.confirmButtonLoading = false;
|
instance.confirmButtonLoading = false;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { computed, onBeforeMount } from 'vue';
|
import { computed, onBeforeMount } from 'vue';
|
||||||
import { getLightColor, getDarkColor } from '@/utils/theme/tool';
|
import { getLightColor, getDarkColor } from '@/utils/theme/tool';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { ElMessage } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
export const useTheme = () => {
|
export const useTheme = () => {
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@@ -16,7 +16,7 @@ export const useTheme = () => {
|
|||||||
const changePrimary = (val: string) => {
|
const changePrimary = (val: string) => {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
val = '#409EFF';
|
val = '#409EFF';
|
||||||
ElMessage({ type: 'success', message: '主题颜色已重置为 #409EFF' });
|
MsgSuccess('主题颜色已重置为 #409EFF');
|
||||||
}
|
}
|
||||||
globalStore.setThemeConfig({ ...themeConfig.value, primary: val });
|
globalStore.setThemeConfig({ ...themeConfig.value, primary: val });
|
||||||
document.documentElement.style.setProperty(
|
document.documentElement.style.setProperty(
|
||||||
|
|||||||
37
frontend/src/utils/message.ts
Normal file
37
frontend/src/utils/message.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
export const MsgSuccess = (message) => {
|
||||||
|
ElMessage.success({
|
||||||
|
message: message,
|
||||||
|
type: 'success',
|
||||||
|
showClose: false,
|
||||||
|
duration: 3000,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const MsgInfo = (message) => {
|
||||||
|
ElMessage.info({
|
||||||
|
message: message,
|
||||||
|
type: 'info',
|
||||||
|
showClose: false,
|
||||||
|
duration: 3000,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const MsgWarning = (message) => {
|
||||||
|
ElMessage.warning({
|
||||||
|
message: message,
|
||||||
|
type: 'warning',
|
||||||
|
showClose: true,
|
||||||
|
duration: 3000,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const MsgError = (message) => {
|
||||||
|
ElMessage.error({
|
||||||
|
message: message,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true,
|
||||||
|
duration: 3000,
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ElMessage } from 'element-plus';
|
import { MsgWarning } from '../message';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hex颜色转rgb颜色
|
* hex颜色转rgb颜色
|
||||||
@@ -8,7 +8,7 @@ import { ElMessage } from 'element-plus';
|
|||||||
export function hexToRgb(str: any) {
|
export function hexToRgb(str: any) {
|
||||||
let hexs: any = '';
|
let hexs: any = '';
|
||||||
let reg = /^\#?[0-9A-Fa-f]{6}$/;
|
let reg = /^\#?[0-9A-Fa-f]{6}$/;
|
||||||
if (!reg.test(str)) return ElMessage.warning('输入错误的hex');
|
if (!reg.test(str)) return MsgWarning('输入错误的hex');
|
||||||
str = str.replace('#', '');
|
str = str.replace('#', '');
|
||||||
hexs = str.match(/../g);
|
hexs = str.match(/../g);
|
||||||
for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16);
|
for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16);
|
||||||
@@ -24,7 +24,7 @@ export function hexToRgb(str: any) {
|
|||||||
*/
|
*/
|
||||||
export function rgbToHex(r: any, g: any, b: any) {
|
export function rgbToHex(r: any, g: any, b: any) {
|
||||||
let reg = /^\d{1,3}$/;
|
let reg = /^\d{1,3}$/;
|
||||||
if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return ElMessage.warning('输入错误的rgb颜色值');
|
if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return MsgWarning('输入错误的rgb颜色值');
|
||||||
let hexs = [r.toString(16), g.toString(16), b.toString(16)];
|
let hexs = [r.toString(16), g.toString(16), b.toString(16)];
|
||||||
for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}`;
|
for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}`;
|
||||||
return `#${hexs.join('')}`;
|
return `#${hexs.join('')}`;
|
||||||
@@ -38,7 +38,7 @@ export function rgbToHex(r: any, g: any, b: any) {
|
|||||||
*/
|
*/
|
||||||
export function getDarkColor(color: string, level: number) {
|
export function getDarkColor(color: string, level: number) {
|
||||||
let reg = /^\#?[0-9A-Fa-f]{6}$/;
|
let reg = /^\#?[0-9A-Fa-f]{6}$/;
|
||||||
if (!reg.test(color)) return ElMessage.warning('输入错误的hex颜色值');
|
if (!reg.test(color)) return MsgWarning('输入错误的hex颜色值');
|
||||||
let rgb = hexToRgb(color);
|
let rgb = hexToRgb(color);
|
||||||
for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level));
|
for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level));
|
||||||
return rgbToHex(rgb[0], rgb[1], rgb[2]);
|
return rgbToHex(rgb[0], rgb[1], rgb[2]);
|
||||||
@@ -52,7 +52,7 @@ export function getDarkColor(color: string, level: number) {
|
|||||||
*/
|
*/
|
||||||
export function getLightColor(color: string, level: number) {
|
export function getLightColor(color: string, level: number) {
|
||||||
let reg = /^\#?[0-9A-Fa-f]{6}$/;
|
let reg = /^\#?[0-9A-Fa-f]{6}$/;
|
||||||
if (!reg.test(color)) return ElMessage.warning('输入错误的hex颜色值');
|
if (!reg.test(color)) return MsgWarning('输入错误的hex颜色值');
|
||||||
let rgb = hexToRgb(color);
|
let rgb = hexToRgb(color);
|
||||||
for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]);
|
for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]);
|
||||||
return rgbToHex(rgb[0], rgb[1], rgb[2]);
|
return rgbToHex(rgb[0], rgb[1], rgb[2]);
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ import LayoutContent from '@/layout/layout-content.vue';
|
|||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { GetAppTags, SearchApp, SyncApp } from '@/api/modules/app';
|
import { GetAppTags, SearchApp, SyncApp } from '@/api/modules/app';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import Detail from '../detail/index.vue';
|
import Detail from '../detail/index.vue';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let req = reactive({
|
let req = reactive({
|
||||||
name: '',
|
name: '',
|
||||||
@@ -143,7 +143,7 @@ const sync = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
SyncApp()
|
SyncApp()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('app.syncSuccess'));
|
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
||||||
search(req);
|
search(req);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -79,9 +79,9 @@ import { reactive, ref } from 'vue';
|
|||||||
import ComplexTable from '@/components/complex-table/index.vue';
|
import ComplexTable from '@/components/complex-table/index.vue';
|
||||||
import Header from '@/components/drawer-header/index.vue';
|
import Header from '@/components/drawer-header/index.vue';
|
||||||
import { dateFormat } from '@/utils/util';
|
import { dateFormat } from '@/utils/util';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface InstallRrops {
|
interface InstallRrops {
|
||||||
appInstallId: number;
|
appInstallId: number;
|
||||||
@@ -140,7 +140,7 @@ const backup = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
await InstalledOp(req)
|
await InstalledOp(req)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.backupSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.backupSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -159,7 +159,7 @@ const restore = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
await InstalledOp(req)
|
await InstalledOp(req)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.restoreSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.restoreSuccess'));
|
||||||
openRestorePage.value = false;
|
openRestorePage.value = false;
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -39,11 +39,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { InstalledOp } from '@/api/modules/app';
|
import { InstalledOp } from '@/api/modules/app';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let deleteReq = ref({
|
let deleteReq = ref({
|
||||||
operate: 'delete',
|
operate: 'delete',
|
||||||
@@ -84,7 +85,7 @@ const submit = async () => {
|
|||||||
InstalledOp(deleteReq.value)
|
InstalledOp(deleteReq.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.deleteSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.deleteSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ import {
|
|||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import Backups from './backup/index.vue';
|
import Backups from './backup/index.vue';
|
||||||
import AppResources from './check/index.vue';
|
import AppResources from './check/index.vue';
|
||||||
import AppDelete from './delete/index.vue';
|
import AppDelete from './delete/index.vue';
|
||||||
@@ -175,6 +175,7 @@ import { App } from '@/api/interface/app';
|
|||||||
import Status from '@/components/status/index.vue';
|
import Status from '@/components/status/index.vue';
|
||||||
import { getAge } from '@/utils/util';
|
import { getAge } from '@/utils/util';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let data = ref<any>();
|
let data = ref<any>();
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
@@ -212,7 +213,7 @@ const sync = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
SyncInstalledApp()
|
SyncInstalledApp()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('app.syncSuccess'));
|
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -265,7 +266,7 @@ const operate = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
await InstalledOp(operateReq)
|
await InstalledOp(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -28,9 +28,10 @@
|
|||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetAppUpdateVersions, InstalledOp } from '@/api/modules/app';
|
import { GetAppUpdateVersions, InstalledOp } from '@/api/modules/app';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import Header from '@/components/drawer-header/index.vue';
|
import Header from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let open = ref(false);
|
let open = ref(false);
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
@@ -65,7 +66,7 @@ const operate = async () => {
|
|||||||
await InstalledOp(operateReq)
|
await InstalledOp(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -76,9 +76,10 @@ import { javascript } from '@codemirror/lang-javascript';
|
|||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { listComposeTemplate, upCompose } from '@/api/modules/container';
|
import { listComposeTemplate, upCompose } from '@/api/modules/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
@@ -136,7 +137,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
upCompose(form)
|
upCompose(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
|
|||||||
@@ -138,9 +138,10 @@ import ComplexTable from '@/components/complex-table/index.vue';
|
|||||||
import Status from '@/components/status/index.vue';
|
import Status from '@/components/status/index.vue';
|
||||||
import { dateFormat } from '@/utils/util';
|
import { dateFormat } from '@/utils/util';
|
||||||
import { composeOperator, ContainerOperator, inspect, searchContainer } from '@/api/modules/container';
|
import { composeOperator, ContainerOperator, inspect, searchContainer } from '@/api/modules/container';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const composeName = ref();
|
const composeName = ref();
|
||||||
const composePath = ref();
|
const composePath = ref();
|
||||||
@@ -175,6 +176,7 @@ const loading = ref(false);
|
|||||||
const search = async () => {
|
const search = async () => {
|
||||||
let filterItem = filters.value;
|
let filterItem = filters.value;
|
||||||
let params = {
|
let params = {
|
||||||
|
name: '',
|
||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
filters: filterItem,
|
filters: filterItem,
|
||||||
@@ -241,7 +243,7 @@ const onOperate = async (operation: string) => {
|
|||||||
Promise.all(ps)
|
Promise.all(ps)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
search();
|
search();
|
||||||
@@ -268,7 +270,7 @@ const onComposeOperate = async (operation: string) => {
|
|||||||
await composeOperator(params)
|
await composeOperator(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
if (operation === 'down') {
|
if (operation === 'down') {
|
||||||
emit('back');
|
emit('back');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ import { Codemirror } from 'vue-codemirror';
|
|||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { composeUpdate } from '@/api/modules/container';
|
import { composeUpdate } from '@/api/modules/container';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const composeVisiable = ref(false);
|
const composeVisiable = ref(false);
|
||||||
@@ -59,7 +59,7 @@ const onSubmitEdit = async () => {
|
|||||||
await composeUpdate(param)
|
await composeUpdate(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
composeVisiable.value = false;
|
composeVisiable.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -97,11 +97,11 @@ import CreateDialog from '@/views/container/compose/create/index.vue';
|
|||||||
import ComposeDetial from '@/views/container/compose/detail/index.vue';
|
import ComposeDetial from '@/views/container/compose/detail/index.vue';
|
||||||
import { composeOperator, loadDockerStatus, searchCompose } from '@/api/modules/container';
|
import { composeOperator, loadDockerStatus, searchCompose } from '@/api/modules/container';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const data = ref();
|
const data = ref();
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
@@ -175,7 +175,7 @@ const onDelete = async (row: Container.ComposeInfo) => {
|
|||||||
};
|
};
|
||||||
await useDeleteData(composeOperator, param, 'commons.msg.delete');
|
await useDeleteData(composeOperator, param, 'commons.msg.delete');
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const dialogEditRef = ref();
|
const dialogEditRef = ref();
|
||||||
|
|||||||
@@ -204,10 +204,11 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { listImage, listVolume, createContainer } from '@/api/modules/container';
|
import { listImage, listVolume, createContainer } from '@/api/modules/container';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -318,7 +319,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await createContainer(form)
|
await createContainer(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -131,9 +131,10 @@ import { reactive, onMounted, ref } from 'vue';
|
|||||||
import { dateFormat } from '@/utils/util';
|
import { dateFormat } from '@/utils/util';
|
||||||
import { ContainerOperator, inspect, loadDockerStatus, searchContainer } from '@/api/modules/container';
|
import { ContainerOperator, inspect, loadDockerStatus, searchContainer } from '@/api/modules/container';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const data = ref();
|
const data = ref();
|
||||||
@@ -274,7 +275,7 @@ const onOperate = async (operation: string) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
import { ContainerOperator } from '@/api/modules/container';
|
import { ContainerOperator } from '@/api/modules/container';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
import { ElForm } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -53,7 +54,7 @@ const onSubmitName = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
newNameVisiable.value = false;
|
newNameVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ import FileList from '@/components/file-list/index.vue';
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { imageLoad } from '@/api/modules/container';
|
import { imageLoad } from '@/api/modules/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
loadVisiable.value = false;
|
loadVisiable.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { imagePull } from '@/api/modules/container';
|
import { imagePull } from '@/api/modules/container';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
@@ -76,6 +76,7 @@ import { oneDark } from '@codemirror/theme-one-dark';
|
|||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { formatImageStdout } from '@/utils/docker';
|
import { formatImageStdout } from '@/utils/docker';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
@@ -125,7 +126,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
logVisiable.value = true;
|
logVisiable.value = true;
|
||||||
buttonDisabled.value = true;
|
buttonDisabled.value = true;
|
||||||
loadLogs(res.data);
|
loadLogs(res.data);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { imagePush } from '@/api/modules/container';
|
import { imagePush } from '@/api/modules/container';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
@@ -79,6 +79,7 @@ import { oneDark } from '@codemirror/theme-one-dark';
|
|||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { formatImageStdout } from '@/utils/docker';
|
import { formatImageStdout } from '@/utils/docker';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
@@ -130,7 +131,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
logVisiable.value = true;
|
logVisiable.value = true;
|
||||||
buttonDisabled.value = true;
|
buttonDisabled.value = true;
|
||||||
loadLogs(res.data);
|
loadLogs(res.data);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,11 @@ import FileList from '@/components/file-list/index.vue';
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { imageSave } from '@/api/modules/container';
|
import { imageSave } from '@/api/modules/container';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -45,10 +45,11 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { imageTag } from '@/api/modules/container';
|
import { imageTag } from '@/api/modules/container';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -62,9 +62,10 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { createNetwork } from '@/api/modules/container';
|
import { createNetwork } from '@/api/modules/container';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await createNetwork(form)
|
await createNetwork(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ const onInspect = async (id: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function isSystem(val: string) {
|
function isSystem(val: string) {
|
||||||
return val === 'bridge' || val === '1panel' || val === 'none' || val === 'host';
|
return val === 'bridge' || val === '1panel-network' || val === 'none' || val === 'host';
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
|
|||||||
@@ -27,8 +27,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { deleteImageRepo } from '@/api/modules/container';
|
import { deleteImageRepo } from '@/api/modules/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const isDelete = ref(false);
|
const isDelete = ref(false);
|
||||||
@@ -50,7 +51,7 @@ const onSubmit = async () => {
|
|||||||
await deleteImageRepo({ ids: ids.value, deleteInsecure: isDelete.value })
|
await deleteImageRepo({ ids: ids.value, deleteInsecure: isDelete.value })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
repoVisiable.value = false;
|
repoVisiable.value = false;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -77,10 +77,11 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { createImageRepo, updateImageRepo } from '@/api/modules/container';
|
import { createImageRepo, updateImageRepo } from '@/api/modules/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -125,7 +126,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await createImageRepo(dialogData.value.rowData!)
|
await createImageRepo(dialogData.value.rowData!)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
@@ -137,7 +138,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await updateImageRepo(dialogData.value.rowData!)
|
await updateImageRepo(dialogData.value.rowData!)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
@@ -123,6 +123,7 @@ import {
|
|||||||
updateDaemonJson,
|
updateDaemonJson,
|
||||||
updateDaemonJsonByfile,
|
updateDaemonJsonByfile,
|
||||||
} from '@/api/modules/container';
|
} from '@/api/modules/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const showDaemonJsonAlert = ref(false);
|
const showDaemonJsonAlert = ref(false);
|
||||||
@@ -171,7 +172,7 @@ const onOperator = async (operation: string) => {
|
|||||||
await dockerOperate(param);
|
await dockerOperate(param);
|
||||||
search();
|
search();
|
||||||
changeMode();
|
changeMode();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmitSave = async () => {
|
const onSubmitSave = async () => {
|
||||||
@@ -181,7 +182,7 @@ const onSubmitSave = async () => {
|
|||||||
await updateDaemonJsonByfile(param)
|
await updateDaemonJsonByfile(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -207,7 +208,7 @@ const onSubmitSave = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -61,10 +61,11 @@ import { javascript } from '@codemirror/lang-javascript';
|
|||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { createComposeTemplate, updateComposeTemplate } from '@/api/modules/container';
|
import { createComposeTemplate, updateComposeTemplate } from '@/api/modules/container';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -107,7 +108,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await createComposeTemplate(dialogData.value.rowData!)
|
await createComposeTemplate(dialogData.value.rowData!)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
@@ -119,7 +120,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await updateComposeTemplate(dialogData.value.rowData!)
|
await updateComposeTemplate(dialogData.value.rowData!)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -57,9 +57,10 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { createVolume } from '@/api/modules/container';
|
import { createVolume } from '@/api/modules/container';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -104,7 +105,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await createVolume(form)
|
await createVolume(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ import { loadBackupName } from '@/views/setting/helper';
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Cronjob } from '@/api/interface/cronjob';
|
import { Cronjob } from '@/api/interface/cronjob';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
@@ -226,7 +227,7 @@ const onChangeStatus = async (id: number, status: string) => {
|
|||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
let itemStatus = status === 'enable' ? 'Enable' : 'Disable';
|
let itemStatus = status === 'enable' ? 'Enable' : 'Disable';
|
||||||
await updateStatus({ id: id, status: itemStatus });
|
await updateStatus({ id: id, status: itemStatus });
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -236,7 +237,7 @@ const onHandle = async (row: Cronjob.CronjobInfo) => {
|
|||||||
await handleOnce(row.id)
|
await handleOnce(row.id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -164,13 +164,14 @@ import { loadBackupName } from '@/views/setting/helper';
|
|||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import { getBackupList } from '@/api/modules/setting';
|
import { getBackupList } from '@/api/modules/setting';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { Cronjob } from '@/api/interface/cronjob';
|
import { Cronjob } from '@/api/interface/cronjob';
|
||||||
import { addCronjob, editCronjob } from '@/api/modules/cronjob';
|
import { addCronjob, editCronjob } from '@/api/modules/cronjob';
|
||||||
import { loadDBNames } from '@/api/modules/database';
|
import { loadDBNames } from '@/api/modules/database';
|
||||||
import { CheckAppInstalled } from '@/api/modules/app';
|
import { CheckAppInstalled } from '@/api/modules/app';
|
||||||
import { GetWebsiteOptions } from '@/api/modules/website';
|
import { GetWebsiteOptions } from '@/api/modules/website';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface DialogProps {
|
interface DialogProps {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -367,7 +368,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await editCronjob(dialogData.value.rowData);
|
await editCronjob(dialogData.value.rowData);
|
||||||
}
|
}
|
||||||
|
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -277,12 +277,13 @@ import { loadBackupName } from '@/views/setting/helper';
|
|||||||
import { searchRecords, download, handleOnce, updateStatus } from '@/api/modules/cronjob';
|
import { searchRecords, download, handleOnce, updateStatus } from '@/api/modules/cronjob';
|
||||||
import { dateFormat, dateFormatForName } from '@/utils/util';
|
import { dateFormat, dateFormatForName } from '@/utils/util';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const hasRecords = ref();
|
const hasRecords = ref();
|
||||||
@@ -393,7 +394,7 @@ const onHandle = async (row: Cronjob.CronjobInfo) => {
|
|||||||
await handleOnce(row.id)
|
await handleOnce(row.id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -408,7 +409,7 @@ const onChangeStatus = async (id: number, status: string) => {
|
|||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
let itemStatus = status === 'enable' ? 'Enable' : 'Disable';
|
let itemStatus = status === 'enable' ? 'Enable' : 'Disable';
|
||||||
await updateStatus({ id: id, status: itemStatus });
|
await updateStatus({ id: id, status: itemStatus });
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
dialogData.value.rowData.status = itemStatus;
|
dialogData.value.rowData.status = itemStatus;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ import { dateFormat } from '@/utils/util';
|
|||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { backup, recover } from '@/api/modules/database';
|
import { backup, recover } from '@/api/modules/database';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/setting';
|
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/setting';
|
||||||
import { Backup } from '@/api/interface/backup';
|
import { Backup } from '@/api/interface/backup';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ const onBackup = async () => {
|
|||||||
dbName: dbName.value,
|
dbName: dbName.value,
|
||||||
};
|
};
|
||||||
await backup(params);
|
await backup(params);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ const onRecover = async (row: Backup.RecordInfo) => {
|
|||||||
backupName: row.fileDir + '/' + row.fileName,
|
backupName: row.fileDir + '/' + row.fileName,
|
||||||
};
|
};
|
||||||
await recover(params);
|
await recover(params);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDownload = async (row: Backup.RecordInfo) => {
|
const onDownload = async (row: Backup.RecordInfo) => {
|
||||||
|
|||||||
@@ -56,9 +56,10 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { addMysqlDB } from '@/api/modules/database';
|
import { addMysqlDB } from '@/api/modules/database';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const createVisiable = ref(false);
|
const createVisiable = ref(false);
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
@@ -108,7 +109,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
form.permission = form.permissionIPs;
|
form.permission = form.permissionIPs;
|
||||||
}
|
}
|
||||||
await addMysqlDB(form);
|
await addMysqlDB(form);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
createVisiable.value = false;
|
createVisiable.value = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,10 +40,11 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { deleteMysqlDB } from '@/api/modules/database';
|
import { deleteMysqlDB } from '@/api/modules/database';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let deleteReq = ref({
|
let deleteReq = ref({
|
||||||
id: 0,
|
id: 0,
|
||||||
@@ -80,7 +81,7 @@ const submit = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
ElMessage.success(i18n.global.t('commons.msg.deleteSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.deleteSuccess'));
|
||||||
dialogVisiable.value = false;
|
dialogVisiable.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -164,11 +164,11 @@ import { dateFormat } from '@/utils/util';
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { deleteCheckMysqlDB, loadRemoteAccess, searchMysqlDBs, updateMysqlDescription } from '@/api/modules/database';
|
import { deleteCheckMysqlDB, loadRemoteAccess, searchMysqlDBs, updateMysqlDescription } from '@/api/modules/database';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { Database } from '@/api/interface/database';
|
import { Database } from '@/api/interface/database';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetAppPort } from '@/api/modules/app';
|
import { GetAppPort } from '@/api/modules/app';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ const search = async () => {
|
|||||||
const onChange = async (info: any) => {
|
const onChange = async (info: any) => {
|
||||||
if (!info.edit) {
|
if (!info.edit) {
|
||||||
await updateMysqlDescription({ id: info.id, description: info.description });
|
await updateMysqlDescription({ id: info.id, description: info.description });
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ const onCopyPassword = (row: Database.MysqlDBInfo) => {
|
|||||||
input.select();
|
input.select();
|
||||||
document.execCommand('Copy');
|
document.execCommand('Copy');
|
||||||
document.body.removeChild(input);
|
document.body.removeChild(input);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.copySuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.copySuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDelete = async (row: Database.MysqlDBInfo) => {
|
const onDelete = async (row: Database.MysqlDBInfo) => {
|
||||||
|
|||||||
@@ -54,10 +54,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { deleteCheckMysqlDB, updateMysqlAccess, updateMysqlPassword } from '@/api/modules/database';
|
import { deleteCheckMysqlDB, updateMysqlAccess, updateMysqlPassword } from '@/api/modules/database';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const changeVisiable = ref(false);
|
const changeVisiable = ref(false);
|
||||||
@@ -128,7 +129,7 @@ const submitChangeInfo = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
changeVisiable.value = false;
|
changeVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -143,7 +144,7 @@ const submitChangeInfo = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
changeVisiable.value = false;
|
changeVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -162,7 +163,7 @@ const onSubmit = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
emit('search');
|
emit('search');
|
||||||
changeVisiable.value = false;
|
changeVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -31,10 +31,11 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { updateMysqlAccess } from '@/api/modules/database';
|
import { updateMysqlAccess } from '@/api/modules/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ const onSubmit = async () => {
|
|||||||
await updateMysqlAccess(param)
|
await updateMysqlAccess(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
dialogVisiable.value = false;
|
dialogVisiable.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -28,11 +28,12 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { updateMysqlPassword } from '@/api/modules/database';
|
import { updateMysqlPassword } from '@/api/modules/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { GetAppPassword } from '@/api/modules/app';
|
import { GetAppPassword } from '@/api/modules/app';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ const onSubmit = async () => {
|
|||||||
await updateMysqlPassword(param)
|
await updateMysqlPassword(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
dialogVisiable.value = false;
|
dialogVisiable.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import ContainerLog from '@/components/container-log/index.vue';
|
import ContainerLog from '@/components/container-log/index.vue';
|
||||||
import Status from '@/views/database/mysql/setting/status/index.vue';
|
import Status from '@/views/database/mysql/setting/status/index.vue';
|
||||||
@@ -108,6 +108,7 @@ import { ChangePort, GetAppDefaultConfig } from '@/api/modules/app';
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -178,7 +179,7 @@ const onSubmitChangePort = async () => {
|
|||||||
await ChangePort(params)
|
await ChangePort(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -224,7 +225,7 @@ const onSubmitChangeConf = async () => {
|
|||||||
await updateMysqlConfByFile(param)
|
await updateMysqlConfByFile(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ import { Database } from '@/api/interface/database';
|
|||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { updateMysqlVariables } from '@/api/modules/database';
|
import { updateMysqlVariables } from '@/api/modules/database';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { dateFormatForName } from '@/utils/util';
|
import { dateFormatForName } from '@/utils/util';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
@@ -122,7 +122,7 @@ const onSave = async () => {
|
|||||||
await updateMysqlVariables(param)
|
await updateMysqlVariables(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -116,12 +116,13 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { Database } from '@/api/interface/database';
|
import { Database } from '@/api/interface/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { updateMysqlVariables } from '@/api/modules/database';
|
import { updateMysqlVariables } from '@/api/modules/database';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { planOptions } from './../helper';
|
import { planOptions } from './../helper';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -285,7 +286,7 @@ const onSaveVariables = async () => {
|
|||||||
await updateMysqlVariables(param)
|
await updateMysqlVariables(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -67,11 +67,12 @@ import { computeSize, dateFormatSimple } from '@/utils/util';
|
|||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { recoverByUpload } from '@/api/modules/database';
|
import { recoverByUpload } from '@/api/modules/database';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, UploadFile, UploadFiles, UploadInstance, UploadProps } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps } from 'element-plus';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { BatchDeleteFile, GetFilesList, UploadFileData } from '@/api/modules/files';
|
import { BatchDeleteFile, GetFilesList, UploadFileData } from '@/api/modules/files';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
const baseDir = ref();
|
const baseDir = ref();
|
||||||
@@ -120,7 +121,7 @@ const onRecover = async (row: File.File) => {
|
|||||||
fileName: row.name,
|
fileName: row.name,
|
||||||
};
|
};
|
||||||
await recoverByUpload(params);
|
await recoverByUpload(params);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploaderFiles = ref<UploadFiles>([]);
|
const uploaderFiles = ref<UploadFiles>([]);
|
||||||
@@ -133,10 +134,10 @@ const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
|
|||||||
rawFile.name.endsWith('.zip') ||
|
rawFile.name.endsWith('.zip') ||
|
||||||
rawFile.name.endsWith('.tgz')
|
rawFile.name.endsWith('.tgz')
|
||||||
) {
|
) {
|
||||||
ElMessage.error(i18n.global.t('database.unSupportType'));
|
MsgError(i18n.global.t('database.unSupportType'));
|
||||||
return false;
|
return false;
|
||||||
} else if (rawFile.size / 1024 / 1024 > 10) {
|
} else if (rawFile.size / 1024 / 1024 > 10) {
|
||||||
ElMessage.error(i18n.global.t('database.unSupportSize'));
|
MsgError(i18n.global.t('database.unSupportSize'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -160,7 +161,7 @@ const onSubmit = () => {
|
|||||||
}
|
}
|
||||||
formData.append('path', baseDir.value);
|
formData.append('path', baseDir.value);
|
||||||
UploadFileData(formData, {}).then(() => {
|
UploadFileData(formData, {}).then(() => {
|
||||||
ElMessage.success(i18n.global.t('file.uploadSuccess'));
|
MsgSuccess(i18n.global.t('file.uploadSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,10 +30,11 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { changeRedisPassword } from '@/api/modules/database';
|
import { changeRedisPassword } from '@/api/modules/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { GetAppPassword } from '@/api/modules/app';
|
import { GetAppPassword } from '@/api/modules/app';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ const onSubmit = async () => {
|
|||||||
await changeRedisPassword(param)
|
await changeRedisPassword(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
dialogVisiable.value = false;
|
dialogVisiable.value = false;
|
||||||
emit('checkExist');
|
emit('checkExist');
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
@@ -138,6 +138,7 @@ import i18n from '@/lang';
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { ChangePort, GetAppDefaultConfig } from '@/api/modules/app';
|
import { ChangePort, GetAppDefaultConfig } from '@/api/modules/app';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
|
|
||||||
@@ -235,7 +236,7 @@ const onChangePort = async (formEl: FormInstance | undefined) => {
|
|||||||
await ChangePort(params)
|
await ChangePort(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -266,7 +267,7 @@ const submtiForm = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loadform();
|
loadform();
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -298,7 +299,7 @@ const submtiFile = async () => {
|
|||||||
await updateRedisConfByFile(param)
|
await updateRedisConfByFile(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|||||||
@@ -127,11 +127,12 @@ import {
|
|||||||
} from '@/api/modules/database';
|
} from '@/api/modules/database';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { computeSize } from '@/utils/util';
|
import { computeSize } from '@/utils/util';
|
||||||
import { BatchDeleteFile } from '@/api/modules/files';
|
import { BatchDeleteFile } from '@/api/modules/files';
|
||||||
|
import { MsgInfo, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -201,7 +202,7 @@ const onBackup = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
loadBackupRecords();
|
loadBackupRecords();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -216,7 +217,7 @@ const onRecover = async () => {
|
|||||||
await recoverRedis(param)
|
await recoverRedis(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -269,7 +270,7 @@ const onSave = async (formEl: FormInstance | undefined, type: string) => {
|
|||||||
await updateRedisPersistenceConf(param)
|
await updateRedisPersistenceConf(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -280,7 +281,7 @@ const onSave = async (formEl: FormInstance | undefined, type: string) => {
|
|||||||
let itemSaves = [] as Array<string>;
|
let itemSaves = [] as Array<string>;
|
||||||
for (const item of form.saves) {
|
for (const item of form.saves) {
|
||||||
if (item.count === 0 || item.second === 0) {
|
if (item.count === 0 || item.second === 0) {
|
||||||
ElMessage.info(i18n.global.t('database.rdbInfo'));
|
MsgInfo(i18n.global.t('database.rdbInfo'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
itemSaves.push(item.second + '', item.count + '');
|
itemSaves.push(item.second + '', item.count + '');
|
||||||
@@ -291,7 +292,7 @@ const onSave = async (formEl: FormInstance | undefined, type: string) => {
|
|||||||
await updateRedisPersistenceConf(param)
|
await updateRedisPersistenceConf(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import { ref } from 'vue';
|
|||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { ChangeFileMode } from '@/api/modules/files';
|
import { ChangeFileMode } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import FileRole from '@/components/file-role/index.vue';
|
import FileRole from '@/components/file-role/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let open = ref(false);
|
let open = ref(false);
|
||||||
let form = ref<File.FileCreate>({ path: '', isDir: false, mode: 0o755 });
|
let form = ref<File.FileCreate>({ path: '', isDir: false, mode: 0o755 });
|
||||||
@@ -55,7 +55,7 @@ const submit = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
ChangeFileMode(form.value)
|
ChangeFileMode(form.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { SaveFileContent } from '@/api/modules/files';
|
import { SaveFileContent } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import * as monaco from 'monaco-editor';
|
import * as monaco from 'monaco-editor';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ const saveContent = (closePage: boolean) => {
|
|||||||
SaveFileContent(form.value).finally(() => {
|
SaveFileContent(form.value).finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
open.value = !closePage;
|
open.value = !closePage;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -53,12 +53,13 @@
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { computed, reactive, ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { ElMessage, FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { CompressExtention, CompressType } from '@/enums/files';
|
import { CompressExtention, CompressType } from '@/enums/files';
|
||||||
import { CompressFile } from '@/api/modules/files';
|
import { CompressFile } from '@/api/modules/files';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface CompressProps {
|
interface CompressProps {
|
||||||
files: Array<any>;
|
files: Array<any>;
|
||||||
@@ -111,7 +112,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
CompressFile(addItem as File.FileCompress)
|
CompressFile(addItem as File.FileCompress)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('file.compressSuccess'));
|
MsgSuccess(i18n.global.t('file.compressSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -60,12 +60,13 @@
|
|||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { ref, reactive, computed } from 'vue';
|
import { ref, reactive, computed } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { ElMessage, FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { CreateFile } from '@/api/modules/files';
|
import { CreateFile } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import FileRole from '@/components/file-role/index.vue';
|
import FileRole from '@/components/file-role/index.vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const fileForm = ref<FormInstance>();
|
const fileForm = ref<FormInstance>();
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
@@ -125,7 +126,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
CreateFile(addItem as File.FileCreate)
|
CreateFile(addItem as File.FileCreate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -43,12 +43,13 @@
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { ElMessage, FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { DeCompressFile } from '@/api/modules/files';
|
import { DeCompressFile } from '@/api/modules/files';
|
||||||
import { Mimetypes } from '@/global/mimetype';
|
import { Mimetypes } from '@/global/mimetype';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface CompressProps {
|
interface CompressProps {
|
||||||
files: Array<any>;
|
files: Array<any>;
|
||||||
@@ -99,7 +100,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
DeCompressFile(form.value)
|
DeCompressFile(form.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('file.deCompressSuccess'));
|
MsgSuccess(i18n.global.t('file.deCompressSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ import { GetFilesList, DeleteFile, GetFileContent, ComputeDirSize } from '@/api/
|
|||||||
import { computeSize, dateFormat, getIcon, getRandomStr } from '@/utils/util';
|
import { computeSize, dateFormat, getIcon, getRandomStr } from '@/utils/util';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import ComplexTable from '@/components/complex-table/index.vue';
|
import ComplexTable from '@/components/complex-table/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@@ -169,6 +168,7 @@ import Process from './process/index.vue';
|
|||||||
import Detail from './detail/index.vue';
|
import Detail from './detail/index.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { Back, Refresh } from '@element-plus/icons-vue';
|
import { Back, Refresh } from '@element-plus/icons-vue';
|
||||||
|
import { MsgWarning } from '@/utils/message';
|
||||||
|
|
||||||
interface FilePaths {
|
interface FilePaths {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -365,7 +365,7 @@ const openCompress = (items: File.File[]) => {
|
|||||||
|
|
||||||
const openDeCompress = (item: File.File) => {
|
const openDeCompress = (item: File.File) => {
|
||||||
if (Mimetypes.get(item.mimeType) == undefined) {
|
if (Mimetypes.get(item.mimeType) == undefined) {
|
||||||
ElMessage.warning(i18n.global.t('file.canNotDeCompress'));
|
MsgWarning(i18n.global.t('file.canNotDeCompress'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,10 +42,11 @@
|
|||||||
import { MoveFile } from '@/api/modules/files';
|
import { MoveFile } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { ref, reactive, computed } from 'vue';
|
import { ref, reactive, computed } from 'vue';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface MoveProps {
|
interface MoveProps {
|
||||||
oldPaths: Array<string>;
|
oldPaths: Array<string>;
|
||||||
@@ -98,7 +99,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
MoveFile(addForm)
|
MoveFile(addForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('file.moveStart'));
|
MsgSuccess(i18n.global.t('file.moveStart'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -31,10 +31,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { RenameRile } from '@/api/modules/files';
|
import { RenameRile } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { ElMessage, FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface RenameProps {
|
interface RenameProps {
|
||||||
path: string;
|
path: string;
|
||||||
@@ -81,7 +82,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
RenameRile(addItem as File.FileRename)
|
RenameRile(addItem as File.FileRename)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -29,10 +29,11 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { ElMessage, UploadFile, UploadFiles, UploadInstance } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance } from 'element-plus';
|
||||||
import { UploadFileData } from '@/api/modules/files';
|
import { UploadFileData } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface UploadProps {
|
interface UploadProps {
|
||||||
path: string;
|
path: string;
|
||||||
@@ -73,7 +74,7 @@ const submit = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
UploadFileData(formData, { onUploadProgress: onProcess })
|
UploadFileData(formData, { onUploadProgress: onProcess })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('file.uploadSuccess'));
|
MsgSuccess(i18n.global.t('file.uploadSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -42,10 +42,11 @@
|
|||||||
import { WgetFile } from '@/api/modules/files';
|
import { WgetFile } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface WgetProps {
|
interface WgetProps {
|
||||||
path: string;
|
path: string;
|
||||||
@@ -91,7 +92,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
WgetFile(addForm)
|
WgetFile(addForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('file.downloadStart'));
|
MsgSuccess(i18n.global.t('file.downloadStart'));
|
||||||
submitData.value = true;
|
submitData.value = true;
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ import { useDeleteData } from '@/hooks/use-delete-data';
|
|||||||
import type { ElForm } from 'element-plus';
|
import type { ElForm } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const data = ref();
|
const data = ref();
|
||||||
@@ -129,7 +129,7 @@ const submitAddCommand = (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
cmdVisiable.value = false;
|
cmdVisiable.value = false;
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -169,9 +169,9 @@ import {
|
|||||||
deleteGroup,
|
deleteGroup,
|
||||||
} from '@/api/modules/host';
|
} from '@/api/modules/host';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import type Node from 'element-plus/es/components/tree/src/model/node';
|
import type Node from 'element-plus/es/components/tree/src/model/node';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
type FormInstance = InstanceType<typeof ElForm>;
|
||||||
const hostInfoRef = ref<FormInstance>();
|
const hostInfoRef = ref<FormInstance>();
|
||||||
@@ -261,21 +261,21 @@ const submitAddHost = (formEl: FormInstance | undefined, ops: string) => {
|
|||||||
case 'create':
|
case 'create':
|
||||||
await addHost(hostInfo);
|
await addHost(hostInfo);
|
||||||
restHostForm();
|
restHostForm();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
loadHostTree();
|
loadHostTree();
|
||||||
break;
|
break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
await editHost(hostInfo);
|
await editHost(hostInfo);
|
||||||
restHostForm();
|
restHostForm();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
loadHostTree();
|
loadHostTree();
|
||||||
break;
|
break;
|
||||||
case 'testconn':
|
case 'testconn':
|
||||||
await testByInfo(hostInfo).then((res) => {
|
await testByInfo(hostInfo).then((res) => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
ElMessage.success(i18n.global.t('terminal.connTestOk'));
|
MsgSuccess(i18n.global.t('terminal.connTestOk'));
|
||||||
} else {
|
} else {
|
||||||
ElMessage.success(i18n.global.t('terminal.connTestFailed'));
|
MsgSuccess(i18n.global.t('terminal.connTestFailed'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -295,7 +295,7 @@ const onCreateGroup = async (name: string) => {
|
|||||||
groupOperation.value = '';
|
groupOperation.value = '';
|
||||||
groupInputShow.value = false;
|
groupInputShow.value = false;
|
||||||
}
|
}
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
groupOperation.value = '';
|
groupOperation.value = '';
|
||||||
groupInputShow.value = false;
|
groupInputShow.value = false;
|
||||||
loadHostTree();
|
loadHostTree();
|
||||||
@@ -309,7 +309,7 @@ const onUpdateGroup = async () => {
|
|||||||
}
|
}
|
||||||
let group = { id: currentGroupID.value, name: currentGroupValue.value, type: 'host' };
|
let group = { id: currentGroupID.value, name: currentGroupValue.value, type: 'host' };
|
||||||
await editGroup(group);
|
await editGroup(group);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
loadHostTree();
|
loadHostTree();
|
||||||
loadGroups();
|
loadGroups();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -68,13 +68,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { Host } from '@/api/interface/host';
|
import { Host } from '@/api/interface/host';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { addHost, testByInfo } from '@/api/modules/host';
|
import { addHost, testByInfo } from '@/api/modules/host';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const dialogVisiable = ref();
|
const dialogVisiable = ref();
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
type FormInstance = InstanceType<typeof ElForm>;
|
||||||
@@ -130,9 +131,9 @@ const submitAddHost = (formEl: FormInstance | undefined, ops: string) => {
|
|||||||
case 'testConn':
|
case 'testConn':
|
||||||
await testByInfo(hostInfo).then((res) => {
|
await testByInfo(hostInfo).then((res) => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
ElMessage.success(i18n.global.t('terminal.connTestOk'));
|
MsgSuccess(i18n.global.t('terminal.connTestOk'));
|
||||||
} else {
|
} else {
|
||||||
ElMessage.success(i18n.global.t('terminal.connTestFailed'));
|
MsgSuccess(i18n.global.t('terminal.connTestFailed'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ import { dateFormat } from '@/utils/util';
|
|||||||
import { cleanLogs, getLoginLogs } from '@/api/modules/log';
|
import { cleanLogs, getLoginLogs } from '@/api/modules/log';
|
||||||
import { onMounted, reactive, ref } from '@vue/runtime-core';
|
import { onMounted, reactive, ref } from '@vue/runtime-core';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const data = ref();
|
const data = ref();
|
||||||
@@ -116,7 +116,7 @@ const onClean = async () => {
|
|||||||
const onSubmitClean = async () => {
|
const onSubmitClean = async () => {
|
||||||
await cleanLogs({ logType: 'login' });
|
await cleanLogs({ logType: 'login' });
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ import LayoutContent from '@/layout/layout-content.vue';
|
|||||||
import { cleanLogs, getOperationLogs } from '@/api/modules/log';
|
import { cleanLogs, getOperationLogs } from '@/api/modules/log';
|
||||||
import { onMounted, reactive, ref } from '@vue/runtime-core';
|
import { onMounted, reactive, ref } from '@vue/runtime-core';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const data = ref();
|
const data = ref();
|
||||||
@@ -142,7 +142,7 @@ const onClean = async () => {
|
|||||||
const onSubmitClean = async () => {
|
const onSubmitClean = async () => {
|
||||||
await cleanLogs({ logType: 'operation' });
|
await cleanLogs({ logType: 'operation' });
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -164,12 +164,12 @@
|
|||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import type { ElForm } from 'element-plus';
|
import type { ElForm } from 'element-plus';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { loginApi, getCaptcha, mfaLoginApi, checkIsFirst, initUser } from '@/api/modules/auth';
|
import { loginApi, getCaptcha, mfaLoginApi, checkIsFirst, initUser } from '@/api/modules/auth';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { MenuStore } from '@/store/modules/menu';
|
import { MenuStore } from '@/store/modules/menu';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
const menuStore = MenuStore();
|
const menuStore = MenuStore();
|
||||||
@@ -232,7 +232,7 @@ const register = (formEl: FormInstance | undefined) => {
|
|||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
await initUser(registerForm);
|
await initUser(registerForm);
|
||||||
checkStatus();
|
checkStatus();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ const login = (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
globalStore.setLogStatus(true);
|
globalStore.setLogStatus(true);
|
||||||
menuStore.setMenuList([]);
|
menuStore.setMenuList([]);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.loginSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.loginSuccess'));
|
||||||
router.push({ name: 'home' });
|
router.push({ name: 'home' });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loginVerify();
|
loginVerify();
|
||||||
@@ -287,7 +287,7 @@ const mfaLogin = async () => {
|
|||||||
await mfaLoginApi(mfaLoginForm);
|
await mfaLoginApi(mfaLoginForm);
|
||||||
globalStore.setLogStatus(true);
|
globalStore.setLogStatus(true);
|
||||||
menuStore.setMenuList([]);
|
menuStore.setMenuList([]);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.loginSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.loginSuccess'));
|
||||||
router.push({ name: 'home' });
|
router.push({ name: 'home' });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -66,9 +66,10 @@ import { getSettingInfo, loadUpgradeInfo, upgrade } from '@/api/modules/setting'
|
|||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import MdEditor from 'md-editor-v3';
|
import MdEditor from 'md-editor-v3';
|
||||||
import 'md-editor-v3/lib/style.css';
|
import 'md-editor-v3/lib/style.css';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgInfo, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const version = ref();
|
const version = ref();
|
||||||
const upgradeInfo = ref();
|
const upgradeInfo = ref();
|
||||||
@@ -104,7 +105,7 @@ const onLoadUpgradeInfo = async () => {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (!res.data) {
|
if (!res.data) {
|
||||||
ElMessage.info(i18n.global.t('setting.noUpgrade'));
|
MsgInfo(i18n.global.t('setting.noUpgrade'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
upgradeInfo.value = res.data;
|
upgradeInfo.value = res.data;
|
||||||
@@ -125,7 +126,7 @@ const onUpgrade = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -132,11 +132,12 @@ import { ref } from 'vue';
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { Backup } from '@/api/interface/backup';
|
import { Backup } from '@/api/interface/backup';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { addBackup, editBackup, listBucket } from '@/api/modules/setting';
|
import { addBackup, editBackup, listBucket } from '@/api/modules/setting';
|
||||||
import { deepCopy } from '@/utils/util';
|
import { deepCopy } from '@/utils/util';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
type FormInstance = InstanceType<typeof ElForm>;
|
||||||
@@ -222,7 +223,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
await editBackup(dialogData.value.rowData);
|
await editBackup(dialogData.value.rowData);
|
||||||
}
|
}
|
||||||
|
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
emit('search');
|
emit('search');
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -57,10 +57,11 @@
|
|||||||
import { ref, onMounted, reactive } from 'vue';
|
import { ref, onMounted, reactive } from 'vue';
|
||||||
import { Setting } from '@/api/interface/setting';
|
import { Setting } from '@/api/interface/setting';
|
||||||
import { getSettingInfo, handleExpired } from '@/api/modules/setting';
|
import { getSettingInfo, handleExpired } from '@/api/modules/setting';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
let settingForm = reactive<Setting.SettingInfo>({
|
let settingForm = reactive<Setting.SettingInfo>({
|
||||||
userName: '',
|
userName: '',
|
||||||
password: '',
|
password: '',
|
||||||
@@ -119,11 +120,11 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => {
|
|||||||
let password =
|
let password =
|
||||||
settingForm.complexityVerification === 'disable' ? passForm.newPassword : passForm.newPasswordComplexity;
|
settingForm.complexityVerification === 'disable' ? passForm.newPassword : passForm.newPasswordComplexity;
|
||||||
if (password === passForm.oldPassword) {
|
if (password === passForm.oldPassword) {
|
||||||
ElMessage.error(i18n.global.t('setting.duplicatePassword'));
|
MsgError(i18n.global.t('setting.duplicatePassword'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await handleExpired({ oldPassword: passForm.oldPassword, newPassword: password });
|
await handleExpired({ oldPassword: passForm.oldPassword, newPassword: password });
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
router.push({ name: 'home' });
|
router.push({ name: 'home' });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,12 +47,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import { cleanMonitors, getSettingInfo, updateSetting } from '@/api/modules/setting';
|
import { cleanMonitors, getSettingInfo, updateSetting } from '@/api/modules/setting';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
@@ -89,7 +90,7 @@ const onSave = async (formEl: FormInstance | undefined, key: string, val: any) =
|
|||||||
await updateSetting(param)
|
await updateSetting(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -101,13 +101,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, onMounted, computed } from 'vue';
|
import { ref, reactive, onMounted, computed } from 'vue';
|
||||||
import { ElMessage, ElForm } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import { syncTime, getSettingInfo, updateSetting } from '@/api/modules/setting';
|
import { syncTime, getSettingInfo, updateSetting } from '@/api/modules/setting';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useTheme } from '@/hooks/use-theme';
|
import { useTheme } from '@/hooks/use-theme';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
@@ -166,7 +167,7 @@ const onSave = async (formEl: FormInstance | undefined, key: string, val: any) =
|
|||||||
break;
|
break;
|
||||||
case 'SessionTimeout':
|
case 'SessionTimeout':
|
||||||
if (Number(val) < 300) {
|
if (Number(val) < 300) {
|
||||||
ElMessage.error(i18n.t('setting.sessionTimeoutError'));
|
MsgError(i18n.t('setting.sessionTimeoutError'));
|
||||||
search();
|
search();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -186,7 +187,7 @@ const onSave = async (formEl: FormInstance | undefined, key: string, val: any) =
|
|||||||
await updateSetting(param)
|
await updateSetting(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -223,7 +224,7 @@ const onSyncTime = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
form.localTime = res.data;
|
form.localTime = res.data;
|
||||||
countdown();
|
countdown();
|
||||||
ElMessage.success(i18n.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { ElMessage, ElForm, ElMessageBox } from 'element-plus';
|
import { ElForm, ElMessageBox } from 'element-plus';
|
||||||
import { Setting } from '@/api/interface/setting';
|
import { Setting } from '@/api/interface/setting';
|
||||||
import LayoutContent from '@/layout/layout-content.vue';
|
import LayoutContent from '@/layout/layout-content.vue';
|
||||||
import { updatePassword, updateSetting, getMFA, bindMFA, getSettingInfo, updatePort } from '@/api/modules/setting';
|
import { updatePassword, updateSetting, getMFA, bindMFA, getSettingInfo, updatePort } from '@/api/modules/setting';
|
||||||
@@ -201,6 +201,7 @@ import { Rules } from '@/global/form-rules';
|
|||||||
import { dateFormatSimple } from '@/utils/util';
|
import { dateFormatSimple } from '@/utils/util';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@@ -277,7 +278,7 @@ const onSave = async (formEl: FormInstance | undefined, key: string, val: any) =
|
|||||||
await updateSetting(param)
|
await updateSetting(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -317,7 +318,7 @@ const onSavePort = async (formEl: FormInstance | undefined, key: string, val: an
|
|||||||
await updatePort(param)
|
await updatePort(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
let href = window.location.href;
|
let href = window.location.href;
|
||||||
let ip = href.split('//')[1].split(':')[0];
|
let ip = href.split('//')[1].split(':')[0];
|
||||||
window.open(`${href.split('//')[0]}//${ip}:${val}/1panel/login`, '_self');
|
window.open(`${href.split('//')[0]}//${ip}:${val}/1panel/login`, '_self');
|
||||||
@@ -343,7 +344,7 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => {
|
|||||||
let password =
|
let password =
|
||||||
form.complexityVerification === 'disable' ? passForm.newPassword : passForm.newPasswordComplexity;
|
form.complexityVerification === 'disable' ? passForm.newPassword : passForm.newPasswordComplexity;
|
||||||
if (password === passForm.oldPassword) {
|
if (password === passForm.oldPassword) {
|
||||||
ElMessage.error(i18n.global.t('setting.duplicatePassword'));
|
MsgError(i18n.global.t('setting.duplicatePassword'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dialogLoading.value = true;
|
dialogLoading.value = true;
|
||||||
@@ -351,7 +352,7 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
dialogLoading.value = false;
|
dialogLoading.value = false;
|
||||||
passwordVisiable.value = false;
|
passwordVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
router.push({ name: 'login', params: { code: '' } });
|
router.push({ name: 'login', params: { code: '' } });
|
||||||
globalStore.setLogStatus(false);
|
globalStore.setLogStatus(false);
|
||||||
})
|
})
|
||||||
@@ -375,7 +376,7 @@ const handleMFA = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -389,7 +390,7 @@ const onBind = async () => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
isMFAShow.value = false;
|
isMFAShow.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -44,13 +44,14 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { snapshotImport } from '@/api/modules/setting';
|
import { snapshotImport } from '@/api/modules/setting';
|
||||||
import { getBackupList, getFilesFromBackup } from '@/api/modules/setting';
|
import { getBackupList, getFilesFromBackup } from '@/api/modules/setting';
|
||||||
import { loadBackupName } from '../../helper';
|
import { loadBackupName } from '../../helper';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
@@ -92,7 +93,7 @@ const submitImport = async (formEl: FormInstance | undefined) => {
|
|||||||
emit('search');
|
emit('search');
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ import { snapshotCreate, searchSnapshotPage, snapshotDelete, updateSnapshotDescr
|
|||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { dateFormat } from '@/utils/util';
|
import { dateFormat } from '@/utils/util';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Setting } from '@/api/interface/setting';
|
import { Setting } from '@/api/interface/setting';
|
||||||
@@ -158,6 +158,7 @@ import RecoverStatus from '@/views/setting/snapshot/status/index.vue';
|
|||||||
import SnapshotImport from '@/views/setting/snapshot/import/index.vue';
|
import SnapshotImport from '@/views/setting/snapshot/import/index.vue';
|
||||||
import { getBackupList } from '@/api/modules/setting';
|
import { getBackupList } from '@/api/modules/setting';
|
||||||
import { loadBackupName } from '../helper';
|
import { loadBackupName } from '../helper';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const data = ref();
|
const data = ref();
|
||||||
@@ -202,7 +203,7 @@ const handleClose = () => {
|
|||||||
const onChange = async (info: any) => {
|
const onChange = async (info: any) => {
|
||||||
if (!info.edit) {
|
if (!info.edit) {
|
||||||
await updateSnapshotDescription({ id: info.id, description: info.description });
|
await updateSnapshotDescription({ id: info.id, description: info.description });
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -216,7 +217,7 @@ const submitAddSnapshot = (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
search();
|
search();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -179,10 +179,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { Setting } from '@/api/interface/setting';
|
import { Setting } from '@/api/interface/setting';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import DrawerHeader from '@/components/drawer-header/index.vue';
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { snapshotRecover, snapshotRollback } from '@/api/modules/setting';
|
import { snapshotRecover, snapshotRollback } from '@/api/modules/setting';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
const snapInfo = ref();
|
const snapInfo = ref();
|
||||||
@@ -212,7 +213,7 @@ const doRecover = async (isNew: boolean) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
dialogVisiable.value = false;
|
dialogVisiable.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -242,7 +243,7 @@ const rollbackSnapshot = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
dialogVisiable.value = false;
|
dialogVisiable.value = false;
|
||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -27,11 +27,12 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { CreateAcmeAccount } from '@/api/modules/website';
|
import { CreateAcmeAccount } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let open = ref();
|
let open = ref();
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
@@ -67,7 +68,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
|
|
||||||
CreateAcmeAccount(account.value)
|
CreateAcmeAccount(account.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -97,8 +97,9 @@ import { Website } from '@/api/interface/website';
|
|||||||
import { CreateSSL, GetDnsResolve, SearchAcmeAccount, SearchDnsAccount } from '@/api/modules/website';
|
import { CreateSSL, GetDnsResolve, SearchAcmeAccount, SearchDnsAccount } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { computed, reactive, ref } from 'vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -213,7 +214,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
CreateSSL(ssl.value)
|
CreateSSL(ssl.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ import DrawerHeader from '@/components/drawer-header/index.vue';
|
|||||||
import { GetSSL } from '@/api/modules/website';
|
import { GetSSL } from '@/api/modules/website';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { dateFormatSimple, getProvider } from '@/utils/util';
|
import { dateFormatSimple, getProvider } from '@/utils/util';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import useClipboard from 'vue-clipboard3';
|
import useClipboard from 'vue-clipboard3';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
const { toClipboard } = useClipboard();
|
const { toClipboard } = useClipboard();
|
||||||
|
|
||||||
let open = ref(false);
|
let open = ref(false);
|
||||||
@@ -96,9 +96,9 @@ const get = async () => {
|
|||||||
const copyText = async (msg) => {
|
const copyText = async (msg) => {
|
||||||
try {
|
try {
|
||||||
await toClipboard(msg);
|
await toClipboard(msg);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.copySuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.copySuccess'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ElMessage.error(i18n.global.t('commons.msg.copyfailed'));
|
MsgError(i18n.global.t('commons.msg.copyfailed'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,8 @@
|
|||||||
import { CreateDnsAccount, UpdateDnsAccount } from '@/api/modules/website';
|
import { CreateDnsAccount, UpdateDnsAccount } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
interface AccountProps {
|
interface AccountProps {
|
||||||
@@ -150,7 +151,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
if (accountData.value.mode === 'edit') {
|
if (accountData.value.mode === 'edit') {
|
||||||
UpdateDnsAccount(account.value)
|
UpdateDnsAccount(account.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -159,7 +160,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
} else {
|
} else {
|
||||||
CreateDnsAccount(account.value)
|
CreateDnsAccount(account.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
import { Website } from '@/api/interface/Website';
|
import { Website } from '@/api/interface/Website';
|
||||||
import { RenewSSL } from '@/api/modules/website';
|
import { RenewSSL } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
|
||||||
interface RenewProps {
|
interface RenewProps {
|
||||||
@@ -68,7 +68,7 @@ const submit = () => {
|
|||||||
RenewSSL(renewReq)
|
RenewSSL(renewReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
ElMessage.success(i18n.global.t('ssl.renewSuccess'));
|
MsgSuccess(i18n.global.t('ssl.renewSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ import { reactive, ref } from 'vue';
|
|||||||
import { dateFormat } from '@/utils/util';
|
import { dateFormat } from '@/utils/util';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/setting';
|
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/setting';
|
||||||
import { Backup } from '@/api/interface/backup';
|
import { Backup } from '@/api/interface/backup';
|
||||||
import { BackupWebsite, RecoverWebsite } from '@/api/modules/website';
|
import { BackupWebsite, RecoverWebsite } from '@/api/modules/website';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -99,7 +99,7 @@ const onRecover = async (row: Backup.RecordInfo) => {
|
|||||||
await RecoverWebsite(params)
|
await RecoverWebsite(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -111,7 +111,7 @@ const onBackup = async () => {
|
|||||||
await BackupWebsite({ id: websiteID.value })
|
await BackupWebsite({ id: websiteID.value })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -21,9 +21,10 @@
|
|||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { GetNginxConfig, UpdateNginxConfig } from '@/api/modules/website';
|
import { GetNginxConfig, UpdateNginxConfig } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -60,7 +61,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
UpdateNginxConfig(req.value)
|
UpdateNginxConfig(req.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search(req.value);
|
search(req.value);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ import DrawerHeader from '@/components/drawer-header/index.vue';
|
|||||||
import { CreateDomain } from '@/api/modules/website';
|
import { CreateDomain } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const domainForm = ref<FormInstance>();
|
const domainForm = ref<FormInstance>();
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
CreateDomain(domain.value)
|
CreateDomain(domain.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -119,11 +119,12 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { GetHTTPSConfig, ListSSL, UpdateHTTPSConfig } from '@/api/modules/website';
|
import { GetHTTPSConfig, ListSSL, UpdateHTTPSConfig } from '@/api/modules/website';
|
||||||
import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
|
import { ElMessageBox, FormInstance } from 'element-plus';
|
||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { dateFormatSimple, getProvider } from '@/utils/util';
|
import { dateFormatSimple, getProvider } from '@/utils/util';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -214,7 +215,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
form.websiteId = id.value;
|
form.websiteId = id.value;
|
||||||
UpdateHTTPSConfig(form)
|
UpdateHTTPSConfig(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
get();
|
get();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -244,7 +245,7 @@ const changeEnable = (enable: boolean) => {
|
|||||||
form.websiteId = id.value;
|
form.websiteId = id.value;
|
||||||
UpdateHTTPSConfig(form).then(() => {
|
UpdateHTTPSConfig(form).then(() => {
|
||||||
done();
|
done();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
get();
|
get();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,9 +47,10 @@
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { GetNginxConfig, UpdateNginxConfig } from '@/api/modules/website';
|
import { GetNginxConfig, UpdateNginxConfig } from '@/api/modules/website';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -150,7 +151,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
UpdateNginxConfig(req)
|
UpdateNginxConfig(req)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search(req);
|
search(req);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -41,8 +41,9 @@ import { GetWebsite, UpdateWebsite } from '@/api/modules/website';
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import { ListGroups } from '@/api/modules/website';
|
import { ListGroups } from '@/api/modules/website';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const websiteForm = ref<FormInstance>();
|
const websiteForm = ref<FormInstance>();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -76,7 +77,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
UpdateWebsite(form)
|
UpdateWebsite(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ import { oneDark } from '@codemirror/theme-one-dark';
|
|||||||
import { GetWebsiteNginx, UpdateNginxFile } from '@/api/modules/website';
|
import { GetWebsiteNginx, UpdateNginxFile } from '@/api/modules/website';
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { StreamLanguage } from '@codemirror/language';
|
import { StreamLanguage } from '@codemirror/language';
|
||||||
import { nginx } from '@codemirror/legacy-modes/mode/nginx';
|
import { nginx } from '@codemirror/legacy-modes/mode/nginx';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const extensions = [StreamLanguage.define(nginx), oneDark];
|
const extensions = [StreamLanguage.define(nginx), oneDark];
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ const submit = () => {
|
|||||||
content: content.value,
|
content: content.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ import { SaveFileContent } from '@/api/modules/files';
|
|||||||
import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website';
|
import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
import { FormInstance } from 'element-plus';
|
||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -115,7 +116,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
SaveFileContent(fileUpdate)
|
SaveFileContent(fileUpdate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website';
|
|||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import ComplexTable from '@/components/complex-table/index.vue';
|
import ComplexTable from '@/components/complex-table/index.vue';
|
||||||
import { SaveFileContent } from '@/api/modules/files';
|
import { SaveFileContent } from '@/api/modules/files';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -112,7 +112,7 @@ const submit = async (extArray: string[]) => {
|
|||||||
SaveFileContent(fileUpdate)
|
SaveFileContent(fileUpdate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
exts.value = '';
|
exts.value = '';
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
get();
|
get();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website';
|
|||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import ComplexTable from '@/components/complex-table/index.vue';
|
import ComplexTable from '@/components/complex-table/index.vue';
|
||||||
import { SaveFileContent } from '@/api/modules/files';
|
import { SaveFileContent } from '@/api/modules/files';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { checkIp } from '@/utils/util';
|
import { checkIp } from '@/utils/util';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -117,7 +117,7 @@ const openCreate = () => {
|
|||||||
}
|
}
|
||||||
for (const id in ipArray) {
|
for (const id in ipArray) {
|
||||||
if (checkIp(ipArray[id])) {
|
if (checkIp(ipArray[id])) {
|
||||||
ElMessage.error(i18n.global.t('commons.rule.ipErr', [ipArray[id]]));
|
MsgError(i18n.global.t('commons.rule.ipErr', [ipArray[id]]));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ const submit = async (ipList: string[]) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
ips.value = '';
|
ips.value = '';
|
||||||
get();
|
get();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website';
|
|||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import ComplexTable from '@/components/complex-table/index.vue';
|
import ComplexTable from '@/components/complex-table/index.vue';
|
||||||
import { SaveFileContent } from '@/api/modules/files';
|
import { SaveFileContent } from '@/api/modules/files';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -138,7 +138,7 @@ const submit = async (addArray: string[]) => {
|
|||||||
SaveFileContent(fileUpdate)
|
SaveFileContent(fileUpdate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
add.value = '';
|
add.value = '';
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
get();
|
get();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -176,10 +176,11 @@ import { GetApp, GetAppDetail, SearchApp, GetAppInstalled } from '@/api/modules/
|
|||||||
import { CreateWebsite, ListGroups, PreCheck } from '@/api/modules/website';
|
import { CreateWebsite, ListGroups, PreCheck } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, FormInstance, ElMessage } from 'element-plus';
|
import { ElForm, FormInstance } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import Params from '@/views/app-store/detail/params/index.vue';
|
import Params from '@/views/app-store/detail/params/index.vue';
|
||||||
import Check from '../check/index.vue';
|
import Check from '../check/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const buttonList = [
|
const buttonList = [
|
||||||
{
|
{
|
||||||
@@ -338,7 +339,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
} else {
|
} else {
|
||||||
CreateWebsite(website.value)
|
CreateWebsite(website.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ import DrawerHeader from '@/components/drawer-header/index.vue';
|
|||||||
import { Website } from '@/api/interface/Website';
|
import { Website } from '@/api/interface/Website';
|
||||||
import { ChangeDefaultServer, ListWebsites } from '@/api/modules/website';
|
import { ChangeDefaultServer, ListWebsites } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let open = ref(false);
|
let open = ref(false);
|
||||||
let websites = ref<any>();
|
let websites = ref<any>();
|
||||||
@@ -71,7 +71,7 @@ const get = async () => {
|
|||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
ChangeDefaultServer({ id: defaultId.value }).then(() => {
|
ChangeDefaultServer({ id: defaultId.value }).then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,9 +46,10 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { DeleteWebsite } from '@/api/modules/website';
|
import { DeleteWebsite } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
let key = 1;
|
let key = 1;
|
||||||
let open = ref(false);
|
let open = ref(false);
|
||||||
@@ -91,7 +92,7 @@ const submit = () => {
|
|||||||
DeleteWebsite(deleteReq.value)
|
DeleteWebsite(deleteReq.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
ElMessage.success(i18n.global.t('commons.msg.deleteSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.deleteSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ import { ref } from 'vue';
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import ComplexTable from '@/components/complex-table/index.vue';
|
import ComplexTable from '@/components/complex-table/index.vue';
|
||||||
import { ListGroups, CreateGroup, DeleteGroup, UpdateGroup } from '@/api/modules/website';
|
import { ListGroups, CreateGroup, DeleteGroup, UpdateGroup } from '@/api/modules/website';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import Header from '@/components/drawer-header/index.vue';
|
import Header from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
interface groupData {
|
interface groupData {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -95,12 +95,12 @@ const saveGroup = (create: groupData, isDefault: boolean) => {
|
|||||||
}
|
}
|
||||||
if (create.id == 0) {
|
if (create.id == 0) {
|
||||||
CreateGroup(group).then(() => {
|
CreateGroup(group).then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
UpdateGroup(group).then(() => {
|
UpdateGroup(group).then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ const deleteGroup = (index: number) => {
|
|||||||
if (group.id > 0) {
|
if (group.id > 0) {
|
||||||
DeleteGroup({ id: group.id }).then(() => {
|
DeleteGroup({ id: group.id }).then(() => {
|
||||||
data.value.splice(index, 1);
|
data.value.splice(index, 1);
|
||||||
ElMessage.success(i18n.global.t('commons.msg.deleteSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.deleteSuccess'));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
data.value.splice(index, 1);
|
data.value.splice(index, 1);
|
||||||
|
|||||||
@@ -163,8 +163,9 @@ import NginxConfig from './nginx/index.vue';
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { dateFormatSimple } from '@/utils/util';
|
import { dateFormatSimple } from '@/utils/util';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
@@ -292,7 +293,7 @@ const submitDate = (row: any) => {
|
|||||||
|
|
||||||
UpdateWebsite(req).then(() => {
|
UpdateWebsite(req).then(() => {
|
||||||
row.change = true;
|
row.change = true;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -366,7 +367,7 @@ const opWebsite = (op: string, id: number) => {
|
|||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
await OpWebsite({ id: id, operate: op });
|
await OpWebsite({ id: id, operate: op });
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ import { Nginx } from '@/api/interface/nginx';
|
|||||||
import { GetNginxConfigByScope, UpdateNginxConfigByScope } from '@/api/modules/nginx';
|
import { GetNginxConfigByScope, UpdateNginxConfigByScope } from '@/api/modules/nginx';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, FormInstance } from 'element-plus';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
import { FormInstance } from 'element-plus';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
let req = ref<Nginx.NginxScopeReq>({
|
let req = ref<Nginx.NginxScopeReq>({
|
||||||
@@ -125,7 +126,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
updateReq.value.params = params;
|
updateReq.value.params = params;
|
||||||
UpdateNginxConfigByScope(updateReq.value)
|
UpdateNginxConfigByScope(updateReq.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
getParams();
|
getParams();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ import { Codemirror } from 'vue-codemirror';
|
|||||||
import { StreamLanguage } from '@codemirror/language';
|
import { StreamLanguage } from '@codemirror/language';
|
||||||
import { nginx } from '@codemirror/legacy-modes/mode/nginx';
|
import { nginx } from '@codemirror/legacy-modes/mode/nginx';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { GetAppDefaultConfig } from '@/api/modules/app';
|
import { GetAppDefaultConfig } from '@/api/modules/app';
|
||||||
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const extensions = [StreamLanguage.define(nginx), oneDark];
|
const extensions = [StreamLanguage.define(nginx), oneDark];
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ const submit = () => {
|
|||||||
backup: useOld.value,
|
backup: useOld.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
getNginx();
|
getNginx();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
@@ -67,12 +67,13 @@ import { reactive, ref } from 'vue';
|
|||||||
import { computeSize, dateFormatSimple } from '@/utils/util';
|
import { computeSize, dateFormatSimple } from '@/utils/util';
|
||||||
import { useDeleteData } from '@/hooks/use-delete-data';
|
import { useDeleteData } from '@/hooks/use-delete-data';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessage, UploadFile, UploadFiles, UploadInstance, UploadProps } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps } from 'element-plus';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { BatchDeleteFile, GetFilesList, UploadFileData } from '@/api/modules/files';
|
import { BatchDeleteFile, GetFilesList, UploadFileData } from '@/api/modules/files';
|
||||||
import { RecoverWebsiteByUpload } from '@/api/modules/website';
|
import { RecoverWebsiteByUpload } from '@/api/modules/website';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
import Header from '@/components/drawer-header/index.vue';
|
import Header from '@/components/drawer-header/index.vue';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
const baseDir = ref();
|
const baseDir = ref();
|
||||||
@@ -125,7 +126,7 @@ const onRecover = async (row: File.File) => {
|
|||||||
await RecoverWebsiteByUpload(params)
|
await RecoverWebsiteByUpload(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -137,7 +138,7 @@ const uploadRef = ref<UploadInstance>();
|
|||||||
|
|
||||||
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
|
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
|
||||||
if (rawFile.name.endsWith('.tar.gz')) {
|
if (rawFile.name.endsWith('.tar.gz')) {
|
||||||
ElMessage.error(i18n.global.t('database.unSupportType'));
|
MsgError(i18n.global.t('database.unSupportType'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -165,7 +166,7 @@ const onSubmit = () => {
|
|||||||
UploadFileData(formData, {})
|
UploadFileData(formData, {})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElMessage.success(i18n.global.t('file.uploadSuccess'));
|
MsgSuccess(i18n.global.t('file.uploadSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user