parent
828edc58a2
commit
68d8a1f55b
|
@ -212,7 +212,7 @@ export function getBrowserSearch({ uuid, parameters: parametersList = [], query,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request a Process Activity list
|
// Request a Process Activity list
|
||||||
export function requestProcessActivity({ pageToken, pageSize }) {
|
export function requestListProcessesLogs({ pageToken, pageSize }) {
|
||||||
// Get Process Activity
|
// Get Process Activity
|
||||||
return Instance.call(this).requestListProcessesLogs({ pageToken, pageSize })
|
return Instance.call(this).requestListProcessesLogs({ pageToken, pageSize })
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {
|
import {
|
||||||
runProcess,
|
runProcess,
|
||||||
requestProcessActivity
|
requestListProcessesLogs
|
||||||
} from '@/api/ADempiere/data'
|
} from '@/api/ADempiere/data'
|
||||||
import { showNotification } from '@/utils/ADempiere/notification'
|
import { showNotification } from '@/utils/ADempiere/notification'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
|
@ -794,26 +794,26 @@ const processControl = {
|
||||||
/**
|
/**
|
||||||
* TODO: Add date time in which the process/report was executed
|
* TODO: Add date time in which the process/report was executed
|
||||||
*/
|
*/
|
||||||
getSessionProcessFromServer({ commit, dispatch, getters, rootGetters }) {
|
getSessionProcessFromServer({ commit, dispatch, getters, rootGetters }, parameters) {
|
||||||
// process Activity
|
// process Activity
|
||||||
return requestProcessActivity()
|
const { pageToken, pageSize } = parameters
|
||||||
|
return requestListProcessesLogs({ pageToken, pageSize })
|
||||||
.then(processActivityResponse => {
|
.then(processActivityResponse => {
|
||||||
const responseList = processActivityResponse.processLogsList.map(businessProcessItem => {
|
const responseList = processActivityResponse.processLogsList.map(processLogItem => {
|
||||||
const processMetadata = rootGetters.getProcess(businessProcessItem.uuid)
|
const processMetadata = rootGetters.getProcess(processLogItem.uuid)
|
||||||
// if no exists metadata process in store and no request progess
|
// if no exists metadata process in store and no request progess
|
||||||
if (processMetadata === undefined && getters.getInRequestMetadata(businessProcessItem.uuid) === undefined) {
|
if (processMetadata === undefined && getters.getInRequestMetadata(processLogItem.uuid) === undefined) {
|
||||||
commit('addInRequestMetadata', businessProcessItem.uuid)
|
commit('addInRequestMetadata', processLogItem.uuid)
|
||||||
dispatch('getProcessFromServer', {
|
dispatch('getProcessFromServer', {
|
||||||
containerUuid: businessProcessItem.uuid
|
containerUuid: processLogItem.uuid
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
commit('deleteInRequestMetadata', businessProcessItem.uuid)
|
commit('deleteInRequestMetadata', processLogItem.uuid)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const process = {
|
const process = {
|
||||||
...businessProcessItem,
|
...processLogItem,
|
||||||
processUuid: businessProcessItem.uuid
|
processUuid: processLogItem.uuid
|
||||||
}
|
}
|
||||||
return process
|
return process
|
||||||
})
|
})
|
||||||
|
|
|
@ -53,15 +53,14 @@
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<!-- show only when bring logs -->
|
<!-- show only when bring logs -->
|
||||||
<el-popover
|
<el-popover
|
||||||
v-else-if="activity.logs.length > 0 || activity.summary"
|
v-else-if="activity.logsList.length > 0 || activity.summary"
|
||||||
v-key="is-logs"
|
|
||||||
placement="right"
|
placement="right"
|
||||||
width="500"
|
width="500"
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
>
|
>
|
||||||
<b>{{ $t('table.ProcessActivity.Logs') }}</b><br>
|
<b>{{ $t('table.ProcessActivity.Logs') }}</b><br>
|
||||||
<ul>
|
<ul>
|
||||||
<li @click="zoomIn(activity)"> {{ activity.summary }} </li>
|
<li @click="handleCommand({ ...activity, command: 'zoomIn' })"> {{ activity.summary }} </li>
|
||||||
<el-scrollbar wrap-class="popover-scroll">
|
<el-scrollbar wrap-class="popover-scroll">
|
||||||
<li v-for="(logItem, key) in activity.logsList" :key="key" @click="zoomIn(activity)">
|
<li v-for="(logItem, key) in activity.logsList" :key="key" @click="zoomIn(activity)">
|
||||||
{{ logItem.log }}
|
{{ logItem.log }}
|
||||||
|
@ -123,7 +122,9 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
processActivity: [],
|
processActivity: [],
|
||||||
recordCount: 0
|
recordCount: 0,
|
||||||
|
pageToken: '',
|
||||||
|
pageSize: 50
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -151,7 +152,7 @@ export default {
|
||||||
infoMetadata = {}
|
infoMetadata = {}
|
||||||
}
|
}
|
||||||
Object.assign(processMetadataReturned, element, infoMetadata)
|
Object.assign(processMetadataReturned, element, infoMetadata)
|
||||||
|
processMetadataReturned.parametersList = element.parametersList
|
||||||
var indexRepeat = processAllReturned.findIndex(item => item.instanceUuid === element.instanceUuid && !this.isEmptyValue(element.instanceUuid))
|
var indexRepeat = processAllReturned.findIndex(item => item.instanceUuid === element.instanceUuid && !this.isEmptyValue(element.instanceUuid))
|
||||||
if (indexRepeat > -1) {
|
if (indexRepeat > -1) {
|
||||||
// update attributes in exists process to return
|
// update attributes in exists process to return
|
||||||
|
@ -171,15 +172,23 @@ export default {
|
||||||
},
|
},
|
||||||
language() {
|
language() {
|
||||||
return this.$store.getters.language
|
return this.$store.getters.language
|
||||||
|
},
|
||||||
|
permissionRoutes() {
|
||||||
|
return this.$store.getters.permission_routes
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.$store.dispatch('getSessionProcessFromServer')
|
this.$store.dispatch('getSessionProcessFromServer', {
|
||||||
|
pageToken: this.pageToken,
|
||||||
|
pageSize: this.pageSize
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
if (response.nextPageToken !== this.pageToken) {
|
||||||
|
this.pageToken = response.nextPageToken
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
zoomIn(activity) {
|
|
||||||
this.$router.push({ path: activity.processIdPath })
|
|
||||||
},
|
|
||||||
getProcessMetadata(uuid) {
|
getProcessMetadata(uuid) {
|
||||||
return this.$store.getters.getProcess(uuid)
|
return this.$store.getters.getProcess(uuid)
|
||||||
},
|
},
|
||||||
|
@ -193,20 +202,19 @@ export default {
|
||||||
fileName: activity.output.fileName
|
fileName: activity.output.fileName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else if (activity.command === 'zoomIn') {
|
||||||
if (!this.isEmptyValue(activity.parametersList)) {
|
this.$store.dispatch('getWindowByUuid', { routes: this.permissionRoutes, windowUuid: activity.uuid })
|
||||||
this.$route.query = {
|
const processRoute = this.$store.getters.getWindowRoute(activity.uuid)
|
||||||
|
if (!this.isEmptyValue(processRoute)) {
|
||||||
|
this.$router.push({
|
||||||
|
name: processRoute.name,
|
||||||
|
query: {
|
||||||
...this.$route.query,
|
...this.$route.query,
|
||||||
...activity.parametersList
|
...activity.parametersList
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.$router.push({
|
|
||||||
path: activity.processIdPath,
|
|
||||||
query: {
|
|
||||||
...this.$route.query
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
checkStatus({ isError, isProcessing, isReport }) {
|
checkStatus({ isError, isProcessing, isReport }) {
|
||||||
const status = {
|
const status = {
|
||||||
|
|
Loading…
Reference in New Issue