Skip to content

Commit

Permalink
add refresh button for hive in Data Catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcheng15 committed Feb 28, 2022
1 parent 42b02e4 commit 33cf446
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AddSchedule/ScheduleForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
>
<span slot="label">
{{ $t(`schedules.previousTask`) }}
<el-tooltip placement="top" :content="$t('schedules.previousInfo')">
<el-tooltip effect="dark" placement="top" :content="$t('schedules.previousInfo')">
<i class="el-ksd-icon-more_info_16 hasEvent"></i>
</el-tooltip>
</span>
Expand Down
1 change: 1 addition & 0 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"delete": "Delete",
"remove": "Remove",
"update": "Update",
"refresh": "Refresh",
"import": "Import",
"export": "Export",
"move": "Move",
Expand Down
1 change: 1 addition & 0 deletions src/locale/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"delete": "删除",
"remove": "移除",
"update": "更新",
"refresh": "刷新",
"import": "导入",
"export": "导出",
"move": "移动",
Expand Down
13 changes: 13 additions & 0 deletions src/page/Workspace/DataCatalog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
<el-button class="icon-bg" icon="el-ksd-icon-dup_16" type="text" size="mini" v-clipboard:success="onCopy" v-clipboard:copy="data.path"></el-button>
</el-tooltip>
</span>
<span v-else-if="data.id === 'hive'">
<el-tooltip effect="dark" :content="$t('refresh')" placement="top">
<el-button class="icon-bg" icon="el-ksd-icon-refresh_16" type="text" size="mini" @click.stop="refreshHive(node)"></el-button>
</el-tooltip>
</span>
</div>
</div>
</el-tree>
Expand Down Expand Up @@ -121,6 +126,14 @@ export default class DataCataLog extends Vue {
return this.originalWidth + this.nodeScrollWidth - 55
}
refreshHive (node) {
node.childNodes.forEach(n => {
this.$refs['tableTree'].remove(n.id)
})
node.expanded = false
node.loaded = false
}
getTextWidth (str, fontSize) {
let result = 10
let ele = document.createElement('span')
Expand Down

0 comments on commit 33cf446

Please sign in to comment.