Browse Source

Merge pull request #62 from millionfor/dev-20190415

Dev 20190415
pull/2/head
millionfor 6 years ago committed by GitHub
parent
commit
4e82c77fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue
  2. 4
      escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
  3. 0
      escheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/common.js
  4. 65
      escheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/index.vue
  5. 141
      escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue
  6. 0
      escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue
  7. 80
      escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/index.vue
  8. 8
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
  9. 18
      escheduler-ui/src/js/conf/home/pages/projects/pages/historyTaskRecord/index.vue
  10. 14
      escheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/projectChart.vue
  11. 15
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
  12. 0
      escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue
  13. 131
      escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue
  14. 14
      escheduler-ui/src/js/conf/home/pages/projects/pages/taskRecord/index.vue
  15. 195
      escheduler-ui/src/js/conf/home/pages/projects/pages/taskRecord/pages/list/index.vue
  16. 2
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue
  17. 2
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue
  18. 2
      escheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue
  19. 4
      escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue
  20. 34
      escheduler-ui/src/js/conf/home/router/index.js
  21. 12
      escheduler-ui/src/js/conf/home/store/dag/actions.js
  22. 2
      escheduler-ui/src/js/conf/home/store/security/actions.js
  23. 2
      escheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue
  24. 9
      escheduler-ui/src/js/module/components/secondaryMenu/menu.js
  25. 7
      escheduler-ui/src/js/module/i18n/locale/en_US.js
  26. 9
      escheduler-ui/src/js/module/i18n/locale/zh_CN.js
  27. 2
      escheduler-ui/src/sass/common/index.scss

2
escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue

@ -1,6 +1,6 @@
<template>
<x-select
style="width: 170px;"
style="width: 157px;"
:disabled="isDetails"
@on-change="_onChange"
v-model="value">

4
escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue

