Skip to content

Commit

Permalink
JENKINS-20717 Added message in view if no components/pipelines are co…
Browse files Browse the repository at this point in the history
…nfigured
  • Loading branch information
patbos committed Jan 13, 2014
1 parent 189bac4 commit 8124e31
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

<div id="pipelineerror" class="pipelineerror"/>

<div id="pipeline-message" class="pipeline-message"/>

<j:forEach begin="1" end="${it.noOfColumns}" indexVar="i">
<script type="text/javascript">
pipelineContainers[${i-1}] = 'pipelines-${i}';
Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/pipe-fullscreen.css
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ div.pipelineerror {
display: none;
}

div.pipeline-message {
font-size: 20px;
text-align: center;
}

div.left {
float: left;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/pipe.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ div.pipelineerror {
display: none;
}

div.pipeline-message {
font-size: 15px;
}

div.left {
float: left;
}
Expand Down
6 changes: 5 additions & 1 deletion src/main/webapp/pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ function refreshPipelines(data, divNames, errorDiv, view, showAvatars, showChang
var lastUpdate = data.lastUpdated;
if (lastResponse == null || JSON.stringify(data.pipelines) != JSON.stringify(lastResponse.pipelines)) {


for (var z = 0; z < divNames.length; z++) {
Q("#" + divNames[z]).html('');
}

var tasks = [];

if (data.pipelines.length == 0) {
Q("#pipeline-message").html('No pipelines configured or found. Please review the <a href="configure">configuration</a>')
}

for (var c = 0; c < data.pipelines.length; c++) {
var component = data.pipelines[c];
var html = "<section class='component'>";
Expand Down Expand Up @@ -134,6 +137,7 @@ function refreshPipelines(data, divNames, errorDiv, view, showAvatars, showChang
html = html + "</section>";

Q("#" + divNames[c % divNames.length]).append(html);
Q("#pipeline-message").html('');
}
lastResponse = data;
equalheight(".stage");
Expand Down

0 comments on commit 8124e31

Please sign in to comment.