mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 05:17:36 -02:30
AC-502 home page widgets should now show 0 rather than ' ' for empty values.
This commit is contained in:
@@ -13,7 +13,11 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
|
|||||||
return function(params) {
|
return function(params) {
|
||||||
|
|
||||||
var scope = $rootScope.$new();
|
var scope = $rootScope.$new();
|
||||||
var inventoryCount, inventoryFails, groupCount, groupFails, hostCount;
|
var inventoryCount = 0;
|
||||||
|
var inventoryFails = 0;
|
||||||
|
var groupCount = 0;
|
||||||
|
var groupFails = 0;
|
||||||
|
var hostCount = 0;
|
||||||
var hostFails = 0;
|
var hostFails = 0;
|
||||||
var counts = 0;
|
var counts = 0;
|
||||||
var expectedCounts = 5;
|
var expectedCounts = 5;
|
||||||
@@ -34,10 +38,10 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
|
|||||||
html += (label == 'Hosts' || label == 'Groups') ? " class=\"pad-left-sm\" " : "";
|
html += (label == 'Hosts' || label == 'Groups') ? " class=\"pad-left-sm\" " : "";
|
||||||
html += ">" + label + "</a></td>\n";
|
html += ">" + label + "</a></td>\n";
|
||||||
html += "<td class=\"failed-column text-right\">";
|
html += "<td class=\"failed-column text-right\">";
|
||||||
html += (fail > 0) ? "<a href=\"/blah/blah\">" + fail + "</a>" : "";
|
html += "<a href=\"/blah/blah\">" + fail + "</a>";
|
||||||
html += "</td>\n";
|
html += "</td>\n";
|
||||||
html += "<td class=\"text-right\">";
|
html += "<td class=\"text-right\">";
|
||||||
html += (count > 0) ? "<a href=\"/blah/blah\">" + count + "</a>" : "";
|
html += "<a href=\"/blah/blah\">" + count + "</a>";
|
||||||
html += "</td></tr>\n";
|
html += "</td></tr>\n";
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,14 @@ angular.module('JobStatusWidget', ['RestServices', 'Utilities'])
|
|||||||
return function(params) {
|
return function(params) {
|
||||||
|
|
||||||
var scope = $rootScope.$new();
|
var scope = $rootScope.$new();
|
||||||
var jobCount, jobFails, inventoryCount, inventoryFails, groupCount, groupFails, hostCount, hostFails;
|
var jobCount = 0;
|
||||||
|
var jobFails = 0;
|
||||||
|
var inventoryCount = 0;
|
||||||
|
var inventoryFails = 0;
|
||||||
|
var groupCount = 0;
|
||||||
|
var groupFails = 0;
|
||||||
|
var hostCount = 0;
|
||||||
|
var hostFails = 0;
|
||||||
var counts = 0;
|
var counts = 0;
|
||||||
var expectedCounts = 8;
|
var expectedCounts = 8;
|
||||||
var target = params.target;
|
var target = params.target;
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
|
|||||||
var html = ''
|
var html = ''
|
||||||
html += "<tr><td><a href=\"/#/projects/?source_type=" + value + "\">" + label + "</a></td>\n";
|
html += "<tr><td><a href=\"/#/projects/?source_type=" + value + "\">" + label + "</a></td>\n";
|
||||||
html += "<td class=\"failed-column text-right\">";
|
html += "<td class=\"failed-column text-right\">";
|
||||||
html += (fail > 0) ? "<a href=\"/blah/blah\">" + fail + "</a>" : "";
|
html += "<a href=\"/blah/blah\">" + fail + "</a>";
|
||||||
html += "</td>\n";
|
html += "</td>\n";
|
||||||
html += "<td class=\"text-right\">";
|
html += "<td class=\"text-right\">";
|
||||||
html += (count > 0) ? "<a href=\"/blah/blah\">" + count + "</a>" : "";
|
html += "<a href=\"/blah/blah\">" + count + "</a>";
|
||||||
html += "</td>\n";
|
html += "</td>\n";
|
||||||
html += "</tr>\n";
|
html += "</tr>\n";
|
||||||
return html;
|
return html;
|
||||||
|
|||||||
Reference in New Issue
Block a user