Skip to content

Commit

Permalink
#409 作业总览页面支持按照“作业状态”进行过滤
Browse files Browse the repository at this point in the history
  • Loading branch information
allen8203 committed Apr 23, 2018
1 parent 8fa209b commit 4677a5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
11 changes: 9 additions & 2 deletions saturn-console-web/src/pages/job_list/job_overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<el-option v-for="item in groupList" :label="item" :value="item" :key="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-select v-model="filters.status" @change="scope.search">
<el-option label="全部状态" value=""></el-option>
<el-option v-for="item in $option.jobStatusTypes" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input placeholder="搜索" v-model="filters.jobName" @keyup.enter.native="scope.search"></el-input>
</el-form-item>
Expand Down Expand Up @@ -55,7 +61,7 @@
</div>
<el-table stripe border ref="multipleTable" @selection-change="handleSelectionChange" @sort-change="scope.onSortChange" :data="scope.pageData" style="width: 100%">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="jobName" label="作业名" min-width="110" sortable>
<el-table-column prop="jobName" label="作业名" sortable>
<template slot-scope="scope">
<router-link tag="a" :to="{ name: 'job_setting', params: { domain: domainName, jobName: scope.row.jobName } }">
<el-button type="text">
Expand Down Expand Up @@ -84,7 +90,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="description" label="描述">
<el-table-column prop="description" show-overflow-tooltip label="描述" width="170px">
<template slot-scope="scope">
{{scope.row.description || '-'}}
</template>
Expand Down Expand Up @@ -150,6 +156,7 @@ export default {
filters: {
jobName: '',
groups: '',
status: '',
},
orderBy: 'jobName',
groupList: [],
Expand Down
13 changes: 13 additions & 0 deletions saturn-console-web/src/utils/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@ export default {
value: 'SHELL_JOB',
label: 'Shell定时作业',
}],
jobStatusTypes: [{
value: 'READY',
label: '已就绪',
}, {
value: 'RUNNING',
label: '运行中',
}, {
value: 'STOPPING',
label: '停止中',
}, {
value: 'STOPPED',
label: '已停止',
}],
};

0 comments on commit 4677a5e

Please sign in to comment.