mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -03:30
Latest UI changes, fixes and enhancements.
This commit is contained in:
@@ -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 });
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <em>Refresh</em> 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 <em>Refresh</em> 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 = "<div class=\"inventory-passwd-msg\">Starting inventory update for the <em>" + group_name +
|
||||
"</em> group. Please provide the " + group_source + " credentials:</div>\n";
|
||||
var extra_html = "<div class=\"inventory-passwd-msg\">Starting inventory update for <em>" + group_name +
|
||||
"</em>. Please provide the " + group_source + " credentials:</div>\n";
|
||||
scope.$emit('InventorySubmit', data.passwords_needed_to_update, extra_html);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@ angular.module('GroupListDefinition', [])
|
||||
help: {
|
||||
awPopOver: "Choose groups by clicking on each group you wish to add. Click the <em>Select</em> 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',
|
||||
|
||||
@@ -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 <em>Select</em> button.",
|
||||
dataPlacement: 'left',
|
||||
dataPlacement: 'top',
|
||||
dataContainer: '#form-modal .modal-content',
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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<br>Status',
|
||||
@@ -55,8 +55,10 @@ angular.module('InventorySummaryDefinition', [])
|
||||
},
|
||||
last_updated: {
|
||||
label: 'Last<br>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', [])
|
||||
"<dt>successful</dt><dd>The most recent inventory update ran to completion without incident.</dd>\n" +
|
||||
"<dt>updating</dt><dd>The inventory update is currently running.</dd>\n" +
|
||||
"</dl>\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'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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: "<dl>\n<dt>Success</dt><dd>Tasks successfully executed on the host.</dd>\n" +
|
||||
"<dt>Changed</dt><dd>Actions taken on the host.</dd>\n" +
|
||||
@@ -114,15 +109,20 @@ angular.module('JobHostDefinition', [])
|
||||
"<dt>Unreachable</dt><dd>Times the ansible server could not reach the host.</dd>\n" +
|
||||
"<dt>Skipped</dt><dd>Tasks bypassed and not performed on the host due to prior task failure or the host being unreachable.</dd>\n" +
|
||||
"</dl>\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'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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: "<dl>\n<dt>Updating</dt><dd>An SCM update is in progress.</dd>\n" +
|
||||
"<dt>Never Updated</dt><dd>No SCM update has ever run for the project.</dd>\n" +
|
||||
@@ -64,14 +60,18 @@ angular.module('ProjectsListDefinition', [])
|
||||
"<dt>Missing</dt><dd>The local project directory is missing.</dd>\n" +
|
||||
"<dt>N/A</dt><dd>The project does not use SCM, so an update status is not available.</dd>\n" +
|
||||
"</dl>\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'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -978,9 +978,12 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
if ( (!options.modal) && this.form.showTitle ) {
|
||||
html += "<div class=\"form-title\">";
|
||||
html += (options.mode == 'edit') ? this.form.editTitle : this.form.addTitle;
|
||||
if (this.form.cancelButton) {
|
||||
html += "<button type=\"button\" ng-click=\"closeForm()\" class=\"close form-cancel\" aria-hidden=\"true\">" +
|
||||
"×</button>\n";
|
||||
if (this.has('titleActions')) {
|
||||
html += "<div class=\"title-actions pull-right\">\n";
|
||||
for (btn in this.form.titleActions) {
|
||||
html += this.button(this.form.titleActions[btn]);
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
html += "</div>\n";
|
||||
html += "<hr class=\"form-title-hr\">\n";
|
||||
@@ -1202,6 +1205,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
"add hosts to the group.</p>";
|
||||
html += "</div>\n";
|
||||
|
||||
/*
|
||||
html += "<div class=\"row\">\n";
|
||||
html += "<div class=\"col-lg-12\">\n";
|
||||
html += "<div class=\"tree-view-container well\">\n";
|
||||
@@ -1211,10 +1215,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
html += "</div>\n";
|
||||
html += "<div class=\"col-lg-8 btn-container\">\n";
|
||||
html += "<div class=\"btn-container-inner\">\n";
|
||||
/*html += "<button type=\"button\" id=\"edit_group_btn\" class=\"btn btn-default btn-sm\" ng-click=\"editGroup()\" ng-hide=\"groupEditHide\" " +
|
||||
"aw-tool-tip=\"Edit the selected group's properties\" data-placement=\"bottom\" ng-disabled=\"grpBtnDisable\"><i class=\"icon-edit\"></i> " +
|
||||
"properties</button>\n";
|
||||
*/
|
||||
html += "<button type=\"button\" id=\"copy_group_btn\" class=\"btn btn-success btn-sm\" ng-click=\"addGroup()\" ng-hide=\"groupAddHide\" " +
|
||||
"aw-tool-tip=\"Copy existing groups to the selected group\" data-placement=\"bottom\" ng-disabled=\"grpBtnDisable\"><i class=\"icon-check\"></i> Copy</button>\n";
|
||||
html += "<button type=\"button\" id=\"create_group_btn\" class=\"btn btn-success btn-sm\" ng-click=\"createGroup()\" ng-hide=\"groupCreateHide\" " +
|
||||
@@ -1229,14 +1229,16 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
html += "</div>\n";
|
||||
html += "</div><!-- tree controls -->\n";
|
||||
html += "<hr class=\"tree-control-divider\">\n";
|
||||
*/
|
||||
html += "<div class=\"row\">\n";
|
||||
html += "<div class=\"col-lg-4\">\n" +
|
||||
html += "<div class=\"col-lg-3\">\n" +
|
||||
"<div id=\"tree-view\"></div>\n" +
|
||||
"</div>\n";
|
||||
html += "<div class=\"col-lg-8 tree-form-container\">\n<div id=\"tree-form\">\n</div>\n</div>\n";
|
||||
html += "<div class=\"col-lg-9 tree-form-container\">\n";
|
||||
html += "<div id=\"tree-form\">\n</div>\n";
|
||||
html += "</div>\n";
|
||||
html += "</div><!-- well -->\n";
|
||||
html += "</div><!-- col-lg-12 -->\n";
|
||||
//html += "</div><!-- well -->\n";
|
||||
//html += "</div><!-- col-lg-12 -->\n";
|
||||
html += "</div><!-- row -->\n";
|
||||
|
||||
}
|
||||
@@ -1454,21 +1456,23 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
html += SearchWidget({ iterator: form.related[itm].iterator, template: form.related[itm], mini: true });
|
||||
|
||||
html += "<div class=\"col-lg-7\">\n";
|
||||
html += "<div class=\"list-actions\">\n";
|
||||
for (var act in form.related[itm].actions) {
|
||||
var action = form.related[itm].actions[act];
|
||||
html += "<button type=\"button\" class=\"btn btn-sm ";
|
||||
html += "<button type=\"button\" class=\"btn btn-xs ";
|
||||
html += (form.related[itm].actions[act]['class']) ? form.related[itm].actions[act]['class'] : "btn-success";
|
||||
html += "\" ";
|
||||
html += "id=\"" + itm + "_" + act + "_btn\" ";
|
||||
html += this.attr(action,'ngClick');
|
||||
html += (action['ngShow']) ? this.attr(action,'ngShow') : "";
|
||||
html += (action.awToolTip) ? this.attr(action,'awToolTip') : "";
|
||||
html += (action.awToolTip) ? "data-placement=\"right\" " : "";
|
||||
html += (action.awToolTip) ? "data-placement=\"top\" " : "";
|
||||
html += "><i class=\"" + action.icon + "\"></i>";
|
||||
html += (action.label) ? " " + action.label : "";
|
||||
html += "</button>\n";
|
||||
}
|
||||
html += "</div>\n";
|
||||
html += "</div>\n";
|
||||
html += "</div><!-- row -->\n"
|
||||
|
||||
// Start the list
|
||||
|
||||
@@ -99,7 +99,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
// pass in button object, get back html
|
||||
var html = '';
|
||||
if (btn.awRefresh) {
|
||||
html += "<div class=\"refresh-grp pull-right\" ";
|
||||
html += "<div class=\"refresh-grp\" ";
|
||||
html += (btn.ngShow) ? Attr(btn, 'ngShow') : "";
|
||||
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') : "";
|
||||
|
||||
@@ -162,22 +162,10 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if (options.mode != 'lookup' && (list.well == undefined || list.well == 'true')) {
|
||||
if (options.mode != 'lookup' && (list.well == undefined || list.well == true)) {
|
||||
html += "<div class=\"well\">\n";
|
||||
}
|
||||
|
||||
// Add a title and optionally a close button (used on Inventory->Groups)
|
||||
if (options.mode !== 'lookup' && list.showTitle) {
|
||||
html += "<div class=\"form-title\">";
|
||||
html += (options.mode == 'edit' || options.mode == 'summary') ? list.editTitle : list.addTitle;
|
||||
if (list.cancelButton) {
|
||||
html += "<button type=\"button\" ng-click=\"closeForm()\" class=\"close form-cancel\" aria-hidden=\"true\">" +
|
||||
"×</button>\n";
|
||||
}
|
||||
html += "</div>\n";
|
||||
html += "<hr class=\"form-title-hr\">\n";
|
||||
}
|
||||
|
||||
/*
|
||||
if (list.editTitle.match(/^Inventory Summary/)) {
|
||||
html += "<div class=\"row groups-issue\">\n";
|
||||
@@ -203,7 +191,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
//actions
|
||||
var base = $location.path().replace(/^\//,'').split('/')[0];
|
||||
|
||||
html += "<div class=\"list-actions ";
|
||||
html += "<div class=\"";
|
||||
if (options.mode == 'summary') {
|
||||
html += 'col-lg-5';
|
||||
}
|
||||
@@ -213,22 +201,20 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
else {
|
||||
html += "col-lg-7 col-md-5";
|
||||
}
|
||||
|
||||
html += "\">\n";
|
||||
|
||||
html += "<div class=\"list-actions\">\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 += "<label class=\"checkbox-inline pull-right\"><input type=\"checkbox\" ng-model=\"inventoryFailureFilter\" " +
|
||||
"ng-change=\"search('inventory')\" id=\"failed_jobs_chbox\"> Show only inventories with failed jobs</label>\n";
|
||||
}*/
|
||||
|
||||
html += "</div><!-- list-acitons -->\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 += "</div><!-- col-lg-7 -->\n";
|
||||
|
||||
}
|
||||
else {
|
||||
html += "<div class=\"col-lg-7\"></div>\n";
|
||||
}
|
||||
|
||||
html += "</div>\n";
|
||||
html += "</div><!-- row -->\n";
|
||||
|
||||
|
||||
// Add a title and optionally a close button (used on Inventory->Groups)
|
||||
if (options.mode !== 'lookup' && list.showTitle) {
|
||||
html += "<div class=\"form-title\">";
|
||||
html += (options.mode == 'edit' || options.mode == 'summary') ? list.editTitle : list.addTitle;
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
// table header row
|
||||
html += "<table id=\"" + list.name + "_table\" ";
|
||||
@@ -376,7 +369,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if (options.mode != 'lookup' && (list.well == undefined || list.well == 'true')) {
|
||||
if (options.mode != 'lookup' && (list.well == undefined || list.well == true)) {
|
||||
html += "</div>\n"; //well
|
||||
}
|
||||
|
||||
@@ -386,7 +379,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
else {
|
||||
html += PaginateWidget({ set: list.name, iterator: list.iterator, mini: true });
|
||||
}
|
||||
|
||||
|
||||
return html;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user