mirror of
https://github.com/ansible/awx.git
synced 2024-10-28 02:25:27 +03:00
cleaned up the rest of the lists
This commit is contained in:
parent
434d14b428
commit
d52739d04e
@ -38,7 +38,6 @@ if ($basePath) {
|
||||
|
||||
// Modules
|
||||
import './forms';
|
||||
import './lists';
|
||||
import portalMode from './portal-mode/main';
|
||||
import systemTracking from './system-tracking/main';
|
||||
import inventories from './inventories/main';
|
||||
@ -126,25 +125,14 @@ var tower = angular.module('Tower', [
|
||||
'templates',
|
||||
'PromptDialog',
|
||||
'AWDirectives',
|
||||
'InventoriesListDefinition',
|
||||
'InventoryFormDefinition',
|
||||
'InventoryGroupsDefinition',
|
||||
'InventoryHostsDefinition',
|
||||
'HostFormDefinition',
|
||||
'HostListDefinition',
|
||||
'GroupFormDefinition',
|
||||
'GroupListDefinition',
|
||||
'TemplatesListDefinition',
|
||||
'JobTemplateFormDefinition',
|
||||
'CompletedJobsDefinition',
|
||||
'AllJobsDefinition',
|
||||
'HostGroupsFormDefinition',
|
||||
'ScheduledJobsDefinition',
|
||||
'lrInfiniteScroll',
|
||||
'PortalJobsListDefinition',
|
||||
'features',
|
||||
'pendolytics',
|
||||
'InventorySourcesListDefinition',
|
||||
])
|
||||
|
||||
.constant('AngularScheduler.partials', urlPrefix + 'lib/angular-scheduler/lib/')
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export default
|
||||
angular.module('JobTemplateFormDefinition', [ 'CompletedJobsDefinition'])
|
||||
angular.module('JobTemplateFormDefinition', [])
|
||||
|
||||
.factory('JobTemplateFormObject', ['i18n', function(i18n) {
|
||||
return {
|
||||
|
@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('InventoriesListDefinition', [])
|
||||
.factory('InventoryList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'inventories',
|
||||
@ -96,4 +94,4 @@ export default
|
||||
ngShow: 'inventory.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
}
|
||||
};}]);
|
||||
};}];
|
@ -13,6 +13,10 @@ import { copyMoveGroupRoute, copyMoveHostRoute } from './manage/copy-move/copy-m
|
||||
import adHocRoute from './manage/adhoc/adhoc.route';
|
||||
import { templateUrl } from '../shared/template-url/template-url.factory';
|
||||
import { N_ } from '../i18n';
|
||||
|
||||
// actual inventory list config object
|
||||
import InventoryList from './inventory.list';
|
||||
|
||||
export default
|
||||
angular.module('inventory', [
|
||||
inventoryAdd.name,
|
||||
@ -20,6 +24,7 @@ angular.module('inventory', [
|
||||
inventoryList.name,
|
||||
inventoryManage.name,
|
||||
])
|
||||
.factory('InventoryList', InventoryList)
|
||||
.config(['$stateProvider', '$stateExtenderProvider', 'stateDefinitionsProvider',
|
||||
function($stateProvider, $stateExtenderProvider, stateDefinitionsProvider) {
|
||||
// When stateDefinition.lazyLoad() resolves, states matching name.** or /url** will be de-registered and replaced with resolved states
|
||||
|
@ -0,0 +1,24 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'groups',
|
||||
iterator: 'copy',
|
||||
selectTitle: 'Copy Groups',
|
||||
index: false,
|
||||
well: false,
|
||||
emptyListText: 'PLEASE CREATE ADDITIONAL GROUPS / HOSTS TO PERFORM THIS ACTION',
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Target Group Name'
|
||||
}
|
||||
},
|
||||
basePath: 'api/v1/inventories/{{$stateParams.inventory_id}}/groups'
|
||||
};
|
@ -6,8 +6,10 @@
|
||||
|
||||
import CopyMoveGroupsController from './copy-move-groups.controller';
|
||||
import CopyMoveHostsController from './copy-move-hosts.controller';
|
||||
import CopyMoveGroupList from './copy-move-groups.list';
|
||||
|
||||
export default
|
||||
angular.module('manageCopyMove', [])
|
||||
.controller('CopyMoveGroupsController', CopyMoveGroupsController)
|
||||
.controller('CopyMoveHostsController', CopyMoveHostsController);
|
||||
.controller('CopyMoveHostsController', CopyMoveHostsController)
|
||||
.value('CopyMoveGroupList', CopyMoveGroupList);
|
||||
|
@ -0,0 +1,167 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'groups',
|
||||
iterator: 'group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
listTitle: 'GROUPS',
|
||||
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||
showTitle: false,
|
||||
well: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
'class': 'table-no-border',
|
||||
multiSelect: true,
|
||||
trackBy: 'group.id',
|
||||
|
||||
fields: {
|
||||
sync_status: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
ngClick: 'viewUpdateStatus(group.id)',
|
||||
awToolTip: "{{ group.status_tooltip }}",
|
||||
dataTipWatch: "group.status_tooltip",
|
||||
icon: "{{ 'fa icon-cloud-' + group.status_class }}",
|
||||
ngClass: "group.status_class",
|
||||
dataPlacement: "top",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
ngClick: "showFailedHosts(group)",
|
||||
icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: 'Groups',
|
||||
key: true,
|
||||
ngClick: "groupSelect(group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
},
|
||||
total_groups: {
|
||||
nosort: true,
|
||||
label: '',
|
||||
type: 'badgeCount',
|
||||
ngHide: 'group.total_groups == 0',
|
||||
noLink: true,
|
||||
awToolTip: "{{group.name | sanitize}} contains {{group.total_groups}} {{group.total_groups === 1 ? 'child' : 'children'}}"
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
// $scope.$parent is governed by InventoryManageController,
|
||||
ngDisabled: '!$parent.groupsSelected && !$parent.hostsSelected',
|
||||
ngClick: '$parent.setAdhocPattern()',
|
||||
awToolTip: "Select an inventory source by clicking the check box beside it. The inventory source can be a single group or host, a selection of multiple hosts, or a selection of multiple groups.",
|
||||
dataTipWatch: "adhocCommandTooltip",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'RUN COMMANDS',
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
ngShow: 'canAdhoc'
|
||||
// TODO: set up a tip watcher and change text based on when
|
||||
// things are selected/not selected. This is started and
|
||||
// commented out in the inventory controller within the watchers.
|
||||
// awToolTip: "{{ adhocButtonTipContents }}",
|
||||
// dataTipWatch: "adhocButtonTipContents"
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createGroup()",
|
||||
awToolTip: "Create a new group",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD GROUP',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
group_update: {
|
||||
//label: 'Sync',
|
||||
mode: 'all',
|
||||
ngClick: 'updateGroup(group)',
|
||||
awToolTip: "{{ group.launch_tooltip }}",
|
||||
dataTipWatch: "group.launch_tooltip",
|
||||
ngShow: "(group.status !== 'running' && group.status " +
|
||||
"!== 'pending' && group.status !== 'updating') && group.summary_fields.user_capabilities.start",
|
||||
ngClass: "group.launch_class",
|
||||
dataPlacement: "top",
|
||||
},
|
||||
cancel: {
|
||||
//label: 'Cancel',
|
||||
mode: 'all',
|
||||
ngClick: "cancelUpdate(group.id)",
|
||||
awToolTip: "Cancel sync process",
|
||||
'class': 'red-txt',
|
||||
ngShow: "(group.status == 'running' || group.status == 'pending' " +
|
||||
"|| group.status == 'updating') && group.summary_fields.user_capabilities.start",
|
||||
dataPlacement: "top",
|
||||
iconClass: "fa fa-minus-circle"
|
||||
},
|
||||
copy: {
|
||||
mode: 'all',
|
||||
ngClick: "copyMoveGroup(group.id)",
|
||||
awToolTip: 'Copy or move group',
|
||||
ngShow: "group.id > 0 && group.summary_fields.user_capabilities.copy",
|
||||
dataPlacement: "top"
|
||||
},
|
||||
schedule: {
|
||||
mode: 'all',
|
||||
ngClick: "scheduleGroup(group.id)",
|
||||
awToolTip: "{{ group.group_schedule_tooltip }}",
|
||||
ngClass: "group.scm_type_class",
|
||||
dataPlacement: 'top',
|
||||
ngShow: "!(group.summary_fields.inventory_source.source === '')"
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(group.id)",
|
||||
awToolTip: 'Edit group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(group.id)",
|
||||
awToolTip: 'View group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "!group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "deleteGroup(group)",
|
||||
awToolTip: 'Delete group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
};
|
@ -11,6 +11,7 @@ import GetSourceTypeOptions from './factories/get-source-type-options.factory';
|
||||
import GetSyncStatusMsg from './factories/get-sync-status-msg.factory';
|
||||
import GroupsCancelUpdate from './factories/groups-cancel-update.factory';
|
||||
import ViewUpdateStatus from './factories/view-update-status.factory';
|
||||
import InventoryGroups from './inventory-groups.list';
|
||||
|
||||
export default
|
||||
angular.module('manageGroups', [])
|
||||
@ -19,5 +20,6 @@ angular.module('manageGroups', [])
|
||||
.factory('GetSyncStatusMsg', GetSyncStatusMsg)
|
||||
.factory('GroupsCancelUpdate', GroupsCancelUpdate)
|
||||
.factory('ViewUpdateStatus', ViewUpdateStatus)
|
||||
.value('InventoryGroups', InventoryGroups)
|
||||
.controller('GroupAddController', GroupAddController)
|
||||
.controller('GroupEditController', GroupEditController);
|
||||
|
@ -0,0 +1,119 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'hosts',
|
||||
iterator: 'host',
|
||||
editTitle: '{{ selected_group }}',
|
||||
listTitle: 'HOSTS',
|
||||
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||
showTitle: false,
|
||||
well: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
hasChildren: true,
|
||||
'class': 'table-no-border',
|
||||
multiSelect: true,
|
||||
trackBy: 'host.id',
|
||||
|
||||
fields: {
|
||||
active_failures: {
|
||||
label: '',
|
||||
iconOnly: true,
|
||||
nosort: true,
|
||||
// do not remove this ng-click directive
|
||||
// the list generator case to handle fields without ng-click
|
||||
// cannot handle the aw-* directives
|
||||
ngClick: 'noop()',
|
||||
awPopOver: "{{ host.job_status_html }}",
|
||||
dataTitle: "{{ host.job_status_title }}",
|
||||
awToolTip: "{{ host.badgeToolTip }}",
|
||||
dataPlacement: 'top',
|
||||
icon: "{{ 'fa icon-job-' + host.active_failures }}",
|
||||
id: 'active-failures-action',
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Hosts',
|
||||
ngClick: "editHost(host.id)",
|
||||
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
||||
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
|
||||
dataHostId: "{{ host.id }}",
|
||||
dataType: "host",
|
||||
class: 'InventoryManage-breakWord'
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right',
|
||||
copy: {
|
||||
mode: 'all',
|
||||
ngClick: "copyMoveHost(host.id)",
|
||||
awToolTip: 'Copy or move host to another group',
|
||||
dataPlacement: "top",
|
||||
ngShow: 'host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host.id)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit host',
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host.id)",
|
||||
awToolTip: 'View host',
|
||||
dataPlacement: 'top',
|
||||
ngShow: '!host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
ngClick: "deleteHost(host.id, host.name)",
|
||||
icon: 'icon-trash',
|
||||
awToolTip: 'Delete host',
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
system_tracking: {
|
||||
buttonContent: 'System Tracking',
|
||||
ngClick: 'systemTracking()',
|
||||
awToolTip: "Select one or two hosts by clicking the checkbox beside the host. System tracking offers the ability to compare the results of two scan runs from different dates on one host or the same date on two hosts.",
|
||||
dataTipWatch: "systemTrackingTooltip",
|
||||
dataPlacement: 'top',
|
||||
awFeature: 'system_tracking',
|
||||
actionClass: 'btn List-buttonDefault system-tracking',
|
||||
ngDisabled: 'systemTrackingDisabled || !hostsSelected',
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
ngShow: true
|
||||
},
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createHost()",
|
||||
awToolTip: "Create a new host",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD HOST',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
}
|
||||
|
||||
};
|
@ -8,10 +8,12 @@ import HostsAddController from './hosts-add.controller';
|
||||
import HostsEditController from './hosts-edit.controller';
|
||||
import SetStatus from './factories/set-status.factory';
|
||||
import SetEnabledMsg from './factories/set-enabled-msg.factory';
|
||||
import InventoryHosts from './inventory-hosts.list';
|
||||
|
||||
export default
|
||||
angular.module('manageHosts', [])
|
||||
.factory('SetStatus', SetStatus)
|
||||
.factory('SetEnabledMsg', SetEnabledMsg)
|
||||
.value('InventoryHosts', InventoryHosts)
|
||||
.controller('HostsAddController', HostsAddController)
|
||||
.controller('HostEditController', HostsEditController);
|
||||
|
@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('AllJobsDefinition', [])
|
||||
.factory('AllJobsList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'jobs',
|
||||
@ -118,4 +116,4 @@ export default
|
||||
}
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}];
|
@ -14,6 +14,7 @@ import RelaunchInventory from './factories/relaunch-inventory.factory';
|
||||
import RelaunchJob from './factories/relaunch-job.factory';
|
||||
import RelaunchPlaybook from './factories/relaunch-playbook.factory';
|
||||
import RelaunchSCM from './factories/relaunch-scm.factory';
|
||||
import AllJobsList from './all-jobs.list';
|
||||
|
||||
export default
|
||||
angular.module('JobsModule', [])
|
||||
@ -28,4 +29,5 @@ export default
|
||||
.factory('RelaunchInventory', RelaunchInventory)
|
||||
.factory('RelaunchJob', RelaunchJob)
|
||||
.factory('RelaunchPlaybook', RelaunchPlaybook)
|
||||
.factory('RelaunchSCM', RelaunchSCM);
|
||||
.factory('RelaunchSCM', RelaunchSCM)
|
||||
.factory('AllJobsList', AllJobsList);
|
||||
|
@ -1,31 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
import CompletedJobs from "./lists/CompletedJobs";
|
||||
import AllJobs from "./lists/AllJobs";
|
||||
import Groups from "./lists/Groups";
|
||||
import Hosts from "./lists/Hosts";
|
||||
import Inventories from "./lists/Inventories";
|
||||
import InventoryGroups from "./lists/InventoryGroups";
|
||||
import InventoryHosts from "./lists/InventoryHosts";
|
||||
import InventorySources from "./lists/InventorySources";
|
||||
import PortalJobs from "./lists/PortalJobs";
|
||||
import ScheduledJobs from "./lists/ScheduledJobs";
|
||||
import Templates from "./lists/Templates";
|
||||
|
||||
export
|
||||
{ CompletedJobs,
|
||||
AllJobs,
|
||||
Groups,
|
||||
Hosts,
|
||||
Inventories,
|
||||
InventoryGroups,
|
||||
InventoryHosts,
|
||||
InventorySources,
|
||||
PortalJobs,
|
||||
ScheduledJobs,
|
||||
Templates
|
||||
};
|
@ -1,27 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('GroupListDefinition', [])
|
||||
.value('CopyMoveGroupList', {
|
||||
|
||||
name: 'groups',
|
||||
iterator: 'copy',
|
||||
selectTitle: 'Copy Groups',
|
||||
index: false,
|
||||
well: false,
|
||||
emptyListText: 'PLEASE CREATE ADDITIONAL GROUPS / HOSTS TO PERFORM THIS ACTION',
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Target Group Name'
|
||||
}
|
||||
},
|
||||
basePath: 'api/v1/inventories/{{$stateParams.inventory_id}}/groups'
|
||||
});
|
@ -1,28 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default
|
||||
angular.module('HostListDefinition', [])
|
||||
.value('HostList', {
|
||||
|
||||
name: 'copy_hosts',
|
||||
iterator: 'copy_host',
|
||||
selectTitle: 'Add Existing Hosts',
|
||||
editTitle: 'Hosts',
|
||||
index: false,
|
||||
well: false,
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Host Name'
|
||||
}
|
||||
},
|
||||
|
||||
actions: { },
|
||||
|
||||
fieldActions: { }
|
||||
});
|
@ -1,170 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default
|
||||
angular.module('InventoryGroupsDefinition', [])
|
||||
.value('InventoryGroups', {
|
||||
|
||||
name: 'groups',
|
||||
iterator: 'group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
listTitle: 'GROUPS',
|
||||
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||
showTitle: false,
|
||||
well: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
'class': 'table-no-border',
|
||||
multiSelect: true,
|
||||
trackBy: 'group.id',
|
||||
|
||||
fields: {
|
||||
sync_status: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
ngClick: 'viewUpdateStatus(group.id)',
|
||||
awToolTip: "{{ group.status_tooltip }}",
|
||||
dataTipWatch: "group.status_tooltip",
|
||||
icon: "{{ 'fa icon-cloud-' + group.status_class }}",
|
||||
ngClass: "group.status_class",
|
||||
dataPlacement: "top",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
ngClick: "showFailedHosts(group)",
|
||||
icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: 'Groups',
|
||||
key: true,
|
||||
ngClick: "groupSelect(group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
},
|
||||
total_groups: {
|
||||
nosort: true,
|
||||
label: '',
|
||||
type: 'badgeCount',
|
||||
ngHide: 'group.total_groups == 0',
|
||||
noLink: true,
|
||||
awToolTip: "{{group.name | sanitize}} contains {{group.total_groups}} {{group.total_groups === 1 ? 'child' : 'children'}}"
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
// $scope.$parent is governed by InventoryManageController,
|
||||
ngDisabled: '!$parent.groupsSelected && !$parent.hostsSelected',
|
||||
ngClick: '$parent.setAdhocPattern()',
|
||||
awToolTip: "Select an inventory source by clicking the check box beside it. The inventory source can be a single group or host, a selection of multiple hosts, or a selection of multiple groups.",
|
||||
dataTipWatch: "adhocCommandTooltip",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'RUN COMMANDS',
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
ngShow: 'canAdhoc'
|
||||
// TODO: set up a tip watcher and change text based on when
|
||||
// things are selected/not selected. This is started and
|
||||
// commented out in the inventory controller within the watchers.
|
||||
// awToolTip: "{{ adhocButtonTipContents }}",
|
||||
// dataTipWatch: "adhocButtonTipContents"
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createGroup()",
|
||||
awToolTip: "Create a new group",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD GROUP',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
group_update: {
|
||||
//label: 'Sync',
|
||||
mode: 'all',
|
||||
ngClick: 'updateGroup(group)',
|
||||
awToolTip: "{{ group.launch_tooltip }}",
|
||||
dataTipWatch: "group.launch_tooltip",
|
||||
ngShow: "(group.status !== 'running' && group.status " +
|
||||
"!== 'pending' && group.status !== 'updating') && group.summary_fields.user_capabilities.start",
|
||||
ngClass: "group.launch_class",
|
||||
dataPlacement: "top",
|
||||
},
|
||||
cancel: {
|
||||
//label: 'Cancel',
|
||||
mode: 'all',
|
||||
ngClick: "cancelUpdate(group.id)",
|
||||
awToolTip: "Cancel sync process",
|
||||
'class': 'red-txt',
|
||||
ngShow: "(group.status == 'running' || group.status == 'pending' " +
|
||||
"|| group.status == 'updating') && group.summary_fields.user_capabilities.start",
|
||||
dataPlacement: "top",
|
||||
iconClass: "fa fa-minus-circle"
|
||||
},
|
||||
copy: {
|
||||
mode: 'all',
|
||||
ngClick: "copyMoveGroup(group.id)",
|
||||
awToolTip: 'Copy or move group',
|
||||
ngShow: "group.id > 0 && group.summary_fields.user_capabilities.copy",
|
||||
dataPlacement: "top"
|
||||
},
|
||||
schedule: {
|
||||
mode: 'all',
|
||||
ngClick: "scheduleGroup(group.id)",
|
||||
awToolTip: "{{ group.group_schedule_tooltip }}",
|
||||
ngClass: "group.scm_type_class",
|
||||
dataPlacement: 'top',
|
||||
ngShow: "!(group.summary_fields.inventory_source.source === '')"
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(group.id)",
|
||||
awToolTip: 'Edit group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(group.id)",
|
||||
awToolTip: 'View group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "!group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "deleteGroup(group)",
|
||||
awToolTip: 'Delete group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
});
|
@ -1,122 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default
|
||||
angular.module('InventoryHostsDefinition', [])
|
||||
.value('InventoryHosts', {
|
||||
|
||||
name: 'hosts',
|
||||
iterator: 'host',
|
||||
editTitle: '{{ selected_group }}',
|
||||
listTitle: 'HOSTS',
|
||||
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||
showTitle: false,
|
||||
well: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
hasChildren: true,
|
||||
'class': 'table-no-border',
|
||||
multiSelect: true,
|
||||
trackBy: 'host.id',
|
||||
|
||||
fields: {
|
||||
active_failures: {
|
||||
label: '',
|
||||
iconOnly: true,
|
||||
nosort: true,
|
||||
// do not remove this ng-click directive
|
||||
// the list generator case to handle fields without ng-click
|
||||
// cannot handle the aw-* directives
|
||||
ngClick: 'noop()',
|
||||
awPopOver: "{{ host.job_status_html }}",
|
||||
dataTitle: "{{ host.job_status_title }}",
|
||||
awToolTip: "{{ host.badgeToolTip }}",
|
||||
dataPlacement: 'top',
|
||||
icon: "{{ 'fa icon-job-' + host.active_failures }}",
|
||||
id: 'active-failures-action',
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Hosts',
|
||||
ngClick: "editHost(host.id)",
|
||||
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
||||
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
|
||||
dataHostId: "{{ host.id }}",
|
||||
dataType: "host",
|
||||
class: 'InventoryManage-breakWord'
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right',
|
||||
copy: {
|
||||
mode: 'all',
|
||||
ngClick: "copyMoveHost(host.id)",
|
||||
awToolTip: 'Copy or move host to another group',
|
||||
dataPlacement: "top",
|
||||
ngShow: 'host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host.id)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit host',
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host.id)",
|
||||
awToolTip: 'View host',
|
||||
dataPlacement: 'top',
|
||||
ngShow: '!host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
ngClick: "deleteHost(host.id, host.name)",
|
||||
icon: 'icon-trash',
|
||||
awToolTip: 'Delete host',
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
system_tracking: {
|
||||
buttonContent: 'System Tracking',
|
||||
ngClick: 'systemTracking()',
|
||||
awToolTip: "Select one or two hosts by clicking the checkbox beside the host. System tracking offers the ability to compare the results of two scan runs from different dates on one host or the same date on two hosts.",
|
||||
dataTipWatch: "systemTrackingTooltip",
|
||||
dataPlacement: 'top',
|
||||
awFeature: 'system_tracking',
|
||||
actionClass: 'btn List-buttonDefault system-tracking',
|
||||
ngDisabled: 'systemTrackingDisabled || !hostsSelected',
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
ngShow: true
|
||||
},
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createHost()",
|
||||
awToolTip: "Create a new host",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD HOST',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
}
|
||||
|
||||
});
|
@ -1,34 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2016 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('InventorySourcesListDefinition', [])
|
||||
.value('InventorySourcesList', {
|
||||
|
||||
name: 'workflow_inventory_sources',
|
||||
iterator: 'inventory_source',
|
||||
basePath: 'inventory_sources',
|
||||
listTitle: 'INVENTORY SOURCES',
|
||||
index: false,
|
||||
hover: true,
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
ngBind: 'inventory_source.summary_fields.group.name',
|
||||
columnClass: 'col-md-11',
|
||||
simpleTip: {
|
||||
awToolTip: "Inventory: {{inventory_source.summary_fields.inventory.name}}",
|
||||
dataPlacement: "top"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
actions: {},
|
||||
|
||||
fieldActions: {}
|
||||
});
|
@ -5,9 +5,13 @@
|
||||
*************************************************/
|
||||
|
||||
import route from './portal-mode.route';
|
||||
import PortalJobsList from './portal-jobs.list';
|
||||
import PortalJobTemplateList from './portal-job-templates.list';
|
||||
|
||||
export default
|
||||
angular.module('portalMode', [])
|
||||
.factory('PortalJobsList', PortalJobsList)
|
||||
.factory('PortalJobTemplateList', PortalJobTemplateList)
|
||||
.run(['$stateExtender', function($stateExtender){
|
||||
$stateExtender.addState(route);
|
||||
}]);
|
||||
}]);
|
||||
|
44
awx/ui/client/src/portal-mode/portal-job-templates.list.js
Normal file
44
awx/ui/client/src/portal-mode/portal-job-templates.list.js
Normal file
@ -0,0 +1,44 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'job_templates',
|
||||
iterator: 'job_template',
|
||||
editTitle: i18n._('JOB TEMPLATES'),
|
||||
listTitle: i18n._('JOB TEMPLATES'),
|
||||
index: false,
|
||||
hover: true,
|
||||
well: true,
|
||||
emptyListText: i18n._('There are no job templates to display at this time'),
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: i18n._('Name'),
|
||||
columnClass: 'col-lg-5 col-md-5 col-sm-9 col-xs-8',
|
||||
linkTo: '/#/templates/{{job_template.id}}'
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
columnClass: 'col-lg-4 col-md-4 hidden-sm hidden-xs'
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
submit: {
|
||||
label: i18n._('Launch'),
|
||||
mode: 'all',
|
||||
ngClick: 'submitJob(job_template.id)',
|
||||
awToolTip: i18n._('Start a job using this template'),
|
||||
dataPlacement: 'top'
|
||||
}
|
||||
}
|
||||
};}];
|
@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('PortalJobsListDefinition', [])
|
||||
.factory('PortalJobsList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'jobs',
|
||||
@ -44,4 +42,4 @@ export default
|
||||
},
|
||||
|
||||
actions: { }
|
||||
};}]);
|
||||
};}];
|
@ -17,6 +17,7 @@ import RRuleToAPI from './factories/r-rule-to-api.factory';
|
||||
import SchedulePost from './factories/schedule-post.factory';
|
||||
import ToggleSchedule from './factories/toggle-schedule.factory';
|
||||
import SchedulesList from './schedules.list';
|
||||
import ScheduledJobsList from './scheduled-jobs.list';
|
||||
|
||||
export default
|
||||
angular.module('scheduler', [])
|
||||
@ -30,6 +31,7 @@ export default
|
||||
.factory('SchedulePost', SchedulePost)
|
||||
.factory('ToggleSchedule', ToggleSchedule)
|
||||
.factory('SchedulesList', SchedulesList)
|
||||
.factory('ScheduledJobsList', ScheduledJobsList)
|
||||
.directive('schedulerDatePicker', schedulerDatePicker)
|
||||
.run(['$stateExtender', function($stateExtender) {
|
||||
// Inventory sync schedule states registered in: awx/ui/client/src/inventories/manage/groups/main.js
|
||||
|
@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('ScheduledJobsDefinition', [])
|
||||
.factory('ScheduledJobsList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'schedules',
|
||||
@ -85,4 +83,4 @@ export default
|
||||
ngShow: 'schedule.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
}
|
||||
};}]);
|
||||
};}];
|
@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('CompletedJobsDefinition', [])
|
||||
.factory('CompletedJobsList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
// These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view
|
||||
awToolTip: i18n._('Please save and run a job to view'),
|
||||
@ -84,4 +82,4 @@ export default
|
||||
ngShow: 'completed_job.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
}
|
||||
};}]);
|
||||
};}];
|
31
awx/ui/client/src/templates/inventory-sources.list.js
Normal file
31
awx/ui/client/src/templates/inventory-sources.list.js
Normal file
@ -0,0 +1,31 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2016 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default {
|
||||
name: 'workflow_inventory_sources',
|
||||
iterator: 'inventory_source',
|
||||
basePath: 'inventory_sources',
|
||||
listTitle: 'INVENTORY SOURCES',
|
||||
index: false,
|
||||
hover: true,
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
ngBind: 'inventory_source.summary_fields.group.name',
|
||||
columnClass: 'col-md-11',
|
||||
simpleTip: {
|
||||
awToolTip: "Inventory: {{inventory_source.summary_fields.inventory.name}}",
|
||||
dataPlacement: "top"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
actions: {},
|
||||
|
||||
fieldActions: {}
|
||||
};
|
@ -21,6 +21,9 @@ import templateCopyService from './copy-template/template-copy.service';
|
||||
import CallbackHelpInit from './job_templates/factories/callback-help-init.factory';
|
||||
import md5Setup from './job_templates/factories/md-5-setup.factory';
|
||||
import WorkflowForm from './workflows.form';
|
||||
import CompletedJobsList from './completed-jobs.list';
|
||||
import InventorySourcesList from './inventory-sources.list';
|
||||
import TemplateList from './templates.list';
|
||||
|
||||
export default
|
||||
angular.module('templates', [surveyMaker.name, templatesList.name, jobTemplatesAdd.name,
|
||||
@ -33,6 +36,9 @@ angular.module('templates', [surveyMaker.name, templatesList.name, jobTemplatesA
|
||||
.factory('CallbackHelpInit', CallbackHelpInit)
|
||||
.factory('md5Setup', md5Setup)
|
||||
.factory('WorkflowForm', WorkflowForm)
|
||||
.factory('CompletedJobsList', CompletedJobsList)
|
||||
.factory('TemplateList', TemplateList)
|
||||
.value('InventorySourcesList', InventorySourcesList)
|
||||
.config(['$stateProvider', 'stateDefinitionsProvider', '$stateExtenderProvider',
|
||||
function($stateProvider, stateDefinitionsProvider, $stateExtenderProvider) {
|
||||
let stateTree, addJobTemplate, editJobTemplate, addWorkflow, editWorkflow,
|
||||
|
@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('TemplatesListDefinition', [])
|
||||
.factory('TemplateList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'templates',
|
||||
@ -129,4 +127,4 @@ export default
|
||||
ngShow: 'template.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
}
|
||||
};}]);
|
||||
};}];
|
Loading…
Reference in New Issue
Block a user