mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
AC-502 Changed sort order of System Summary and indented Groups, Hosts under Inventory.
This commit is contained in:
@@ -99,7 +99,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
|
|||||||
|
|
||||||
if (passwords.length > 0) {
|
if (passwords.length > 0) {
|
||||||
// Prompt for passwords
|
// Prompt for passwords
|
||||||
console.log(passwords);
|
|
||||||
html += "<form class=\"form-horizontal\" name=\"password_form\" novalidate>\n";
|
html += "<form class=\"form-horizontal\" name=\"password_form\" novalidate>\n";
|
||||||
html += (extra_html) ? extra_html : "";
|
html += (extra_html) ? extra_html : "";
|
||||||
var current_form;
|
var current_form;
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
|||||||
scope.removeCountReady();
|
scope.removeCountReady();
|
||||||
}
|
}
|
||||||
scope.removeCountReady = scope.$on('countReady', function(e, obj, count) {
|
scope.removeCountReady = scope.$on('countReady', function(e, obj, count) {
|
||||||
var keys=[];
|
var keys=[ 'organizations', 'users', 'teams', 'projects', 'inventory', 'groups', 'hosts',
|
||||||
|
'credentials', 'job_templates', 'jobs' ];
|
||||||
var html, itm;
|
var html, itm;
|
||||||
var cnt = 0;
|
var cnt = 0;
|
||||||
for (itm in counts) {
|
for (itm in counts) {
|
||||||
@@ -31,25 +32,25 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
|||||||
}
|
}
|
||||||
if (cnt == expected) {
|
if (cnt == expected) {
|
||||||
// sort the list of objs
|
// sort the list of objs
|
||||||
for (var key in counts) {
|
//for (var key in counts) {
|
||||||
if (key !== 'hosts' && key !== 'groups') {
|
// if (key !== 'hosts' && key !== 'groups') {
|
||||||
keys.push(key);
|
// keys.push(key);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
// sort the keys, forcing groups and hosts to appear directlry after inventory
|
// sort the keys, forcing groups and hosts to appear directlry after inventory
|
||||||
keys.sort();
|
//keys.sort();
|
||||||
var new_keys = [];
|
//var new_keys = [];
|
||||||
for (var i=0; i < keys.length; i++) {
|
//for (var i=0; i < keys.length; i++) {
|
||||||
if (keys[i] == 'inventory') {
|
// if (keys[i] == 'inventory') {
|
||||||
new_keys.push('inventory');
|
// new_keys.push('inventory');
|
||||||
new_keys.push('groups');
|
// new_keys.push('groups');
|
||||||
new_keys.push('hosts');
|
// new_keys.push('hosts');
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
new_keys.push(keys[i]);
|
// new_keys.push(keys[i]);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
keys = new_keys;
|
//keys = new_keys;
|
||||||
html = "<div class=\"panel panel-default\">\n";
|
html = "<div class=\"panel panel-default\">\n";
|
||||||
html += "<div class=\"panel-heading\">System Summary</div>\n";
|
html += "<div class=\"panel-heading\">System Summary</div>\n";
|
||||||
html += "<div class=\"panel-body\">\n";
|
html += "<div class=\"panel-body\">\n";
|
||||||
@@ -62,18 +63,18 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
|||||||
html += "</thead>\n";
|
html += "</thead>\n";
|
||||||
html += "<tbody>\n";
|
html += "<tbody>\n";
|
||||||
for (var i=0; i < keys.length; i++) {
|
for (var i=0; i < keys.length; i++) {
|
||||||
html += "<tr><td ";
|
html += "<tr><td class=\"capitalize\">\n";
|
||||||
html += (keys[i] == 'hosts' || keys[i] == 'groups') ? "class=\"pad-left-md\"" : '';
|
|
||||||
html += ">\n";
|
|
||||||
html += "<a href=\"/#/";
|
html += "<a href=\"/#/";
|
||||||
html += (keys[i] == 'inventory') ? 'inventories' : keys[i];
|
html += (keys[i] == 'inventory') ? 'inventories' : keys[i];
|
||||||
html += "\">";
|
html += "\"";
|
||||||
|
html += (keys[i] == 'hosts' || keys[i] == 'groups') ? " class=\"pad-left-sm\" " : "";
|
||||||
|
html += ">";
|
||||||
if (keys[i] == 'inventory') {
|
if (keys[i] == 'inventory') {
|
||||||
html += 'Inventories';
|
html += 'Inventories';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var txt = keys[i].replace(/\_/g,' ');
|
html += keys[i].replace(/\_/g,' ');
|
||||||
html += txt.substring(0,1).toUpperCase() + txt.substring(1);
|
//html += txt.substring(0,1).toUpperCase() + txt.substring(1);
|
||||||
}
|
}
|
||||||
html += "</a></td>\n"
|
html += "</a></td>\n"
|
||||||
html += "<td class=\"text-right\"><a href=\"/#/";
|
html += "<td class=\"text-right\"><a href=\"/#/";
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ body {
|
|||||||
/* Helper Classes */
|
/* Helper Classes */
|
||||||
.pad-right-sm { padding-right: 10px; }
|
.pad-right-sm { padding-right: 10px; }
|
||||||
.pad-left-md { padding-left: 30px; }
|
.pad-left-md { padding-left: 30px; }
|
||||||
|
.pad-left-sm { padding-left: 10px; }
|
||||||
.pad-left-lg { padding-left: 50px; }
|
.pad-left-lg { padding-left: 50px; }
|
||||||
.normal-weight { font-weight: normal; }
|
.normal-weight { font-weight: normal; }
|
||||||
.no-bullets { list-style: none; }
|
.no-bullets { list-style: none; }
|
||||||
|
|||||||
Reference in New Issue
Block a user