feature: Popup execution dialog from logs
This commit is contained in:
parent
42535feadf
commit
58cc04298f
|
|
@ -162,7 +162,7 @@
|
|||
<td class = "timestamp">?</td>
|
||||
<td>
|
||||
<span role = "img" class = "icon"></span>
|
||||
<span class = "content">?</span>
|
||||
<a href = "#" class = "content">?</a>
|
||||
|
||||
<details>
|
||||
<summary>stdout</summary>
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class ActionButton extends ExecutionFeedbackButton {
|
|||
uniqueTrackingId: this.getUniqueId()
|
||||
}
|
||||
|
||||
this.onActionStarted(startActionArgs.uuid)
|
||||
this.onActionStarted(startActionArgs.uniqueTrackingId)
|
||||
|
||||
window.fetch(window.restBaseUrl + 'StartAction', {
|
||||
method: 'POST',
|
||||
|
|
@ -125,10 +125,10 @@ class ActionButton extends ExecutionFeedbackButton {
|
|||
})
|
||||
}
|
||||
|
||||
onActionStarted (executionUuid) {
|
||||
onActionStarted (executionTrackingId) {
|
||||
if (this.popupOnStart === 'execution-button') {
|
||||
const btnExecution = document.createElement('execution-button')
|
||||
btnExecution.constructFromJson(executionUuid)
|
||||
btnExecution.constructFromJson(executionTrackingId)
|
||||
this.querySelector('.action-button-footer').prepend(btnExecution)
|
||||
|
||||
return
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ExecutionFeedbackButton } from './ExecutionFeedbackButton.js'
|
|||
|
||||
class ExecutionButton extends ExecutionFeedbackButton {
|
||||
constructFromJson (json) {
|
||||
this.executionUuid = json
|
||||
this.executionTrackingId = json
|
||||
this.ellapsed = 0
|
||||
|
||||
this.appendChild(document.createElement('button'))
|
||||
|
|
@ -22,7 +22,7 @@ class ExecutionButton extends ExecutionFeedbackButton {
|
|||
show () {
|
||||
window.executionDialog.reset()
|
||||
window.executionDialog.show()
|
||||
window.executionDialog.fetchExecutionResult(this.executionUuid)
|
||||
window.executionDialog.fetchExecutionResult(this.executionTrackingId)
|
||||
}
|
||||
|
||||
onExecStatusChanged () {
|
||||
|
|
|
|||
|
|
@ -90,10 +90,10 @@ export class ExecutionDialog {
|
|||
}
|
||||
|
||||
fetchExecutionResult (uuid) {
|
||||
this.executionUuid = uuid
|
||||
this.executionTrackingId = uuid
|
||||
|
||||
const executionStatusArgs = {
|
||||
executionUuid: this.executionUuid
|
||||
executionTrackingId: this.executionTrackingId
|
||||
}
|
||||
|
||||
window.fetch(window.restBaseUrl + 'ExecutionStatus', {
|
||||
|
|
@ -127,7 +127,7 @@ export class ExecutionDialog {
|
|||
this.domStdout.parentElement.open = true
|
||||
}
|
||||
|
||||
this.executionUuid = res.logEntry.executionUuid
|
||||
this.executionTrackingId = res.logEntry.executionTrackingId
|
||||
|
||||
if (res.logEntry.executionFinished) {
|
||||
this.domStatus.innerText = 'Completed'
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function onExecutionFinished (evt) {
|
|||
|
||||
switch (actionButton.popupOnStart) {
|
||||
case 'execution-button':
|
||||
document.querySelector('execution-button#execution-' + logEntry.uuid).onExecutionFinished(logEntry)
|
||||
document.querySelector('execution-button#execution-' + logEntry.executionTrackingId).onExecutionFinished(logEntry)
|
||||
break
|
||||
case 'execution-dialog-stdout-only':
|
||||
case 'execution-dialog':
|
||||
|
|
@ -414,6 +414,14 @@ export function marshalLogsJsonToHtml (json) {
|
|||
row.querySelector('.exit-code').innerText = logTableExitCode
|
||||
row.setAttribute('title', logEntry.actionTitle)
|
||||
|
||||
row.querySelector('.content').onclick = () => {
|
||||
window.executionDialog.reset()
|
||||
window.executionDialog.show()
|
||||
window.executionDialog.renderExecutionResult({
|
||||
logEntry: window.logEntries[logEntry.executionTrackingId]
|
||||
})
|
||||
}
|
||||
|
||||
for (const tag of logEntry.tags) {
|
||||
const domTag = document.createElement('span')
|
||||
domTag.classList.add('tag')
|
||||
|
|
|
|||
Loading…
Reference in New Issue