mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Restyled hosts side of inventory edit page. Still need to calc # or rows that resized host container can accommodate.
This commit is contained in:
parent
3711409237
commit
4f88a0b582
@ -21,7 +21,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
};
|
||||
}])
|
||||
|
||||
.factory('SetGroupContainerHeight', [ 'GetGroupContainerHeight', function(GetGroupContainerHeight) {
|
||||
.factory('SetContainerHeights', [ 'GetGroupContainerHeight', function(GetGroupContainerHeight) {
|
||||
return function() {
|
||||
var height;
|
||||
if ($(window).width() > 1210) {
|
||||
@ -32,13 +32,15 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
$('#groups-container .list-table-container').height('auto');
|
||||
}
|
||||
$('#groups-container .list-table-container').mCustomScrollbar("update");
|
||||
$('#hosts-container .well').height( $('#groups-container').height() - 39 );
|
||||
};
|
||||
}])
|
||||
.factory('WatchInventoryWindowResize', ['ApplyEllipsis', 'SetGroupContainerHeight',
|
||||
function (ApplyEllipsis, SetGroupContainerHeight) {
|
||||
|
||||
.factory('WatchInventoryWindowResize', ['ApplyEllipsis', 'SetContainerHeights',
|
||||
function (ApplyEllipsis, SetContainerHeights) {
|
||||
return function () {
|
||||
// Call to set or restore window resize
|
||||
SetGroupContainerHeight();
|
||||
SetContainerHeights();
|
||||
$(window).resize(_.debounce(function() {
|
||||
// Hack to stop group-name div slipping to a new line
|
||||
$('#groups_table .name-column').each(function () {
|
||||
@ -51,7 +53,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
});
|
||||
ApplyEllipsis('#groups_table .group-name a');
|
||||
ApplyEllipsis('#hosts_table .host-name a');
|
||||
SetGroupContainerHeight();
|
||||
SetContainerHeights();
|
||||
}, 500));
|
||||
};
|
||||
}
|
||||
|
||||
@ -50,8 +50,9 @@ angular.module('InventoryHostsDefinition', [])
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
|
||||
columnClass: 'col-lg-2 col-md-2 col-sm-2 col-xs-3',
|
||||
label: false,
|
||||
|
||||
enabled_flag: {
|
||||
iconClass: "{{ 'fa icon-enabled-' + host.enabled }}",
|
||||
|
||||
@ -1333,7 +1333,14 @@ input[type="checkbox"].checkbox-no-label {
|
||||
overflow: auto;
|
||||
}
|
||||
.list-actions {
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
#hosts-container {
|
||||
.list-table-container {
|
||||
position: relative;
|
||||
top: -15px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -475,11 +475,12 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
}
|
||||
if (options.mode === 'select' || options.mode === 'lookup') {
|
||||
html += "<th>Select</th>";
|
||||
} else if (options.mode === 'edit' && list.fieldActions &&
|
||||
(list.fieldActions.label === undefined || list.fieldActions.label)) {
|
||||
} else if (options.mode === 'edit' && list.fieldActions) {
|
||||
html += "<th class=\"actions-column";
|
||||
html += (list.fieldActions && list.fieldActions.columnClass) ? " " + list.fieldActions.columnClass : "";
|
||||
html += "\">Actions</th>\n";
|
||||
html += "\">";
|
||||
html += (list.fieldActions.label === undefined || list.fieldActions.label) ? "Actions" : "";
|
||||
html += "</th>\n";
|
||||
}
|
||||
html += "</tr>\n";
|
||||
html += "</thead>\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user