Merge lp:~sil2100/bileto/dashboard_add_qa_colors into lp:bileto

Proposed by Łukasz Zemczak
Status: Rejected
Rejected by: Robert Bruce Park
Proposed branch: lp:~sil2100/bileto/dashboard_add_qa_colors
Merge into: lp:bileto
Diff against target: 50 lines (+15/-5)
2 files modified
tickets/static/dashboard.html (+1/-1)
tickets/static/dashboard.js (+14/-4)
To merge this branch: bzr merge lp:~sil2100/bileto/dashboard_add_qa_colors
Reviewer Review Type Date Requested Status
CU2D maintainers Pending
Review via email: mp+266603@code.launchpad.net

Commit message

Make sure that the dashboard silo status color also changes basing on QA status, informing the trainguards of when a silo is rejected or signed-off.

Description of the change

Make sure that the dashboard silo status color also changes basing on QA status, informing the trainguards of when a silo is rejected or signed-off.

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Still need to actually test it somewhere.

Revision history for this message
Robert Bruce Park (robru) wrote :

Oh haha, I didn't even see this. I fixed this already in a recent commit I did.

Also, "somewhere" is the staging area, branches can be configured the same way as for jenkins, as per the instructions:

https://wiki.canonical.com/UbuntuEngineering/CI/Playbook/StagingTrain

Unmerged revisions

201. By Łukasz Zemczak

Add QA status to have effect on silo colors in the dashboard.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tickets/static/dashboard.html'
--- tickets/static/dashboard.html 2015-07-10 22:06:58 +0000
+++ tickets/static/dashboard.html 2015-07-31 17:28:43 +0000
@@ -105,7 +105,7 @@
105 </ul>105 </ul>
106 </div>106 </div>
107 </div>107 </div>
108 <div class="status" style="color: {{getSiloColor(siloname)}};">108 <div class="status" style="color: {{getSiloColor(siloname, bileto.reqs[silos[siloname].requestid].qa_signoff)}};">
109 <div class="jenkins_status">109 <div class="jenkins_status">
110 <p ng-repeat="status in silos[siloname].longStatus"110 <p ng-repeat="status in silos[siloname].longStatus"
111 ng-bind-html="status"></p>111 ng-bind-html="status"></p>
112112
=== modified file 'tickets/static/dashboard.js'
--- tickets/static/dashboard.js 2015-07-10 22:00:45 +0000
+++ tickets/static/dashboard.js 2015-07-31 17:28:43 +0000
@@ -44,9 +44,18 @@
44 'silo dirty': 'olive',44 'silo dirty': 'olive',
45};45};
4646
47QA_STATE_COLORS = {
48 'qa granted': 'blue',
49 'qa failed': 'red',
50};
51
4752
48function getStatusColor(status) {53function getStatusColor(status) {
49 return STATUS_COLORS[nWords(status, 2).toLowerCase()] || 'black';54 return STATUS_COLORS[nWords(status, 2).toLowerCase()];
55};
56
57function getQAStateColor(qa_state) {
58 return QA_STATE_COLORS[qa_state.toLowerCase()];
50};59};
5160
52var app = angular.module('CITrainWeb', ['ngSanitize']);61var app = angular.module('CITrainWeb', ['ngSanitize']);
@@ -258,9 +267,10 @@
258 }267 }
259 })268 })
260269
261 $scope.getSiloColor = function(siloname) {270 $scope.getSiloColor = function(siloname, qa_state) {
262 var siloColor = ($scope.silos[siloname] || {}).statusColor || '';271 var qaColor = getQAStateColor(qa_state);
263 return siloColor || 'black';272 var siloColor = ($scope.silos[siloname] || {}).statusColor;
273 return siloColor || qaColor || 'black';
264 };274 };
265275
266 function getQuery() {276 function getQuery() {

Subscribers

People subscribed via source and target branches