fix: 名称调整等

This commit is contained in:
meilin.huang
2025-09-14 20:53:47 +08:00
parent 66d5fd6ca4
commit 54d0688571
8 changed files with 28 additions and 45 deletions

View File

@@ -25,26 +25,26 @@
"dayjs": "^1.11.18", "dayjs": "^1.11.18",
"echarts": "^6.0.0", "echarts": "^6.0.0",
"element-plus": "^2.11.2", "element-plus": "^2.11.2",
"js-base64": "^3.7.7", "js-base64": "^3.7.8",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.5.4",
"monaco-editor": "^0.52.2", "monaco-editor": "^0.53.0",
"monaco-sql-languages": "^0.15.1", "monaco-sql-languages": "^0.15.1",
"monaco-themes": "^0.4.6", "monaco-themes": "^0.4.7",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^3.0.3", "pinia": "^3.0.3",
"qrcode.vue": "^3.6.0", "qrcode.vue": "^3.6.0",
"screenfull": "^6.0.2", "screenfull": "^6.0.2",
"sortablejs": "^1.15.6", "sortablejs": "^1.15.6",
"sql-formatter": "^15.6.5", "sql-formatter": "^15.6.8",
"trzsz": "^1.1.5", "trzsz": "^1.1.5",
"uuid": "^11.1.0", "uuid": "^13.0.0",
"vue": "^v3.6.0-alpha.2", "vue": "^v3.6.0-alpha.2",
"vue-i18n": "^11.1.11", "vue-i18n": "^11.1.12",
"vue-router": "^4.5.1", "vue-router": "^4.5.1",
"vuedraggable": "^4.1.0" "vuedraggable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/vite": "^4.1.12", "@tailwindcss/vite": "^4.1.13",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/node": "^22.13.14", "@types/node": "^22.13.14",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",

View File

