Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 1c98cd8

Browse files
author
Jialin Qiao
authored
Merge pull request #22 from wd94/v1.3pr
2 parents 161c24e + c64dae3 commit 1c98cd8

53 files changed

Lines changed: 3913 additions & 312 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frontend/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/public/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<meta http-equiv="pragram" content="no-cache">
8+
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
9+
<meta http-equiv="expires" content="0">
710
<link rel="icon" href="<%= BASE_URL %>iotdb.ico" />
811
<title><%= htmlWebpackPlugin.options.title %></title>
912
<script type="text/javascript" src="<%= BASE_URL %>iconfont.js"></script>

frontend/src/App.vue

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,50 @@
1818
-->
1919

2020
<template>
21-
<router-view />
21+
<el-config-provider :locale="language">
22+
<router-view />
23+
</el-config-provider>
2224
</template>
2325

26+
<script>
27+
import { ref, watch, nextTick } from 'vue';
28+
import { ElConfigProvider } from 'element-plus';
29+
import { useI18n } from 'vue-i18n';
30+
import enLocale from 'element-plus/lib/locale/lang/en';
31+
import deLocale from 'element-plus/lib/locale/lang/de';
32+
import zhLocale from 'element-plus/lib/locale/lang/zh-cn';
33+
34+
export default {
35+
name: 'App',
36+
components: {
37+
ElConfigProvider,
38+
},
39+
setup() {
40+
const map = {
41+
[enLocale.name]: enLocale,
42+
[deLocale.name]: deLocale,
43+
[zhLocale.name]: zhLocale,
44+
};
45+
let { locale } = useI18n();
46+
let language = ref(map[locale.value]);
47+
function useLanguageWatch(refValue, callback) {
48+
let { locale } = useI18n();
49+
watch(locale, () => {
50+
refValue.value = map[locale.value];
51+
nextTick(() => {
52+
refValue.value = callback();
53+
});
54+
});
55+
}
56+
useLanguageWatch(language, () => {
57+
return map[locale.value];
58+
});
59+
return {
60+
language,
61+
};
62+
},
63+
};
64+
</script>
2465
<style lang="scss">
2566
#app {
2667
-webkit-font-smoothing: antialiased;

frontend/src/components/FormTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or imp
2323
:suffix-icon="item.suffixIcon"
2424
:prefix-icon="item.prefixIcon"
2525
>
26-
<template #prepend v-if="item.inputHeader">{{ formData[item.inputHeaderText] }}</template>
26+
<template #prepend v-if="item.inputHeader">{{ typeof item.inputHeaderText === 'function' ? item.inputHeaderText(formData, item) : formData[item.inputHeaderText] }}</template>
2727
</el-input>
2828
<el-select
2929
v-if="item.type === 'SELECT'"

