Commit a465512c authored by vehnem's avatar vehnem
Browse files

front: display step number

parent cdc5e0d6
......@@ -272,6 +272,7 @@
<table id="mappings-logs-table" data-pagination="true"
data-page-size="4" class="table">
<thead>
<th data-field="step">Step</th>
<th data-field="stateHtml">State</th>
<th data-field="filename">Log File</th>
<th data-field="description">Description</th>
......@@ -354,6 +355,7 @@
<table id="generic-logs-table" data-pagination="true"
data-page-size="4" class="table">
<thead>
<th data-field="step">Step</th>
<th data-field="stateHtml">State</th>
<th data-field="filename">Log File</th>
<th data-field="description">Description</th>
......@@ -436,6 +438,7 @@
<table id="wikidata-logs-table" data-pagination="true"
data-page-size="4" class="table">
<thead>
<th data-field="step">Step</th>
<th data-field="stateHtml">State</th>
<th data-field="filename">Log File</th>
<th data-field="description">Description</th>
......
......@@ -119,15 +119,16 @@ function getLogs(group) {
var processLogs = []
var doneSteps = 0
var isRunning = false
var step = ""
var step = 6
var stepHtml = ""
data.forEach(element => {
step += -1
var state = element.state
if (state == 0) {
state = '<strong class="text-warning">WARN</strong>'
state = '<strong class="text-warning">WAIT</strong>'
} else if (state == 1) {
step = stepByLog[element.logName] || step
stepHtml = stepByLog[element.logName] || stepHtml
doneSteps += 1
isRunning = true
state = '<strong class="text-success">RUN</strong>'
......@@ -139,14 +140,14 @@ function getLogs(group) {
var url = element.url
var file = element.logName
var description = element.description
processLogs.push({ 'state': element.state, 'stateHtml': state, 'description': description, 'filename': `<a href="${url}">${file}</a>` })
processLogs.push({ 'step': step, 'state': element.state, 'stateHtml': state, 'description': description, 'filename': `<a href="${url}">${file}</a>` })
})
if ( isRunning ) doneSteps -= 1;
setProgress(group, doneSteps, 6)
if (step != "" ) $(`#${group}-progress-step`).append(` at step: ${step}`)
if (step != "" ) $(`#${group}-progress-step`).append(` at step: ${stepHtml}`)
processLogs.sort( function(a,b) {
if (a.state == 1) return -1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment