mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 13:17:50 +08:00
[Fix-7493] Support searching for task node in the DAG. (#7766)
* add a select to support fuzzy search
This commit is contained in:
parent
7e378ea672
commit
4203304b08
@ -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) {
|
||||
|
@ -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'
|
||||
}
|
||||
|
@ -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…
Reference in New Issue
Block a user