frontend/src/components/StandTable.vue

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or imp
3030
<svg v-if="iconArr.icon[item.icon]" :class="['icon', { 'icon-time': item.icon === 'TIME' }]" @click="sqlClick" aria-hidden="true">
3131
<use :xlink:href="`#icon-${iconArr.icon[item.icon]}`"></use>
3232
</svg>
33-
<span :style="{ 'margin-left': iconArr.icon[item.icon] ? '5px' : '' }">{{ $t(item.label) }}</span>
33+
<span :style="{ 'margin-left': iconArr.icon[item.icon] ? '5px' : '' }" :class="[{ closable: !!item.closable }]" :title="$t(item.label)"
34+
>{{ $t(item.label) }}
35+
<span class="el-icon-close" v-on:click="item.closable(item)"></span>
36+
</span>
3437
<i :class="item.icon" style="margin-left: 4px" @click="iconEvent(item.iconNum)"></i>
3538
</template>
3639
<template #default="scope">
@@ -40,7 +43,7 @@ IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or imp
4043
:size="item.size"
4144
:class="{ borderRed: (scope.row.namecopy || !scope.row[item.prop]) && scope.row.border && item.border }"
4245
:placeholder="$t('device.inputTip') + $t(item.label)"
43-
@blur="item.event(scope, scope.row, scope.row[item.prop], $event)"
46+
@blur="item.event(scope, scope.row, scope.row[item.prop], $event, item)"
4447
>
4548
</el-input>
4649
<el-input
@@ -382,6 +385,23 @@ export default {
382385
line-height: 0px;
383386
min-height: 0 !important;
384387
}
388+
.el-icon-close {
389+
display: none;
390+
position: absolute;
391+
top: 5px;
392+
cursor: pointer;
393+
}
394+
.closable {
395+
&:hover > .el-icon-close {
396+
display: inline-block;
397+
position: absolute;
398+
top: 5px;
399+
cursor: pointer;
400+
}
401+
}
402+
:deep(.el-table) th > .cell {
403+
white-space: nowrap;
404+
}
385405
</style>
386406
<style lang="scss">
387407
.borderRed {

frontend/src/components/TreeSelect.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
-->
119
<template>
220
<div class="tree-select-wraper">
321
<el-select v-model="mineStatus" :placeholder="placeholder" multiple collapse-tags @change="changeSelect" style="width: 100%">
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { watch, nextTick } from 'vue';
20+
import { useI18n } from 'vue-i18n';
21+
function useLanguageWatch(refValue, callback) {
22+
let { locale } = useI18n();
23+
watch(locale, () => {
24+
refValue.value = [];
25+
nextTick(() => {
26+
refValue.value = callback();
27+
});
28+
});
29+
}
30+
31+
export default useLanguageWatch;

frontend/src/i18n/cn.js

Lines changed: 91 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const cn = {
2525
about: {
2626
'line-2': '关于我们',
2727
'line-3': 'IoTDB的可视化管理工具',
28-
'line-4': 'IoTDB Admin是IoTDB的可视化管理工具,可对IoTDB的数据进行增删改查、权限控制等,简化IoTDB的使用及学习成本。',
28+
'line-4': 'IoTDB WorkBench是IoTDB的可视化管理工具,可对IoTDB的数据进行增删改查、权限控制等,简化IoTDB的使用及学习成本。',
2929
'line-5': `在我们心中IoTDB是最棒的时序数据库之一,我们将一直不遗余力地推动国产时序数据库IoTDB的应用和发展,为本土开源能力的提高、开源生态的发展,贡献自己的力量,欢迎大家加入IoTDB
30-
Admin的开发及维护,期待你的加入:`,
30+
WorkBench的开发及维护,期待你的加入:`,
3131
'line-6-text': '微信扫一扫',
3232
'line-7': '版本号: V0.12',
3333
'back-btn': '返回工作页面',
@@ -45,6 +45,18 @@ const cn = {
4545
tip: '提示',
4646
deleteSuccess: '删除成功',
4747
add: '新增',
48+
placeHolder: '请输入',
49+
selectPlaceholder: '请选择',
50+
survival: '存活',
51+
death: '死机',
52+
port: '端口',
53+
refresh: '刷新',
54+
startTime: '开始时间',
55+
endTime: '结束时间',
56+
all: '全部',
57+
success: '成功',
58+
fail: '失败',
59+
query: '查询',
4860
},
4961
databasem: {
5062
newStoreGroup: '新建存储组',
@@ -65,6 +77,7 @@ const cn = {
6577
nodatasource: '目前还没有数据连接,请',
6678
newQueryWindow: '查询',
6779
feedback: '问题反馈',
80+
monitorManagement: '监控管理',
6881
},
6982
loginPage: {
7083
account: '账号',
@@ -74,13 +87,13 @@ const cn = {
7487
forgetPassWord: '忘记密码',
7588
signIn: '登录',
7689
forgetPassword: '忘记密码',
77-
forgetPasswordTip: '请联系系统管理员',
90+
forgetPasswordTip: '请联系系统管理员 WeChat:loveher147',
7891
accountEmptyTip: '账号不能为空',
7992
accountContentTip: '用户名必须由字母、数字、下划线组成,不能以数字和下划线开始',
8093
accountLengthTip: '用户名必须大于等于3个字符,小于等于32字符',
8194
passwordEmptyTip: '密码不能为空',
8295
passwordLenghtTip: '密码必须大于等于6位,请检查密码位数',
83-
welcomeLogin: '欢迎登录IoTDB数据库管理系统',
96+
welcomeLogin: '欢迎登录 IoTDB WorkBench',
8497
loginErrorTip: '用户名或密码不正确,请重新输入',
8598
},
8699

@@ -415,6 +428,80 @@ const cn = {
415428
deleteArry: '批量删除',
416429
importTip: '导入成功',
417430
},
431+
controlPage: {
432+
dataList: '数据列表',
433+
address: '主机或 IP 地址',
434+
storage: '存储组数量',
435+
entity: '实体数量',
436+
physics: '物理量数量',
437+
total: '数据总量',
438+
monitor: '监控指标',
439+
search: '查询统计',
440+
allMode: '全部模式',
441+
devMode: '开发者模式',
442+
opeMode: '运维者模式',
443+
chartBtn: '图表面板',
444+
listBtn: '列表面板',
445+
jvm: 'JVM指标',
446+
cpu: 'CPU指标',
447+
memory: '内存指标',
448+
store: '存储指标',
449+
write: '写入指标',
450+
isearch: '查询指标',
451+
iName: '指标名称',
452+
iType: '指标类型',
453+
zxjg: '最新结果发生时间',
454+
zxzb: '最新指标结果',
455+
sql: 'SQL语句',
456+
runTime: '运行时间',
457+
exeTime: '执行时间(s)',
458+
slowSearch: '慢查询',
459+
lastTime: '最近一次运行时间',
460+
runCount: '运行次数',
461+
querySentence: '查询语句',
462+
exeResult: '执行结果',
463+
downloadLog: '日志下载',
464+
totalUseTime: '总耗时 (ms)',
465+
garmmarUseTime: '语法耗时 (ms)',
466+
ybyUseTime: '预编译耗时 (ms)',
467+
yhbyUseTime: '优化编译耗时 (ms)',
468+
exeUseTime: '执行耗时 (ms)',
469+
470+
JVMThread: 'JVM 指标-线程',
471+
JVMRecycle: 'JVM 指标-垃圾回收',
472+
JVMMemory: 'JVM 指标-内存',
473+
JVMClasses: 'JVM 指标-classes',
474+
475+
selectMetrics: '请选择指标类型',
476+
477+
GCEchart: 'GC发生次数及耗时(以分钟计算最近15分钟)',
478+
JVMClassEchart: 'JVM卸载/加载的class数量',
479+
YGCEchart: 'YGC发生原因及耗时',
480+
FGCEchart: 'FGC发生原因及耗时',
481+
JAVATypeEchart: 'java各类型线程数',
482+
JAVATimeEchart: 'java各时间段线程数',
483+
MemoryEchart: '内存使用大小',
484+
BufferEchart: '缓冲区使用大小',
485+
CPUEchart: 'CPU time占比',
486+
IOEchart: '磁盘 IO 吞吐',
487+
FileCountEchart: '文件数量统计',
488+
FileSizeEchart: '文件大小统计',
489+
WriteEchart: '写入成功失败统计及耗时',
490+
SearchEchart: '查询成功失败统计',
491+
ApiEchart: '接口耗时',
492+
ApiQPSEchart: '接口 QPS',
493+
494+
fgcCount: 'fgc次数',
495+
ygcCount: 'ygc次数',
496+
fgcTime: 'fgc耗时',
497+
ygcTime: 'ygc耗时',
498+
499+
Ptotal: '共',
500+
Pentries: '条',
501+
EachPage: '每页',
502+
slow: '慢',
503+
nodata: '无数据',
504+
},
418505
},
419506
};
420507

0 commit comments

Comments
 (0)