@@ -4,8 +4,8 @@ export default {
personalCenter: 'Personal Center', personalCenter: 'Personal Center',
myResource: 'Resource', myResource: 'Resource',
tag: 'Tag', tag: 'Resource',
tagTree: 'Tag Tree', tagTree: 'Resource Tree',
tagSave: 'Save Tag', tagSave: 'Save Tag',
tagDelete: 'Delete Tag', tagDelete: 'Delete Tag',
authorization: 'Authorization', authorization: 'Authorization',

View File

@@ -4,8 +4,8 @@ export default {
personalCenter: '个人中心', personalCenter: '个人中心',
myResource: '我的资源', myResource: '我的资源',
tag: '标签', tag: '资源',
tagTree: '标签树', tagTree: '资源树',
tagSave: '保存标签', tagSave: '保存标签',
tagDelete: '删除标签', tagDelete: '删除标签',
authorization: '授权凭证', authorization: '授权凭证',

View File

@@ -654,8 +654,9 @@ const onCopyConfigClick = (target: any) => {
}; };
const checkClientWidth = () => { const checkClientWidth = () => {
const oldLayout = getLocal('oldLayout'); let oldLayout = getLocal('oldLayout');
if (!oldLayout) { if (!oldLayout) {
oldLayout = themeConfig.value.layout;
setLocal('oldLayout', themeConfig.value.layout); setLocal('oldLayout', themeConfig.value.layout);
} }
if (width.value < 1000) { if (width.value < 1000) {

View File

@@ -37,10 +37,9 @@
:label="$t(TagResourceTypeEnum.Machine.label)" :label="$t(TagResourceTypeEnum.Machine.label)"
:value="TagResourceTypeEnum.Machine.value" :value="TagResourceTypeEnum.Machine.value"
/> />
<el-option <el-option
:key="TagResourceTypeEnum.DbInstance.value" :key="TagResourceTypeEnum.DbInstance.value"
:label="TagResourceTypeEnum.DbInstance.label" :label="$t(TagResourceTypeEnum.DbInstance.label)"
:value="TagResourceTypeEnum.DbInstance.value" :value="TagResourceTypeEnum.DbInstance.value"
/> />
<el-option <el-option

View File

@@ -30,7 +30,7 @@
</el-popover> </el-popover>
</template> </template>
<div :ref="(el: any) => setTerminalWrapperRef(el, dt.key)" class="terminal-wrapper flex-1 h-[calc(100vh-155px)]"> <div class="terminal-wrapper flex-1 h-[calc(100vh-155px)]">
<TerminalBody <TerminalBody
v-if="dt.params.protocol == MachineProtocolEnum.Ssh.value" v-if="dt.params.protocol == MachineProtocolEnum.Ssh.value"
:mount-init="false" :mount-init="false"
@@ -161,11 +161,6 @@ const actionBtns = hasPerms([perms.updateMachine, perms.closeCli]);
const emits = defineEmits(['init']); const emits = defineEmits(['init']);
class MachineNodeType {
static Machine = 1;
static AuthCert = 2;
}
const resourceOpCtx: ResourceOpCtx | undefined = inject(ResourceOpCtxKey); const resourceOpCtx: ResourceOpCtx | undefined = inject(ResourceOpCtxKey);
const state = reactive({ const state = reactive({
@@ -294,10 +289,11 @@ const openTerminal = (machine: any, ex?: boolean) => {
}; };
state.tabs.set(key, tab); state.tabs.set(key, tab);
state.activeTermName = key;
nextTick(() => { nextTick(() => {
handleReconnect(tab); handleReconnect(tab);
state.activeTermName = key;
setTimeout(() => fitTerminal(), 300);
}); });
}; };
@@ -398,17 +394,6 @@ const setTerminalRef = (el: any, key: any) => {
} }
}; };
const terminalWrapperRefs: any = {};
const setTerminalWrapperRef = (el: any, key: any) => {
if (key) {
terminalWrapperRefs[key] = el;
}
};
const onResizeTagTree = () => {
fitTerminal();
};
const fitTerminal = () => { const fitTerminal = () => {
setTimeout(() => { setTimeout(() => {
let info = state.tabs.get(state.activeTermName); let info = state.tabs.get(state.activeTermName);
@@ -419,9 +404,7 @@ const fitTerminal = () => {
}; };
const handleReconnect = (tab: any, force = false) => { const handleReconnect = (tab: any, force = false) => {
let width = terminalWrapperRefs[tab.key]?.offsetWidth; terminalRefs[tab.key]?.init();
let height = terminalWrapperRefs[tab.key]?.offsetHeight;
terminalRefs[tab.key]?.init(width, height, force);
}; };
defineExpose({ defineExpose({

View File

@@ -26,7 +26,7 @@ require (
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.13.9 github.com/pkg/sftp v1.13.9
github.com/pquerna/otp v1.5.0 github.com/pquerna/otp v1.5.0
github.com/redis/go-redis/v9 v9.12.1 github.com/redis/go-redis/v9 v9.13.0
github.com/robfig/cron/v3 v3.0.1 // github.com/robfig/cron/v3 v3.0.1 //
github.com/sijms/go-ora/v2 v2.9.0 github.com/sijms/go-ora/v2 v2.9.0
github.com/spf13/cast v1.9.2 github.com/spf13/cast v1.9.2
@@ -34,14 +34,14 @@ require (
github.com/tidwall/gjson v1.18.0 github.com/tidwall/gjson v1.18.0
github.com/veops/go-ansiterm v0.0.5 github.com/veops/go-ansiterm v0.0.5
go.mongodb.org/mongo-driver/v2 v2.3.0 // mongo go.mongodb.org/mongo-driver/v2 v2.3.0 // mongo
golang.org/x/crypto v0.41.0 // ssh golang.org/x/crypto v0.42.0 // ssh
golang.org/x/oauth2 v0.30.0 golang.org/x/oauth2 v0.31.0
golang.org/x/sync v0.16.0 golang.org/x/sync v0.17.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
// gorm // gorm
gorm.io/driver/mysql v1.6.0 gorm.io/driver/mysql v1.6.0
gorm.io/gorm v1.30.3 gorm.io/gorm v1.30.5
) )
require ( require (
@@ -114,9 +114,9 @@ require (
golang.org/x/arch v0.19.0 // indirect golang.org/x/arch v0.19.0 // indirect
golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect
golang.org/x/image v0.29.0 // indirect golang.org/x/image v0.29.0 // indirect
golang.org/x/net v0.42.0 // indirect golang.org/x/net v0.43.0 // indirect
golang.org/x/sys v0.35.0 // indirect golang.org/x/sys v0.36.0 // indirect
golang.org/x/text v0.28.0 // indirect golang.org/x/text v0.29.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect google.golang.org/protobuf v1.36.6 // indirect
modernc.org/libc v1.66.4 // indirect modernc.org/libc v1.66.4 // indirect
modernc.org/mathutil v1.7.1 // indirect modernc.org/mathutil v1.7.1 // indirect

View File

@@ -42,7 +42,7 @@ func (dm *Meta) GetSqlDb(ctx context.Context, d *dbi.DbInfo) (*sql.DB, error) {
return nil, err return nil, err
} }
dsn := fmt.Sprintf("dm://%s:%s@%s:%d/%s", d.Username, url.PathEscape(d.Password), d.Host, d.Port, dbParam) dsn := fmt.Sprintf("dm://%s:%s@%s:%d%s", d.Username, url.PathEscape(d.Password), d.Host, d.Port, dbParam)
return sql.Open(driverName, dsn) return sql.Open(driverName, dsn)
} }