feat: core 增加 xpack 节点管理

This commit is contained in:
ssongliu
2024-07-25 14:43:41 +08:00
parent cabca70ee5
commit fafa042ee9
36 changed files with 411 additions and 116 deletions
+7 -7
View File
@@ -2,29 +2,29 @@ import { Login } from '@/api/interface/auth';
import http from '@/api';
export const loginApi = (params: Login.ReqLoginForm) => {
return http.post<Login.ResLogin>(`/auth/login`, params);
return http.post<Login.ResLogin>(`/core/auth/login`, params);
};
export const mfaLoginApi = (params: Login.MFALoginForm) => {
return http.post<Login.ResLogin>(`/auth/mfalogin`, params);
return http.post<Login.ResLogin>(`/core/auth/mfalogin`, params);
};
export const getCaptcha = () => {
return http.get<Login.ResCaptcha>(`/auth/captcha`);
return http.get<Login.ResCaptcha>(`/core/auth/captcha`);
};
export const logOutApi = () => {
return http.post<any>(`/auth/logout`);
return http.post<any>(`/core/auth/logout`);
};
export const checkIsSafety = (code: string) => {
return http.get<string>(`/auth/issafety?code=${code}`);
return http.get<string>(`/core/auth/issafety?code=${code}`);
};
export const checkIsDemo = () => {
return http.get<boolean>('/auth/demo');
return http.get<boolean>('/core/auth/demo');
};
export const getLanguage = () => {
return http.get<string>(`/auth/language`);
return http.get<string>(`/core/auth/language`);
};
+1 -1
View File
@@ -26,7 +26,7 @@ export const unbindLicense = () => {
};
export const getSettingInfo = () => {
return http.post<Setting.SettingInfo>(`/settings/search`);
return http.post<Setting.SettingInfo>(`/core/settings/search`);
};
export const getSystemAvailable = () => {
return http.get(`/settings/search/available`);
+2 -2
View File
@@ -18,10 +18,10 @@
<template #default="{ row }">
<div v-if="!row.edit">
<span v-if="row.name === 'default'">
{{ $t('website.default') }}
{{ $t('commons.table.default') }}
</span>
<span v-if="row.name !== 'default'">{{ row.name }}</span>
<span v-if="row.isDefault">({{ $t('website.default') }})</span>
<span v-if="row.isDefault">({{ $t('commons.table.default') }})</span>
</div>
<el-form @submit.prevent ref="groupForm" v-if="row.edit" :model="row">
+1 -2
View File
@@ -88,6 +88,7 @@ const message = {
statusWaiting: 'Waiting...',
records: 'Records',
group: 'Group',
default: 'Default',
createdAt: 'Creation Time',
publishedAt: 'Publish Time',
date: 'Date',
@@ -1928,7 +1929,6 @@ const message = {
nginxPer: 'Performance Tuning',
neverExpire: 'Never Expire',
setDefault: 'Set as default',
default: 'Default',
deleteHelper: 'Related application status is abnormal, please check',
toApp: 'Go to the installed list',
cycle: 'Cycle',
@@ -2334,7 +2334,6 @@ const message = {
ustc: 'University of Science and Technology of China',
netease: 'Netease',
aliyun: 'Alibaba Cloud',
default: 'default',
tsinghua: 'Tsinghua University',
xtomhk: 'XTOM Mirror Station (Hong Kong)',
xtom: 'XTOM Mirror Station (Global)',
+1 -2
View File
@@ -87,6 +87,7 @@ const message = {
statusWaiting: '進行中...',
records: '任務輸出',
group: '分組',
default: '默認',
createdAt: '創建時間',
publishedAt: '發布時間',
date: '時間',
@@ -1794,7 +1795,6 @@ const message = {
nginxPer: '性能調整',
neverExpire: '永不過期',
setDefault: '設為默認',
default: '默認',
deleteHelper: '相關應用狀態不正常,請檢查',
toApp: '去已安裝列表',
cycle: '周期',
@@ -2167,7 +2167,6 @@ const message = {
ustc: '中國科學技術大學',
netease: '網易',
aliyun: '阿里雲',
default: '默認',
tsinghua: '清華大學',
xtomhk: 'XTOM 鏡像站香港',
xtom: 'XTOM 鏡像站全球',
+1 -2
View File
@@ -87,6 +87,7 @@ const message = {
statusWaiting: '进行中...',
records: '任务输出',
group: '分组',
default: '默认',
createdAt: '创建时间',
publishedAt: '发布时间',
date: '时间',
@@ -1796,7 +1797,6 @@ const message = {
nginxPer: '性能调整',
neverExpire: '永不过期',
setDefault: '设为默认',
default: '默认',
deleteHelper: '相关应用状态不正常,请检查',
toApp: '去已安装列表',
cycle: '周期',
@@ -2170,7 +2170,6 @@ const message = {
ustc: '中国科学技术大学',
netease: '网易',
aliyun: '阿里云',
default: '默认',
tsinghua: '清华大学',
xtomhk: 'XTOM 镜像站香港',
xtom: 'XTOM 镜像站全球',
@@ -35,7 +35,7 @@
<el-table-column :label="$t('commons.table.port')" prop="port" />
<el-table-column :label="$t('commons.table.group')" show-overflow-tooltip prop="groupBelong">
<template #default="{ row }">
<span v-if="row.groupBelong === 'default'">{{ $t('website.default') }}</span>
<span v-if="row.groupBelong === 'default'">{{ $t('commons.table.default') }}</span>
<span v-else>{{ row.groupBelong }}</span>
</template>
</el-table-column>
@@ -100,7 +100,7 @@
>
<template #default="{ node, data }">
<span class="custom-tree-node">
<span v-if="node.label === 'default'">{{ $t('website.default') }}</span>
<span v-if="node.label === 'default'">{{ $t('commons.table.default') }}</span>
<div v-else>
<span v-if="node.label.length <= 25">
<a @click="onClickConn(node, data)">{{ node.label }}</a>
@@ -4,7 +4,7 @@
<el-form-item :label="$t('toolbox.device.syncSite')" prop="ntpSite" :rules="Rules.domain">
<el-input v-model="form.ntpSite" />
<el-button type="primary" link class="tagClass" @click="form.ntpSite = 'pool.ntp.org'">
{{ $t('website.default') }}
{{ $t('commons.table.default') }}
</el-button>
<el-button type="primary" link class="tagClass" @click="form.ntpSite = 'ntp.aliyun.com'">
{{ $t('toolbox.device.ntpALi') }}
@@ -265,7 +265,7 @@ const hasPnpm = computed(() => {
const imageSources = [
{
label: i18n.global.t('runtime.default'),
label: i18n.global.t('commons.table.default'),
value: 'https://registry.npmjs.org/',
},
{
@@ -243,7 +243,7 @@ const phpSources = [
value: 'mirrors.xtom.com',
},
{
label: i18n.global.t('runtime.default'),
label: i18n.global.t('commons.table.default'),
value: 'dl-cdn.alpinelinux.org',
},
];