Skip to content

Commit 90556ef

Browse files
committed
add shortcuts on the data manager page
1 parent 561ffb6 commit 90556ef

File tree

6 files changed

+17
-2
lines changed

6 files changed

+17
-2
lines changed

console/atest-ui/src/assets/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,6 @@ html.dark .el-main {
9696
}
9797

9898
.page-header {
99+
height: 32px;
99100
padding-bottom: var(--page-title-bottom-padding, 0px);
100101
}

console/atest-ui/src/assets/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#app {
44
margin: 0 auto;
5-
padding-top: 40px;
5+
{{/* padding-top: 40px; */}}
66
height: 100vh;
77
font-weight: normal;
88
}

console/atest-ui/src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"createSecret": "Create Secret",
3737
"secretManager": "Secret Manager",
3838
"storeManager": "Store Manager",
39+
"dataManager": "Data Manager",
3940
"protoContent": "Proto Content",
4041
"protoFile": "Proto File",
4142
"protoImport": "Proto Import",

console/atest-ui/src/locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"createSecret": "创建凭据",
3737
"secretManager": "凭据管理",
3838
"storeManager": "存储管理",
39+
"dataManager": "数据管理",
3940
"apiRequestParameter": "API 请求参数",
4041
"codeGenerator": "代码生成",
4142
"testing": "测试",

console/atest-ui/src/views/DataManager.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { Codemirror } from 'vue-codemirror'
1010
import HistoryInput from '../components/HistoryInput.vue'
1111
import type { Ref } from 'vue'
1212
import { Refresh, Document } from '@element-plus/icons-vue'
13+
import { Magic } from './magicKeys'
14+
import { useI18n } from 'vue-i18n'
1315
16+
const { t } = useI18n()
1417
const stores: Ref<Store[]> = ref([])
1518
const kind = ref('')
1619
const store = ref('')
@@ -259,10 +262,19 @@ const tryShowPrettyJSON = (row: any, column: any, cell: HTMLTableCellElement, ev
259262
watch(largeContent, (e) => {
260263
largeContentDialogVisible.value = e !== ''
261264
})
265+
266+
Magic.AdvancedKeys([{
267+
Keys: ['Ctrl+E'],
268+
Func: executeQuery,
269+
Description: 'Execute query'
270+
}])
262271
</script>
263272

264273
<template>
265274
<div>
275+
<div class="page-header">
276+
<span class="page-title">{{t('title.dataManager')}}</span>
277+
</div>
266278
<el-container style="height: calc(100vh - 80px);">
267279
<el-aside v-if="kind === 'atest-store-orm' || kind === 'atest-store-iotdb' || kind === 'atest-store-cassandra' || kind === 'atest-store-elasticsearch' || kind === 'atest-store-opengemini'">
268280
<el-scrollbar>

console/atest-ui/src/views/magicKeys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface MagicKey {
3636
const MagicKeyEventName = 'show-key-bindings-dialog'
3737
const AdvancedKeys = (keys: MagicKey[]) => {
3838
keys.push({
39-
Keys: ['ctrl+/'],
39+
Keys: ['Ctrl+/'],
4040
Func: () => {
4141
const event = new CustomEvent(MagicKeyEventName, {
4242
detail: keys.map((k) => ({

0 commit comments

Comments
 (0)