From 43aca1972afacb55a6bc61857399602591234516 Mon Sep 17 00:00:00 2001
From: chouseknecht
Date: Thu, 10 Oct 2013 03:40:30 -0400
Subject: [PATCH] Latest UI changes, fixes and enhancements.
---
awx/ui/static/js/controllers/Groups.js | 13 ++++
awx/ui/static/js/controllers/JobEvents.js | 3 +-
awx/ui/static/js/controllers/JobHosts.js | 3 +-
awx/ui/static/js/forms/Groups.js | 47 +++++++++++++-
awx/ui/static/js/forms/InventoryHosts.js | 4 +-
awx/ui/static/js/helpers/Groups.js | 6 +-
awx/ui/static/js/helpers/JobSubmission.js | 34 +++++-----
awx/ui/static/js/lists/Credentials.js | 2 +-
awx/ui/static/js/lists/Groups.js | 2 +-
awx/ui/static/js/lists/Hosts.js | 2 +-
awx/ui/static/js/lists/Inventories.js | 2 +-
awx/ui/static/js/lists/InventorySummary.js | 29 ++++++---
awx/ui/static/js/lists/JobHosts.js | 14 ++---
awx/ui/static/js/lists/JobTemplates.js | 2 +-
awx/ui/static/js/lists/Organizations.js | 2 +-
awx/ui/static/js/lists/Permissions.js | 2 +-
awx/ui/static/js/lists/Projects.js | 14 ++---
awx/ui/static/js/lists/Teams.js | 2 +-
awx/ui/static/js/lists/Users.js | 2 +-
awx/ui/static/less/ansible-ui.less | 62 ++++---------------
awx/ui/static/lib/ansible/form-generator.js | 30 +++++----
.../static/lib/ansible/generator-helpers.js | 4 +-
awx/ui/static/lib/ansible/list-generator.js | 45 ++++++--------
23 files changed, 180 insertions(+), 146 deletions(-)
diff --git a/awx/ui/static/js/controllers/Groups.js b/awx/ui/static/js/controllers/Groups.js
index 482683417e..cf0c754a4f 100644
--- a/awx/ui/static/js/controllers/Groups.js
+++ b/awx/ui/static/js/controllers/Groups.js
@@ -125,6 +125,7 @@ function InventoryGroups ($scope, $rootScope, $compile, $location, $log, $routeP
// Respond to user clicking on a tree node
var node = $('li[id="' + n.attr.id + '"]');
+ var parent = node.parent().parent();
var type = node.attr('type');
var url;
@@ -153,6 +154,18 @@ function InventoryGroups ($scope, $rootScope, $compile, $location, $log, $routeP
scope.createButtonShow = true;
scope.group_id = node.attr('group_id');
+ scope.addGroupHelp = "Copy an existing group into " + node.attr('name');
+ scope.createGroupHelp = "Create a new group, adding it to " + node.attr('name');
+ scope.updateGroupHelp = "Start the inventory update process, refreshing " + node.attr('name');
+ if (parent.attr('id') == 'inventory-node') {
+ scope.deleteGroupHelp = "Remove " + node.attr('name') + " from " + parent.attr('name') +
+ " Inventory. Any hosts will still be available in All Hosts.";
+ }
+ else {
+ scope.deleteGroupHelp = "Remove " + node.attr('name') + " from " + parent.attr('name') +
+ ". Any hosts will still be available in " + parent.attr('name') + " and All Hosts.";
+ }
+
// Load the form
GroupsEdit({ "inventory_id": id, group_id: scope.group_id });
diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js
index 560cb676f9..75d1d42758 100644
--- a/awx/ui/static/js/controllers/JobEvents.js
+++ b/awx/ui/static/js/controllers/JobEvents.js
@@ -187,7 +187,8 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
.success( function(data, status, headers, config) {
scope.job_status = data.status;
scope.job_name = data.summary_fields.job_template.name;
- LoadBreadCrumbs({ path: '/jobs/' + scope.job_id, title: scope.job_name });
+ //LoadBreadCrumbs({ path: '/jobs/' + scope.job_id, title: scope.job_name });
+ LoadBreadCrumbs({ path: '/jobs/' + scope.job_id, title: scope.job_id + ' - ' + data.summary_fields.job_template.name });
if (!(data.status == 'pending' || data.status == 'waiting' || data.status == 'running')) {
if ($rootScope.timer) {
clearInterval($rootScope.timer);
diff --git a/awx/ui/static/js/controllers/JobHosts.js b/awx/ui/static/js/controllers/JobHosts.js
index 29de821821..22e232b6c1 100644
--- a/awx/ui/static/js/controllers/JobHosts.js
+++ b/awx/ui/static/js/controllers/JobHosts.js
@@ -97,7 +97,8 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
LoadBreadCrumbs({ path: '/hosts/' + scope['host_id'], title: $routeParams['host_name'] });
}
else {
- LoadBreadCrumbs();
+ LoadBreadCrumbs({ path: '/jobs/' + scope.job_id, title: scope.job_id + ' - ' +
+ scope.jobhosts[0].summary_fields.job.job_template_name });
}
});
diff --git a/awx/ui/static/js/forms/Groups.js b/awx/ui/static/js/forms/Groups.js
index 51fc97fcb1..2bb10db29e 100644
--- a/awx/ui/static/js/forms/Groups.js
+++ b/awx/ui/static/js/forms/Groups.js
@@ -11,14 +11,57 @@ angular.module('GroupFormDefinition', [])
'GroupForm', {
addTitle: 'Create Group', //Legend in add mode
- editTitle: 'Group Properties: {{ name }}', //Legend in edit mode
+ editTitle: '{{ name }}', //Legend in edit mode
showTitle: true,
cancelButton: false,
name: 'group', //Form name attribute
- well: false, //Wrap the form with TB well
+ well: true, //Wrap the form with TB well
formLabelSize: 'col-lg-3',
formFieldSize: 'col-lg-9',
+ titleActions: {
+ copy_action: {
+ 'class': 'btn-success btn-xs',
+ ngClick: "addGroup()",
+ ngHide: "groupAddHide",
+ awToolTip: "\{\{ addGroupHelp \}\}",
+ dataPlacement: 'top',
+ ngDisabled: "grpBtnDisable",
+ icon: "icon-check",
+ label: 'Copy'
+ },
+ create_action: {
+ 'class': 'btn-success btn-xs',
+ ngClick: "createGroup()",
+ ngHide: "groupCreateHide",
+ awToolTip: "\{\{ createGroupHelp \}\}",
+ dataPlacement: "top",
+ ngDisabled: "grpBtnDisable",
+ icon: "icon-plus",
+ label: "Create New"
+ },
+ update_action: {
+ 'class': 'btn-success btn-xs',
+ ngClick: "updateGroup()",
+ ngHide: "groupUpdateHide",
+ awToolTip: "\{\{ updateGroupHelp \}\}",
+ dataPlacement: "top",
+ ngDisabled: "grpBtnDisable",
+ icon: "icon-cloud-download",
+ label: 'Update'
+ },
+ delete_action: {
+ 'class': "btn-danger btn-xs",
+ ngClick: "deleteGroup()",
+ ngHide: "groupDeleteHide",
+ awToolTip: "\{\{ deleteGroupHelp \}\}",
+ dataPlacement: "top",
+ ngDisabled: "grpBtnDisable",
+ icon: "icon-trash",
+ label: "Delete"
+ }
+ },
+
fields: {
name: {
label: 'Name',
diff --git a/awx/ui/static/js/forms/InventoryHosts.js b/awx/ui/static/js/forms/InventoryHosts.js
index c9729cc8f3..e9904491d8 100644
--- a/awx/ui/static/js/forms/InventoryHosts.js
+++ b/awx/ui/static/js/forms/InventoryHosts.js
@@ -77,7 +77,7 @@ angular.module('InventoryHostsFormDefinition', [])
ngHide: "hostAddHide",
awToolTip: "Copy an existing host to the selected group",
dataPlacement: 'bottom',
- 'class': 'btn-sm btn-success',
+ 'class': 'btn-xs btn-success',
icon: 'icon-check'
},
create: {
@@ -86,7 +86,7 @@ angular.module('InventoryHostsFormDefinition', [])
ngHide: 'hostCreateHide',
awToolTip: 'Create a new host and add it to the selected group',
dataPlacement: 'bottom',
- 'class': 'btn-sm btn-success',
+ 'class': 'btn-xs btn-success',
icon: 'icon-plus'
}
},
diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js
index cf2096161c..4f2f6d52a3 100644
--- a/awx/ui/static/js/helpers/Groups.js
+++ b/awx/ui/static/js/helpers/Groups.js
@@ -189,8 +189,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
}
scope.PostRefreshRemove = scope.$on('PostRefresh', function() {
for (var i=0; i < scope.groups.length; i++) {
- var last_update = null
- //(scope.groups[i].last_updated == null) ? '' : FormatDate(new Date(scope.groups[i].last_updated));
+ var last_update = (scope.groups[i].summary_fields.inventory_source.last_updated == null) ? null :
+ FormatDate(new Date(scope.groups[i].summary_fields.inventory_source.last_updated));
var stat, stat_class, status_tip;
@@ -639,7 +639,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
})
.error( function(data, status, headers, config) {
ProcessErrors(scope, data, status, form,
- { hdr: 'Error!', msg: 'Failed to retrieve group: ' + id + '. GET status: ' + status });
+ { hdr: 'Error!', msg: 'Failed to retrieve group: ' + defaultUrl + '. GET status: ' + status });
});
if (!scope.$$phase) {
diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js
index 850422921c..da4179bdd6 100644
--- a/awx/ui/static/js/helpers/JobSubmission.js
+++ b/awx/ui/static/js/helpers/JobSubmission.js
@@ -59,7 +59,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
cancel();
}
else {
- scope.$emit('UpdateSubmitted');
+ scope.$emit('UpdateSubmitted','canceled');
}
}
@@ -77,7 +77,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
Rest.setUrl(start_url);
Rest.post(pswd)
.success( function(data, status, headers, config) {
- scope.$emit('UpdateSubmitted');
+ scope.$emit('UpdateSubmitted','started');
if (form.name == 'credential') {
navigate(false);
}
@@ -292,7 +292,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
if (scope.removeUpdateSubmitted) {
scope.removeUpdateSubmitted();
}
- scope.removeUpdateSubmitted = scope.$on('UpdateSubmitted', function() {
+ scope.removeUpdateSubmitted = scope.$on('UpdateSubmitted', function(e, action) {
// Refresh the project list after update request submitted
scope.refresh();
});
@@ -376,17 +376,19 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
if (scope.removeUpdateSubmitted) {
scope.removeUpdateSubmitted();
}
- scope.removeUpdateSubmitted = scope.$on('UpdateSubmitted', function() {
- // Refresh the project list after update request submitted
- Alert('Update Started', 'The request to start the inventory process was submitted. Monitor progress from the inventory summary screen. ' +
- 'The screen will refresh every 10 seconds, or refresh manually by clicking the Refresh button.', 'alert-info');
- var node = $('#inventory-node')
- var selected = $('#tree-view').jstree('get_selected');
- scope['inventorySummaryGroup'] = group_name;
- selected.each(function(idx) {
- $('#tree-view').jstree('deselect_node', $(this));
- });
- $('#tree-view').jstree('select_node', node);
+ scope.removeUpdateSubmitted = scope.$on('UpdateSubmitted', function(e, action) {
+ if (action == 'started') {
+ // Refresh the project list after update request submitted
+ Alert('Update Started', 'The request to start the inventory process was submitted. Monitor progress from the inventory summary screen. ' +
+ 'The screen will refresh every 10 seconds, or refresh manually by clicking the Refresh button.', 'alert-info');
+ var node = $('#inventory-node')
+ var selected = $('#tree-view').jstree('get_selected');
+ scope['inventorySummaryGroup'] = group_name;
+ selected.each(function(idx) {
+ $('#tree-view').jstree('deselect_node', $(this));
+ });
+ $('#tree-view').jstree('select_node', node);
+ }
});
if (scope.removeInventorySubmit) {
@@ -408,8 +410,8 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
Rest.get()
.success( function(data, status, headers, config) {
if (data.can_update) {
- var extra_html = "Starting inventory update for the " + group_name +
- " group. Please provide the " + group_source + " credentials:
\n";
+ var extra_html = "Starting inventory update for " + group_name +
+ " . Please provide the " + group_source + " credentials:
\n";
scope.$emit('InventorySubmit', data.passwords_needed_to_update, extra_html);
}
else {
diff --git a/awx/ui/static/js/lists/Credentials.js b/awx/ui/static/js/lists/Credentials.js
index ee78f72ba0..7fa370a2dc 100644
--- a/awx/ui/static/js/lists/Credentials.js
+++ b/awx/ui/static/js/lists/Credentials.js
@@ -50,7 +50,7 @@ angular.module('CredentialsListDefinition', [])
mode: 'all', // One of: edit, select, all
ngClick: 'addCredential()',
basePaths: ['teams','users'], // base path must be in list, or action not available
- "class": 'btn-success btn-sm',
+ "class": 'btn-success btn-xs',
awToolTip: 'Create a new credential'
}
},
diff --git a/awx/ui/static/js/lists/Groups.js b/awx/ui/static/js/lists/Groups.js
index c0e92d600e..493d670020 100644
--- a/awx/ui/static/js/lists/Groups.js
+++ b/awx/ui/static/js/lists/Groups.js
@@ -31,7 +31,7 @@ angular.module('GroupListDefinition', [])
help: {
awPopOver: "Choose groups by clicking on each group you wish to add. Click the Select button to add the groups to " +
"the selected inventory group.",
- dataPlacement: 'left',
+ dataPlacement: 'top',
dataContainer: '#form-modal .modal-content',
icon: "icon-question-sign",
mode: 'all',
diff --git a/awx/ui/static/js/lists/Hosts.js b/awx/ui/static/js/lists/Hosts.js
index 5a363969e0..9aaee1510b 100644
--- a/awx/ui/static/js/lists/Hosts.js
+++ b/awx/ui/static/js/lists/Hosts.js
@@ -31,7 +31,7 @@ angular.module('HostListDefinition', [])
actions: {
help: {
awPopOver: "Select hosts by clicking on each host you wish to add. Add the selected hosts to the group by clicking the Select button.",
- dataPlacement: 'left',
+ dataPlacement: 'top',
dataContainer: '#form-modal .modal-content',
icon: "icon-question-sign",
mode: 'all',
diff --git a/awx/ui/static/js/lists/Inventories.js b/awx/ui/static/js/lists/Inventories.js
index 24938479fb..1ff8c1db67 100644
--- a/awx/ui/static/js/lists/Inventories.js
+++ b/awx/ui/static/js/lists/Inventories.js
@@ -79,7 +79,7 @@ angular.module('InventoriesListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addInventory()',
- "class": 'btn-sm btn-success',
+ "class": 'btn-xs btn-success',
awToolTip: 'Create a new inventory'
}
},
diff --git a/awx/ui/static/js/lists/InventorySummary.js b/awx/ui/static/js/lists/InventorySummary.js
index f64ac68dda..ed3f3896e4 100644
--- a/awx/ui/static/js/lists/InventorySummary.js
+++ b/awx/ui/static/js/lists/InventorySummary.js
@@ -14,7 +14,7 @@ angular.module('InventorySummaryDefinition', [])
iterator: 'group',
editTitle: 'Inventory Summary: {{ inventory_name }}',
showTitle: true,
- well: false,
+ well: true,
index: false,
hover: true,
@@ -32,7 +32,7 @@ angular.module('InventorySummaryDefinition', [])
awToolTip: '# of hosts with job failures. Click to view hosts.',
dataPlacement: 'top',
searchable: false,
- nosort: true
+ nosort: false
},
status: {
label: 'Update Status',
@@ -55,8 +55,10 @@ angular.module('InventorySummaryDefinition', [])
},
last_updated: {
label: 'Last Updated',
+ sourceModel: 'inventory_source',
+ sourceField: 'last_updated',
searchable: false,
- nosort: true
+ nosort: false
},
source: {
label: 'Source',
@@ -95,9 +97,16 @@ angular.module('InventorySummaryDefinition', [])
},
actions: {
- refresh: {
- awRefresh: true,
- mode: 'all'
+ create: {
+ label: 'Create New',
+ mode: 'all',
+ icon: 'icon-plus',
+ 'class': "btn-success btn-xs",
+ ngClick: "createGroup()",
+ ngHide: "groupCreateHide",
+ ngDisabled: 'grpBtnDisabled',
+ awToolTip: "Create a new top-level group",
+ dataPlacement: 'top'
},
help: {
awPopOver:
@@ -108,14 +117,18 @@ angular.module('InventorySummaryDefinition', [])
"successful The most recent inventory update ran to completion without incident. \n" +
"updating The inventory update is currently running. \n" +
"\n",
- dataPlacement: 'left',
+ dataPlacement: 'top',
dataContainer: 'body',
icon: "icon-question-sign",
mode: 'all',
- 'class': 'btn-xs btn-info btn-help pull-right',
+ 'class': 'btn-xs btn-info btn-help',
awToolTip: 'Click for help',
dataTitle: 'Update Status',
iconSize: 'large'
+ },
+ refresh: {
+ awRefresh: true,
+ mode: 'all'
}
},
diff --git a/awx/ui/static/js/lists/JobHosts.js b/awx/ui/static/js/lists/JobHosts.js
index cad9fa4312..5358879aad 100644
--- a/awx/ui/static/js/lists/JobHosts.js
+++ b/awx/ui/static/js/lists/JobHosts.js
@@ -102,11 +102,6 @@ angular.module('JobHostDefinition', [])
},
actions: {
- refresh: {
- awRefresh: true,
- ngShow: "host_id == null && (job_status == 'pending' || job_status == 'waiting' || job_status == 'running')",
- mode: 'all'
- },
help: {
awPopOver: "\nSuccess Tasks successfully executed on the host. \n" +
"Changed Actions taken on the host. \n" +
@@ -114,15 +109,20 @@ angular.module('JobHostDefinition', [])
"Unreachable Times the ansible server could not reach the host. \n" +
"Skipped Tasks bypassed and not performed on the host due to prior task failure or the host being unreachable. \n" +
" \n",
- dataPlacement: 'left',
+ dataPlacement: 'top',
dataContainer: "body",
icon: "icon-question-sign",
mode: 'all',
- 'class': 'btn-info btn-xs btn-help pull-right',
+ 'class': 'btn-info btn-xs btn-help',
awToolTip: 'Click for help',
dataTitle: 'Job Host Summary',
id: 'jobhost-help-button',
iconSize: 'large'
+ },
+ refresh: {
+ awRefresh: true,
+ ngShow: "host_id == null && (job_status == 'pending' || job_status == 'waiting' || job_status == 'running')",
+ mode: 'all'
}
},
diff --git a/awx/ui/static/js/lists/JobTemplates.js b/awx/ui/static/js/lists/JobTemplates.js
index 0877ccd6a2..05e1ba5e40 100644
--- a/awx/ui/static/js/lists/JobTemplates.js
+++ b/awx/ui/static/js/lists/JobTemplates.js
@@ -34,7 +34,7 @@ angular.module('JobTemplatesListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addJobTemplate()',
- "class": 'btn-success btn-sm',
+ "class": 'btn-success btn-xs',
basePaths: ['job_templates'],
awToolTip: 'Create a new template'
}
diff --git a/awx/ui/static/js/lists/Organizations.js b/awx/ui/static/js/lists/Organizations.js
index 298f42d9bc..964a5708c7 100644
--- a/awx/ui/static/js/lists/Organizations.js
+++ b/awx/ui/static/js/lists/Organizations.js
@@ -33,7 +33,7 @@ angular.module('OrganizationListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addOrganization()',
- "class": 'btn-success btn-sm',
+ "class": 'btn-success btn-xs',
awToolTip: 'Create a new organization'
}
},
diff --git a/awx/ui/static/js/lists/Permissions.js b/awx/ui/static/js/lists/Permissions.js
index 12800746fb..995e9097e4 100644
--- a/awx/ui/static/js/lists/Permissions.js
+++ b/awx/ui/static/js/lists/Permissions.js
@@ -47,7 +47,7 @@ angular.module('PermissionListDefinition', [])
label: 'Create New',
mode: 'all', // One of: edit, select, all
ngClick: 'addPermission()',
- "class": 'btn-success btn-sm',
+ "class": 'btn-success btn-xs',
awToolTip: 'Add a new permission',
ngShow: 'PermissionAddAllowed'
}
diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js
index 53e5142b38..dfd1309b80 100644
--- a/awx/ui/static/js/lists/Projects.js
+++ b/awx/ui/static/js/lists/Projects.js
@@ -49,13 +49,9 @@ angular.module('ProjectsListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addProject()',
- "class": 'btn-success btn-sm',
+ "class": 'btn-success btn-xs',
awToolTip: 'Create a new project'
},
- refresh: {
- awRefresh: true,
- mode: 'all'
- },
help: {
awPopOver: "\nUpdating An SCM update is in progress. \n" +
"Never Updated No SCM update has ever run for the project. \n" +
@@ -64,14 +60,18 @@ angular.module('ProjectsListDefinition', [])
"Missing The local project directory is missing. \n" +
"N/A The project does not use SCM, so an update status is not available. \n" +
" \n",
- dataPlacement: 'left',
+ dataPlacement: 'top',
dataContainer: 'body',
icon: "icon-question-sign",
mode: 'all',
- 'class': 'btn-xs btn-info btn-help pull-right',
+ 'class': 'btn-xs btn-info btn-help',
awToolTip: 'Click for help',
dataTitle: 'Project Status',
iconSize: 'large'
+ },
+ refresh: {
+ awRefresh: true,
+ mode: 'all'
}
},
diff --git a/awx/ui/static/js/lists/Teams.js b/awx/ui/static/js/lists/Teams.js
index 59fe8da58d..02b1b332ab 100644
--- a/awx/ui/static/js/lists/Teams.js
+++ b/awx/ui/static/js/lists/Teams.js
@@ -40,7 +40,7 @@ angular.module('TeamsListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addTeam()',
- "class": 'btn-sm btn-success',
+ "class": 'btn-xs btn-success',
awToolTip: 'Create a new team'
}
},
diff --git a/awx/ui/static/js/lists/Users.js b/awx/ui/static/js/lists/Users.js
index 4a5c21fbbc..1a37785318 100644
--- a/awx/ui/static/js/lists/Users.js
+++ b/awx/ui/static/js/lists/Users.js
@@ -40,7 +40,7 @@ angular.module('UserListDefinition', [])
mode: 'all', // One of: edit, select, all
ngClick: 'addUser()',
basePaths: ['organizations','users'], // base path must be in list, or action not available
- "class": 'btn-success btn-sm',
+ "class": 'btn-success btn-xs',
awToolTip: 'Create a new user'
}
},
diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less
index 90444bf76e..473b4cff7a 100644
--- a/awx/ui/static/less/ansible-ui.less
+++ b/awx/ui/static/less/ansible-ui.less
@@ -157,6 +157,7 @@ td.actions {
.refresh-grp {
display: inline-block;
+ text-align: right;
margin-left: 10px;
margin-top: 0;
padding: 0;
@@ -555,18 +556,10 @@ select.field-mini-height {
}
/* Display list actions next to search widget */
-/*
.list-actions {
- display: inline-block;
- padding-bottom: 22px;
- margin-left: 10px;
- vertical-align: top;
+ text-align: right;
}
-.list-actions .btn {
- margin-right: 3px;
-}
-*/
.btn-help {
margin-left: 15px;
@@ -868,12 +861,7 @@ select.field-mini-height {
border-radius: 6px;
}
- .tree-container {
- background-color: #f5f5f5;
- border: 1px solid #e3e3e3;
- border-radius: 6px;
- }
-
+ /*
.tree-view-container {
padding: 0 0 10px 0;
@@ -881,16 +869,19 @@ select.field-mini-height {
padding-right: 10px;
}
}
-
- .tree-form-container {
- padding-left: 0;
- padding-right: 25px;
- }
+ */
#tree-view {
+ background-color: #f5f5f5;
border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+
+ /*border: 1px solid #e3e3e3;
border-radius: 6px;
background-color: #e3e3e3;
+ */
padding-top: 10px;
padding-left: 10px;
padding-bottom: 10px;
@@ -905,11 +896,11 @@ select.field-mini-height {
#tree-form {
display: none;
- padding: 15px 10px 10px 10px;
+ /*padding: 15px 10px 10px 10px;
margin-top: 5px;
border: 1px solid #e3e3e3;
background-color: #e3e3e3;
- border-radius: 6px;
+ border-radius: 6px;*/
.form-title {
color: #888;
@@ -924,28 +915,6 @@ select.field-mini-height {
}
}
- .tree-controls {
- .btn-container{
- padding-left: 0;
- }
-
- .btn-container-inner {
- padding-top: 10px;
- }
-
- .title {
- padding-top: 15px;
- padding-left: 13px;
- color: @grey;
- font-weight: bold;
- }
- }
-
- .tree-control-divider {
- width: 98%;
- margin: 10px auto;
- }
-
/* Inventory-> Hosts */
.hosts-well {
@@ -1216,11 +1185,6 @@ tr td button i {
width: 60px;
}
- #tree-view {
- margin-left: 10px;
- margin-top: 5px;
- }
-
.label-text {
text-align: right;
}
diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js
index 9a7a53f006..75eb3705e2 100644
--- a/awx/ui/static/lib/ansible/form-generator.js
+++ b/awx/ui/static/lib/ansible/form-generator.js
@@ -978,9 +978,12 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
if ( (!options.modal) && this.form.showTitle ) {
html += "\n";
html += " \n";
@@ -1202,6 +1205,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
"add hosts to the group.
";
html += "\n";
+ /*
html += "\n";
html += "
\n";
html += "
\n";
@@ -1211,10 +1215,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += "
\n";
html += "
\n";
html += "
\n";
- /*html += " " +
- "properties \n";
- */
html += " Copy \n";
html += "\n";
html += "
\n";
html += "
\n";
+ */
html += "
\n";
- html += "
\n" +
+ html += "
\n";
- html += "
\n";
+ html += "
\n";
+ html += "
\n
\n";
html += "
\n";
- html += "
\n";
- html += "
\n";
+ //html += "
\n";
+ //html += "
\n";
html += "
\n";
}
@@ -1454,21 +1456,23 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += SearchWidget({ iterator: form.related[itm].iterator, template: form.related[itm], mini: true });
html += "\n";
+ html += "
\n";
for (var act in form.related[itm].actions) {
var action = form.related[itm].actions[act];
- html += " ";
html += (action.label) ? " " + action.label : "";
html += " \n";
}
html += "
\n";
+ html += "
\n";
html += "\n"
// Start the list
diff --git a/awx/ui/static/lib/ansible/generator-helpers.js b/awx/ui/static/lib/ansible/generator-helpers.js
index c1d1e98e39..49d323504e 100644
--- a/awx/ui/static/lib/ansible/generator-helpers.js
+++ b/awx/ui/static/lib/ansible/generator-helpers.js
@@ -99,7 +99,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
// pass in button object, get back html
var html = '';
if (btn.awRefresh) {
- html += "\n";
}
@@ -129,7 +129,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
html += (btn.ngHide) ? Attr(btn,'ngHide') : "";
html += (btn.awToolTip) ? Attr(btn,'awToolTip') : "";
html += (btn.awToolTip && btn.dataPlacement == undefined) ? "data-placement=\"top\" " : "";
- html += (btn.awRefresh && !btn.awTooltip) ? "aw-tool-tip=\"Refresh page\" " : "";
+ html += (btn.awRefresh && !btn.awTooltip) ? "aw-tool-tip=\"Refresh page\" data-placement=\"top\" ": "";
html += (btn.awPopOver) ? "aw-pop-over=\"" +
btn.awPopOver.replace(/[\'\"]/g, '"') + "\" " : "";
html += (btn.dataPlacement) ? Attr(btn, 'dataPlacement') : "";
diff --git a/awx/ui/static/lib/ansible/list-generator.js b/awx/ui/static/lib/ansible/list-generator.js
index b8067b8248..de280e2fd9 100644
--- a/awx/ui/static/lib/ansible/list-generator.js
+++ b/awx/ui/static/lib/ansible/list-generator.js
@@ -162,22 +162,10 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
html += "
\n";
}
- if (options.mode != 'lookup' && (list.well == undefined || list.well == 'true')) {
+ if (options.mode != 'lookup' && (list.well == undefined || list.well == true)) {
html += "\n";
}
- // Add a title and optionally a close button (used on Inventory->Groups)
- if (options.mode !== 'lookup' && list.showTitle) {
- html += "
";
- html += (options.mode == 'edit' || options.mode == 'summary') ? list.editTitle : list.addTitle;
- if (list.cancelButton) {
- html += "" +
- "× \n";
- }
- html += "
\n";
- html += "
\n";
- }
-
/*
if (list.editTitle.match(/^Inventory Summary/)) {
html += "
\n";
@@ -203,7 +191,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
//actions
var base = $location.path().replace(/^\//,'').split('/')[0];
- html += "
\n";
+
+ html += "
\n";
+ // all but refresh button
for (action in list.actions) {
if (list.actions[action].mode == 'all' || list.actions[action].mode == options.mode) {
if ( (list.actions[action].basePaths == undefined) ||
(list.actions[action].basePaths && list.actions[action].basePaths.indexOf(base) > -1) ) {
- html += this.button(list.actions[action], action);
+ html += this.button(list.actions[action], action);
}
}
}
-
- /*if (list.name == 'inventories' && options.mode !== 'select') {
- html += " Show only inventories with failed jobs \n";
- }*/
-
+ html += "
\n";
+
//select instructions
if (options.mode == 'select' && list.selectInstructions) {
var btn = {
@@ -243,14 +229,21 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
};
html += this.button(btn, 'select');
}
+ html += "
\n";
+
}
else {
html += "
\n";
}
- html += "
\n";
html += "
\n";
-
+
+ // Add a title and optionally a close button (used on Inventory->Groups)
+ if (options.mode !== 'lookup' && list.showTitle) {
+ html += "";
+ html += (options.mode == 'edit' || options.mode == 'summary') ? list.editTitle : list.addTitle;
+ html += "
\n";
+ }
// table header row
html += "\n";
}
- if (options.mode != 'lookup' && (list.well == undefined || list.well == 'true')) {
+ if (options.mode != 'lookup' && (list.well == undefined || list.well == true)) {
html += "\n"; //well
}
@@ -386,7 +379,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
else {
html += PaginateWidget({ set: list.name, iterator: list.iterator, mini: true });
}
-
+
return html;
}