@ -528,10 +528,10 @@
position: relative;
margin-bottom: 10px;
.text-box {
width: 110px;
width: 112px;
float: left;
text-align: right;
margin-right: 10px;
margin-right: 8px;
>span {
font-size: 14px;
color: #777;

0
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/common.js → escheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/common.js

65
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/conditions.vue → escheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/index.vue

@ -11,7 +11,7 @@
type="daterange"
format="YYYY-MM-DD HH:mm:ss"
placement="bottom-end"
v-model="datepicker"
:value="[searchParams.startDate,searchParams.endDate]"
:panelNum="2">
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('Select date range')">
<i slot="suffix"
@ -24,7 +24,7 @@
</x-datepicker>
</div>
<div class="list">
<x-select style="width: 160px;" @on-change="_onChangeState" :value="stateType" >
<x-select style="width: 160px;" @on-change="_onChangeState" :value="searchParams.stateType" >
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 160px;" size="small" :placeholder="$t('State')" suffix-icon="ans-icon-arrow-down">
</x-input>
<x-option
@ -36,10 +36,10 @@
</x-select>
</div>
<div class="list">
<x-input v-model="host" style="width: 140px;" size="small" :placeholder="$t('host')"></x-input>
<x-input v-model="searchParams.host" style="width: 140px;" size="small" :placeholder="$t('host')"></x-input>
</div>
<div class="list">
<x-input v-model="searchVal" style="width: 200px;" size="small" :placeholder="$t('name')"></x-input>
<x-input v-model="searchParams.searchVal" style="width: 200px;" size="small" :placeholder="$t('name')"></x-input>
</div>
</template>
</m-conditions>
@ -47,14 +47,14 @@
<script>
import _ from 'lodash'
import { stateType } from './common'
import { setUrlParams } from '@/module/util/routerUtil'
import mConditions from '@/module/components/conditions/conditions'
export default {
name: 'conditions',
name: 'instance-conditions',
data () {
return {
// state(list)
stateTypeList: stateType,
searchParams: {
// state
stateType: '',
// start date
@ -64,74 +64,43 @@
// search value
searchVal: '',
// host
host: '',
// datepicker plugin
datepicker: []
host: ''
}
}
},
props: {},
methods: {
_ckQuery () {
setUrlParams({ pageNo: 1 })
this.$emit('on-query', {
startDate: this.startDate || '',
endDate: this.endDate || '',
stateType: this.stateType || '',
host: _.trim(this.host) || '',
searchVal: _.trim(this.searchVal) || ''
})
this.$emit('on-query', this.searchParams)
},
/**
* change times
*/
_onChangeStartStop (val) {
this.startDate = val[0]
this.endDate = val[1]
// set url params
setUrlParams({
startDate: this.startDate,
endDate: this.endDate
})
this.searchParams.startDate = val[0]
this.searchParams.endDate = val[1]
},
/**
* change state
*/
_onChangeState (val) {
this.stateType = val.value
// set url params
setUrlParams({
stateType: this.stateType
})
this.searchParams.stateType = val.value
},
/**
* empty date
*/
_dateEmpty () {
this.startDate = ''
this.endDate = ''
this.searchParams.startDate = ''
this.searchParams.endDate = ''
this.$refs.datepicker.empty()
// set url params
setUrlParams({
startDate: '',
endDate: ''
})
}
},
watch: {
searchVal (val) {
setUrlParams({
searchVal: _.trim(val)
})
}
},
created () {
let query = this.$route.query
if (!_.isEmpty(query)) {
this.searchVal = query.searchVal
this.startDate = query.startDate
this.endDate = query.endDate
this.stateType = query.stateType
this.datepicker = (!this.startDate && !this.endDate) ? [] : [this.startDate, this.endDate]
// Routing parameter merging
if (!_.isEmpty(this.$route.query)) {
this.searchParams = _.assign(this.searchParams, this.$route.query)
}
},
mounted () {

141
escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue

@ -0,0 +1,141 @@
<template>
<m-conditions>
<template slot="search-group">
<div class="list">
<x-button type="ghost" size="small" @click="_ckQuery" icon="fa fa-search"></x-button>
</div>
<div class="list">
<x-datepicker
:value="[searchParams.startDate,searchParams.endDate]"
ref="datepicker"
@on-change="_onChangeStartStop"
type="daterange"
format="YYYY-MM-DD HH:mm:ss"
placement="bottom-end"
:panelNum="2">
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('Select date range')">
<i slot="suffix"
@click.stop="_dateEmpty()"
class="ans-icon-fail-solid"
v-show="value"
style="font-size: 13px;cursor: pointer;margin-top: 1px;">
</i>
</x-input>
</x-datepicker>
</div>
<div class="list">
<x-input v-model="searchParams.destTable" style="width: 120px;" size="small" :placeholder="$t('Target Table')"></x-input>
</div>
<div class="list">
<x-input v-model="searchParams.sourceTable" style="width: 120px;" size="small" :placeholder="$t('Source Table')"></x-input>
</div>
<div class="list">
<x-select style="width: 90px;" @on-change="_onChangeState" :value="searchParams.state">
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 90px;" size="small" :placeholder="$t('State')" suffix-icon="ans-icon-arrow-down"></x-input>
<x-option
v-for="city in stateList"
:key="city.label"
:value="city.code"
:label="city.label">
</x-option>
</x-select>
</div>
<div class="list">
<x-datepicker
v-model="searchParams.taskDate"
@on-change="_onChangeDate"
format="YYYY-MM-DD"
:panelNum="1">
<x-input slot="input" readonly slot-scope="{value}" style="width: 130px;" :value="value" size="small" :placeholder="$t('Date')"></x-input>
</x-datepicker>
</div>
<div class="list">
<x-input v-model="searchParams.taskName" style="width: 130px;" size="small" :placeholder="$t('Task Name')"></x-input>
</div>
</template>
</m-conditions>
</template>
<script>
import _ from 'lodash'
import mConditions from '@/module/components/conditions/conditions'
export default {
name: 'conditions',
data () {
return {
stateList: [
{
label: `${this.$t('none')}`,
code: ``
},
{
label: `${this.$t('success')}`,
code: `成功`
},
{
label: `${this.$t('waiting')}`,
code: `等待`
},
{
label: `${this.$t('execution')}`,
code: `执行中`
},
{
label: `${this.$t('finish')}`,
code: `完成`
}, {
label: `${this.$t('failed')}`,
code: `失败`
}
],
searchParams: {
taskName: '',
state: '',
sourceTable: '',
destTable: '',
taskDate: '',
startDate: '',
endDate: ''
}
}
},
props: {},
methods: {
_ckQuery () {
this.$emit('on-query', this.searchParams)
},
/**
* change times
*/
_onChangeStartStop (val) {
this.searchParams.startDate = val[0]
this.searchParams.endDate = val[1]
},
/**
* change state
*/
_onChangeState (val) {
this.searchParams.state = val.value
},
/**
* empty date
*/
_dateEmpty () {
this.searchParams.startDate = ''
this.searchParams.endDate = ''
this.$refs.datepicker.empty()
},
_onChangeDate (val) {
this.searchParams.taskDate = val.replace(/-/g, '')
}
},
created () {
// Routing parameter merging
if (!_.isEmpty(this.$route.query)) {
this.searchParams = _.assign(this.searchParams, this.$route.query)
}
},
mounted () {
},
components: { mConditions }
}
</script>

0
escheduler-ui/src/js/conf/home/pages/projects/pages/taskRecord/pages/list/_source/list.vue → escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue

80
escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/pages/list/index.vue → escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/index.vue

@ -1,19 +1,19 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Task Instance')">
<m-list-construction :title="config.title">
<template slot="conditions">
<m-conditions @on-query="_onQuery"></m-conditions>
</template>
<template slot="content">
<template v-if="taskInstanceList.length">
<m-list :task-instance-list="taskInstanceList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
<template v-if="taskRecordList.length">
<m-list :task-record-list="taskRecordList" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!taskInstanceList.length">
<template v-if="!taskRecordList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
@ -23,85 +23,73 @@
</template>
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import mList from './_source/list'
import { setUrlParams } from '@/module/util/routerUtil'
import store from '@/conf/home/store'
import mConditions from './_source/conditions'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/conf/home/pages/projects/pages/instance/pages/list/_source/conditions'
import { setUrlParams } from '@/module/util/routerUtil'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import mNoData from '@/module/components/noData/noData'
export default {
name: 'task-instance-list-index',
name: 'task-record-list',
data () {
return {
isLoading: true,
store,
total: null,
taskInstanceList: [],
taskRecordList: [],
isLoading: true,
searchParams: {
// page size
pageSize: 10,
// page index
pageNo: 1,
// Query name
searchVal: '',
// Process instance id
processInstanceId: '',
// host
host: '',
// state
stateType: '',
// start date
taskName: '',
state: '',
sourceTable: '',
destTable: '',
taskDate: '',
startDate: '',
// end date
endDate: ''
endDate: '',
pageSize: 10,
pageNo: 1
}
}
},
props: {},
props: {
config: String
},
methods: {
...mapActions('dag', ['getTaskInstanceList']),
/**
* click query
*/
_onQuery (o) {
this.searchParams = _.assign(this.searchParams, o)
if (this.searchParams.taskName) {
this.searchParams.taskName = ''
setUrlParams({
taskName: ''
})
}
setUrlParams(this.searchParams)
this._debounceGET()
},
_page (val) {
this.searchParams.pageNo = val
setUrlParams({
pageNo: this.searchParams.pageNo
})
setUrlParams(this.searchParams)
this._debounceGET()
},
/**
* get list data
*/
_getTaskInstanceList (flag) {
_getList (flag) {
this.isLoading = !flag
this.getTaskInstanceList(this.searchParams).then(res => {
this.taskInstanceList = []
this.taskInstanceList = res.totalList
this.store.dispatch(`dag/${this.config.apiFn}`, this.searchParams).then(res => {
this.taskRecordList = []
this.taskRecordList = res.totalList
this.total = res.total
this.isLoading = false
}).catch(e => {
this.isLoading = false
})
},
_onUpdate () {
this._debounceGET()
},
/**
* Anti-shake request interface
* @desc Prevent function from being called multiple times
*/
_debounceGET: _.debounce(function (flag) {
this._getTaskInstanceList(flag)
this._getList(flag)
}, 100, {
'leading': false,
'trailing': true
@ -118,7 +106,7 @@
this.searchParams.pageNo = a.query.pageNo || 1
}
},
'searchParams': {
'searchParams.pageNo': {
deep: true,
handler () {
this._debounceGET()

8
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue

@ -62,9 +62,7 @@
*/
_page (val) {
this.searchParams.pageNo = val
setUrlParams({
pageNo: this.searchParams.pageNo
})
setUrlParams(this.searchParams)
this._debounceGET()
},
/**
@ -73,9 +71,7 @@
_onConditions (o) {
this.searchParams.searchVal = o.searchVal
this.searchParams.pageNo = 1
setUrlParams({
pageNo: this.searchParams.pageNo
})
setUrlParams(this.searchParams)
this._debounceGET()
},
/**

18
escheduler-ui/src/js/conf/home/pages/projects/pages/historyTaskRecord/index.vue

@ -0,0 +1,18 @@
<template>
<m-list :config="config"></m-list>
</template>
<script>
import mList from '@/conf/home/pages/projects/pages/_source/taskRecordList'
export default {
name: 'history-task-record',
data () {
return {
config: {
title: `${this.$t('History task record')}`,
apiFn: 'getHistoryTaskRecordList'
}
}
},
components: { mList }
}
</script>

14
escheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/projectChart.vue

@ -37,7 +37,7 @@
<a href="javascript:" @click="id && _goTask(item.key)" :class="id ?'links':''">{{item.value}}</a>
</span>
</td>
<td><span>{{item.key}}</span></td>
<td><span class="ellipsis" style="width: 98%;" :title="item.key">{{item.key}}</span></td>
</tr>
</table>
</div>
@ -63,7 +63,7 @@
<tr v-for="(item,$index) in processStateCountList">
<td><span>{{$index+1}}</span></td>
<td><span><a href="javascript:" @click="id && _goProcess(item.key)" :class="id ?'links':''">{{item.value}}</a></span></td>
<td><span>{{item.key}}</span></td>
<td><span class="ellipsis" style="width: 98%;" :title="item.key">{{item.key}}</span></td>
</tr>
</table>
</div>
@ -93,7 +93,7 @@
import dayjs from 'dayjs'
import { mapActions } from 'vuex'
import { pie, bar } from './chartConfig'
import { stateType } from '@/conf/home/pages/projects/pages/instance/pages/list/_source/common'
import { stateType } from '@/conf/home/pages/projects/pages/_source/instanceConditions/common'
import Chart from '~/@analysys/ana-charts'
import mNoData from '@/module/components/noData/noData'
import mSpin from '@/module/components/spin/spin'
@ -273,4 +273,12 @@
}
}
}
.table-small-model {
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
}
</style>

15
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue

@ -3,7 +3,7 @@
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Process Instance')">
<template slot="conditions">
<m-conditions @on-query="_onQuery"></m-conditions>
<m-instance-conditions @on-query="_onQuery"></m-instance-conditions>
</template>
<template slot="content">
<template v-if="processInstanceList.length">
@ -25,13 +25,13 @@
import _ from 'lodash'
import { mapActions } from 'vuex'
import mList from './_source/list'
import mConditions from './_source/conditions'
import mSpin from '@/module/components/spin/spin'
import localStore from '@/module/util/localStorage'
import { setUrlParams } from '@/module/util/routerUtil'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import mInstanceConditions from '@/conf/home/pages/projects/pages/_source/instanceConditions'
export default {
name: 'instance-list-index',
@ -70,15 +70,16 @@
*/
_onQuery (o) {
this.searchParams = _.assign(this.searchParams, o)
setUrlParams(this.searchParams)
this._debounceGET()
},
/**
* 分页事件
*/
_page (val) {
this.searchParams.pageNo = val
setUrlParams({
pageNo: this.searchParams.pageNo
})
setUrlParams(this.searchParams)
this._debounceGET()
},
/**
* 获取list数据
@ -98,7 +99,7 @@
* 更新
*/
_onUpdate () {
this._debounceGET('false')
this._debounceGET()
},
/**
* 路由变动
@ -158,7 +159,7 @@
//
clearInterval(this.setIntervalP)
},
components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
components: { mList, mInstanceConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
}
</script>

0
escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/pages/list/_source/list.vue → escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue

131
escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue

@ -1,8 +1,135 @@
<template>
<router-view></router-view>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Task Instance')">
<template slot="conditions">
<m-instance-conditions @on-query="_onQuery"></m-instance-conditions>
</template>
<template slot="content">
<template v-if="taskInstanceList.length">
<m-list :task-instance-list="taskInstanceList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!taskInstanceList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</div>
</template>
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import mList from './_source/list'
import mSpin from '@/module/components/spin/spin'
import { setUrlParams } from '@/module/util/routerUtil'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import mInstanceConditions from '@/conf/home/pages/projects/pages/_source/instanceConditions'
export default {
name: 'task-instance-index'
name: 'task-instance-list-index',
data () {
return {
isLoading: true,
total: null,
taskInstanceList: [],
searchParams: {
// page size
pageSize: 10,
// page index
pageNo: 1,
// Query name
searchVal: '',
// Process instance id
processInstanceId: '',
// host
host: '',
// state
stateType: '',
// start date
startDate: '',
// end date
endDate: ''
}
}
},
props: {},
methods: {
...mapActions('dag', ['getTaskInstanceList']),
/**
* click query
*/
_onQuery (o) {
this.searchParams = _.assign(this.searchParams, o)
if (this.searchParams.taskName) {
this.searchParams.taskName = ''
}
setUrlParams(this.searchParams)
this._debounceGET()
},
_page (val) {
this.searchParams.pageNo = val
setUrlParams(this.searchParams)
this._debounceGET()
},
/**
* get list data
*/
_getTaskInstanceList (flag) {
this.isLoading = !flag
this.getTaskInstanceList(this.searchParams).then(res => {
this.taskInstanceList = []
this.taskInstanceList = res.totalList
this.total = res.total
this.isLoading = false
}).catch(e => {
this.isLoading = false
})
},
/**
* Anti-shake request interface
* @desc Prevent function from being called multiple times
*/
_debounceGET: _.debounce(function (flag) {
this._getTaskInstanceList(flag)
}, 100, {
'leading': false,
'trailing': true
})
},
watch: {
// router
'$route' (a) {
// url no params get instance list
if (_.isEmpty(a.query)) {
this.searchParams.pageNo = 1
this.searchParams.processInstanceId = ''
} else {
this.searchParams.pageNo = a.query.pageNo || 1
}
},
'searchParams': {
deep: true,
handler () {
this._debounceGET()
}
}
},
created () {
// Routing parameter merging
if (!_.isEmpty(this.$route.query)) {
this.searchParams = _.assign(this.searchParams, this.$route.query)
}
},
mounted () {
this._debounceGET()
},
components: { mList, mInstanceConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
}
</script>

14
escheduler-ui/src/js/conf/home/pages/projects/pages/taskRecord/index.vue

@ -1,8 +1,18 @@
<template>
<router-view></router-view>
<m-list :config="config"></m-list>
</template>
<script>
import mList from '@/conf/home/pages/projects/pages/_source/taskRecordList'
export default {
name: 'task-record-index'
name: 'task-record',
data () {
return {
config: {
title: `${this.$t('Task record')}`,
apiFn: 'getTaskRecordList'
}
}
},
components: { mList }
}
</script>

195
escheduler-ui/src/js/conf/home/pages/projects/pages/taskRecord/pages/list/index.vue

@ -1,195 +0,0 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Task record')">
<template slot="conditions">
<m-conditions>
<template slot="search-group">
<div class="list">
<x-button type="ghost" size="small" @click="_ckQuery" icon="fa fa-search"></x-button>
</div>
<div class="list">
<x-datepicker
ref="datepicker"
@on-change="_onChangeStartStop"
type="daterange"
format="YYYY-MM-DD HH:mm:ss"
placement="bottom-end"
:panelNum="2">
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('Select date range')">
<i slot="suffix"
@click.stop="_dateEmpty()"
class="ans-icon-fail-solid"
v-show="value"
style="font-size: 13px;cursor: pointer;margin-top: 1px;">
</i>
</x-input>
</x-datepicker>
</div>
<div class="list">
<x-input v-model="destTable" style="width: 120px;" size="small" :placeholder="$t('Target Table')"></x-input>
</div>
<div class="list">
<x-input v-model="sourceTable" style="width: 120px;" size="small" :placeholder="$t('Source Table')"></x-input>
</div>
<div class="list">
<x-select style="width: 90px;" @on-change="_onChangeState">
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 90px;" size="small" :placeholder="$t('State')" suffix-icon="ans-icon-arrow-down"></x-input>
<x-option
v-for="city in stateList"
:key="city.label"
:value="city.code"
:label="city.label">
</x-option>
</x-select>
</div>
<div class="list">
<x-datepicker
@on-change="_onChangeDate"
format="YYYY-MM-DD"
:panelNum="1">
<x-input slot="input" readonly slot-scope="{value}" style="width: 130px;" :value="value" size="small" :placeholder="$t('Date')"></x-input>
</x-datepicker>
</div>
<div class="list">
<x-input v-model="taskName" style="width: 130px;" size="small" :placeholder="$t('Task Name')"></x-input>
</div>
</template>
</m-conditions>
</template>
<template slot="content">
<template v-if="taskRecordList.length">
<m-list :task-record-list="taskRecordList" @on-update="_onUpdate" :page-no="pageNo" :page-size="pageSize">
</m-list>
<div class="page-box">
<x-page :current="pageNo" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!taskRecordList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</div>
</template>
<script>
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import mList from './_source/list'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'task-record-list-index',
data () {
return {
pageSize: 10,
pageNo: 1,
total: null,
taskRecordList: [],
isLoading: true,
taskName: '',
state: '',
sourceTable: '',
destTable: '',
taskDate: '',
startDate: '',
endDate: '',
stateList: [
{
label: `${i18n.$t('none')}`,
code: ``
},
{
label: `${i18n.$t('success')}`,
code: `${i18n.$t('success')}`
},
{
label: `${i18n.$t('waiting')}`,
code: `${i18n.$t('waiting')}`
},
{
label: `${i18n.$t('In Execution')}`,
code: `${i18n.$t('In Execution')}`
},
{
label: `${i18n.$t('Finish')}`,
code: `${i18n.$t('Finish')}`
}, {
label: `${i18n.$t('failed')}`,
code: `${i18n.$t('failed')}`
}
]
}
},
props: {},
methods: {
...mapActions('dag', ['getTaskRecordList']),
/**
* empty date
*/
_dateEmpty () {
this.startDate = ''
this.endDate = ''
this.$refs.datepicker.empty()
},
_ckQuery () {
this._getTaskRecordList()
},
_onChangeState (val) {
this.state = val.value
},
_onChangeStartStop (val) {
this.startDate = val[0]
this.endDate = val[1]
},
_onChangeDate (val) {
this.taskDate = val.replace(/-/g, '')
},
_page (val) {
this.pageNo = val
this._getTaskRecordList()
},
/**
* get list data
*/
_getTaskRecordList (flag) {
this.isLoading = !flag
let param = {
pageSize: this.pageSize,
pageNo: this.pageNo,
taskName: this.taskName,
state: this.state,
sourceTable: this.sourceTable,
destTable: this.destTable,
taskDate: this.taskDate,
startDate: this.startDate,
endDate: this.endDate
}
this.taskRecordList = []
this.getTaskRecordList(param).then(res => {
this.taskRecordList = res.totalList
this.total = res.total
this.isLoading = false
}).catch(e => {
this.isLoading = false
})
},
_onUpdate () {
this._getTaskRecordList('false')
}
},
watch: {
},
created () {
},
mounted () {
this._getTaskRecordList()
},
components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
}
</script>

2
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue

@ -1,5 +1,5 @@
<template>
<m-popup :ok-text="$t('Confirm Rename')" :nameText="$t('Rename')" @ok="_ok" :asyn-loading="true">
<m-popup :ok-text="$t('Rename')" :nameText="$t('Rename')" @ok="_ok" :asyn-loading="true">
<template slot="content">
<div class="resource-rename-model">
<m-list-box-f>

2
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue

@ -1,5 +1,5 @@
<template>
<m-popup :ok-text="$t('Confirm Rename')" :nameText="$t('Rename')" @ok="_ok" :asyn-loading="true">
<m-popup :ok-text="$t('Rename')" :nameText="$t('Rename')" @ok="_ok" :asyn-loading="true">
<template slot="content">
<div class="resource-rename-model">
<m-list-box-f>

2
escheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue

@ -35,7 +35,6 @@
</template>
<script>
import _ from 'lodash'
import i18n from '@/module/i18n'
import store from '@/conf/home/store'
import mPopup from '@/module/components/popup/popup'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
@ -99,7 +98,6 @@
this.$message.error(e.msg || '')
})
}
},
_verification () {
if (!this.queueName) {

4
escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue

@ -192,13 +192,13 @@
let sourceListPrs = _.map(data[0], v => {
return {
id: v.id,
name: v.name
name: v.alias
}
})
let targetListPrs = _.map(data[1], v => {
return {
id: v.id,
name: v.name
name: v.alias
}
})
let self = this

34
escheduler-ui/src/js/conf/home/router/index.js

@ -157,45 +157,29 @@ const router = new Router({
},
{
path: '/projects/task-instance',
name: 'task-instance-index',
name: 'task-instance',
component: resolve => require(['../pages/projects/pages/taskInstance'], resolve),
meta: {
title: `${i18n.$t('Task Instance')}`
},
redirect: {
name: 'task-instance-list'
},
children: [
{
path: '/projects/task-instance/list',
name: 'task-instance-list',
component: resolve => require(['../pages/projects/pages/taskInstance/pages/list/index'], resolve),
meta: {
title: `${i18n.$t('Task Instance')}`
}
}
]
},
{
path: '/projects/task-record',
name: 'task-record-index',
name: 'task-record',
component: resolve => require(['../pages/projects/pages/taskRecord'], resolve),
meta: {
title: `${i18n.$t('Task record')}`
}
},
redirect: {
name: 'task-record-list'
},
children: [
{
path: '/projects/task-record/list',
name: 'task-record-list',
component: resolve => require(['../pages/projects/pages/taskRecord/pages/list/index'], resolve),
path: '/projects/history-task-record',
name: 'history-task-record',
component: resolve => require(['../pages/projects/pages/historyTaskRecord'], resolve),
meta: {
title: `${i18n.$t('Task record')}`
}
title: `History task record`
}
]
}
]
},

12
escheduler-ui/src/js/conf/home/store/dag/actions.js

@ -478,6 +478,18 @@ export default {
})
})
},
/**
* Query history task record list
*/
getHistoryTaskRecordList ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`projects/task-record/history-list-paging`, payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)
})
})
},
/**
* tree chart
*/

