mirror of
https://github.com/ansible/awx.git
synced 2026-05-18 06:47:41 -02:30
Inventory refactor: now all nodes in group tree have an icon. same for job events view.
This commit is contained in:
@@ -453,13 +453,17 @@ function InventoriesEdit ($scope, $location, $routeParams, $compile, GenerateLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.cancelUpdate = function(id) {
|
$scope.cancelUpdate = function(tree_id) {
|
||||||
GroupsCancelUpdate({ scope: $scope, tree_id: id });
|
GroupsCancelUpdate({ scope: $scope, tree_id: tree_id });
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.toggle = function(id) {
|
$scope.toggle = function(tree_id) {
|
||||||
// Expand/collapse nodes
|
// Expand/collapse nodes
|
||||||
ToggleChildren({ scope: $scope, list: list, id: id });
|
if (tree_id !== $scope.selected_tree_id) {
|
||||||
|
$scope.showHosts(tree_id, Find({ list: $scope.groups, key: 'id', val: tree_id }).group_id, false);
|
||||||
|
console.log('set group_id to: ' + $scope.selected_group_id);
|
||||||
|
}
|
||||||
|
ToggleChildren({ scope: $scope, list: list, id: tree_id });
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.refreshGroups = function(tree_id, group_id) {
|
$scope.refreshGroups = function(tree_id, group_id) {
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
set[i]['class'] = 'parentNode';
|
set[i]['class'] = 'parentNode';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
set[i]['ngicon'] = 'fa fa-square-o node-no-toggle';
|
||||||
set[i]['class'] = 'childNode';
|
set[i]['class'] = 'childNode';
|
||||||
set[i]['event_detail'] = formatJSON(set[i].event_data);
|
set[i]['event_detail'] = formatJSON(set[i].event_data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
|||||||
// Expand: lookup and display children
|
// Expand: lookup and display children
|
||||||
expand(clicked);
|
expand(clicked);
|
||||||
}
|
}
|
||||||
else {
|
else if (/minus-square-o/.test(set[clicked]['ngicon'])) {
|
||||||
collapse(clicked);
|
collapse(clicked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,12 +94,11 @@ angular.module('JobEventsListDefinition', [])
|
|||||||
},
|
},
|
||||||
|
|
||||||
fieldActions: {
|
fieldActions: {
|
||||||
edit: {
|
view: {
|
||||||
label: 'View',
|
label: 'View',
|
||||||
ngClick: "viewJobEvent(\{\{ jobevent.id \}\})",
|
ngClick: "viewJobEvent(\{\{ jobevent.id \}\})",
|
||||||
icon: 'icon-zoom-in',
|
awToolTip: 'View event details',
|
||||||
"class": 'btn-default btn-xs',
|
dataPlacement: 'top'
|
||||||
awToolTip: 'View event details'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -995,7 +995,7 @@ input[type="checkbox"].checkbox-no-label {
|
|||||||
.level-10 { padding-left: 200px; }
|
.level-10 { padding-left: 200px; }
|
||||||
|
|
||||||
.level-3-detail {
|
.level-3-detail {
|
||||||
padding-left: 72px;
|
padding-left: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#job_events .control-group {
|
#job_events .control-group {
|
||||||
@@ -1045,7 +1045,7 @@ input[type="checkbox"].checkbox-no-label {
|
|||||||
border-right: 1px solid #ddd;
|
border-right: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-toggle {
|
.node-toggle, .node-no-toggle {
|
||||||
/* also used on job evetns */
|
/* also used on job evetns */
|
||||||
float: none;
|
float: none;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
@@ -1054,6 +1054,10 @@ input[type="checkbox"].checkbox-no-label {
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.node-no-toggle {
|
||||||
|
opacity: .30;
|
||||||
|
}
|
||||||
|
|
||||||
.disabled {
|
.disabled {
|
||||||
color: @grey;
|
color: @grey;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper'])
|
|||||||
source: sorted[i].summary_fields.inventory_source.source,
|
source: sorted[i].summary_fields.inventory_source.source,
|
||||||
group_id: sorted[i].id,
|
group_id: sorted[i].id,
|
||||||
event_level: level,
|
event_level: level,
|
||||||
ngicon: (sorted[i].children.length > 0) ? 'fa fa-minus-square-o node-toggle' : null,
|
ngicon: (sorted[i].children.length > 0) ? 'fa fa-minus-square-o node-toggle' : 'fa fa-square-o node-no-toggle',
|
||||||
ngclick: 'toggle(' + id + ')',
|
ngclick: 'toggle(' + id + ')',
|
||||||
related: {
|
related: {
|
||||||
children: (sorted[i].children.length > 0) ? sorted[i].related.children : '',
|
children: (sorted[i].children.length > 0) ? sorted[i].related.children : '',
|
||||||
|
|||||||
@@ -505,8 +505,8 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
|||||||
// Add collapse/expand icon --used on job_events page
|
// Add collapse/expand icon --used on job_events page
|
||||||
if (list['hasChildren'] && field.hasChildren) {
|
if (list['hasChildren'] && field.hasChildren) {
|
||||||
html += "<span class=\"level-\{\{ " + list.iterator + ".event_level \}\}\"><a href=\"\" ng-click=\"\{\{ " + list.iterator + ".ngclick \}\}\"> " +
|
html += "<span class=\"level-\{\{ " + list.iterator + ".event_level \}\}\"><a href=\"\" ng-click=\"\{\{ " + list.iterator + ".ngclick \}\}\"> " +
|
||||||
"<i class=\"\{\{ " + list.iterator + ".ngicon \}\}\" ng-show=\"'\{\{ " +
|
"<i class=\"\{\{ " + list.iterator + ".ngicon \}\}\"></i></a> ";
|
||||||
list.iterator + ".related.children \}\}' !== ''\" ></i></a> ";
|
//ng-show=\"'\{\{ " + list.iterator + ".related.children \}\}' !== ''\"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the Link
|
// Start the Link
|
||||||
|
|||||||
Reference in New Issue
Block a user