Browse Source

[Fix-7493] Support searching for task node in the DAG. (#7766)

* add a select to support fuzzy search
3.0.0/version-upgrade
calvin 3 years ago committed by GitHub
parent
commit
4203304b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.vue
  2. 3
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  3. 3
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

28
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.vue

@ -74,16 +74,14 @@
'visible': searchInputVisible
}"
>
<el-input
v-model="searchText"
placeholder=""
prefix-icon="el-icon-search"
size="mini"
@keyup.enter.native="onSearch"
clearable
@blur="searchInputBlur"
ref="searchInput"
></el-input>
<el-select v-if="searchInputVisible" ref="searchInput" v-model="searchText" size="mini" clearable prefix-icon="el-icon-search" @change="onSearch" @keyup.enter.native="onSearch" filterable :placeholder="$t('Please select task name')">
<el-option
v-for="item in getTaskNodeOptions()"
:key="item.id"
:label="item.data.taskName"
:value="item.data.taskName">
</el-option>
</el-select>
</div>
<el-tooltip
class="toolbar-operation"
@ -191,14 +189,12 @@
const canvas = this.getDagCanvasRef()
canvas.navigateTo(this.searchText)
},
getTaskNodeOptions () {
const canvas = this.getDagCanvasRef()
return canvas.getNodes()
},
showSearchInput () {
this.searchInputVisible = true
this.$refs.searchInput.focus()
},
searchInputBlur () {
if (!this.searchText) {
this.searchInputVisible = false
}
},
getDagCanvasRef () {
if (this.canvasRef) {

3
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -795,5 +795,6 @@ export default {
'Task group queue the status of releasing': 'Released',
'Modify task group queue priority': 'Edit the priority of the task group queue',
'Priority not empty': 'The value of priority can not be empty',
'Priority must be number': 'The value of priority should be number'
'Priority must be number': 'The value of priority should be number',
'Please select task name': 'Please select a task name'
}

3
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -797,5 +797,6 @@ export default {
'Modify task group queue priority': '修改优先级',
'Force to start task': '强制启动',
'Priority not empty': '优先级不能为空',
'Priority must be number': '优先级必须是数值'
'Priority must be number': '优先级必须是数值',
'Please select task name': '请选择节点名称'
}

Loading…
Cancel
Save