mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02: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:
@@ -21,7 +21,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
|||||||
};
|
};
|
||||||
}])
|
}])
|
||||||
|
|
||||||
.factory('SetGroupContainerHeight', [ 'GetGroupContainerHeight', function(GetGroupContainerHeight) {
|
.factory('SetContainerHeights', [ 'GetGroupContainerHeight', function(GetGroupContainerHeight) {
|
||||||
return function() {
|
return function() {
|
||||||
var height;
|
var height;
|
||||||
if ($(window).width() > 1210) {
|
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').height('auto');
|
||||||
}
|
}
|
||||||
$('#groups-container .list-table-container').mCustomScrollbar("update");
|
$('#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 () {
|
return function () {
|
||||||
// Call to set or restore window resize
|
// Call to set or restore window resize
|
||||||
SetGroupContainerHeight();
|
SetContainerHeights();
|
||||||
$(window).resize(_.debounce(function() {
|
$(window).resize(_.debounce(function() {
|
||||||
// Hack to stop group-name div slipping to a new line
|
// Hack to stop group-name div slipping to a new line
|
||||||
$('#groups_table .name-column').each(function () {
|
$('#groups_table .name-column').each(function () {
|
||||||
@@ -51,7 +53,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
|||||||
});
|
});
|
||||||
ApplyEllipsis('#groups_table .group-name a');
|
ApplyEllipsis('#groups_table .group-name a');
|
||||||
ApplyEllipsis('#hosts_table .host-name a');
|
ApplyEllipsis('#hosts_table .host-name a');
|
||||||
SetGroupContainerHeight();
|
SetContainerHeights();
|
||||||
}, 500));
|
}, 500));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,8 +50,9 @@ angular.module('InventoryHostsDefinition', [])
|
|||||||
},
|
},
|
||||||
|
|
||||||
fieldActions: {
|
fieldActions: {
|
||||||
|
|
||||||
columnClass: 'col-lg-2 col-md-2 col-sm-2 col-xs-3',
|
columnClass: 'col-lg-2 col-md-2 col-sm-2 col-xs-3',
|
||||||
|
label: false,
|
||||||
|
|
||||||
enabled_flag: {
|
enabled_flag: {
|
||||||
iconClass: "{{ 'fa icon-enabled-' + host.enabled }}",
|
iconClass: "{{ 'fa icon-enabled-' + host.enabled }}",
|
||||||
|
|||||||
@@ -1333,7 +1333,14 @@ input[type="checkbox"].checkbox-no-label {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.list-actions {
|
.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') {
|
if (options.mode === 'select' || options.mode === 'lookup') {
|
||||||
html += "<th>Select</th>";
|
html += "<th>Select</th>";
|
||||||
} else if (options.mode === 'edit' && list.fieldActions &&
|
} else if (options.mode === 'edit' && list.fieldActions) {
|
||||||
(list.fieldActions.label === undefined || list.fieldActions.label)) {
|
|
||||||
html += "<th class=\"actions-column";
|
html += "<th class=\"actions-column";
|
||||||
html += (list.fieldActions && list.fieldActions.columnClass) ? " " + list.fieldActions.columnClass : "";
|
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 += "</tr>\n";
|
||||||
html += "</thead>\n";
|
html += "</thead>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user