Skip to content

Commit

Permalink
merge pull request #11
Browse files Browse the repository at this point in the history
  • Loading branch information
weiye committed Apr 23, 2020
1 parent 3d5af00 commit 4c1890d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 180 deletions.
8 changes: 1 addition & 7 deletions src/layout/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,12 @@ import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import ErrorLog from '@/components/ErrorLog'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
export default {
components: {
Breadcrumb,
Hamburger,
ErrorLog,
Screenfull,
SizeSelect,
Search
ErrorLog
},
computed: {
...mapGetters([
Expand Down
12 changes: 6 additions & 6 deletions src/views/datax/jdbc-datasource/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<!-- <el-table-column label="jdbc驱动类" width="200" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">{{ scope.row.jdbcDriverClass ? scope.row.jdbcDriverClass:'-' }}</template>
</el-table-column>-->
<!-- <el-table-column label="ZK地址" width="200" align="center" :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">{{ scope.row.zkAdress ? scope.row.zkAdress:'-' }}</template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="数据库名" width="200" align="center" :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">{{ scope.row.databaseName ? scope.row.databaseName:'-' }}</template>-->
<!-- </el-table-column>-->
<el-table-column label="ZK地址" width="200" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">{{ scope.row.zkAdress ? scope.row.zkAdress:'-' }}</template>
</el-table-column>
<el-table-column label="数据库名" width="200" align="center" :show-overflow-tooltip="true">-->
<template slot-scope="scope">{{ scope.row.databaseName ? scope.row.databaseName:'-' }}</template>-->
</el-table-column>
<el-table-column label="备注" width="150" align="center">
<template slot-scope="scope">{{ scope.row.comments }}</template>
</el-table-column>
Expand Down
84 changes: 19 additions & 65 deletions src/views/datax/jobInfo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,26 @@
<el-table-column align="center" label="ID" width="80">
<template slot-scope="scope">{{ scope.row.id }}</template>
</el-table-column>
<el-table-column label="任务名称" align="center" width="200">
<el-table-column label="任务名称" align="center">
<template slot-scope="scope">{{ scope.row.jobDesc }}</template>
</el-table-column>
<el-table-column label="Cron" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.jobCron }}</span>
</template>
</el-table-column>
<el-table-column label="路由策略" align="center" width="100">
<el-table-column label="路由策略" align="center" width="130">
<template slot-scope="scope"> {{ routeStrategies.find(t => t.value === scope.row.executorRouteStrategy).label }}</template>
</el-table-column>
<el-table-column label="状态" align="center" width="80">
<el-table-column label="状态" align="center" width="150">
<template slot-scope="scope">
<el-switch
v-model="scope.row.triggerStatus"
active-color="#00A854"
active-text="启动"
:active-value="1"
inactive-color="#F04134"
inactive-text="停止"
:inactive-value="0"
@change="changeSwitch(scope.row)"
/>
Expand Down Expand Up @@ -87,7 +89,7 @@
执行一次
</el-button>
<el-button type="primary" size="mini" @click="handlerViewLog(row)">
查询日志
日志
</el-button>
<el-button type="primary" size="mini" @click="handlerUpdate(row)">
编辑
Expand Down Expand Up @@ -138,12 +140,9 @@
</el-select>
</el-form-item>
</el-col>

<el-col :span="12">
<el-form-item label="负责人" prop="author">
<el-select v-model="temp.author" multiple placeholder="请输入负责人" value-key="id">
<el-option v-for="item in authorList" :key="item.id" :label="item.nickname" :value="item" />
</el-select>
<el-input v-model="temp.author" placeholder="请输入负责人" />
</el-form-item>
</el-col>
</el-row>
Expand All @@ -155,13 +154,16 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报警邮件">
<el-input v-model="temp.alarmEmail" placeholder="请输入报警邮件,多个用逗号分隔" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="父任务ID">
<el-select v-model="temp.parentJobId" multiple placeholder="父任务ID" value-key="id">
<el-option v-for="item in JobIdList" :key="item.id" :label="item.jobDesc" :value="item" />
</el-select>
<el-form-item label="超时时间(分钟)">
<el-input-number v-model="temp.executorTimeout" :min="0" :max="20" />
</el-form-item>
</el-col>
<el-col :span="12">
Expand All @@ -173,11 +175,6 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="超时时间(分钟)">
<el-input-number v-model="temp.executorTimeout" :min="0" :max="20" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="失败重试次数">
<el-input-number v-model="temp.executorFailRetryCount" :min="0" :max="20" />
Expand All @@ -191,7 +188,6 @@
</el-form-item>
</el-col>
</el-row>

<el-row v-if="temp.glueType==='BEAN'" v-show="temp.replaceParam" :gutter="20">
<el-col :span="12">
<el-form-item label="增量时间格式" prop="replaceParamType">
Expand Down Expand Up @@ -335,7 +331,7 @@ export default {
jobJson: '',
executorParam: '',
replaceParam: '',
replaceParamType: 'UnitTime',
replaceParamType: 'Timestamp',
jvmParam: '',
incStartTime: '',
partitionInfo: ''
Expand All @@ -349,7 +345,6 @@ export default {
this.partitionField = ''
},
executorList: '',
authorList: '',
JobIdList: '',
blockStrategies: [
{ value: 'SERIAL_EXECUTION', label: '单机串行' },
Expand Down Expand Up @@ -387,10 +382,10 @@ export default {
{ value: 'yyyy/MM/dd', label: 'yyyy/MM/dd' }
],
replaceFormatTypes: [
{ value: 'yyyy/MM/dd', label: '日期' },
{ value: 'HH:mm:ss', label: '时间' },
{ value: 'yyyy/MM/dd HH:mm:ss', label: '日期+时间' },
{ value: 'UnitTime', label: '时间戳' }
{ value: 'yyyy/MM/dd', label: 'yyyy/MM/dd' },
{ value: 'HH:mm:ss', label: 'HH:mm:ss' },
{ value: 'yyyy/MM/dd HH:mm:ss', label: 'yyyy/MM/dd HH:mm:ss' },
{ value: 'Timestamp', label: '时间戳' }
],
statusList: [
{ value: 500, label: '失败' },
Expand All @@ -403,7 +398,6 @@ export default {
created() {
this.fetchData()
this.getExecutor()
this.getUsers()
this.getJobIdList()
},
Expand All @@ -414,12 +408,6 @@ export default {
this.executorList = content
})
},
getUsers() {
job.getUsersList().then(response => {
const { content } = response
this.authorList = content
})
},
getJobIdList() {
job.getJobIdList().then(response => {
const { content } = response
Expand Down Expand Up @@ -494,10 +482,7 @@ export default {
this.temp = Object.assign({}, row) // copy obj
if (this.temp.jobJson) this.jobJson = JSON.parse(this.temp.jobJson)
this.glueSource = this.temp.glueSource
const arrIntSet = []
const arrchildSet = []
const arrparentSet = []
const arrJobIdList = []
if (this.JobIdList) {
for (const n in this.JobIdList) {
Expand All @@ -508,20 +493,6 @@ export default {
this.JobIdList = arrJobIdList
}
if (this.temp.author) {
// eslint-disable-next-line no-unused-vars
const arrString = this.temp.author.split(',')
for (const i in arrString) {
for (const n in this.authorList) {
// eslint-disable-next-line eqeqeq
if (this.authorList[n].id == arrString[i]) {
arrIntSet.push(this.authorList[n])
}
}
}
this.temp.author = arrIntSet
}
if (this.temp.childJobId) {
// eslint-disable-next-line no-unused-vars
const arrString = this.temp.childJobId.split(',')
Expand All @@ -537,23 +508,6 @@ export default {
}
this.temp.childJobId = arrchildSet
}
console.log(this.temp.childJobId)
if (this.temp.parentJobId) {
// eslint-disable-next-line no-unused-vars
const arrString = this.temp.parentJobId.split(',')
for (const i in arrString) {
for (const n in this.JobIdList) {
// eslint-disable-next-line eqeqeq
if (this.JobIdList[n].id == arrString[i]) {
arrparentSet.push(this.JobIdList[n])
}
}
}
this.temp.parentJobId = arrparentSet
}
if (this.temp.partitionInfo) {
const partition = this.temp.partitionInfo.split(',')
this.partitionField = partition[0]
Expand Down
Loading

0 comments on commit 4c1890d

Please sign in to comment.