Compare commits

...

7 Commits

Author SHA1 Message Date
meilin.huang
7761fe0288 feat: 新增系统全局配置&修改账号密码 2022-08-26 20:15:36 +08:00
may-fly
09e6bdcf7e Merge pull request #9 from 1ch0/master
fix: store mongodb password incorrectly
2022-08-26 10:20:12 +08:00
1ch0
61a4d87f59 perf: hide mongodb passwords when printing logs 2022-08-26 10:01:08 +08:00
1ch0
c219ec33b0 fix: store mongodb password incorrectly 2022-08-26 09:58:01 +08:00
may-fly
fd86f36218 Merge pull request #8 from 1ch0/master
Perf: hide mongodb passwords when printing logs
2022-08-25 18:13:38 +08:00
Echo Cheng
efac41f392 Perf: hide mongodb passwords when printing logs 2022-08-25 17:58:07 +08:00
meilin.huang
52df61ae0d refactor: 构建发行版脚本优化 2022-08-24 21:36:16 +08:00
97 changed files with 876 additions and 349 deletions

View File

@@ -109,26 +109,27 @@ function runBuild() {
read -p "是否构建前端[0|其他->否 1->是 2->构建并拷贝至server/static/static]: " runBuildWeb
read -p "请选择构建版本[0|其他->全部 1->linux-amd64 2->linux-arm64 3->windows]: " buildType
buildWeb ${runBuildWeb}
if [ "${buildType}" == "1" ];then
buildLinuxAmd64 ${toPath} ${runBuildWeb}
exit;
if [ "${runBuildWeb}" == "1" ] || [ "${runBuildWeb}" == "2" ] ; then
buildWeb ${runBuildWeb}
fi
if [ "${buildType}" == "2" ];then
buildLinuxArm64 ${toPath} ${runBuildWeb}
exit;
fi
if [ "${buildType}" == "3" ];then
buildWindows ${toPath} ${runBuildWeb}
exit;
fi
buildLinuxAmd64 ${toPath}
buildLinuxArm64 ${toPath}
buildWindows ${toPath}
case ${buildType} in
"1")
buildLinuxAmd64 ${toPath} ${runBuildWeb}
;;
"2")
buildLinuxArm64 ${toPath} ${runBuildWeb}
;;
"3")
buildWindows ${toPath} ${runBuildWeb}
;;
*)
buildLinuxAmd64 ${toPath} ${runBuildWeb}
buildLinuxArm64 ${toPath} ${runBuildWeb}
buildWindows ${toPath} ${runBuildWeb}
;;
esac
}
runBuild

View File

@@ -11,6 +11,8 @@ import { useStore } from '@/store/index.ts';
import { getLocal } from '@/common/utils/storage.ts';
import LockScreen from '@/views/layout/lockScreen/index.vue';
import Setings from '@/views/layout/navBars/breadcrumb/setings.vue';
import Watermark from '@/common/utils/wartermark.ts';
export default defineComponent({
name: 'app',
components: { LockScreen, Setings },
@@ -57,6 +59,8 @@ export default defineComponent({
() => route.path,
() => {
nextTick(() => {
// 路由变化更新水印
Watermark.use();
document.title = `${route.meta.title} - ${getThemeConfig.value.globalTitle}` || getThemeConfig.value.globalTitle;
});
}

View File

@@ -1,10 +1,11 @@
import request from './request'
export default {
login: (param: any) => request.request('POST', '/sys/accounts/login', param, null),
changePwd: (param: any) => request.request('POST', '/sys/accounts/change-pwd', param, null),
getPublicKey: () => request.request('GET', '/common/public-key', null, null),
captcha: () => request.request('GET', '/sys/captcha', null, null),
logout: (param: any) => request.request('POST', '/sys/accounts/logout/{token}', param, null),
getMenuRoute: (param: any) => request.request('Get', '/sys/resources/account', param, null)
login: (param: any) => request.request('POST', '/sys/accounts/login', param),
changePwd: (param: any) => request.request('POST', '/sys/accounts/change-pwd', param),
getPublicKey: () => request.request('GET', '/common/public-key'),
getConfigValue: (param: any) => request.request('GET', '/sys/configs/value', param),
captcha: () => request.request('GET', '/sys/captcha'),
logout: (param: any) => request.request('POST', '/sys/accounts/logout/{token}', param),
getMenuRoute: (param: any) => request.request('Get', '/sys/resources/account', param)
}

View File

@@ -0,0 +1,48 @@
import openApi from './openApi';
// 登录是否使用验证码配置key
const UseLoginCaptchaConfigKey = "UseLoginCaptcha"
const UseWartermarkConfigKey = "UseWartermark"
/**
* 获取系统配置值
*
* @param key 配置key
* @returns 配置值
*/
export async function getConfigValue(key: string) : Promise<string> {
return await openApi.getConfigValue({key}) as string
}
/**
* 获取bool类型系统配置值
*
* @param key 配置key
* @param defaultValue 默认值
* @returns 是否为ture1: true其他: false
*/
export async function getBoolConfigValue(key :string, defaultValue :boolean) : Promise<boolean> {
const value = await getConfigValue(key)
if (!value) {
return defaultValue;
}
return value == "1";
}
/**
* 是否使用登录验证码
*
* @returns
*/
export async function useLoginCaptcha() : Promise<boolean> {
return await getBoolConfigValue(UseLoginCaptchaConfigKey, true)
}
/**
* 是否启用水印
*
* @returns
*/
export async function useWartermark() : Promise<boolean> {
return await getBoolConfigValue(UseWartermarkConfigKey, true)
}

View File

@@ -35,3 +35,22 @@ export function removeSession(key: string) {
export function clearSession() {
window.sessionStorage.clear();
}
export function getUserInfo4Session() {
return getSession("userInfo")
}
export function setUserInfo2Session(userinfo: any) {
setSession("userInfo", userinfo)
}
// 获取是否开启水印
export function getUseWatermark4Session() {
return getSession("useWatermark")
}
export function setUseWatermark2Session(useWatermark: boolean) {
setSession("useWatermark", useWatermark)
}

View File

@@ -1,21 +1,26 @@
import { getUseWatermark4Session, getUserInfo4Session } from '@/common/utils/storage.ts';
import { dateFormat } from '@/common/utils/date.ts'
// 页面添加水印效果
const setWatermark = (str: any) => {
const id = '1.23452384164.123412416';
if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any);
const can = document.createElement('canvas');
can.width = 250;
can.height = 180;
can.width = 400;
can.height = 250;
const cans: any = can.getContext('2d');
cans.rotate((-20 * Math.PI) / 180);
cans.font = '12px Vedana';
cans.fillStyle = 'rgba(200, 200, 200, 0.30)';
cans.textAlign = 'center';
cans.font = '14px Vedana';
cans.fillStyle = 'rgba(200, 200, 200, 0.35)';
cans.textAlign = 'left';
cans.textBaseline = 'Middle';
cans.fillText(str, can.width / 10, can.height / 2);
// cans.fillText('mayfly go', can.width / 4, can.height )
cans.fillText(str, can.width / 8, can.height / 2);
const div = document.createElement('div');
div.id = id;
div.style.pointerEvents = 'none';
div.style.top = '35px';
div.style.top = '30px';
div.style.left = '0px';
div.style.position = 'fixed';
div.style.zIndex = '10000000';
@@ -26,16 +31,34 @@ const setWatermark = (str: any) => {
return id;
};
function set(str: any) {
let id = setWatermark(str);
if (document.getElementById(id) === null) id = setWatermark(str);
}
function del() {
let id = '1.23452384164.123412416';
if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any);
}
const watermark = {
use: () => {
setTimeout(() => {
const userinfo = getUserInfo4Session()
if (userinfo && getUseWatermark4Session()) {
set(`${userinfo.username} ${dateFormat('yyyy-MM-dd HH:mm:ss', new Date())}`)
} else {
del();
}
}, 1500)
},
// 设置水印
set: (str: any) => {
let id = setWatermark(str);
if (document.getElementById(id) === null) id = setWatermark(str);
set(str)
},
// 删除水印
del: () => {
let id = '1.23452384164.123412416';
if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any);
del();
},
};

View File

@@ -2,6 +2,7 @@ import RouterParent from '@/views/layout/routerView/parent.vue';
export const imports = {
'RouterParent': RouterParent,
"Home": () => import('@/views/home/index.vue'),
'Personal': () => import('@/views/personal/index.vue'),
// machine
@@ -11,6 +12,8 @@ export const imports = {
"RoleList": () => import('@/views/system/role'),
"AccountList": () => import('@/views/system/account'),
"SyslogList": () => import('@/views/system/syslog/SyslogList.vue'),
"ConfigList": () => import('@/views/system/config/ConfigList.vue'),
// project
"ProjectList": () => import('@/views/ops/project/ProjectList.vue'),
// db

View File

@@ -273,23 +273,6 @@
<el-switch v-model="getThemeConfig.isInvert" @change="onAddFilterChange('invert')"></el-switch>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex-label">开启水印</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-switch v-model="getThemeConfig.isWartermark" @change="onWartermarkChange"></el-switch>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt14">
<div class="layout-breadcrumb-seting-bar-flex-label">水印文案</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-input
v-model="getThemeConfig.wartermarkText"
size="small"
style="width: 90px"
@input="onWartermarkTextInput($event)"
></el-input>
</div>
</div>
<!-- 其它设置 -->
<el-divider content-position="left">其他设置</el-divider>
@@ -440,8 +423,6 @@ import { ElMessage } from 'element-plus';
import ClipboardJS from 'clipboard';
import { useStore } from '@/store/index.ts';
import { getLightColor } from '@/common/utils/theme.ts';
import Watermark from '@/common/utils/wartermark.ts';
import { verifyAndSpace } from '@/common/utils/toolsValidate.ts';
import { setLocal, getLocal, removeLocal } from '@/common/utils/storage.ts';
export default defineComponent({
name: 'layoutBreadcrumbSeting',
@@ -572,18 +553,6 @@ export default defineComponent({
setLocalThemeConfig();
setLocal('appFilterStyle', appEle.style.cssText);
};
// 4、界面显示 --> 开启水印
const onWartermarkChange = () => {
getThemeConfig.value.isWartermark ? Watermark.set(getThemeConfig.value.wartermarkText) : Watermark.del();
setLocalThemeConfig();
};
// 4、界面显示 --> 水印文案
const onWartermarkTextInput = (val: string) => {
getThemeConfig.value.wartermarkText = verifyAndSpace(val);
if (getThemeConfig.value.wartermarkText === '') return false;
if (getThemeConfig.value.isWartermark) Watermark.set(getThemeConfig.value.wartermarkText);
setLocalThemeConfig();
};
// 5、布局切换
const onSetLayout = (layout: string) => {
setLocal('oldLayout', layout);
@@ -735,8 +704,6 @@ export default defineComponent({
const appEl: any = document.querySelector('#app');
appEl.style.cssText = getLocal('appFilterStyle');
}
// 开启水印
onWartermarkChange();
// // 语言国际化
// if (getLocal('themeConfig')) proxy.$i18n.locale = getLocal('themeConfig').globalI18n;
}, 1100);
@@ -762,8 +729,6 @@ export default defineComponent({
getThemeConfig,
onDrawerClose,
onAddFilterChange,
onWartermarkChange,
onWartermarkTextInput,
onSetLayout,
setLocalThemeConfig,
onClassicSplitMenuChange,

View File

@@ -9,7 +9,7 @@
<el-input type="password" placeholder="请输入密码" prefix-icon="lock" v-model="loginForm.password" autocomplete="off" show-password>
</el-input>
</el-form-item>
<el-form-item prop="captcha">
<el-form-item v-if="useLoginCaptcha" prop="captcha">
<el-row :gutter="15">
<el-col :span="16">
<el-input
@@ -78,10 +78,11 @@ import { useRoute, useRouter } from 'vue-router';
import { ElMessage } from 'element-plus';
import { initBackEndControlRoutesFun } from '@/router/index.ts';
import { useStore } from '@/store/index.ts';
import { setSession } from '@/common/utils/storage.ts';
import { setSession, setUserInfo2Session, setUseWatermark2Session } from '@/common/utils/storage.ts';
import { formatAxis } from '@/common/utils/formatTime.ts';
import openApi from '@/common/openApi';
import { RsaEncrypt } from '@/common/rsa';
import { useLoginCaptcha, useWartermark } from '@/common/sysconfig';
import { letterAvatar } from '@/common/utils/string';
export default defineComponent({
@@ -94,6 +95,7 @@ export default defineComponent({
const changePwdFormRef: any = ref(null);
const state = reactive({
useLoginCaptcha: true,
captchaImage: '',
loginForm: {
username: '',
@@ -130,13 +132,17 @@ export default defineComponent({
},
});
onMounted(() => {
onMounted(async () => {
// 移除公钥, 方便后续重新获取
sessionStorage.removeItem('RsaPublicKey')
sessionStorage.removeItem('RsaPublicKey');
state.useLoginCaptcha = await useLoginCaptcha();
getCaptcha();
});
const getCaptcha = async () => {
if (!state.useLoginCaptcha) {
return;
}
let res: any = await openApi.captcha();
state.captchaImage = res.base64Captcha;
state.loginForm.cid = res.cid;
@@ -198,7 +204,7 @@ export default defineComponent({
};
// 存储用户信息到浏览器缓存
setSession('userInfo', userInfos);
setUserInfo2Session(userInfos);
// 1、请注意执行顺序(存储用户信息到vuex)
store.dispatch('userInfos/setUserInfos', userInfos);
if (!store.state.themeConfig.themeConfig.isRequestRoutes) {
@@ -224,10 +230,13 @@ export default defineComponent({
// 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中
route.query?.redirect ? router.push(route.query.redirect as string) : router.push('/');
// 登录成功提示
setTimeout(() => {
setTimeout(async () => {
// 关闭 loading
state.loading.signIn = true;
ElMessage.success(`${currentTimeInfo},欢迎回来!`);
if (await useWartermark()) {
setUseWatermark2Session(true);
}
}, 300);
};

View File

@@ -1,9 +1,5 @@
<template>
<div>
<el-button-group :style="btnStyle">
<el-button @click="onRunSql" type="success" icon="video-play" size="small" plain>执行</el-button>
<el-button @click="formatSql" type="primary" icon="magic-stick" size="small" plain>格式化</el-button>
</el-button-group>
<div class="toolbar">
<el-row type="flex" justify="space-between">
<el-col :span="24">
@@ -58,6 +54,19 @@
<div>
<div class="toolbar">
<div class="fl">
<el-link @click="onRunSql" :underline="false" class="ml15" icon="VideoPlay"></el-link>
<el-divider direction="vertical" border-style="dashed" />
<el-tooltip class="box-item" effect="dark" content="format sql" placement="top">
<el-link @click="formatSql" type="primary" :underline="false" icon="MagicStick"></el-link>
</el-tooltip>
<el-divider direction="vertical" border-style="dashed" />
<el-tooltip class="box-item" effect="dark" content="commit" placement="top">
<el-link @click="onCommit" type="success" :underline="false" icon="CircleCheck"></el-link>
</el-tooltip>
<el-divider direction="vertical" border-style="dashed" />
<el-upload
style="display: inline-block"
:before-upload="beforeUpload"
@@ -72,11 +81,10 @@
multiple
:limit="100"
>
<el-button type="success" icon="video-play" plain size="small">sql脚本执行</el-button>
<el-tooltip class="box-item" effect="dark" content="SQL脚本执行" placement="top">
<el-link type="success" :underline="false" icon="Document"></el-link>
</el-tooltip>
</el-upload>
<el-button @click="onCommit" class="ml5 mb5" type="success" icon="CircleCheck" plain size="small"
>commit</el-button
>
</div>
<div style="float: right" class="fl">
@@ -101,7 +109,7 @@
</div>
</div>
<div @click="closeExecBtns" class="mt5 sqlEditor" @contextmenu="showExecBtns">
<div class="mt5 sqlEditor">
<textarea ref="codeTextarea"></textarea>
</div>
@@ -145,56 +153,64 @@
<el-tab-pane closable v-for="dt in dataTabs" :key="dt.name" :label="dt.label" :name="dt.name">
<el-row v-if="dbId">
<el-link @click="onRefresh(dt.name)" icon="refresh" :underline="false" class="ml5"></el-link>
<el-link @click="addRow" class="ml5" type="primary" icon="plus" :underline="false"></el-link>
<el-link @click="onDeleteData" class="ml5" type="danger" icon="delete" :underline="false"></el-link>
<el-col :span="8">
<el-link @click="onRefresh(dt.name)" icon="refresh" :underline="false" class="ml5"></el-link>
<el-divider direction="vertical" border-style="dashed" />
<el-tooltip class="box-item" effect="dark" content="commit" placement="top">
<el-link @click="onCommit" class="ml5" type="success" icon="check" :underline="false"></el-link>
</el-tooltip>
<el-link @click="addRow" type="primary" icon="plus" :underline="false"></el-link>
<el-divider direction="vertical" border-style="dashed" />
<el-tooltip class="box-item" effect="dark" content="生成insert sql" placement="top">
<el-link @click="onGenerateInsertSql" type="success" class="ml20" :underline="false">gi</el-link>
</el-tooltip>
</el-row>
<el-row class="mt5">
<el-input
v-model="dt.condition"
placeholder="若需条件过滤,可选择列并点击对应的字段并输入需要过滤的内容点击查询按钮即可"
clearable
size="small"
>
<template #prepend>
<el-popover :visible="dt.selectColumnPopoverVisible" :width="320" placement="right">
<template #reference>
<el-link
@click="dt.selectColumnPopoverVisible = !dt.selectColumnPopoverVisible"
type="success"
:underline="false"
>选择列</el-link
<el-link @click="onDeleteData" type="danger" icon="delete" :underline="false"></el-link>
<el-divider direction="vertical" border-style="dashed" />
<el-tooltip class="box-item" effect="dark" content="commit" placement="top">
<el-link @click="onCommit" type="success" icon="CircleCheck" :underline="false"></el-link>
</el-tooltip>
<el-divider direction="vertical" border-style="dashed" />
<el-tooltip class="box-item" effect="dark" content="生成insert sql" placement="top">
<el-link @click="onGenerateInsertSql" type="success" :underline="false">gi</el-link>
</el-tooltip>
</el-col>
<el-col :span="16">
<el-input
v-model="dt.condition"
placeholder="若需条件过滤,可选择列并点击对应的字段并输入需要过滤的内容点击查询按钮即可"
clearable
size="small"
style="width: 100%"
>
<template #prepend>
<el-popover trigger="click" :width="320" placement="right">
<template #reference>
<el-link
type="success"
:underline="false"
>选择列</el-link
>
</template>
<el-table
:data="getColumns4Map(dt.name)"
max-height="500"
size="small"
@row-click="
(...event) => {
onConditionRowClick(event, dt);
}
"
style="cursor: pointer"
>
</template>
<el-table
:data="getColumns4Map(dt.name)"
max-height="500"
size="small"
@row-click="
(...event) => {
onConditionRowClick(event, dt);
}
"
style="cursor: pointer"
>
<el-table-column property="columnName" label="列名" show-overflow-tooltip> </el-table-column>
<el-table-column property="columnComment" label="备注" show-overflow-tooltip> </el-table-column>
</el-table>
</el-popover>
</template>
<el-table-column property="columnName" label="列名" show-overflow-tooltip> </el-table-column>
<el-table-column property="columnComment" label="备注" show-overflow-tooltip> </el-table-column>
</el-table>
</el-popover>
</template>
<template #append>
<el-button @click="selectByCondition(dt.name, dt.condition)" icon="search" size="small"></el-button>
</template>
</el-input>
<template #append>
<el-button @click="selectByCondition(dt.name, dt.condition)" icon="search" size="small"></el-button>
</template>
</el-input>
</el-col>
</el-row>
<el-table
@cell-dblclick="cellClick"
@@ -344,14 +360,6 @@ export default defineComponent({
pageSize: 10,
envId: null,
},
btnStyle: {
position: 'absolute',
zIndex: 1000,
display: 'none',
left: '',
top: '',
},
selectColumnPopoverVisible: false,
conditionDialog: {
title: '',
placeholder: '',
@@ -417,7 +425,7 @@ export default defineComponent({
const setHeight = () => {
// 默认300px
codemirror.setSize('auto', `${window.innerHeight - 538}px`);
state.dataTabsTableHeight = window.innerHeight - 258 - 33;
state.dataTabsTableHeight = window.innerHeight - 274;
};
/**
@@ -486,7 +494,6 @@ export default defineComponent({
} catch (e: any) {
state.queryTab.loading = false;
}
closeExecBtns();
// 即只有以该字符串开头的sql才可修改表数据内容
if (sql.startsWith('SELECT *') || sql.startsWith('select *') || sql.startsWith('SELECT\n *')) {
@@ -729,7 +736,6 @@ export default defineComponent({
columnNames: [],
pageNum: 1,
count: 0,
selectColumnPopoverVisible: false,
};
tab.columnNames = await getColumnNames(tableName);
state.dataTabs[tableName] = tab;
@@ -769,7 +775,6 @@ export default defineComponent({
* 条件查询,点击列信息后显示输入对应的值
*/
const onConditionRowClick = (event: any, dataTab: any) => {
dataTab.selectColumnPopoverVisible = false;
const row = event[0];
state.conditionDialog.title = `请输入 [${row.columnName}] 的值`;
state.conditionDialog.placeholder = `${row.columnType} ${row.columnComment}`;
@@ -993,7 +998,6 @@ export default defineComponent({
state.queryTab.execRes.tableColumn = [];
state.cmOptions.hintOptions.tables = [];
tableMap.clear();
closeExecBtns();
};
const onDataSelectionChange = (datas: []) => {
@@ -1169,7 +1173,6 @@ export default defineComponent({
let selectSql = codemirror.getSelection();
isTrue(selectSql, '请选中需要格式化的sql');
codemirror.replaceSelection(sqlFormatter(selectSql));
closeExecBtns();
};
const search = async () => {
@@ -1177,31 +1180,6 @@ export default defineComponent({
state.dbs = res.list;
};
/**
* 显示执行sql和格式化按钮
*/
const showExecBtns = (event: any) => {
if (event.preventDefault) {
event.preventDefault();
} else {
event.returnValue = false;
}
state.btnStyle.display = 'inline';
state.btnStyle.left = event.offsetX + 15 + 'px';
state.btnStyle.top = event.clientY - 80 + 'px';
};
/**
* 关闭执行sql和格式化按钮
*/
const closeExecBtns = () => {
if (state.btnStyle.left) {
state.btnStyle.display = 'none';
state.btnStyle.left = '';
state.btnStyle.top = '';
}
};
return {
...toRefs(state),
codeTextarea,
@@ -1237,8 +1215,6 @@ export default defineComponent({
onDeleteData,
onTableSortChange,
onGenerateInsertSql,
showExecBtns,
closeExecBtns,
};
},
});

View File

@@ -5,12 +5,9 @@
<el-form-item prop="username" label="用户名:" required>
<el-input :disabled="edit" v-model.trim="form.username" placeholder="请输入账号用户名,密码默认与账号名一致" auto-complete="off"></el-input>
</el-form-item>
<!-- <el-form-item prop="password" label="密码:" required>
<el-form-item v-if="edit" prop="password" label="密码:" required>
<el-input type="password" v-model.trim="form.password" placeholder="请输入密码" autocomplete="new-password"></el-input>
</el-form-item>
<el-form-item v-if="!edit" label="确认密码:" required>
<el-input type="password" v-model.trim="form.repassword" placeholder="请输入确认密码" autocomplete="new-password"></el-input>
</el-form-item> -->
</el-form>
<template #footer>
@@ -74,6 +71,7 @@ export default defineComponent({
watch(props, (newValue) => {
if (newValue.account) {
state.form = { ...newValue.account };
state.edit = true;
} else {
state.form = {} as any;
}
@@ -81,11 +79,9 @@ export default defineComponent({
});
const btnOk = async () => {
let p = state.form.id ? accountApi.update : accountApi.save;
accountForm.value.validate((valid: boolean) => {
if (valid) {
p.request(state.form).then(() => {
accountApi.save.request(state.form).then(() => {
ElMessage.success('操作成功');
emit('val-change', state.form);
state.btnLoading = true;

View File

@@ -2,7 +2,7 @@
<div class="role-list">
<el-card>
<el-button v-auth="'account:add'" type="primary" icon="plus" @click="editAccount(true)">添加</el-button>
<!-- <el-button v-auth="'account:update'" :disabled="chooseId == null" @click="editAccount(false)" type="primary" icon="edit">编辑</el-button> -->
<el-button v-auth="'account:add'" :disabled="chooseId == null" @click="editAccount(false)" type="primary" icon="edit">编辑</el-button>
<el-button v-auth="'account:saveRoles'" :disabled="chooseId == null" @click="roleEdit()" type="success" icon="setting"
>角色分配</el-button
>
@@ -20,7 +20,7 @@
<el-button @click="search()" type="success" icon="search" size="small"></el-button>
</div>
<el-table :data="datas" ref="table" @current-change="choose" show-overflow-tooltip>
<el-table-column label="选择" width="50px">
<el-table-column label="选择" width="55px">
<template #default="scope">
<el-radio v-model="chooseId" :label="scope.row.id">
<i></i>
@@ -29,20 +29,20 @@
</el-table-column>
<el-table-column prop="username" label="用户名" min-width="115"></el-table-column>
<el-table-column align="center" prop="status" label="状态" min-width="63">
<el-table-column align="center" prop="status" label="状态" min-width="65">
<template #default="scope">
<el-tag v-if="scope.row.status == 1" type="success">正常</el-tag>
<el-tag v-if="scope.row.status == -1" type="danger">禁用</el-tag>
</template>
</el-table-column>
<el-table-column min-width="160" prop="lastLoginTime" label="最后登录时间">
<el-table-column min-width="160" prop="lastLoginTime" label="最后登录时间" show-overflow-tooltip>
<template #default="scope">
{{ $filters.dateFormat(scope.row.lastLoginTime) }}
</template>
</el-table-column>
<el-table-column min-width="115" prop="creator" label="创建账号"></el-table-column>
<el-table-column min-width="160" prop="createTime" label="创建时间">
<el-table-column min-width="160" prop="createTime" label="创建时间" show-overflow-tooltip>
<template #default="scope">
{{ $filters.dateFormat(scope.row.createTime) }}
</template>

View File

@@ -32,6 +32,12 @@ export const accountApi = {
saveRoles: Api.create("/sys/accounts/roles", 'post')
}
export const configApi = {
list: Api.create("/sys/configs", 'get'),
save: Api.create("/sys/configs", 'post'),
getValue: Api.create("/sys/configs/value", 'get'),
}
export const logApi = {
list: Api.create("/syslogs", "get")
}

View File

@@ -0,0 +1,99 @@
<template>
<div>
<el-dialog :title="title" v-model="dvisible" :show-close="false" :before-close="cancel" width="500px" :destroy-on-close="true">
<el-form ref="configForm" :model="form" label-width="90px">
<el-form-item prop="name" label="配置项:" required>
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item prop="key" label="配置key:" required>
<el-input :disabled="form.id != null" v-model="form.key"></el-input>
</el-form-item>
<el-form-item prop="value" label="配置值:" required>
<el-input v-model="form.value"></el-input>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remark" type="textarea" :rows="2"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancel()"> </el-button>
<el-button type="primary" :loading="btnLoading" @click="btnOk"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script lang="ts">
import { ref, toRefs, reactive, watch, defineComponent } from 'vue';
import { configApi } from '../api';
export default defineComponent({
name: 'ConfigEdit',
props: {
visible: {
type: Boolean,
},
data: {
type: [Boolean, Object],
},
title: {
type: String,
},
},
setup(props: any, { emit }) {
const configForm: any = ref(null);
const state = reactive({
dvisible: false,
form: {
id: null,
name: '',
key: '',
value: '',
remark: '',
},
btnLoading: false,
});
watch(props, (newValue) => {
state.dvisible = newValue.visible;
if (newValue.data) {
state.form = { ...newValue.data };
} else {
state.form = {} as any;
}
});
const cancel = () => {
// 更新父组件visible prop对应的值为false
emit('update:visible', false);
// 若父组件有取消事件,则调用
emit('cancel');
};
const btnOk = async () => {
configForm.value.validate(async (valid: boolean) => {
if (valid) {
await configApi.save.request(state.form);
emit('val-change', state.form);
cancel();
state.btnLoading = true;
setTimeout(() => {
state.btnLoading = false;
}, 1000);
}
});
};
return {
...toRefs(state),
configForm,
btnOk,
cancel,
};
},
});
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,124 @@
<template>
<div class="role-list">
<el-card>
<el-button type="primary" icon="plus" @click="editConfig(false)">添加</el-button>
<el-button :disabled="chooseId == null" @click="editConfig(chooseData)" type="primary" icon="edit">编辑</el-button>
<el-table :data="configs" @current-change="choose" ref="table" style="width: 100%">
<el-table-column label="选择" width="55px">
<template #default="scope">
<el-radio v-model="chooseId" :label="scope.row.id">
<i></i>
</el-radio>
</template>
</el-table-column>
<el-table-column prop="name" label="配置项"></el-table-column>
<el-table-column prop="key" label="配置key"></el-table-column>
<el-table-column prop="value" label="配置值" min-width="100px" show-overflow-tooltip></el-table-column>
<el-table-column prop="remark" label="备注" min-width="100px" show-overflow-tooltip></el-table-column>
<el-table-column prop="updateTime" label="更新时间">
<template #default="scope">
{{ $filters.dateFormat(scope.row.createTime) }}
</template>
</el-table-column>
<el-table-column prop="modifier" label="修改者" show-overflow-tooltip></el-table-column>
</el-table>
<el-row style="margin-top: 20px" type="flex" justify="end">
<el-pagination
style="text-align: right"
@current-change="handlePageChange"
:total="total"
layout="prev, pager, next, total, jumper"
v-model:current-page="query.pageNum"
:page-size="query.pageSize"
></el-pagination>
</el-row>
</el-card>
<config-edit :title="configEdit.title" v-model:visible="configEdit.visible" :data="configEdit.config" @val-change="configEditChange" />
</div>
</template>
<script lang="ts">
import { toRefs, reactive, onMounted, defineComponent } from 'vue';
import ConfigEdit from './ConfigEdit.vue';
import { configApi } from '../api';
import { ElMessage, ElMessageBox } from 'element-plus';
export default defineComponent({
name: 'ConfigList',
components: {
ConfigEdit,
},
setup() {
const state = reactive({
dialogFormVisible: false,
currentEditPermissions: false,
query: {
pageNum: 1,
pageSize: 10,
name: null,
},
total: 0,
configs: [],
chooseId: null,
chooseData: null,
configEdit: {
title: '配置修改',
visible: false,
config: {},
},
});
onMounted(() => {
search();
});
const search = async () => {
let res = await configApi.list.request(state.query);
state.configs = res.list;
state.total = res.total;
};
const handlePageChange = (curPage: number) => {
state.query.pageNum = curPage;
search();
};
const choose = (item: any) => {
if (!item) {
return;
}
state.chooseId = item.id;
state.chooseData = item;
};
const configEditChange = () => {
ElMessage.success('修改成功!');
state.chooseId = null;
state.chooseData = null;
search();
};
const editConfig = (data: any) => {
if (data) {
state.configEdit.config = data;
} else {
state.configEdit.config = false;
}
state.configEdit.visible = true;
};
return {
...toRefs(state),
search,
handlePageChange,
choose,
configEditChange,
editConfig,
};
},
});
</script>
<style lang="scss">
</style>

View File

@@ -1,7 +1,7 @@
<template>
<div class="role-dialog">
<el-dialog :title="title" v-model="dvisible" :show-close="false" :before-close="cancel" width="500px" :destroy-on-close="true">
<el-form :model="form" label-width="90px">
<el-form ref="roleForm" :model="form" label-width="90px">
<el-form-item prop="name" label="角色名称:" required>
<el-input v-model="form.name" auto-complete="off"></el-input>
</el-form-item>
@@ -28,7 +28,7 @@
</template>
<script lang="ts">
import { toRefs, reactive, watch, defineComponent } from 'vue';
import { ref, toRefs, reactive, watch, defineComponent } from 'vue';
import { roleApi } from '../api';
export default defineComponent({
@@ -45,6 +45,7 @@ export default defineComponent({
},
},
setup(props: any, { emit }) {
const roleForm: any = ref(null);
const state = reactive({
dvisible: false,
form: {
@@ -73,18 +74,22 @@ export default defineComponent({
};
const btnOk = async () => {
// let p = state.form.id ? roleApi.update : roleApi.save;
await roleApi.save.request(state.form);
emit('val-change', state.form);
cancel();
state.btnLoading = true;
setTimeout(() => {
state.btnLoading = false;
}, 1000);
roleForm.value.validate(async (valid: boolean) => {
if (valid) {
await roleApi.save.request(state.form);
emit('val-change', state.form);
cancel();
state.btnLoading = true;
setTimeout(() => {
state.btnLoading = false;
}, 1000);
}
});
};
return {
...toRefs(state),
roleForm,
btnOk,
cancel,
};

View File

@@ -20,7 +20,7 @@
<el-button @click="search" type="success" icon="search"></el-button>
</div>
<el-table :data="roles" @current-change="choose" ref="table" style="width: 100%">
<el-table-column label="选择" width="50px">
<el-table-column label="选择" width="55px">
<template #default="scope">
<el-radio v-model="chooseId" :label="scope.row.id">
<i></i>

View File

@@ -74,6 +74,7 @@ func InitRouter() *gin.Engine {
sys_router.InitRoleRouter(api)
sys_router.InitSystemRouter(api)
sys_router.InitSyslogRouter(api)
sys_router.InitSysConfigRouter(api)
devops_router.InitProjectRouter(api)
devops_router.InitDbRouter(api)

View File

@@ -138,7 +138,7 @@ func (m *Machine) KillProcess(rc *ctx.ReqCtx) {
cli := m.MachineApp.GetCli(GetMachineId(rc.GinCtx))
biz.ErrIsNilAppendErr(m.ProjectApp.CanAccess(rc.LoginAccount.Id, cli.GetMachine().ProjectId), "%s")
_, err := cli.Run("kill -9 " + pid)
_, err := cli.Run("sudo kill -9 " + pid)
biz.ErrIsNilAppendErr(err, "终止进程失败: %s")
}

View File

@@ -9,6 +9,7 @@ import (
"mayfly-go/pkg/ctx"
"mayfly-go/pkg/ginx"
"mayfly-go/pkg/utils"
"regexp"
"strconv"
"github.com/gin-gonic/gin"
@@ -34,11 +35,16 @@ func (m *Mongo) Save(rc *ctx.ReqCtx) {
form := &form.Mongo{}
ginx.BindJsonAndValid(rc.GinCtx, form)
rc.ReqParam = form
mongo := new(entity.Mongo)
utils.Copy(mongo, form)
// 密码脱敏记录日志
form.Uri = func(str string) string {
reg := regexp.MustCompile(`(^mongodb://.+?:)(.+)(@.+$)`)
return reg.ReplaceAllString(str, `${1}****${3}`)
}(form.Uri)
rc.ReqParam = form
mongo.SetBaseInfo(rc.LoginAccount)
m.MongoApp.Save(mongo)
}

View File

@@ -13,6 +13,7 @@ import (
"mayfly-go/pkg/model"
"mayfly-go/pkg/utils"
"net"
"regexp"
"time"
"go.mongodb.org/mongo-driver/mongo"
@@ -95,7 +96,7 @@ func (d *mongoAppImpl) GetMongoCli(id uint64) *mongo.Client {
// -----------------------------------------------------------
//mongo客户端连接缓存指定时间内没有访问则会被关闭
// mongo客户端连接缓存指定时间内没有访问则会被关闭
var mongoCliCache = cache.NewTimedCache(constant.MongoConnExpireTime, 5*time.Second).
WithUpdateAccessTime(true).
OnEvicted(func(key interface{}, value interface{}) {
@@ -177,7 +178,10 @@ func connect(me *entity.Mongo) (*MongoInstance, error) {
return nil, err
}
global.Log.Infof("连接mongo: %s", me.Uri)
global.Log.Infof("连接mongo: %s", func(str string) string {
reg := regexp.MustCompile(`(^mongodb://.+?:)(.+)(@.+$)`)
return reg.ReplaceAllString(str, `${1}****${3}`)
}(me.Uri))
mongoInstance.Cli = client
return mongoInstance, err
}

View File

@@ -23,6 +23,7 @@ type Account struct {
ResourceApp application.Resource
RoleApp application.Role
MsgApp application.Msg
ConfigApp application.Config
}
/** 登录者个人相关操作 **/
@@ -32,8 +33,11 @@ func (a *Account) Login(rc *ctx.ReqCtx) {
loginForm := &form.LoginForm{}
ginx.BindJsonAndValid(rc.GinCtx, loginForm)
// 校验验证码
biz.IsTrue(captcha.Verify(loginForm.Cid, loginForm.Captcha), "验证码错误")
// 判断是否有开启登录验证码校验
if a.ConfigApp.GetConfig(entity.ConfigKeyUseLoginCaptcha).BoolValue(true) {
// 校验验证码
biz.IsTrue(captcha.Verify(loginForm.Cid, loginForm.Captcha), "验证码错误")
}
originPwd, err := utils.DefaultRsaDecrypt(loginForm.Password, true)
biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
@@ -145,17 +149,6 @@ func (a *Account) saveLogin(account *entity.Account, ip string) {
loginMsg.Creator = account.Username
loginMsg.CreatorId = account.Id
a.MsgApp.Create(loginMsg)
// bodyMap, err := httpclient.NewRequest(fmt.Sprintf("http://ip-api.com/json/%s?lang=zh-CN", ip)).Get().BodyToMap()
// if err != nil {
// global.Log.Errorf("获取客户端ip地址信息失败%s", err.Error())
// return
// }
// if bodyMap["status"].(string) == "fail" {
// return
// }
// msg := fmt.Sprintf("%s于%s-%s登录", account.Username, bodyMap["regionName"], bodyMap["city"])
// global.Log.Info(msg)
}
// 获取个人账号信息
@@ -203,8 +196,8 @@ func (a *Account) Accounts(rc *ctx.ReqCtx) {
rc.ResData = a.AccountApp.GetPageList(condition, ginx.GetPageParam(rc.GinCtx), new([]vo.AccountManageVO))
}
// @router /accounts [get]
func (a *Account) CreateAccount(rc *ctx.ReqCtx) {
// @router /accounts
func (a *Account) SaveAccount(rc *ctx.ReqCtx) {
form := &form.AccountCreateForm{}
ginx.BindJsonAndValid(rc.GinCtx, form)
rc.ReqParam = form
@@ -212,7 +205,16 @@ func (a *Account) CreateAccount(rc *ctx.ReqCtx) {
account := &entity.Account{}
utils.Copy(account, form)
account.SetBaseInfo(rc.LoginAccount)
a.AccountApp.Create(account)
if account.Id == 0 {
a.AccountApp.Create(account)
} else {
if account.Password != "" {
biz.IsTrue(CheckPasswordLever(account.Password), "密码强度必须8位以上且包含字⺟⼤⼩写+数字+特殊符号")
account.Password = utils.PwdHash(account.Password)
}
a.AccountApp.Update(account)
}
}
func (a *Account) ChangeStatus(rc *ctx.ReqCtx) {

View File

@@ -0,0 +1,39 @@
package api
import (
"mayfly-go/internal/sys/api/form"
"mayfly-go/internal/sys/application"
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/pkg/biz"
"mayfly-go/pkg/ctx"
"mayfly-go/pkg/ginx"
"mayfly-go/pkg/utils"
)
type Config struct {
ConfigApp application.Config
}
func (c *Config) Configs(rc *ctx.ReqCtx) {
g := rc.GinCtx
condition := &entity.Config{Key: g.Query("key")}
rc.ResData = c.ConfigApp.GetPageList(condition, ginx.GetPageParam(g), new([]entity.Config))
}
func (c *Config) GetConfigValueByKey(rc *ctx.ReqCtx) {
key := rc.GinCtx.Query("key")
biz.NotEmpty(key, "key不能为空")
rc.ResData = c.ConfigApp.GetConfig(key).Value
}
func (c *Config) SaveConfig(rc *ctx.ReqCtx) {
g := rc.GinCtx
form := &form.ConfigForm{}
ginx.BindJsonAndValid(g, form)
rc.ReqParam = form
config := new(entity.Config)
utils.Copy(config, form)
config.SetBaseInfo(rc.LoginAccount)
c.ConfigApp.Save(config)
}

View File

@@ -1,7 +1,9 @@
package form
type AccountCreateForm struct {
Id uint64
Username *string `json:"username" binding:"required,min=4,max=16"`
Password *string `json:"password"`
}
type AccountUpdateForm struct {

View File

@@ -0,0 +1,9 @@
package form
type ConfigForm struct {
Id int
Name string `binding:"required"`
Key string `binding:"required"`
Value string
Remark string `json:"remark"`
}

View File

@@ -4,6 +4,6 @@ package form
type LoginForm struct {
Username string `json:"username" binding:"required"`
Password string `binding:"required"`
Captcha string `binding:"required"`
Cid string `binding:"required"`
Captcha string
Cid string
}

View File

@@ -0,0 +1,46 @@
package application
import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/internal/sys/domain/repository"
"mayfly-go/internal/sys/infrastructure/persistence"
"mayfly-go/pkg/global"
"mayfly-go/pkg/model"
)
type Config interface {
GetPageList(condition *entity.Config, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult
Save(config *entity.Config)
// 获取指定key的配置信息, 不会返回nil, 若不存在则值都默认值即空字符串
GetConfig(key string) *entity.Config
}
type configAppImpl struct {
configRepo repository.Config
}
var ConfigApp Config = &configAppImpl{
configRepo: persistence.ConfigDao,
}
func (a *configAppImpl) GetPageList(condition *entity.Config, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult {
return a.configRepo.GetPageList(condition, pageParam, toEntity)
}
func (a *configAppImpl) Save(config *entity.Config) {
if config.Id == 0 {
a.configRepo.Insert(config)
} else {
a.configRepo.Update(config)
}
}
func (a *configAppImpl) GetConfig(key string) *entity.Config {
config := &entity.Config{Key: key}
if err := a.configRepo.GetConfig(config, "Id", "Key", "Value"); err != nil {
global.Log.Warnf("不存在key = [%s] 的系统配置", key)
}
return config
}

View File

@@ -0,0 +1,29 @@
package entity
import "mayfly-go/pkg/model"
const (
ConfigKeyUseLoginCaptcha string = "UseLoginCaptcha" // 是否使用登录验证码
)
type Config struct {
model.Model
Name string `json:"name"` // 配置名
Key string `json:"key"` // 配置key
Value string `json:"value"`
Remark string `json:"remark"`
}
func (a *Config) TableName() string {
return "t_sys_config"
}
// 若配置信息不存在, 则返回传递的默认值.
// 否则只有value == "1"为true其他为false
func (c *Config) BoolValue(defaultValue bool) bool {
// 如果值不存在,则返回默认值
if c.Id == 0 {
return defaultValue
}
return c.Value == "1"
}

View File

@@ -0,0 +1,18 @@
package repository
import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/pkg/model"
)
type Config interface {
GetPageList(condition *entity.Config, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult
Insert(config *entity.Config)
Update(config *entity.Config)
GetConfig(config *entity.Config, cols ...string) error
GetByCondition(condition *entity.Config, cols ...string) error
}

View File

@@ -0,0 +1,32 @@
package persistence
import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/internal/sys/domain/repository"
"mayfly-go/pkg/biz"
"mayfly-go/pkg/model"
)
type configRepo struct{}
var ConfigDao repository.Config = &configRepo{}
func (m *configRepo) GetPageList(condition *entity.Config, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult {
return model.GetPage(pageParam, condition, toEntity)
}
func (m *configRepo) Insert(config *entity.Config) {
biz.ErrIsNil(model.Insert(config), "新增系统配置失败")
}
func (m *configRepo) Update(config *entity.Config) {
biz.ErrIsNil(model.UpdateById(config), "更新系统配置失败")
}
func (m *configRepo) GetConfig(condition *entity.Config, cols ...string) error {
return model.GetBy(condition, cols...)
}
func (r *configRepo) GetByCondition(condition *entity.Config, cols ...string) error {
return model.GetBy(condition, cols...)
}

View File

@@ -15,6 +15,7 @@ func InitAccountRouter(router *gin.RouterGroup) {
ResourceApp: application.ResourceApp,
RoleApp: application.RoleApp,
MsgApp: application.MsgApp,
ConfigApp: application.ConfigApp,
}
{
// 用户登录
@@ -61,7 +62,7 @@ func InitAccountRouter(router *gin.RouterGroup) {
ctx.NewReqCtxWithGin(c).
WithRequiredPermission(addAccountPermission).
WithLog(createAccount).
Handle(a.CreateAccount)
Handle(a.SaveAccount)
})
changeStatus := ctx.NewLogInfo("修改账号状态").WithSave(true)

View File

@@ -0,0 +1,30 @@
package router
import (
"mayfly-go/internal/sys/api"
"mayfly-go/internal/sys/application"
"mayfly-go/pkg/ctx"
"github.com/gin-gonic/gin"
)
func InitSysConfigRouter(router *gin.RouterGroup) {
r := &api.Config{ConfigApp: application.ConfigApp}
db := router.Group("sys/configs")
{
db.GET("", func(c *gin.Context) {
ctx.NewReqCtxWithGin(c).Handle(r.Configs)
})
db.GET("/value", func(c *gin.Context) {
ctx.NewReqCtxWithGin(c).WithNeedToken(false).Handle(r.GetConfigValueByKey)
})
saveConfig := ctx.NewLogInfo("保存系统配置信息").WithSave(true)
db.POST("", func(c *gin.Context) {
ctx.NewReqCtxWithGin(c).
WithLog(saveConfig).
Handle(r.SaveConfig)
})
}
}

View File

@@ -437,6 +437,8 @@ INSERT INTO `t_sys_resource`(`id`, `pid`, `type`, `status`, `name`, `code`, `wei
INSERT INTO `t_sys_resource`(`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`) VALUES (83, 82, 2, 1, '基本权限', 'mongo:manage:base', 1, 'null', 1, 'admin', 1, 'admin', '2022-05-16 18:13:25', '2022-05-16 18:13:25');
INSERT INTO `t_sys_resource`(`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`) VALUES (84, 4, 1, 1, '操作日志', 'syslogs', 4, '{\"component\":\"SyslogList\",\"icon\":\"Tickets\",\"routeName\":\"SyslogList\"}', 1, 'admin', 1, 'admin', '2022-07-13 19:57:07', '2022-07-13 22:58:19');
INSERT INTO `t_sys_resource`(`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`) VALUES (85, 84, 2, 1, '操作日志基本权限', 'syslog', 1, 'null', 1, 'admin', 1, 'admin', '2022-07-13 19:57:55', '2022-07-13 19:57:55');
INSERT INTO `t_sys_resource`(`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`) VALUES (86, 4, 1, 1, '系统配置', 'configs', 5, '{\"component\":\"ConfigList\",\"icon\":\"Setting\",\"isKeepAlive\":true,\"routeName\":\"ConfigList\"}', 1, 'admin', 1, 'admin', '2022-08-25 22:18:55', '2022-08-25 22:19:18');
INSERT INTO `t_sys_resource`(`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`) VALUES (87, 86, 2, 1, '基本权限', 'config:base', 1, 'null', 1, 'admin', 1, 'admin', '2022-08-25 22:19:35', '2022-08-25 22:19:35');
COMMIT;
-- ----------------------------
@@ -642,6 +644,8 @@ INSERT INTO `t_sys_role_resource`(`id`, `role_id`, `resource_id`, `creator_id`,
INSERT INTO `t_sys_role_resource`(`id`, `role_id`, `resource_id`, `creator_id`, `creator`, `create_time`) VALUES (506, 1, 83, 1, 'admin', '2022-07-14 11:03:09');
INSERT INTO `t_sys_role_resource`(`id`, `role_id`, `resource_id`, `creator_id`, `creator`, `create_time`) VALUES (507, 1, 84, 1, 'admin', '2022-07-14 11:10:11');
INSERT INTO `t_sys_role_resource`(`id`, `role_id`, `resource_id`, `creator_id`, `creator`, `create_time`) VALUES (508, 1, 85, 1, 'admin', '2022-07-14 11:10:11');
INSERT INTO `t_sys_role_resource`(`id`, `role_id`, `resource_id`, `creator_id`, `creator`, `create_time`) VALUES (509, 1, 86, 1, 'admin', '2022-07-14 11:10:11');
INSERT INTO `t_sys_role_resource`(`id`, `role_id`, `resource_id`, `creator_id`, `creator`, `create_time`) VALUES (510, 1, 87, 1, 'admin', '2022-07-14 11:10:11');
COMMIT;
-- ----------------------------
@@ -685,5 +689,32 @@ CREATE TABLE `t_mongo` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- ----------------------------
-- Table structure for t_sys_config
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_config`;
CREATE TABLE `t_sys_config` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(60) COLLATE utf8mb4_bin NOT NULL COMMENT '配置名',
`key` varchar(120) COLLATE utf8mb4_bin NOT NULL COMMENT '配置key',
`value` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '配置value',
`remark` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
`create_time` datetime NOT NULL,
`creator_id` bigint(20) NOT NULL,
`creator` varchar(36) COLLATE utf8mb4_bin NOT NULL,
`update_time` datetime NOT NULL,
`modifier_id` bigint(20) NOT NULL,
`modifier` varchar(36) COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- ----------------------------
-- Records of t_sys_config
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_config` VALUES (1, '是否启用登录验证码', 'UseLoginCaptcha', '1', '1: 启用、0: 不启用', '2022-08-25 22:27:17', 1, 'admin', '2022-08-26 10:26:56', 1, 'admin');
INSERT INTO `t_sys_config` VALUES (2, '是否启用水印', 'UseWartermark', '1', '1: 启用、0: 不启用', '2022-08-25 23:36:35', 1, 'admin', '2022-08-26 10:02:52', 1, 'admin');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -4,7 +4,7 @@ import "fmt"
const (
AppName = "mayfly-go"
Version = "v1.2.6"
Version = "v1.2.8"
)
func GetAppInfo() string {

View File

@@ -3,9 +3,6 @@
config.yml: 服务端口mysqlaeskey(16 24 32位)jwtkey等信息在此配置即可。
建议务必将aes.key(资源密码加密如机器、数据库、redis等密码)与jwt.key(jwt秘钥)两信息使用随机字符串替换。
前端:
static/config.js: 若前后端分开部署则将该文件中的api地址配成后端服务的真实地址即可否则无需修改。
服务启动&重启:./startup.sh
服务关闭:./shutdown.sh

View File

@@ -1 +1 @@
import{_ as s,u as n,b as l,e as c,h as e,g as d,w as f,Y as m,Q as u,R as _,d as p,B as h}from"./index.1661345446364.js";var x="assets/401.1661345446364.png";const v={name:"401",setup(){const t=n();return{onSetAuth:()=>{m(),t.push("/login")}}}},o=t=>(u("data-v-6ec92039"),t=t(),_(),t),g={class:"error"},y={class:"error-flex"},b={class:"left"},C={class:"left-item"},B=o(()=>e("div",{class:"left-item-animation left-item-num"},"401",-1)),w=o(()=>e("div",{class:"left-item-animation left-item-title"},"\u60A8\u672A\u88AB\u6388\u6743\u6216\u767B\u5F55\u8D85\u65F6\uFF0C\u6CA1\u6709\u64CD\u4F5C\u6743\u9650",-1)),A=o(()=>e("div",{class:"left-item-animation left-item-msg"},null,-1)),S={class:"left-item-animation left-item-btn"},F=h("\u91CD\u65B0\u767B\u5F55"),k=o(()=>e("div",{class:"right"},[e("img",{src:x})],-1));function I(t,r,z,a,D,N){const i=l("el-button");return p(),c("div",g,[e("div",y,[e("div",b,[e("div",C,[B,w,A,e("div",S,[d(i,{type:"primary",round:"",onClick:a.onSetAuth},{default:f(()=>[F]),_:1},8,["onClick"])])])]),k])])}var $=s(v,[["render",I],["__scopeId","data-v-6ec92039"]]);export{$ as default};
import{_ as s,u as n,b as l,e as c,h as e,g as d,w as f,$ as m,Q as u,R as _,d as p,B as h}from"./index.1661515638242.js";var x="assets/401.1661515638242.png";const v={name:"401",setup(){const t=n();return{onSetAuth:()=>{m(),t.push("/login")}}}},o=t=>(u("data-v-6ec92039"),t=t(),_(),t),g={class:"error"},y={class:"error-flex"},b={class:"left"},C={class:"left-item"},B=o(()=>e("div",{class:"left-item-animation left-item-num"},"401",-1)),w=o(()=>e("div",{class:"left-item-animation left-item-title"},"\u60A8\u672A\u88AB\u6388\u6743\u6216\u767B\u5F55\u8D85\u65F6\uFF0C\u6CA1\u6709\u64CD\u4F5C\u6743\u9650",-1)),A=o(()=>e("div",{class:"left-item-animation left-item-msg"},null,-1)),S={class:"left-item-animation left-item-btn"},F=h("\u91CD\u65B0\u767B\u5F55"),k=o(()=>e("div",{class:"right"},[e("img",{src:x})],-1));function I(t,r,$,a,z,D){const i=l("el-button");return p(),c("div",g,[e("div",y,[e("div",b,[e("div",C,[B,w,A,e("div",S,[d(i,{type:"primary",round:"",onClick:a.onSetAuth},{default:f(()=>[F]),_:1},8,["onClick"])])])]),k])])}var V=s(v,[["render",I],["__scopeId","data-v-6ec92039"]]);export{V as default};

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -1 +1 @@
import{_ as s,u as n,b as l,e as c,h as e,g as d,w as m,Q as f,R as u,d as _,B as p}from"./index.1661345446364.js";var h="assets/404.1661345446364.png";const x={name:"404",setup(){const t=n();return{onGoHome:()=>{t.push("/")}}}},o=t=>(f("data-v-69e91ac8"),t=t(),u(),t),v={class:"error"},g={class:"error-flex"},y={class:"left"},F={class:"left-item"},b=o(()=>e("div",{class:"left-item-animation left-item-num"},"404",-1)),C=o(()=>e("div",{class:"left-item-animation left-item-title"},"\u5730\u5740\u8F93\u5165\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u5730\u5740~",-1)),B=o(()=>e("div",{class:"left-item-animation left-item-msg"},"\u60A8\u53EF\u4EE5\u5148\u68C0\u67E5\u7F51\u5740\uFF0C\u7136\u540E\u91CD\u65B0\u8F93\u5165",-1)),E={class:"left-item-animation left-item-btn"},w=p("\u8FD4\u56DE\u9996\u9875"),k=o(()=>e("div",{class:"right"},[e("img",{src:h})],-1));function D(t,a,I,r,z,G){const i=l("el-button");return _(),c("div",v,[e("div",g,[e("div",y,[e("div",F,[b,C,B,e("div",E,[d(i,{type:"primary",round:"",onClick:r.onGoHome},{default:m(()=>[w]),_:1},8,["onClick"])])])]),k])])}var N=s(x,[["render",D],["__scopeId","data-v-69e91ac8"]]);export{N as default};
import{_ as s,u as n,b as l,e as c,h as e,g as d,w as m,Q as f,R as u,d as _,B as p}from"./index.1661515638242.js";var h="assets/404.1661515638242.png";const x={name:"404",setup(){const t=n();return{onGoHome:()=>{t.push("/")}}}},o=t=>(f("data-v-69e91ac8"),t=t(),u(),t),v={class:"error"},g={class:"error-flex"},y={class:"left"},F={class:"left-item"},b=o(()=>e("div",{class:"left-item-animation left-item-num"},"404",-1)),C=o(()=>e("div",{class:"left-item-animation left-item-title"},"\u5730\u5740\u8F93\u5165\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u5730\u5740~",-1)),B=o(()=>e("div",{class:"left-item-animation left-item-msg"},"\u60A8\u53EF\u4EE5\u5148\u68C0\u67E5\u7F51\u5740\uFF0C\u7136\u540E\u91CD\u65B0\u8F93\u5165",-1)),E={class:"left-item-animation left-item-btn"},w=p("\u8FD4\u56DE\u9996\u9875"),k=o(()=>e("div",{class:"right"},[e("img",{src:h})],-1));function D(t,a,I,r,z,G){const i=l("el-button");return _(),c("div",v,[e("div",g,[e("div",y,[e("div",F,[b,C,B,e("div",E,[d(i,{type:"primary",round:"",onClick:r.onGoHome},{default:m(()=>[w]),_:1},8,["onClick"])])])]),k])])}var N=s(x,[["render",D],["__scopeId","data-v-69e91ac8"]]);export{N as default};

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1 +1 @@
import{p as r}from"./index.1661345446364.js";class s{constructor(t,e){this.url=t,this.method=e}setUrl(t){return this.url=t,this}setMethod(t){return this.method=t,this}getUrl(){return r.getApiUrl(this.url)}request(t=null,e=null){return r.send(this,t,e)}requestWithHeaders(t,e){return r.sendWithHeaders(this,t,e)}static create(t,e){return new s(t,e)}}export{s as A};
import{p as r}from"./index.1661515638242.js";class s{constructor(t,e){this.url=t,this.method=e}setUrl(t){return this.url=t,this}setMethod(t){return this.method=t,this}getUrl(){return r.getApiUrl(this.url)}request(t=null,e=null){return r.send(this,t,e)}requestWithHeaders(t,e){return r.sendWithHeaders(this,t,e)}static create(t,e){return new s(t,e)}}export{s as A};

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
var Zt=Object.defineProperty,Ot=Object.defineProperties;var Dt=Object.getOwnPropertyDescriptors;var Wt=Object.getOwnPropertySymbols;var Kt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable;var Ft=(Ie,le,Ge)=>le in Ie?Zt(Ie,le,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[le]=Ge,kt=(Ie,le)=>{for(var Ge in le||(le={}))Kt.call(le,Ge)&&Ft(Ie,Ge,le[Ge]);if(Wt)for(var Ge of Wt(le))zt.call(le,Ge)&&Ft(Ie,Ge,le[Ge]);return Ie},Et=(Ie,le)=>Ot(Ie,Dt(le));import{m as ut}from"./api.16613454463646.js";import{P as Xt}from"./ProjectEnvSelect.1661345446364.js";import{i as Tt,a as Pt,b as Jt}from"./assert.1661345446364.js";import{f as Yt}from"./format.1661345446364.js";import{a4 as Ut,A as Gt,t as _t,q as Mt,r as Ht,o as Qt,a5 as qt,v as ei,_ as Vt,m as ti,d as qe,e as gt,h as tt,l as ii,b as Ye,g as Be,w as We,F as It,j as bt,k as mt,i as Rt,z as ni,E as ft,B as yt}from"./index.1661345446364.js";import"./Api.1661345446364.js";import"./api.16613454463644.js";var jt={exports:{}};/*!
var Zt=Object.defineProperty,Ot=Object.defineProperties;var Dt=Object.getOwnPropertyDescriptors;var Wt=Object.getOwnPropertySymbols;var Kt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable;var Ft=(Ie,le,Ge)=>le in Ie?Zt(Ie,le,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[le]=Ge,kt=(Ie,le)=>{for(var Ge in le||(le={}))Kt.call(le,Ge)&&Ft(Ie,Ge,le[Ge]);if(Wt)for(var Ge of Wt(le))zt.call(le,Ge)&&Ft(Ie,Ge,le[Ge]);return Ie},Et=(Ie,le)=>Ot(Ie,Dt(le));import{m as ut}from"./api.16615156382426.js";import{P as Xt}from"./ProjectEnvSelect.1661515638242.js";import{i as Tt,a as Pt,b as Jt}from"./assert.1661515638242.js";import{f as Yt}from"./format.1661515638242.js";import{a6 as Ut,A as Gt,t as _t,q as Mt,r as Ht,o as Qt,a7 as qt,v as ei,_ as Vt,m as ti,d as qe,e as gt,h as tt,l as ii,b as Ye,g as Be,w as We,F as It,j as bt,k as mt,i as Rt,z as ni,E as ft,B as yt}from"./index.1661515638242.js";import"./Api.1661515638242.js";import"./api.16615156382424.js";var jt={exports:{}};/*!
* jsoneditor.js
*
* @brief

View File

@@ -1 +1 @@
var P=Object.defineProperty,V=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var h=(o,e,n)=>e in o?P(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,j=(o,e)=>{for(var n in e||(e={}))B.call(e,n)&&h(o,n,e[n]);if(v)for(var n of v(e))$.call(e,n)&&h(o,n,e[n]);return o},_=(o,e)=>V(o,w(e));import{p as g}from"./api.16613454463644.js";import{A as S,r as F,o as A,t as N,_ as q,b as p,d as r,e as u,g as s,w as a,F as b,j as y,k as E,h as I,i as k,a3 as U}from"./index.1661345446364.js";const z=S({name:"ProjectEnvSelect",props:{visible:{type:Boolean},data:{type:Object},title:{type:String},machineId:{type:Number},isCommon:{type:Boolean}},setup(o,{emit:e}){const n=F({projects:[],envs:[],projectId:null,envId:null});A(async()=>{n.projects=await g.accountProjects.request(null)});const c=async l=>{e("update:projectId",l),e("changeProjectEnv",n.projectId,null),n.envId=null,n.envs=await g.projectEnvs.request({projectId:l})},d=l=>{e("update:envId",l),e("changeProjectEnv",n.projectId,l)};return _(j({},N(n)),{changeProject:c,changeEnv:d})}}),D={style:{float:"left"}},L={style:{float:"right",color:"#8492a6","font-size":"13px"}};function M(o,e,n,c,d,l){const i=p("el-option"),f=p("el-select"),m=p("el-form-item"),C=p("el-form");return r(),u("div",null,[s(C,{class:"search-form","label-position":"right",inline:!0},{default:a(()=>[s(m,{prop:"project",label:"\u9879\u76EE","label-width":"40px"},{default:a(()=>[s(f,{modelValue:o.projectId,"onUpdate:modelValue":e[0]||(e[0]=t=>o.projectId=t),placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",onChange:o.changeProject,filterable:""},{default:a(()=>[(r(!0),u(b,null,y(o.projects,t=>(r(),E(i,{key:t.id,label:`${t.name} [${t.remark}]`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),s(m,{prop:"env",label:"env","label-width":"33px"},{default:a(()=>[s(f,{style:{width:"80px"},modelValue:o.envId,"onUpdate:modelValue":e[1]||(e[1]=t=>o.envId=t),placeholder:"\u73AF\u5883",onChange:o.changeEnv,filterable:""},{default:a(()=>[(r(!0),u(b,null,y(o.envs,t=>(r(),E(i,{key:t.id,label:t.name,value:t.id},{default:a(()=>[I("span",D,k(t.name),1),I("span",L,k(t.remark),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),U(o.$slots,"default")]),_:3})])}var H=q(z,[["render",M]]);export{H as P};
var P=Object.defineProperty,V=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var h=(o,e,n)=>e in o?P(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,j=(o,e)=>{for(var n in e||(e={}))B.call(e,n)&&h(o,n,e[n]);if(v)for(var n of v(e))$.call(e,n)&&h(o,n,e[n]);return o},_=(o,e)=>V(o,w(e));import{p as g}from"./api.16615156382424.js";import{A as S,r as F,o as A,t as N,_ as q,b as p,d as r,e as u,g as s,w as a,F as b,j as y,k as E,h as I,i as k,a5 as U}from"./index.1661515638242.js";const z=S({name:"ProjectEnvSelect",props:{visible:{type:Boolean},data:{type:Object},title:{type:String},machineId:{type:Number},isCommon:{type:Boolean}},setup(o,{emit:e}){const n=F({projects:[],envs:[],projectId:null,envId:null});A(async()=>{n.projects=await g.accountProjects.request(null)});const c=async l=>{e("update:projectId",l),e("changeProjectEnv",n.projectId,null),n.envId=null,n.envs=await g.projectEnvs.request({projectId:l})},d=l=>{e("update:envId",l),e("changeProjectEnv",n.projectId,l)};return _(j({},N(n)),{changeProject:c,changeEnv:d})}}),D={style:{float:"left"}},L={style:{float:"right",color:"#8492a6","font-size":"13px"}};function M(o,e,n,c,d,l){const i=p("el-option"),f=p("el-select"),m=p("el-form-item"),C=p("el-form");return r(),u("div",null,[s(C,{class:"search-form","label-position":"right",inline:!0},{default:a(()=>[s(m,{prop:"project",label:"\u9879\u76EE","label-width":"40px"},{default:a(()=>[s(f,{modelValue:o.projectId,"onUpdate:modelValue":e[0]||(e[0]=t=>o.projectId=t),placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",onChange:o.changeProject,filterable:""},{default:a(()=>[(r(!0),u(b,null,y(o.projects,t=>(r(),E(i,{key:t.id,label:`${t.name} [${t.remark}]`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),s(m,{prop:"env",label:"env","label-width":"33px"},{default:a(()=>[s(f,{style:{width:"80px"},modelValue:o.envId,"onUpdate:modelValue":e[1]||(e[1]=t=>o.envId=t),placeholder:"\u73AF\u5883",onChange:o.changeEnv,filterable:""},{default:a(()=>[(r(!0),u(b,null,y(o.envs,t=>(r(),E(i,{key:t.id,label:t.name,value:t.id},{default:a(()=>[I("span",D,k(t.name),1),I("span",L,k(t.remark),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),U(o.$slots,"default")]),_:3})])}var H=q(z,[["render",M]]);export{H as P};

View File

@@ -1 +1 @@
var i=Object.defineProperty;var a=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var s=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,o=(n,e)=>{for(var t in e||(e={}))m.call(e,t)&&s(n,t,e[t]);if(a)for(var t of a(e))h.call(e,t)&&s(n,t,e[t]);return n};import{S as c}from"./SshTerminal.1661345446364.js";import{_ as p,A as d,S as l,r as u,o as f,t as _,b as g,e as I,g as S,d as v}from"./index.1661345446364.js";const $=d({name:"SshTerminalPage",components:{SshTerminal:c},props:{machineId:{type:Number}},setup(){const n=l(),e=u({machineId:0,height:700});return f(()=>{e.height=window.innerHeight+5,e.machineId=Number.parseInt(n.query.id)}),o({},_(e))}});function b(n,e,t,N,T,k){const r=g("ssh-terminal");return v(),I("div",null,[S(r,{ref:"terminal",machineId:n.machineId,height:n.height+"px"},null,8,["machineId","height"])])}var B=p($,[["render",b]]);export{B as default};
var i=Object.defineProperty;var a=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var s=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,o=(n,e)=>{for(var t in e||(e={}))m.call(e,t)&&s(n,t,e[t]);if(a)for(var t of a(e))h.call(e,t)&&s(n,t,e[t]);return n};import{S as c}from"./SshTerminal.1661515638242.js";import{_ as p,A as d,S as l,r as u,o as f,t as _,b as g,e as I,g as S,d as v}from"./index.1661515638242.js";const $=d({name:"SshTerminalPage",components:{SshTerminal:c},props:{machineId:{type:Number}},setup(){const n=l(),e=u({machineId:0,height:700});return f(()=>{e.height=window.innerHeight+5,e.machineId=Number.parseInt(n.query.id)}),o({},_(e))}});function b(n,e,t,N,T,k){const r=g("ssh-terminal");return v(),I("div",null,[S(r,{ref:"terminal",machineId:n.machineId,height:n.height+"px"},null,8,["machineId","height"])])}var B=p($,[["render",b]]);export{B as default};

View File

@@ -1 +1 @@
var k=Object.defineProperty,B=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var h=(e,t,a)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,w=(e,t)=>{for(var a in t||(t={}))z.call(t,a)&&h(e,a,t[a]);if(f)for(var a of f(t))A.call(t,a)&&h(e,a,t[a]);return e},C=(e,t)=>B(e,N(t));import{l as S,b as $}from"./api.16613454463642.js";import{_ as j,A as L,r as P,o as T,t as U,b as n,d as p,e as b,g as o,w as u,h as I,F as M,j as R,k as c,B as d,i as G,z as F}from"./index.1661345446364.js";import"./Api.1661345446364.js";const H=L({name:"SyslogList",components:{},setup(){const e=P({query:{pageNum:1,pageSize:10,name:null},total:0,logs:[],accounts:[]});T(()=>{t()});const t=async()=>{let r=await S.list.request(e.query);e.logs=r.list,e.total=r.total},a=r=>{e.query.pageNum=r,t()},m=r=>{$.list.request({username:r}).then(g=>{e.accounts=g.list})};return C(w({},U(e)),{search:t,handlePageChange:a,getAccount:m})}}),J={class:"role-list"},K={style:{float:"right"}},O=d("\u6210\u529F"),Q=d("\u5931\u8D25");function W(e,t,a,m,r,g){const i=n("el-option"),_=n("el-select"),v=n("el-button"),s=n("el-table-column"),y=n("el-tag"),q=n("el-table"),D=n("el-pagination"),E=n("el-row"),V=n("el-card");return p(),b("div",J,[o(V,null,{default:u(()=>[I("div",K,[o(_,{remote:"","remote-method":e.getAccount,modelValue:e.query.creatorId,"onUpdate:modelValue":t[0]||(t[0]=l=>e.query.creatorId=l),filterable:"",placeholder:"\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u8D26\u53F7",clearable:"",class:"mr5"},{default:u(()=>[(p(!0),b(M,null,R(e.accounts,l=>(p(),c(i,{key:l.id,label:l.username,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["remote-method","modelValue"]),o(_,{modelValue:e.query.type,"onUpdate:modelValue":t[1]||(t[1]=l=>e.query.type=l),filterable:"",placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7ED3\u679C",clearable:"",class:"mr5"},{default:u(()=>[o(i,{label:"\u6210\u529F",value:1}),o(i,{label:"\u5931\u8D25",value:2})]),_:1},8,["modelValue"]),o(v,{onClick:e.search,type:"success",icon:"search"},null,8,["onClick"])]),o(q,{data:e.logs,style:{width:"100%"}},{default:u(()=>[o(s,{prop:"creator",label:"\u64CD\u4F5C\u4EBA","min-width":"100","show-overflow-tooltip":""}),o(s,{prop:"createTime",label:"\u64CD\u4F5C\u65F6\u95F4","min-width":"160"},{default:u(l=>[d(G(e.$filters.dateFormat(l.row.createTime)),1)]),_:1}),o(s,{prop:"type",label:"\u7ED3\u679C","min-width":"65"},{default:u(l=>[l.row.type==1?(p(),c(y,{key:0,type:"success",size:"small"},{default:u(()=>[O]),_:1})):F("",!0),l.row.type==2?(p(),c(y,{key:1,type:"danger",size:"small"},{default:u(()=>[Q]),_:1})):F("",!0)]),_:1}),o(s,{prop:"description",label:"\u63CF\u8FF0","min-width":"160","show-overflow-tooltip":""}),o(s,{prop:"reqParam",label:"\u8BF7\u6C42\u4FE1\u606F","min-width":"300","show-overflow-tooltip":""}),o(s,{prop:"resp",label:"\u54CD\u5E94\u4FE1\u606F","min-width":"200","show-overflow-tooltip":""})]),_:1},8,["data"]),o(E,{style:{"margin-top":"20px"},type:"flex",justify:"end"},{default:u(()=>[o(D,{style:{"text-align":"right"},onCurrentChange:e.handlePageChange,total:e.total,layout:"prev, pager, next, total, jumper","current-page":e.query.pageNum,"onUpdate:current-page":t[2]||(t[2]=l=>e.query.pageNum=l),"page-size":e.query.pageSize},null,8,["onCurrentChange","total","current-page","page-size"])]),_:1})]),_:1})])}var ee=j(H,[["render",W]]);export{ee as default};
var k=Object.defineProperty,B=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var h=(e,t,a)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,w=(e,t)=>{for(var a in t||(t={}))z.call(t,a)&&h(e,a,t[a]);if(f)for(var a of f(t))A.call(t,a)&&h(e,a,t[a]);return e},C=(e,t)=>B(e,N(t));import{l as S,b as $}from"./api.16615156382422.js";import{_ as j,A as L,r as P,o as T,t as U,b as n,d as p,e as b,g as o,w as u,h as I,F as M,j as R,k as c,B as d,i as G,z as F}from"./index.1661515638242.js";import"./Api.1661515638242.js";const H=L({name:"SyslogList",components:{},setup(){const e=P({query:{pageNum:1,pageSize:10,name:null},total:0,logs:[],accounts:[]});T(()=>{t()});const t=async()=>{let r=await S.list.request(e.query);e.logs=r.list,e.total=r.total},a=r=>{e.query.pageNum=r,t()},m=r=>{$.list.request({username:r}).then(g=>{e.accounts=g.list})};return C(w({},U(e)),{search:t,handlePageChange:a,getAccount:m})}}),J={class:"role-list"},K={style:{float:"right"}},O=d("\u6210\u529F"),Q=d("\u5931\u8D25");function W(e,t,a,m,r,g){const i=n("el-option"),_=n("el-select"),v=n("el-button"),s=n("el-table-column"),y=n("el-tag"),q=n("el-table"),D=n("el-pagination"),E=n("el-row"),V=n("el-card");return p(),b("div",J,[o(V,null,{default:u(()=>[I("div",K,[o(_,{remote:"","remote-method":e.getAccount,modelValue:e.query.creatorId,"onUpdate:modelValue":t[0]||(t[0]=l=>e.query.creatorId=l),filterable:"",placeholder:"\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u8D26\u53F7",clearable:"",class:"mr5"},{default:u(()=>[(p(!0),b(M,null,R(e.accounts,l=>(p(),c(i,{key:l.id,label:l.username,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["remote-method","modelValue"]),o(_,{modelValue:e.query.type,"onUpdate:modelValue":t[1]||(t[1]=l=>e.query.type=l),filterable:"",placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7ED3\u679C",clearable:"",class:"mr5"},{default:u(()=>[o(i,{label:"\u6210\u529F",value:1}),o(i,{label:"\u5931\u8D25",value:2})]),_:1},8,["modelValue"]),o(v,{onClick:e.search,type:"success",icon:"search"},null,8,["onClick"])]),o(q,{data:e.logs,style:{width:"100%"}},{default:u(()=>[o(s,{prop:"creator",label:"\u64CD\u4F5C\u4EBA","min-width":"100","show-overflow-tooltip":""}),o(s,{prop:"createTime",label:"\u64CD\u4F5C\u65F6\u95F4","min-width":"160"},{default:u(l=>[d(G(e.$filters.dateFormat(l.row.createTime)),1)]),_:1}),o(s,{prop:"type",label:"\u7ED3\u679C","min-width":"65"},{default:u(l=>[l.row.type==1?(p(),c(y,{key:0,type:"success",size:"small"},{default:u(()=>[O]),_:1})):F("",!0),l.row.type==2?(p(),c(y,{key:1,type:"danger",size:"small"},{default:u(()=>[Q]),_:1})):F("",!0)]),_:1}),o(s,{prop:"description",label:"\u63CF\u8FF0","min-width":"160","show-overflow-tooltip":""}),o(s,{prop:"reqParam",label:"\u8BF7\u6C42\u4FE1\u606F","min-width":"300","show-overflow-tooltip":""}),o(s,{prop:"resp",label:"\u54CD\u5E94\u4FE1\u606F","min-width":"200","show-overflow-tooltip":""})]),_:1},8,["data"]),o(E,{style:{"margin-top":"20px"},type:"flex",justify:"end"},{default:u(()=>[o(D,{style:{"text-align":"right"},onCurrentChange:e.handlePageChange,total:e.total,layout:"prev, pager, next, total, jumper","current-page":e.query.pageNum,"onUpdate:current-page":t[2]||(t[2]=l=>e.query.pageNum=l),"page-size":e.query.pageSize},null,8,["onCurrentChange","total","current-page","page-size"])]),_:1})]),_:1})])}var ee=j(H,[["render",W]]);export{ee as default};

View File

@@ -1 +1 @@
import{A as s}from"./Api.1661345446364.js";const t={list:s.create("/sys/resources","get"),detail:s.create("/sys/resources/{id}","get"),save:s.create("/sys/resources","post"),update:s.create("/sys/resources/{id}","put"),del:s.create("/sys/resources/{id}","delete"),changeStatus:s.create("/sys/resources/{id}/{status}","put")},r={list:s.create("/sys/roles","get"),save:s.create("/sys/roles","post"),update:s.create("/sys/roles/{id}","put"),del:s.create("/sys/roles/{id}","delete"),roleResourceIds:s.create("/sys/roles/{id}/resourceIds","get"),roleResources:s.create("/sys/roles/{id}/resources","get"),saveResources:s.create("/sys/roles/{id}/resources","post")},c={list:s.create("/sys/accounts","get"),save:s.create("/sys/accounts","post"),update:s.create("/sys/accounts/{id}","put"),del:s.create("/sys/accounts/{id}","delete"),changeStatus:s.create("/sys/accounts/change-status/{id}/{status}","put"),roleIds:s.create("/sys/accounts/{id}/roleIds","get"),roles:s.create("/sys/accounts/{id}/roles","get"),resources:s.create("/sys/accounts/{id}/resources","get"),saveRoles:s.create("/sys/accounts/roles","post")},a={list:s.create("/syslogs","get")};export{r as a,c as b,a as l,t as r};
import{A as s}from"./Api.1661515638242.js";const t={list:s.create("/sys/resources","get"),detail:s.create("/sys/resources/{id}","get"),save:s.create("/sys/resources","post"),update:s.create("/sys/resources/{id}","put"),del:s.create("/sys/resources/{id}","delete"),changeStatus:s.create("/sys/resources/{id}/{status}","put")},c={list:s.create("/sys/roles","get"),save:s.create("/sys/roles","post"),update:s.create("/sys/roles/{id}","put"),del:s.create("/sys/roles/{id}","delete"),roleResourceIds:s.create("/sys/roles/{id}/resourceIds","get"),roleResources:s.create("/sys/roles/{id}/resources","get"),saveResources:s.create("/sys/roles/{id}/resources","post")},r={list:s.create("/sys/accounts","get"),save:s.create("/sys/accounts","post"),update:s.create("/sys/accounts/{id}","put"),del:s.create("/sys/accounts/{id}","delete"),changeStatus:s.create("/sys/accounts/change-status/{id}/{status}","put"),roleIds:s.create("/sys/accounts/{id}/roleIds","get"),roles:s.create("/sys/accounts/{id}/roles","get"),resources:s.create("/sys/accounts/{id}/resources","get"),saveRoles:s.create("/sys/accounts/roles","post")},a={list:s.create("/sys/configs","get"),save:s.create("/sys/configs","post"),getValue:s.create("/sys/configs/value","get")},o={list:s.create("/syslogs","get")};export{c as a,r as b,a as c,o as l,t as r};

View File

@@ -1 +1 @@
import{A as e}from"./Api.1661345446364.js";const c={list:e.create("/machines","get"),getMachinePwd:e.create("/machines/{id}/pwd","get"),info:e.create("/machines/{id}/sysinfo","get"),stats:e.create("/machines/{id}/stats","get"),process:e.create("/machines/{id}/process","get"),killProcess:e.create("/machines/{id}/process","delete"),closeCli:e.create("/machines/{id}/close-cli","delete"),saveMachine:e.create("/machines","post"),changeStatus:e.create("/machines/{id}/{status}","put"),del:e.create("/machines/{id}","delete"),scripts:e.create("/machines/{machineId}/scripts","get"),runScript:e.create("/machines/{machineId}/scripts/{scriptId}/run","get"),saveScript:e.create("/machines/{machineId}/scripts","post"),deleteScript:e.create("/machines/{machineId}/scripts/{scriptId}","delete"),files:e.create("/machines/{id}/files","get"),lsFile:e.create("/machines/{machineId}/files/{fileId}/read-dir","get"),rmFile:e.create("/machines/{machineId}/files/{fileId}/remove","delete"),uploadFile:e.create("/machines/{machineId}/files/{fileId}/upload?token={token}","post"),fileContent:e.create("/machines/{machineId}/files/{fileId}/read","get"),createFile:e.create("/machines/{machineId}/files/{id}/create-file","post"),updateFileContent:e.create("/machines/{machineId}/files/{id}/write","post"),addConf:e.create("/machines/{machineId}/files","post"),delConf:e.create("/machines/{machineId}/files/{id}","delete"),terminal:e.create("/api/machines/{id}/terminal","get")};export{c as m};
import{A as e}from"./Api.1661515638242.js";const c={list:e.create("/machines","get"),getMachinePwd:e.create("/machines/{id}/pwd","get"),info:e.create("/machines/{id}/sysinfo","get"),stats:e.create("/machines/{id}/stats","get"),process:e.create("/machines/{id}/process","get"),killProcess:e.create("/machines/{id}/process","delete"),closeCli:e.create("/machines/{id}/close-cli","delete"),saveMachine:e.create("/machines","post"),changeStatus:e.create("/machines/{id}/{status}","put"),del:e.create("/machines/{id}","delete"),scripts:e.create("/machines/{machineId}/scripts","get"),runScript:e.create("/machines/{machineId}/scripts/{scriptId}/run","get"),saveScript:e.create("/machines/{machineId}/scripts","post"),deleteScript:e.create("/machines/{machineId}/scripts/{scriptId}","delete"),files:e.create("/machines/{id}/files","get"),lsFile:e.create("/machines/{machineId}/files/{fileId}/read-dir","get"),rmFile:e.create("/machines/{machineId}/files/{fileId}/remove","delete"),uploadFile:e.create("/machines/{machineId}/files/{fileId}/upload?token={token}","post"),fileContent:e.create("/machines/{machineId}/files/{fileId}/read","get"),createFile:e.create("/machines/{machineId}/files/{id}/create-file","post"),updateFileContent:e.create("/machines/{machineId}/files/{id}/write","post"),addConf:e.create("/machines/{machineId}/files","post"),delConf:e.create("/machines/{machineId}/files/{id}","delete"),terminal:e.create("/api/machines/{id}/terminal","get")};export{c as m};

View File

@@ -1 +1 @@
import{A as e}from"./Api.1661345446364.js";const c={accountProjects:e.create("/accounts/projects","get"),projects:e.create("/projects","get"),saveProject:e.create("/projects","post"),delProject:e.create("/projects","delete"),projectEnvs:e.create("/projects/{projectId}/envs","get"),saveProjectEnv:e.create("/projects/{projectId}/envs","post"),projectMems:e.create("/projects/{projectId}/members","get"),saveProjectMem:e.create("/projects/{projectId}/members","post"),deleteProjectMem:e.create("/projects/{projectId}/members/{accountId}","delete")};export{c as p};
import{A as e}from"./Api.1661515638242.js";const c={accountProjects:e.create("/accounts/projects","get"),projects:e.create("/projects","get"),saveProject:e.create("/projects","post"),delProject:e.create("/projects","delete"),projectEnvs:e.create("/projects/{projectId}/envs","get"),saveProjectEnv:e.create("/projects/{projectId}/envs","post"),projectMems:e.create("/projects/{projectId}/members","get"),saveProjectMem:e.create("/projects/{projectId}/members","post"),deleteProjectMem:e.create("/projects/{projectId}/members/{accountId}","delete")};export{c as p};

View File

@@ -1 +1 @@
import{A as e}from"./Api.1661345446364.js";const s={redisList:e.create("/redis","get"),getRedisPwd:e.create("/redis/{id}/pwd","get"),redisInfo:e.create("/redis/{id}/info","get"),clusterInfo:e.create("/redis/{id}/cluster-info","get"),saveRedis:e.create("/redis","post"),delRedis:e.create("/redis/{id}","delete"),scan:e.create("/redis/{id}/scan","post"),getStringValue:e.create("/redis/{id}/string-value","get"),saveStringValue:e.create("/redis/{id}/string-value","post"),getHashValue:e.create("/redis/{id}/hash-value","get"),hscan:e.create("/redis/{id}/hscan","get"),hget:e.create("/redis/{id}/hget","get"),hdel:e.create("/redis/{id}/hdel","delete"),saveHashValue:e.create("/redis/{id}/hash-value","post"),getSetValue:e.create("/redis/{id}/set-value","get"),saveSetValue:e.create("/redis/{id}/set-value","post"),del:e.create("/redis/{id}/scan/{cursor}/{count}","delete"),delKey:e.create("/redis/{id}/key","delete")};export{s as r};
import{A as e}from"./Api.1661515638242.js";const s={redisList:e.create("/redis","get"),getRedisPwd:e.create("/redis/{id}/pwd","get"),redisInfo:e.create("/redis/{id}/info","get"),clusterInfo:e.create("/redis/{id}/cluster-info","get"),saveRedis:e.create("/redis","post"),delRedis:e.create("/redis/{id}","delete"),scan:e.create("/redis/{id}/scan","post"),getStringValue:e.create("/redis/{id}/string-value","get"),saveStringValue:e.create("/redis/{id}/string-value","post"),getHashValue:e.create("/redis/{id}/hash-value","get"),hscan:e.create("/redis/{id}/hscan","get"),hget:e.create("/redis/{id}/hget","get"),hdel:e.create("/redis/{id}/hdel","delete"),saveHashValue:e.create("/redis/{id}/hash-value","post"),getSetValue:e.create("/redis/{id}/set-value","get"),saveSetValue:e.create("/redis/{id}/set-value","post"),del:e.create("/redis/{id}/scan/{cursor}/{count}","delete"),delKey:e.create("/redis/{id}/key","delete")};export{s as r};

View File

@@ -1 +1 @@
import{A as o}from"./Api.1661345446364.js";const m={mongoList:o.create("/mongos","get"),saveMongo:o.create("/mongos","post"),deleteMongo:o.create("/mongos/{id}","delete"),databases:o.create("/mongos/{id}/databases","get"),collections:o.create("/mongos/{id}/collections","get"),runCommand:o.create("/mongos/{id}/run-command","post"),findCommand:o.create("/mongos/{id}/command/find","post"),updateByIdCommand:o.create("/mongos/{id}/command/update-by-id","post"),deleteByIdCommand:o.create("/mongos/{id}/command/delete-by-id","post"),insertCommand:o.create("/mongos/{id}/command/insert","post")};export{m};
import{A as o}from"./Api.1661515638242.js";const m={mongoList:o.create("/mongos","get"),saveMongo:o.create("/mongos","post"),deleteMongo:o.create("/mongos/{id}","delete"),databases:o.create("/mongos/{id}/databases","get"),collections:o.create("/mongos/{id}/collections","get"),runCommand:o.create("/mongos/{id}/run-command","post"),findCommand:o.create("/mongos/{id}/command/find","post"),updateByIdCommand:o.create("/mongos/{id}/command/update-by-id","post"),deleteByIdCommand:o.create("/mongos/{id}/command/delete-by-id","post"),insertCommand:o.create("/mongos/{id}/command/insert","post")};export{m};

View File

Before

Width:  |  Height:  |  Size: 458 KiB

After

Width:  |  Height:  |  Size: 458 KiB

View File

@@ -1 +1 @@
import{E as u}from"./Enum.1661345446364.js";var d={ResourceTypeEnum:new u().add("MENU","\u83DC\u5355",1).add("PERMISSION","\u6743\u9650",2),accountStatus:new u().add("ENABLE","\u6B63\u5E38",1).add("DISABLE","\u7981\u7528",-1),logType:new u().add("UPDATE","\u4FEE\u6539",2).add("DELETE","\u5220\u9664",3).add("SYS_LOG","\u7CFB\u7EDF",4).add("ERR_LOG","\u5F02\u5E38",5)};export{d as e};
import{E as u}from"./Enum.1661515638242.js";var d={ResourceTypeEnum:new u().add("MENU","\u83DC\u5355",1).add("PERMISSION","\u6743\u9650",2),accountStatus:new u().add("ENABLE","\u6B63\u5E38",1).add("DISABLE","\u7981\u7528",-1),logType:new u().add("UPDATE","\u4FEE\u6539",2).add("DELETE","\u5220\u9664",3).add("SYS_LOG","\u7CFB\u7EDF",4).add("ERR_LOG","\u5F02\u5E38",5)};export{d as e};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
.login-content-form[data-v-147f4cff]{margin-top:20px}.login-content-form .login-content-code[data-v-147f4cff]{display:flex;align-items:center;justify-content:space-around}.login-content-form .login-content-code .login-content-code-img[data-v-147f4cff]{width:100%;height:40px;line-height:40px;background-color:#fff;border:1px solid #dcdfe6;color:#333;font-size:16px;font-weight:700;letter-spacing:5px;text-indent:5px;text-align:center;cursor:pointer;transition:all ease .2s;border-radius:4px;user-select:none}.login-content-form .login-content-code .login-content-code-img[data-v-147f4cff]:hover{border-color:#c0c4cc;transition:all ease .2s}.login-content-form .login-content-submit[data-v-147f4cff]{width:100%;letter-spacing:2px;font-weight:300;margin-top:15px}.login-container[data-v-46973cfa]{width:100%;height:100%;background:url(./bg-login.1661345446364.png) no-repeat;background-size:100% 100%}.login-container .login-logo[data-v-46973cfa]{position:absolute;top:30px;left:50%;height:50px;display:flex;align-items:center;font-size:20px;color:var(--color-primary);letter-spacing:2px;width:90%;transform:translate(-50%)}.login-container .login-content[data-v-46973cfa]{width:500px;padding:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) translateZ(0);background-color:#fffffffc;box-shadow:0 2px 12px 0 var(--color-primary-light-5);border-radius:4px;transition:height .2s linear;height:480px;overflow:hidden;z-index:1}.login-container .login-content .login-content-main[data-v-46973cfa]{margin:0 auto;width:80%}.login-container .login-content .login-content-main .login-content-title[data-v-46973cfa]{color:#333;font-weight:500;font-size:22px;text-align:center;letter-spacing:4px;margin:15px 0 30px;white-space:nowrap}.login-container .login-content-mobile[data-v-46973cfa]{height:418px}.login-container .login-copyright[data-v-46973cfa]{position:absolute;left:50%;transform:translate(-50%);bottom:30px;text-align:center;color:#fff;font-size:12px;opacity:.8}.login-container .login-copyright .login-copyright-company[data-v-46973cfa],.login-container .login-copyright .login-copyright-msg[data-v-46973cfa]{white-space:nowrap}
.login-content-form[data-v-aa711bf4]{margin-top:20px}.login-content-form .login-content-code[data-v-aa711bf4]{display:flex;align-items:center;justify-content:space-around}.login-content-form .login-content-code .login-content-code-img[data-v-aa711bf4]{width:100%;height:40px;line-height:40px;background-color:#fff;border:1px solid #dcdfe6;color:#333;font-size:16px;font-weight:700;letter-spacing:5px;text-indent:5px;text-align:center;cursor:pointer;transition:all ease .2s;border-radius:4px;user-select:none}.login-content-form .login-content-code .login-content-code-img[data-v-aa711bf4]:hover{border-color:#c0c4cc;transition:all ease .2s}.login-content-form .login-content-submit[data-v-aa711bf4]{width:100%;letter-spacing:2px;font-weight:300;margin-top:15px}.login-container[data-v-46973cfa]{width:100%;height:100%;background:url(./bg-login.1661515638242.png) no-repeat;background-size:100% 100%}.login-container .login-logo[data-v-46973cfa]{position:absolute;top:30px;left:50%;height:50px;display:flex;align-items:center;font-size:20px;color:var(--color-primary);letter-spacing:2px;width:90%;transform:translate(-50%)}.login-container .login-content[data-v-46973cfa]{width:500px;padding:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) translateZ(0);background-color:#fffffffc;box-shadow:0 2px 12px 0 var(--color-primary-light-5);border-radius:4px;transition:height .2s linear;height:480px;overflow:hidden;z-index:1}.login-container .login-content .login-content-main[data-v-46973cfa]{margin:0 auto;width:80%}.login-container .login-content .login-content-main .login-content-title[data-v-46973cfa]{color:#333;font-weight:500;font-size:22px;text-align:center;letter-spacing:4px;margin:15px 0 30px;white-space:nowrap}.login-container .login-content-mobile[data-v-46973cfa]{height:418px}.login-container .login-copyright[data-v-46973cfa]{position:absolute;left:50%;transform:translate(-50%);bottom:30px;text-align:center;color:#fff;font-size:12px;opacity:.8}.login-container .login-copyright .login-copyright-company[data-v-46973cfa],.login-container .login-copyright .login-copyright-msg[data-v-46973cfa]{white-space:nowrap}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,4 +1,4 @@
import{P as Et}from"./index.1661345446364.js";import{a as Dt}from"./assert.1661345446364.js";var xt="0123456789abcdefghijklmnopqrstuvwxyz";function A(r){return xt.charAt(r)}function Rt(r,t){return r&t}function G(r,t){return r|t}function ut(r,t){return r^t}function at(r,t){return r&~t}function Bt(r){if(r==0)return-1;var t=0;return(r&65535)==0&&(r>>=16,t+=16),(r&255)==0&&(r>>=8,t+=8),(r&15)==0&&(r>>=4,t+=4),(r&3)==0&&(r>>=2,t+=2),(r&1)==0&&++t,t}function At(r){for(var t=0;r!=0;)r&=r-1,++t;return t}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt="=";function tt(r){var t,e,i="";for(t=0;t+3<=r.length;t+=3)e=parseInt(r.substring(t,t+3),16),i+=_.charAt(e>>6)+_.charAt(e&63);for(t+1==r.length?(e=parseInt(r.substring(t,t+1),16),i+=_.charAt(e<<2)):t+2==r.length&&(e=parseInt(r.substring(t,t+2),16),i+=_.charAt(e>>2)+_.charAt((e&3)<<4));(i.length&3)>0;)i+=Tt;return i}function lt(r){var t="",e,i=0,n=0;for(e=0;e<r.length&&r.charAt(e)!=Tt;++e){var s=_.indexOf(r.charAt(e));s<0||(i==0?(t+=A(s>>2),n=s&3,i=1):i==1?(t+=A(n<<2|s>>4),n=s&15,i=2):i==2?(t+=A(n),t+=A(s>>2),n=s&3,i=3):(t+=A(n<<2|s>>4),t+=A(s&15),i=0))}return i==1&&(t+=A(n<<2)),t}var C,Ot={decode:function(r){var t;if(C===void 0){var e="0123456789ABCDEF",i=` \f
import{P as Et}from"./index.1661515638242.js";import{a as Dt}from"./assert.1661515638242.js";var xt="0123456789abcdefghijklmnopqrstuvwxyz";function A(r){return xt.charAt(r)}function Rt(r,t){return r&t}function G(r,t){return r|t}function ut(r,t){return r^t}function at(r,t){return r&~t}function Bt(r){if(r==0)return-1;var t=0;return(r&65535)==0&&(r>>=16,t+=16),(r&255)==0&&(r>>=8,t+=8),(r&15)==0&&(r>>=4,t+=4),(r&3)==0&&(r>>=2,t+=2),(r&1)==0&&++t,t}function At(r){for(var t=0;r!=0;)r&=r-1,++t;return t}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt="=";function tt(r){var t,e,i="";for(t=0;t+3<=r.length;t+=3)e=parseInt(r.substring(t,t+3),16),i+=_.charAt(e>>6)+_.charAt(e&63);for(t+1==r.length?(e=parseInt(r.substring(t,t+1),16),i+=_.charAt(e<<2)):t+2==r.length&&(e=parseInt(r.substring(t,t+2),16),i+=_.charAt(e>>2)+_.charAt((e&3)<<4));(i.length&3)>0;)i+=Tt;return i}function lt(r){var t="",e,i=0,n=0;for(e=0;e<r.length&&r.charAt(e)!=Tt;++e){var s=_.indexOf(r.charAt(e));s<0||(i==0?(t+=A(s>>2),n=s&3,i=1):i==1?(t+=A(n<<2|s>>4),n=s&15,i=2):i==2?(t+=A(n),t+=A(s>>2),n=s&3,i=3):(t+=A(n<<2|s>>4),t+=A(s&15),i=0))}return i==1&&(t+=A(n<<2)),t}var C,Ot={decode:function(r){var t;if(C===void 0){var e="0123456789ABCDEF",i=` \f
\r \xA0\u2028\u2029`;for(C={},t=0;t<16;++t)C[e.charAt(t)]=t;for(e=e.toLowerCase(),t=10;t<16;++t)C[e.charAt(t)]=t;for(t=0;t<i.length;++t)C[i.charAt(t)]=-1}var n=[],s=0,h=0;for(t=0;t<r.length;++t){var o=r.charAt(t);if(o=="=")break;if(o=C[o],o!=-1){if(o===void 0)throw new Error("Illegal character at offset "+t);s|=o,++h>=2?(n[n.length]=s,s=0,h=0):s<<=4}}if(h)throw new Error("Hex encoding incomplete: 4 bits missing");return n}},P,st={decode:function(r){var t;if(P===void 0){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=`= \f
\r \xA0\u2028\u2029`;for(P=Object.create(null),t=0;t<64;++t)P[e.charAt(t)]=t;for(P["-"]=62,P._=63,t=0;t<i.length;++t)P[i.charAt(t)]=-1}var n=[],s=0,h=0;for(t=0;t<r.length;++t){var o=r.charAt(t);if(o=="=")break;if(o=P[o],o!=-1){if(o===void 0)throw new Error("Illegal character at offset "+t);s|=o,++h>=4?(n[n.length]=s>>16,n[n.length]=s>>8&255,n[n.length]=s&255,s=0,h=0):s<<=6}}switch(h){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=s>>10;break;case 3:n[n.length]=s>>16,n[n.length]=s>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(r){var t=st.re.exec(r);if(t)if(t[1])r=t[1];else if(t[2])r=t[2];else throw new Error("RegExp out of sync");return st.decode(r)}},H=1e13,k=function(){function r(t){this.buf=[+t||0]}return r.prototype.mulAdd=function(t,e){var i=this.buf,n=i.length,s,h;for(s=0;s<n;++s)h=i[s]*t+e,h<H?e=0:(e=0|h/H,h-=e*H),i[s]=h;e>0&&(i[s]=e)},r.prototype.sub=function(t){var e=this.buf,i=e.length,n,s;for(n=0;n<i;++n)s=e[n]-t,s<0?(s+=H,t=1):t=0,e[n]=s;for(;e[e.length-1]===0;)e.pop()},r.prototype.toString=function(t){if((t||10)!=10)throw new Error("only base 10 is supported");for(var e=this.buf,i=e[e.length-1].toString(),n=e.length-2;n>=0;--n)i+=(H+e[n]).toString().substring(1);return i},r.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*H+t[i];return e},r.prototype.simplify=function(){var t=this.buf;return t.length==1?t[0]:this},r}(),mt="\u2026",Vt=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,It=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function F(r,t){return r.length>t&&(r=r.substring(0,t)+mt),r}var rt=function(){function r(t,e){this.hexDigits="0123456789ABCDEF",t instanceof r?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=e)}return r.prototype.get=function(t){if(t===void 0&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return typeof this.enc=="string"?this.enc.charCodeAt(t):this.enc[t]},r.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(t&15)},r.prototype.hexDump=function(t,e,i){for(var n="",s=t;s<e;++s)if(n+=this.hexByte(this.get(s)),i!==!0)switch(s&15){case 7:n+=" ";break;case 15:n+=`
`;break;default:n+=" "}return n},r.prototype.isASCII=function(t,e){for(var i=t;i<e;++i){var n=this.get(i);if(n<32||n>176)return!1}return!0},r.prototype.parseStringISO=function(t,e){for(var i="",n=t;n<e;++n)i+=String.fromCharCode(this.get(n));return i},r.prototype.parseStringUTF=function(t,e){for(var i="",n=t;n<e;){var s=this.get(n++);s<128?i+=String.fromCharCode(s):s>191&&s<224?i+=String.fromCharCode((s&31)<<6|this.get(n++)&63):i+=String.fromCharCode((s&15)<<12|(this.get(n++)&63)<<6|this.get(n++)&63)}return i},r.prototype.parseStringBMP=function(t,e){for(var i="",n,s,h=t;h<e;)n=this.get(h++),s=this.get(h++),i+=String.fromCharCode(n<<8|s);return i},r.prototype.parseTime=function(t,e,i){var n=this.parseStringISO(t,e),s=(i?Vt:It).exec(n);return s?(i&&(s[1]=+s[1],s[1]+=+s[1]<70?2e3:1900),n=s[1]+"-"+s[2]+"-"+s[3]+" "+s[4],s[5]&&(n+=":"+s[5],s[6]&&(n+=":"+s[6],s[7]&&(n+="."+s[7]))),s[8]&&(n+=" UTC",s[8]!="Z"&&(n+=s[8],s[9]&&(n+=":"+s[9]))),n):"Unrecognized time: "+n},r.prototype.parseInteger=function(t,e){for(var i=this.get(t),n=i>127,s=n?255:0,h,o="";i==s&&++t<e;)i=this.get(t);if(h=e-t,h===0)return n?-1:0;if(h>4){for(o=i,h<<=3;((+o^s)&128)==0;)o=+o<<1,--h;o="("+h+` bit)

View File

@@ -15,8 +15,8 @@
<link type="favicon" rel="shortcut icon" href="favicon.ico" />
<title>mayfly</title>
<script type="module" crossorigin src="assets/index.1661345446364.js"></script>
<link rel="stylesheet" href="assets/index.16613454463648.css">
<script type="module" crossorigin src="assets/index.1661515638242.js"></script>
<link rel="stylesheet" href="assets/index.16615156382428.css">
</head>
<body>
<div id="app"></div>