From cf2bc6785c765bdc69a9eb35c562c1630e8ef467 Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Wed, 24 Aug 2022 20:55:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8embed=E5=B0=86?= =?UTF-8?q?=E9=9D=99=E6=80=81=E8=B5=84=E6=BA=90=E6=89=93=E5=8C=85=E8=BF=9B?= =?UTF-8?q?=E4=BA=8C=E8=BF=9B=E5=88=B6=E6=96=87=E4=BB=B6&=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=B0=8F=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_release.sh | 34 +- mayfly_go_web/src/views/ops/db/DbList.vue | 4 +- .../src/views/ops/machine/MachineList.vue | 4 +- .../src/views/ops/mongo/MongoList.vue | 4 +- .../src/views/ops/project/ProjectList.vue | 2 +- .../src/views/ops/redis/RedisList.vue | 12 +- server/config.yml | 14 - server/initialize/router.go | 21 +- server/static/static.go | 9 + .../static/assets/401.1661345446364.css | 1 + .../static/static/assets/401.1661345446364.js | 1 + .../static/assets/401.1661345446364.png | Bin 0 -> 39645 bytes .../static/assets/404.1661345446364.css | 1 + .../static/static/assets/404.1661345446364.js | 1 + .../static/assets/404.1661345446364.png | Bin 0 -> 37002 bytes .../static/static/assets/Api.1661345446364.js | 1 + .../assets/DataOperation.1661345446364.css | 1 + .../assets/DataOperation.1661345446364.js | 1 + .../static/assets/DbList.1661345446364.js | 7 + .../static/assets/Enum.1661345446364.js | 1 + .../JetBrainsMono-Regular.1661345446364.woff | Bin 0 -> 59368 bytes .../assets/MongoDataOp.1661345446364.css | 6 + .../assets/MongoDataOp.1661345446364.js | 243 ++++++ .../static/assets/MongoList.1661345446364.js | 1 + .../assets/ProjectEnvSelect.1661345446364.js | 1 + .../assets/ProjectList.1661345446364.js | 1 + .../assets/SqlExecBox.1661345446364.css | 1 + .../static/assets/SqlExecBox.1661345446364.js | 21 + .../assets/SshTerminal.1661345446364.css | 32 + .../assets/SshTerminal.1661345446364.js | 8 + .../assets/SshTerminalPage.1661345446364.js | 1 + .../static/assets/SyslogList.1661345446364.js | 1 + .../static/assets/api.16613454463642.js | 1 + .../static/assets/api.16613454463643.js | 1 + .../static/assets/api.16613454463644.js | 1 + .../static/assets/api.16613454463645.js | 1 + .../static/assets/api.16613454463646.js | 1 + .../static/assets/assert.1661345446364.js | 1 + .../static/assets/bg-login.1661345446364.png | Bin 0 -> 468614 bytes .../assets/codemirror.1661345446364.css | 1 + .../static/assets/codemirror.1661345446364.js | 27 + .../static/assets/enums.1661345446364.js | 1 + .../static/assets/format.1661345446364.js | 2 + .../static/assets/index.1661345446364.css | 1 + .../static/assets/index.1661345446364.js | 88 ++ .../static/assets/index.166134544636410.js | 1 + .../static/assets/index.16613454463642.css | 1 + .../static/assets/index.16613454463642.js | 1 + .../static/assets/index.16613454463643.css | 1 + .../static/assets/index.16613454463643.js | 1 + .../static/assets/index.16613454463644.css | 1 + .../static/assets/index.16613454463644.js | 1 + .../static/assets/index.16613454463645.css | 1 + .../static/assets/index.16613454463645.js | 1 + .../static/assets/index.16613454463646.css | 1 + .../static/assets/index.16613454463646.js | 61 ++ .../static/assets/index.16613454463647.css | 1 + .../static/assets/index.16613454463647.js | 1 + .../static/assets/index.16613454463648.css | 1 + .../static/assets/index.16613454463648.js | 1 + .../static/assets/index.16613454463649.js | 4 + .../assets/jsoneditor-icons.1661345446364.svg | 749 ++++++++++++++++++ .../static/assets/logo.1661345446364.svg | 1 + .../static/static/assets/rsa.1661345446364.js | 26 + server/static/static/config.js | 5 + server/static/static/favicon.ico | Bin 0 -> 8071 bytes server/static/static/index.html | 26 + 67 files changed, 1404 insertions(+), 43 deletions(-) create mode 100644 server/static/static.go create mode 100644 server/static/static/assets/401.1661345446364.css create mode 100644 server/static/static/assets/401.1661345446364.js create mode 100644 server/static/static/assets/401.1661345446364.png create mode 100644 server/static/static/assets/404.1661345446364.css create mode 100644 server/static/static/assets/404.1661345446364.js create mode 100644 server/static/static/assets/404.1661345446364.png create mode 100644 server/static/static/assets/Api.1661345446364.js create mode 100644 server/static/static/assets/DataOperation.1661345446364.css create mode 100644 server/static/static/assets/DataOperation.1661345446364.js create mode 100644 server/static/static/assets/DbList.1661345446364.js create mode 100644 server/static/static/assets/Enum.1661345446364.js create mode 100644 server/static/static/assets/JetBrainsMono-Regular.1661345446364.woff create mode 100644 server/static/static/assets/MongoDataOp.1661345446364.css create mode 100644 server/static/static/assets/MongoDataOp.1661345446364.js create mode 100644 server/static/static/assets/MongoList.1661345446364.js create mode 100644 server/static/static/assets/ProjectEnvSelect.1661345446364.js create mode 100644 server/static/static/assets/ProjectList.1661345446364.js create mode 100644 server/static/static/assets/SqlExecBox.1661345446364.css create mode 100644 server/static/static/assets/SqlExecBox.1661345446364.js create mode 100644 server/static/static/assets/SshTerminal.1661345446364.css create mode 100644 server/static/static/assets/SshTerminal.1661345446364.js create mode 100644 server/static/static/assets/SshTerminalPage.1661345446364.js create mode 100644 server/static/static/assets/SyslogList.1661345446364.js create mode 100644 server/static/static/assets/api.16613454463642.js create mode 100644 server/static/static/assets/api.16613454463643.js create mode 100644 server/static/static/assets/api.16613454463644.js create mode 100644 server/static/static/assets/api.16613454463645.js create mode 100644 server/static/static/assets/api.16613454463646.js create mode 100644 server/static/static/assets/assert.1661345446364.js create mode 100644 server/static/static/assets/bg-login.1661345446364.png create mode 100644 server/static/static/assets/codemirror.1661345446364.css create mode 100644 server/static/static/assets/codemirror.1661345446364.js create mode 100644 server/static/static/assets/enums.1661345446364.js create mode 100644 server/static/static/assets/format.1661345446364.js create mode 100644 server/static/static/assets/index.1661345446364.css create mode 100644 server/static/static/assets/index.1661345446364.js create mode 100644 server/static/static/assets/index.166134544636410.js create mode 100644 server/static/static/assets/index.16613454463642.css create mode 100644 server/static/static/assets/index.16613454463642.js create mode 100644 server/static/static/assets/index.16613454463643.css create mode 100644 server/static/static/assets/index.16613454463643.js create mode 100644 server/static/static/assets/index.16613454463644.css create mode 100644 server/static/static/assets/index.16613454463644.js create mode 100644 server/static/static/assets/index.16613454463645.css create mode 100644 server/static/static/assets/index.16613454463645.js create mode 100644 server/static/static/assets/index.16613454463646.css create mode 100644 server/static/static/assets/index.16613454463646.js create mode 100644 server/static/static/assets/index.16613454463647.css create mode 100644 server/static/static/assets/index.16613454463647.js create mode 100644 server/static/static/assets/index.16613454463648.css create mode 100644 server/static/static/assets/index.16613454463648.js create mode 100644 server/static/static/assets/index.16613454463649.js create mode 100644 server/static/static/assets/jsoneditor-icons.1661345446364.svg create mode 100644 server/static/static/assets/logo.1661345446364.svg create mode 100644 server/static/static/assets/rsa.1661345446364.js create mode 100644 server/static/static/config.js create mode 100644 server/static/static/favicon.ico create mode 100644 server/static/static/index.html diff --git a/build_release.sh b/build_release.sh index 5e25ae16..b7355c36 100755 --- a/build_release.sh +++ b/build_release.sh @@ -30,9 +30,9 @@ function buildWeb() { echo_yellow "-------------------打包前端开始-------------------" yarn run build - if [ "${copy2Server}" == "1" ] ; then - echo_green '将打包后的静态文件拷贝至server/static' - rm -rf ${server_folder}/static && mkdir -p ${server_folder}/static && cp -r ${web_folder}/dist/* ${server_folder}/static + if [ "${copy2Server}" == "2" ] ; then + echo_green '将打包后的静态文件拷贝至server/static/static' + rm -rf ${server_folder}/static/static && mkdir -p ${server_folder}/static/static && cp -r ${web_folder}/dist/* ${server_folder}/static/static fi echo_yellow ">>>>>>>>>>>>>>>>>>>打包前端结束<<<<<<<<<<<<<<<<<<<<\n" } @@ -44,6 +44,7 @@ function build() { toFolder=$1 os=$2 arch=$3 + copyStatic=$4 echo_yellow "-------------------${os}-${arch}打包构建开始-------------------" @@ -67,8 +68,10 @@ function build() { echo_green "移动二进制文件至'${toFolder}'" mv ${server_folder}/${execFileName} ${toFolder} - echo_green "拷贝前端静态页面至'${toFolder}/static'" - mkdir -p ${toFolder}/static && cp -r ${web_folder}/dist/* ${toFolder}/static + if [ "${copy2Server}" == "1" ] ; then + echo_green "拷贝前端静态页面至'${toFolder}/static'" + mkdir -p ${toFolder}/static && cp -r ${web_folder}/dist/* ${toFolder}/static + fi echo_green "拷贝脚本等资源文件[config.yml、mayfly-go.sql、readme.txt、startup.sh、shutdown.sh]" cp ${server_folder}/config.yml ${toFolder} @@ -81,15 +84,15 @@ function build() { } function buildLinuxAmd64() { - build "$1/mayfly-go-linux-amd64" "linux" "amd64" + build "$1/mayfly-go-linux-amd64" "linux" "amd64" $2 } function buildLinuxArm64() { - build "$1/mayfly-go-linux-arm64" "linux" "arm64" + build "$1/mayfly-go-linux-arm64" "linux" "arm64" $2 } function buildWindows() { - build "$1/mayfly-go-windows" "windows" "amd64" + build "$1/mayfly-go-windows" "windows" "amd64" $2 } function runBuild() { @@ -103,28 +106,23 @@ function runBuild() { cd ${toPath} toPath=`pwd` - read -p "是否构建前端[0|其他->否 1->是 2->构建并拷贝至server/static]: " runBuildWeb + read -p "是否构建前端[0|其他->否 1->是 2->构建并拷贝至server/static/static]: " runBuildWeb read -p "请选择构建版本[0|其他->全部 1->linux-amd64 2->linux-arm64 3->windows]: " buildType - if [ "${runBuildWeb}" == "1" ];then - buildWeb - fi - if [ "${runBuildWeb}" == "2" ];then - buildWeb 1 - fi + buildWeb ${runBuildWeb} if [ "${buildType}" == "1" ];then - buildLinuxAmd64 ${toPath} + buildLinuxAmd64 ${toPath} ${runBuildWeb} exit; fi if [ "${buildType}" == "2" ];then - buildLinuxArm64 ${toPath} + buildLinuxArm64 ${toPath} ${runBuildWeb} exit; fi if [ "${buildType}" == "3" ];then - buildWindows ${toPath} + buildWindows ${toPath} ${runBuildWeb} exit; fi diff --git a/mayfly_go_web/src/views/ops/db/DbList.vue b/mayfly_go_web/src/views/ops/db/DbList.vue index 68b86185..4c57d10c 100644 --- a/mayfly_go_web/src/views/ops/db/DbList.vue +++ b/mayfly_go_web/src/views/ops/db/DbList.vue @@ -352,7 +352,6 @@ export default defineComponent({ onMounted(async () => { search(); - state.projects = await projectApi.accountProjects.request(null); }); const filterTableInfos = computed(() => { @@ -399,7 +398,8 @@ export default defineComponent({ search(); }; - const editDb = (isAdd = false) => { + const editDb = async (isAdd = false) => { + state.projects = await projectApi.accountProjects.request(null); if (isAdd) { state.dbEditDialog.data = null; state.dbEditDialog.title = '新增数据库资源'; diff --git a/mayfly_go_web/src/views/ops/machine/MachineList.vue b/mayfly_go_web/src/views/ops/machine/MachineList.vue index f86641b8..60addd59 100644 --- a/mayfly_go_web/src/views/ops/machine/MachineList.vue +++ b/mayfly_go_web/src/views/ops/machine/MachineList.vue @@ -227,7 +227,6 @@ export default defineComponent({ onMounted(async () => { search(); - state.projects = await projectApi.accountProjects.request(null); }); const choose = (item: any) => { @@ -260,7 +259,8 @@ export default defineComponent({ search(); }; - const openFormDialog = (machine: any) => { + const openFormDialog = async (machine: any) => { + state.projects = await projectApi.accountProjects.request(null); let dialogTitle; if (machine) { state.machineEditDialog.data = state.currentData as any; diff --git a/mayfly_go_web/src/views/ops/mongo/MongoList.vue b/mayfly_go_web/src/views/ops/mongo/MongoList.vue index b398a78b..fa0fd07f 100644 --- a/mayfly_go_web/src/views/ops/mongo/MongoList.vue +++ b/mayfly_go_web/src/views/ops/mongo/MongoList.vue @@ -250,7 +250,6 @@ export default defineComponent({ onMounted(async () => { search(); - state.projects = await projectApi.accountProjects.request(null); }); const handlePageChange = (curPage: number) => { @@ -371,7 +370,8 @@ export default defineComponent({ state.total = res.total; }; - const editMongo = (isAdd = false) => { + const editMongo = async (isAdd = false) => { + state.projects = await projectApi.accountProjects.request(null); if (isAdd) { state.mongoEditDialog.data = null; state.mongoEditDialog.title = '新增mongo'; diff --git a/mayfly_go_web/src/views/ops/project/ProjectList.vue b/mayfly_go_web/src/views/ops/project/ProjectList.vue index d32197e4..b6e7bac9 100644 --- a/mayfly_go_web/src/views/ops/project/ProjectList.vue +++ b/mayfly_go_web/src/views/ops/project/ProjectList.vue @@ -152,7 +152,7 @@ :remote-method="getAccount" v-model="showMemDialog.memForm.accountId" filterable - placeholder="请选择" + placeholder="请输入账号模糊搜索并选择" > diff --git a/mayfly_go_web/src/views/ops/redis/RedisList.vue b/mayfly_go_web/src/views/ops/redis/RedisList.vue index d2f922ca..694cbac6 100644 --- a/mayfly_go_web/src/views/ops/redis/RedisList.vue +++ b/mayfly_go_web/src/views/ops/redis/RedisList.vue @@ -31,7 +31,13 @@