Duplicate Processes (#354)
parent
6ce282c65d
commit
557937349a
|
@ -581,12 +581,6 @@ const processControl = {
|
||||||
output
|
output
|
||||||
})
|
})
|
||||||
dispatch('setReportTypeToShareLink', processResult.output.reportType)
|
dispatch('setReportTypeToShareLink', processResult.output.reportType)
|
||||||
dispatch('getDataListTab', {
|
|
||||||
parentUuid: params.parentUuid,
|
|
||||||
containerUuid: params.containerUuid,
|
|
||||||
isRefreshPanel: true,
|
|
||||||
recordUuid: params.recordUuid
|
|
||||||
})
|
|
||||||
resolve(processResult)
|
resolve(processResult)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -715,76 +709,37 @@ const processControl = {
|
||||||
outputStream: '',
|
outputStream: '',
|
||||||
reportType: ''
|
reportType: ''
|
||||||
}
|
}
|
||||||
if (response.getOutput()) {
|
if (isEmptyValue(response.output)) {
|
||||||
const responseOutput = response.getOutput()
|
const responseOutput = response.output
|
||||||
output = {
|
output = {
|
||||||
uuid: responseOutput.getUuid(),
|
uuid: responseOutput.uuid,
|
||||||
name: responseOutput.getName(),
|
name: responseOutput.name,
|
||||||
description: responseOutput.getDescription(),
|
description: responseOutput.description,
|
||||||
fileName: responseOutput.getFilename(),
|
fileName: responseOutput.filename,
|
||||||
mimeType: responseOutput.getMimetype(),
|
mimeType: responseOutput.mimeType,
|
||||||
output: responseOutput.getOutput(),
|
output: responseOutput.output,
|
||||||
outputStream: responseOutput.getOutputstream(),
|
outputStream: responseOutput.outputstream,
|
||||||
reportType: responseOutput.getReporttype()
|
reportType: responseOutput.reporttype
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var logList = []
|
var logList = []
|
||||||
if (response.getLogsList()) {
|
if (response.getLogsList) {
|
||||||
logList = response.getLogsList().map(itemLog => {
|
logList = response.getLogsList.map(itemLog => {
|
||||||
return {
|
return {
|
||||||
log: itemLog.getLog(),
|
log: itemLog.log,
|
||||||
recordId: itemLog.getRecordid()
|
recordId: itemLog.recordid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var link = {
|
|
||||||
href: undefined,
|
|
||||||
download: undefined
|
|
||||||
}
|
|
||||||
if (processDefinition.isReport) {
|
|
||||||
const blob = new Blob(
|
|
||||||
[output.outputStream],
|
|
||||||
{ type: output.mimeType }
|
|
||||||
)
|
|
||||||
link = document.createElement('a')
|
|
||||||
link.href = window.URL.createObjectURL(blob)
|
|
||||||
link.download = output.fileName
|
|
||||||
if (reportType !== 'pdf' && reportType !== 'html') {
|
|
||||||
link.click()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Report views List to context menu
|
|
||||||
var reportViewList = {
|
|
||||||
name: language.t('views.reportView'),
|
|
||||||
type: 'summary',
|
|
||||||
action: '',
|
|
||||||
childs: [],
|
|
||||||
option: 'reportView'
|
|
||||||
}
|
|
||||||
reportViewList.childs = getters.getReportViewList(processResult.processUuid)
|
|
||||||
if (!reportViewList.childs.length) {
|
|
||||||
dispatch('requestReportViews', {
|
|
||||||
processUuid: processResult.processUuid
|
|
||||||
})
|
|
||||||
.then(response => {
|
|
||||||
reportViewList.childs = response
|
|
||||||
// Get contextMenu metadata and concat print report views with contextMenu actions
|
|
||||||
var contextMenuMetadata = rootGetters.getContextMenu(processResult.processUuid)
|
|
||||||
contextMenuMetadata.actions.push(reportViewList)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// assign new attributes
|
// assign new attributes
|
||||||
Object.assign(processResult, {
|
Object.assign(processResult, {
|
||||||
instanceUuid: response.getInstanceuuid(),
|
instanceUuid: response.instanceUuid,
|
||||||
url: link.href,
|
isError: response.isError,
|
||||||
download: link.download,
|
isProcessing: response.isProcessing,
|
||||||
isError: response.getIserror(),
|
summary: response.summary,
|
||||||
isProcessing: response.getIsprocessing(),
|
ResultTableName: response.resulttablename,
|
||||||
summary: response.getSummary(),
|
lastRun: response.lastRun,
|
||||||
ResultTableName: response.getResulttablename(),
|
|
||||||
lastRun: response.getLastrun(),
|
|
||||||
logs: logList,
|
logs: logList,
|
||||||
output: output
|
output: output
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="getRunProcessAll.length" key="with-process" class="app-container">
|
<div v-if="!isEmptyValue(getProcessLog)" key="with-process" class="app-container">
|
||||||
<el-timeline>
|
<el-timeline>
|
||||||
<el-timeline-item
|
<el-timeline-item
|
||||||
v-for="(activity, index) in getRunProcessAll"
|
v-for="(activity, index) in getProcessLog"
|
||||||
:key="index"
|
:key="index"
|
||||||
:timestamp="translateDate(activity.lastRun)"
|
:timestamp="translateDate(activity.lastRun)"
|
||||||
placement="top"
|
placement="top"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<!-- show only when bring logs -->
|
<!-- show only when bring logs -->
|
||||||
<el-popover
|
<el-popover
|
||||||
v-else-if="activity.logsList.length > 0 || activity.summary"
|
v-else-if="!isEmptyValue(activity.logsList) || !isEmptyValue(activity.summary)"
|
||||||
:key="index + 'is-summary'"
|
:key="index + 'is-summary'"
|
||||||
placement="right"
|
placement="right"
|
||||||
width="500"
|
width="500"
|
||||||
|
@ -173,6 +173,14 @@ export default {
|
||||||
return new Date(a.lastRun) - new Date(b.lastRun)
|
return new Date(a.lastRun) - new Date(b.lastRun)
|
||||||
}).reverse()
|
}).reverse()
|
||||||
},
|
},
|
||||||
|
getProcessLog() {
|
||||||
|
var log = this.getRunProcessAll.filter(element => {
|
||||||
|
if (element.isError !== undefined && (element.isProcessing !== undefined)) {
|
||||||
|
return element
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return log
|
||||||
|
},
|
||||||
language() {
|
language() {
|
||||||
return this.$store.getters.language
|
return this.$store.getters.language
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue