From 03272699baebaeffe195dd6490851ec3d53123a7 Mon Sep 17 00:00:00 2001 From: Shiva S Date: Tue, 8 Oct 2019 12:58:29 +0530 Subject: [PATCH] UI: Add pipeline details (#217) * Added pipeline details to the pipeline detail view * fix underline on space in Pipeline details view --- frontend/src/views/pipeline/detail.vue | 81 +++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/pipeline/detail.vue b/frontend/src/views/pipeline/detail.vue index 057a2c0d..7af27781 100755 --- a/frontend/src/views/pipeline/detail.vue +++ b/frontend/src/views/pipeline/detail.vue @@ -12,10 +12,41 @@ - Show Logs + Show Logs (Run :{{runID}}) - +
+
+ + + + + + + + + + + + + + + +
Name{{pipeline.name}}
Repo{{pipeline.repo.url}}
Branch{{pipeline.repo.selectedbranch}}
Location{{pipeline.execpath}}
Trigger Token{{pipeline.trigger_token}}
Last Successful Run + + {{ lastSuccessfulRun.id }} +
Last Run + + {{ lastRun.id }} + [{{ lastRun.status }} + {{ lastRun.status }} + {{ lastRun.status }} + {{ lastRun.status }} ] +
+
+
@@ -231,6 +262,21 @@ export default { this.drawPipelineDetail(pipeline.data, pipelineRun.data) } this.runsRows = pipelineRuns.data + let tempLastSuccessfulRunId = -1; + let tempLastRunId = -1; + for (let runI = 0; runI < pipelineRuns.data.length; runI++) { + if (pipelineRuns.data[runI].status == 'success') { + if (pipelineRuns.data[runI].id > tempLastSuccessfulRunId) { + this.lastSuccessfulRun = pipelineRuns.data[runI]; + tempLastSuccessfulRunId = pipelineRuns.data[runI].id; + } + } + + if (pipelineRuns.data[runI].id > tempLastRunId) { + this.lastRun = pipelineRuns.data[runI]; + tempLastRunId = pipelineRuns.data[runI].id; + } + } this.pipeline = pipeline.data }) .catch((error) => { @@ -251,6 +297,21 @@ export default { // Are runs available? if (pipelineRuns.data) { this.runsRows = pipelineRuns.data + let tempLastSuccessfulRunId = -1; + let tempLastRunId = -1; + for (let runI = 0; runI < pipelineRuns.data.length; runI++) { + if (pipelineRuns.data[runI].status == 'success') { + if (pipelineRuns.data[runI].id > tempLastSuccessfulRunId) { + this.lastSuccessfulRun = pipelineRuns.data[runI]; + tempLastSuccessfulRunId = pipelineRuns.data[runI].id; + } + } + + if (pipelineRuns.data[runI].id > tempLastRunId) { + this.lastRun = pipelineRuns.data[runI]; + tempLastRunId = pipelineRuns.data[runI].id; + } + } } this.pipeline = pipeline.data }) @@ -467,4 +528,20 @@ export default { background-color: #2a2735; } + .pipeline-detail-table { + width: 100%; + table-layout: auto; + border: 1px solid #000000; + background-color: #19191B; + border-radius: 6px; + border-collapse: separate !important; + th { + color: #4da2fc; + } + td, th { + padding: 10px; + padding-left: 15px; + border-bottom: 1px solid #000000; + } + }