2
escheduler-ui/src/js/conf/home/store/security/actions.js

@ -401,5 +401,5 @@ export default {
reject(e)
})
})
},
}
}

2
escheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue

@ -1,7 +1,7 @@
<template>
<m-popup
ref="popup"
:ok-text="$t('Confirm Upload')"
:ok-text="$t('Upload')"
:nameText="$t('File Upload')"
@ok="_ok"
:disabled="progress === 0 ? false : true">

9
escheduler-ui/src/js/module/components/secondaryMenu/menu.js

@ -45,13 +45,18 @@ let menu = {
},
{
name: `${i18n.$t('Task Instance')}`,
path: 'task-instance-list',
path: 'task-instance',
id: 3
},
{
name: `${i18n.$t('Task record')}`,
path: 'task-record-list',
path: 'task-record',
id: 4
},
{
name: `${i18n.$t('History task record')}`,
path: 'history-task-record',
id: 5
}
]
}

7
escheduler-ui/src/js/module/i18n/locale/en_US.js

@ -208,8 +208,8 @@ export default {
'Select date range': 'Select date range',
'Date': 'Date',
'waiting': 'waiting',
'In Execution': 'In Execution',
'Finish': 'Finish',
'execution': 'execution',
'finish': 'finish',
'Create File': 'Create File',
'File Name': 'File Name',
'File Format': 'File Format',
@ -251,7 +251,6 @@ export default {
'Size': 'Size',
'Rename': 'Rename',
'Download': 'Download',
'Confirm Rename': 'Confirm Rename',
'Submit': 'Submit',
'Edit UDF Function': 'Edit UDF Function',
'type': 'type',
@ -298,7 +297,6 @@ export default {
'Copy': 'Copy',
'Delete': 'Delete',
'Please enter keyword': 'Please enter keyword',
'Confirm Upload': 'Confirm Upload',
'File Upload': 'File Upload',
'Drag the file into the current upload window': 'Drag the file into the current upload window',
'Drag area upload': 'Drag area upload',
@ -410,4 +408,5 @@ export default {
'Create queue': 'Create queue',
'Edit queue': 'Edit queue',
'Datasource manage': 'Datasource',
'History task record': 'History task record'
}

9
escheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -208,8 +208,8 @@ export default {
'Select date range': '选择日期区间',
'Date': '日期',
'waiting': '等待',
'In Execution': '执行中',
'Finish': '完成',
'execution': '执行中',
'finish': '完成',
'Create File': '创建文件',
'File Name': '文件名称',
'File Format': '文件格式',
@ -251,7 +251,6 @@ export default {
'Size': '大小',
'Rename': '重命名',
'Download': '下载',
'Confirm Rename': '确认重命名',
'Submit': '提交',
'Edit UDF Function': '编辑UDF函数',
'type': '类型',
@ -297,11 +296,10 @@ export default {
'Start': '运行',
'Copy': '复制节点',
'Please enter keyword': '请输入关键词',
'Confirm Upload': '确认上传',
'File Upload': '文件上传',
'Drag the file into the current upload window': '请将文件拖拽到当前上传窗口内',
'Drag area upload': '拖动区域上传',
'Upload': '点击上传',
'Upload': '上传',
'Please enter file name': '请输入文件名',
'Please select the file to upload': '请选择要上传的文件',
'Resources manage': '资源中心',
@ -409,4 +407,5 @@ export default {
'Create queue': '创建队列',
'Edit queue': '编辑队列',
'Datasource manage': '数据源中心',
'History task record': '历史任务记录'
}

2
escheduler-ui/src/sass/common/index.scss

@ -31,7 +31,7 @@
}
.ans-poptip {
min-width: 154px;
min-width: 158px;
}
.ans-checkbox-wrapper .checkbox-label,

Loading…
Cancel
Save