From 713442aa1d2470a00f01f6367b075fca29fa80ee Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Tue, 15 Mar 2022 22:27:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7&?= =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/starter/banner.go | 6 ++- go.mod | 52 +++++++++---------- mayfly_go_web/package.json | 12 ++--- mayfly_go_web/src/main.ts | 4 +- mayfly_go_web/src/views/ops/db/SqlExec.vue | 29 +++++++---- .../src/views/ops/machine/FileManage.vue | 1 + .../src/views/ops/machine/MachineEdit.vue | 2 +- .../src/views/ops/redis/RedisEdit.vue | 2 +- mayfly_go_web/vite.config.ts | 2 +- 9 files changed, 59 insertions(+), 51 deletions(-) diff --git a/base/starter/banner.go b/base/starter/banner.go index 988de1c1..5f30dacd 100644 --- a/base/starter/banner.go +++ b/base/starter/banner.go @@ -1,9 +1,11 @@ package starter -import "fmt" +import ( + "mayfly-go/base/global" +) func PrintBanner() { - fmt.Print(` + global.Log.Print(` __ _ _ __ ___ __ _ _ _ / _| |_ _ __ _ ___ | '_ ' _ \ / _' | | | | |_| | | | |_____ / _' |/ _ \ diff --git a/go.mod b/go.mod index 7d8a9570..2a780721 100644 --- a/go.mod +++ b/go.mod @@ -5,53 +5,49 @@ go 1.17 require ( // jwt github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/gin-gonic/gin v1.7.2 + github.com/gin-gonic/gin v1.7.7 github.com/go-redis/redis v6.15.9+incompatible - github.com/gorilla/websocket v1.4.2 + github.com/gorilla/websocket v1.5.0 // 验证码 - github.com/mojocn/base64Captcha v1.3.4 - github.com/pkg/sftp v1.13.1 + github.com/mojocn/base64Captcha v1.3.5 + github.com/pkg/sftp v1.13.4 // 定时任务 github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.8.1 // jsonschemal校验 github.com/xeipuuv/gojsonschema v1.2.0 // ssh - golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e + golang.org/x/crypto v0.0.0-20220314234724-5d542ad81a58 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // gorm - gorm.io/driver/mysql v1.0.5 - gorm.io/gorm v1.21.11 + gorm.io/driver/mysql v1.3.2 + gorm.io/gorm v1.23.2 ) require ( github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-playground/locales v0.13.0 // indirect - github.com/go-playground/universal-translator v0.17.0 // indirect - github.com/go-playground/validator/v10 v10.4.1 // indirect - github.com/go-sql-driver/mysql v1.5.0 // indirect + github.com/go-playground/locales v0.14.0 // indirect + github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/validator/v10 v10.10.1 // indirect + github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jinzhu/now v1.1.2 // indirect - github.com/json-iterator/go v1.1.11 // indirect + github.com/jinzhu/now v1.1.4 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/kr/fs v0.1.0 // indirect - github.com/kr/pretty v0.1.0 // indirect - github.com/leodido/go-urn v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.13 // indirect + github.com/leodido/go-urn v1.2.1 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect - github.com/onsi/ginkgo v1.16.4 // indirect - github.com/onsi/gomega v1.10.1 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/ugorji/go/codec v1.1.7 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect + github.com/onsi/gomega v1.18.1 // indirect + github.com/ugorji/go/codec v1.2.7 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - golang.org/x/image v0.0.0-20190802002840-cff245a6509b // indirect - golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect - golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect - golang.org/x/text v0.3.5 // indirect - google.golang.org/protobuf v1.26.0 // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect + golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/mayfly_go_web/package.json b/mayfly_go_web/package.json index 481b6922..065262ef 100644 --- a/mayfly_go_web/package.json +++ b/mayfly_go_web/package.json @@ -7,13 +7,13 @@ "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/" }, "dependencies": { - "axios": "^0.24.0", - "codemirror": "^5.61.0", + "axios": "^0.26.1", + "codemirror": "^5.65.2", "countup.js": "^2.0.7", "cropperjs": "^1.5.11", "echarts": "^5.1.1", - "element-plus": "^2.0.4", - "@element-plus/icons-vue": "^0.2.4", + "element-plus": "^2.1.3", + "@element-plus/icons-vue": "^1.1.1", "jsonlint": "^1.6.3", "lodash": "^4.17.21", "mitt": "^3.0.0", @@ -25,7 +25,7 @@ "vue": "^3.2.30", "vue-router": "^4.0.12", "vuex": "^4.0.2", - "xterm": "^4.16.0", + "xterm": "^4.18.0", "xterm-addon-fit": "^0.5.0" }, "devDependencies": { @@ -44,7 +44,7 @@ "sass": "^1.45.1", "sass-loader": "^12.4.0", "typescript": "^4.2.4", - "vite": "^2.7.4", + "vite": "^2.8.6", "vue-eslint-parser": "^8.0.1" }, "browserslist": [ diff --git a/mayfly_go_web/src/main.ts b/mayfly_go_web/src/main.ts index 1e63ca32..d1e842fb 100644 --- a/mayfly_go_web/src/main.ts +++ b/mayfly_go_web/src/main.ts @@ -8,10 +8,10 @@ import { dateStrFormat } from '@/common/utils/date.ts' import ElementPlus from 'element-plus'; import 'element-plus/dist/index.css'; +import zhCn from 'element-plus/es/locale/lang/zh-cn' import '@/theme/index.scss'; import mitt from 'mitt'; import { ElMessage } from 'element-plus'; -import locale from 'element-plus/lib/locale/lang/zh-cn' import * as svg from '@element-plus/icons-vue'; import SvgIcon from '@/components/svgIcon/index.vue'; @@ -37,7 +37,7 @@ directive(app); app.use(router) .use(store, key) - .use(ElementPlus, { size: globalComponentSize, locale: locale }) + .use(ElementPlus, { size: globalComponentSize, locale: zhCn}) .mount('#app'); diff --git a/mayfly_go_web/src/views/ops/db/SqlExec.vue b/mayfly_go_web/src/views/ops/db/SqlExec.vue index 9ae260d2..cf6be0b9 100644 --- a/mayfly_go_web/src/views/ops/db/SqlExec.vue +++ b/mayfly_go_web/src/views/ops/db/SqlExec.vue @@ -34,14 +34,14 @@ - +
sql脚本执行 - commit + commit
@@ -80,8 +82,9 @@
-
+
-
+
- + @@ -145,7 +148,7 @@ - +