mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
AC-1325 plus inventory refactor cleanup
Fixed obvious issues found after pulling in inventory refactor changes from 1.4.11 branch. Included fixing modal dialog issues.
This commit is contained in:
@@ -486,7 +486,7 @@ InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log
|
|||||||
function InventoriesEdit ($scope, $location, $routeParams, $compile, GenerateList, ClearScope, Empty, Wait, Rest, Alert, LoadBreadCrumbs, GetBasePath, ProcessErrors,
|
function InventoriesEdit ($scope, $location, $routeParams, $compile, GenerateList, ClearScope, Empty, Wait, Rest, Alert, LoadBreadCrumbs, GetBasePath, ProcessErrors,
|
||||||
Breadcrumbs, InventoryGroups, InjectHosts, Find, HostsReload, SearchInit, PaginateInit, GetSyncStatusMsg, GetHostsStatusMsg, GroupsEdit, InventoryUpdate,
|
Breadcrumbs, InventoryGroups, InjectHosts, Find, HostsReload, SearchInit, PaginateInit, GetSyncStatusMsg, GetHostsStatusMsg, GroupsEdit, InventoryUpdate,
|
||||||
GroupsCancelUpdate, ViewUpdateStatus, GroupsDelete, Store, HostsEdit, HostsDelete, EditInventoryProperties, ToggleHostEnabled, Stream, ShowJobSummary,
|
GroupsCancelUpdate, ViewUpdateStatus, GroupsDelete, Store, HostsEdit, HostsDelete, EditInventoryProperties, ToggleHostEnabled, Stream, ShowJobSummary,
|
||||||
InventoryGroupsHelp, HelpDialog, ViewJob, WatchInventoryWindowResize, SetContainerHeights, GetHostContainerRows, GetGroupContainerRows, GetGroupContainerHeight,
|
InventoryGroupsHelp, HelpDialog, ViewJob, WatchInventoryWindowResize, GetHostContainerRows, GetGroupContainerRows, GetGroupContainerHeight,
|
||||||
GroupsCopy, HostsCopy)
|
GroupsCopy, HostsCopy)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -519,7 +519,19 @@ function InventoriesEdit ($scope, $location, $routeParams, $compile, GenerateLis
|
|||||||
}
|
}
|
||||||
$scope.removeHostReloadComplete = $scope.$on('HostReloadComplete', function() {
|
$scope.removeHostReloadComplete = $scope.$on('HostReloadComplete', function() {
|
||||||
if ($scope.initial_height) {
|
if ($scope.initial_height) {
|
||||||
$('#hosts-container .well').height($scope.initial_height + 49);
|
var host_height = $('#hosts-container .well').height(),
|
||||||
|
group_height = $('#group-list-container .well').height(),
|
||||||
|
new_height;
|
||||||
|
|
||||||
|
if (host_height > group_height) {
|
||||||
|
new_height = host_height - (host_height - group_height);
|
||||||
|
}
|
||||||
|
else if (host_height < group_height) {
|
||||||
|
new_height = host_height + (group_height - host_height);
|
||||||
|
}
|
||||||
|
if (new_height) {
|
||||||
|
$('#hosts-container .well').height(new_height);
|
||||||
|
}
|
||||||
$scope.initial_height = null;
|
$scope.initial_height = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -549,17 +561,10 @@ function InventoriesEdit ($scope, $location, $routeParams, $compile, GenerateLis
|
|||||||
scope: $scope
|
scope: $scope
|
||||||
});
|
});
|
||||||
|
|
||||||
/*SetContainerHeights({
|
|
||||||
group_scope: $scope,
|
|
||||||
host_scope: hostScope,
|
|
||||||
reloadHosts: false
|
|
||||||
});*/
|
|
||||||
|
|
||||||
if ($(window).width() > 1210) {
|
if ($(window).width() > 1210) {
|
||||||
$scope.initial_height = GetGroupContainerHeight() - 20;
|
$scope.initial_height = GetGroupContainerHeight();
|
||||||
$('#groups-container .list-table-container').height($scope.initial_height);
|
$('#groups-container .list-table-container').height($scope.initial_height);
|
||||||
rows = GetGroupContainerRows();
|
rows = GetGroupContainerRows();
|
||||||
//$('#hosts-container .well').height( height );
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rows = 20;
|
rows = 20;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ angular.module('InventoryFormDefinition', [])
|
|||||||
.value('InventoryForm', {
|
.value('InventoryForm', {
|
||||||
|
|
||||||
addTitle: 'Create Inventory',
|
addTitle: 'Create Inventory',
|
||||||
editTitle: '{{ inventory_name | capitalize }}',
|
editTitle: '{{ inventory_name }}',
|
||||||
name: 'inventory',
|
name: 'inventory',
|
||||||
well: true,
|
well: true,
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ angular.module('InventoryGroupsDefinition', [])
|
|||||||
|
|
||||||
name: 'groups',
|
name: 'groups',
|
||||||
iterator: 'group',
|
iterator: 'group',
|
||||||
editTitle: '{{ inventory_name }}',
|
editTitle: '{{ inventory.name }}',
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
well: true,
|
well: true,
|
||||||
index: false,
|
index: false,
|
||||||
@@ -134,7 +134,7 @@ angular.module('InventoryGroupsDefinition', [])
|
|||||||
edit: {
|
edit: {
|
||||||
//label: 'Edit',
|
//label: 'Edit',
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
ngClick: "editGroup(group.group_id, group.id)",
|
ngClick: "editGroup(group.id)",
|
||||||
awToolTip: 'Edit group',
|
awToolTip: 'Edit group',
|
||||||
dataPlacement: "top"
|
dataPlacement: "top"
|
||||||
},
|
},
|
||||||
@@ -148,7 +148,7 @@ angular.module('InventoryGroupsDefinition', [])
|
|||||||
"delete": {
|
"delete": {
|
||||||
//label: 'Delete',
|
//label: 'Delete',
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
ngClick: "deleteGroup(group.id, group.group_id)",
|
ngClick: "deleteGroup(group.id)",
|
||||||
awToolTip: 'Delete group',
|
awToolTip: 'Delete group',
|
||||||
dataPlacement: "top"
|
dataPlacement: "top"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1330,29 +1330,6 @@ input[type="checkbox"].checkbox-no-label {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#groups-table-header {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#groups-container {
|
|
||||||
.list-table-container {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.list-actions {
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#hosts-container {
|
|
||||||
.list-table-container {
|
|
||||||
position: relative;
|
|
||||||
top: -15px;
|
|
||||||
}
|
|
||||||
.well {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#inventories_table i[class*="icon-job-"],
|
#inventories_table i[class*="icon-job-"],
|
||||||
#home_groups_table i[class*="icon-job-"] {
|
#home_groups_table i[class*="icon-job-"] {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|||||||
@@ -116,8 +116,9 @@
|
|||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#group-list-container {
|
#group-list-container,
|
||||||
.list-actions {
|
#hosts-container {
|
||||||
margin-bottom: 0;
|
.page-row {
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1136,7 +1136,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.modal && this.form.actions) {
|
if ((options.showActions === undefined || options.showActions === true) && !this.modal && this.form.actions) {
|
||||||
html += this.getActions(options);
|
html += this.getActions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1251,7 +1251,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
//buttons
|
//buttons
|
||||||
if (!this.modal) {
|
if ((options.showButtons === undefined || options.showButtons === true) && !this.modal) {
|
||||||
if (this.has('buttons')) {
|
if (this.has('buttons')) {
|
||||||
|
|
||||||
if (this.form.twoColumns) {
|
if (this.form.twoColumns) {
|
||||||
|
|||||||
@@ -152,6 +152,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="inventory-edit-modal-dialog"></div>
|
||||||
|
|
||||||
<div ng-include="'/static/partials/logviewer.html'"></div>
|
<div ng-include="'/static/partials/logviewer.html'"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user