mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Marked strings for translation in the inventories-hosts directory
This commit is contained in:
parent
ec773f57d9
commit
e723e85bbd
@ -79,17 +79,15 @@ export default ['i18n', function(i18n) {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right',
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host.id)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit host',
|
||||
awToolTip: i18n._('Edit host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host.id)",
|
||||
awToolTip: 'View host',
|
||||
awToolTip: i18n._('View host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: '!host.summary_fields.user_capabilities.edit'
|
||||
}
|
||||
@ -98,18 +96,18 @@ export default ['i18n', function(i18n) {
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
awToolTip: i18n._("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
buttonContent: i18n._('REFRESH')
|
||||
},
|
||||
smart_inventory: {
|
||||
mode: 'all',
|
||||
ngClick: "smartInventory()",
|
||||
awToolTip: "Create a new Smart Inventory from search results.",
|
||||
awToolTip: i18n._("Create a new Smart Inventory from search results."),
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'SMART INVENTORY',
|
||||
buttonContent: i18n._('SMART INVENTORY'),
|
||||
ngShow: 'canAdd && (hosts.length > 0 || !(searchTags | isEmpty))',
|
||||
dataPlacement: "top",
|
||||
ngDisabled: '!enableSmartInventoryButton'
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="hosts.length === 0 && !(searchTags | isEmpty)">
|
||||
<div class="col-lg-12 List-searchNoResults">No records matched your search.</div>
|
||||
<div class="col-lg-12 List-searchNoResults" translate>No records matched your search.</div>
|
||||
</div>
|
||||
<div class="List-noItems" ng-show="hosts.length === 0 && (searchTags | isEmpty)">PLEASE ADD ITEMS TO THIS LIST</div>
|
||||
<div class="List-noItems" ng-show="hosts.length === 0 && (searchTags | isEmpty)" translate>PLEASE ADD ITEMS TO THIS LIST</div>
|
||||
<div class="list-table-container" ng-show="hosts.length > 0">
|
||||
<table id="hosts_table" class="List-table table-no-border" is-extended="false">
|
||||
<thead>
|
||||
@ -44,15 +44,15 @@
|
||||
<th base-path="hosts" collection="hosts" dataset="host_dataset" column-sort="" column-field="active_failures" column-iterator="host" column-no-sort="true" column-label="" column-custom-class="status-column List-staticColumn--smallStatus" query-set="host_queryset"></th>
|
||||
<th base-path="hosts" collection="hosts" dataset="host_dataset" column-sort="" column-field="name" column-iterator="host" column-no-sort="undefined" column-label="Name" column-custom-class="col-lg-6 col-md-8 col-sm-8 col-xs-7" query-set="host_queryset"></th>
|
||||
<th base-path="hosts" collection="hosts" dataset="host_dataset" column-sort="" column-field="inventory" column-iterator="host" column-no-sort="undefined" column-label="Inventory" column-custom-class="col-lg-5 col-md-4 col-sm-4 hidden-xs elllipsis" query-set="host_queryset"></th>
|
||||
<th class="List-tableHeader List-tableHeader--actions actions-column col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right">Actions</th>
|
||||
<th class="List-tableHeader List-tableHeader--actions actions-column col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right" translate>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-class="[host.active_class]" id="{{ host.id }}" class="List-tableRow host_class" ng-repeat="host in hosts track by host.id">
|
||||
<td class="List-tableCell toggleHost-column List-staticColumn--toggle">
|
||||
<div class="ScheduleToggle" ng-class="{'is-on': host.enabled, 'ScheduleToggle--disabled': host.has_inventory_sources}" aw-tool-tip="<p>Indicates if a host is available and should be included in running jobs.</p><p>For hosts that are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.</p>" data-placement="right" data-tip-watch="undefined">
|
||||
<button ng-disabled="host.has_inventory_sources" ng-show="host.enabled" class="ScheduleToggle-switch is-on" ng-click="toggleHost($event, host)">ON</button>
|
||||
<button ng-disabled="host.has_inventory_sources" ng-show="!host.enabled" class="ScheduleToggle-switch" ng-click="toggleHost($event, host)">OFF</button>
|
||||
<button ng-disabled="host.has_inventory_sources" ng-show="host.enabled" class="ScheduleToggle-switch is-on" ng-click="toggleHost($event, host)" translate>ON</button>
|
||||
<button ng-disabled="host.has_inventory_sources" ng-show="!host.enabled" class="ScheduleToggle-switch" ng-click="toggleHost($event, host)" translate>OFF</button>
|
||||
</div>
|
||||
</td>
|
||||
<td class="List-tableCell active_failures-column status-column List-staticColumn--smallStatus">
|
||||
|
||||
@ -4,66 +4,68 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'groups',
|
||||
iterator: 'group',
|
||||
editTitle: '{{ host.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
trackBy: 'group.id',
|
||||
basePath: 'api/v2/hosts/{{$stateParams.host_id}}/groups/',
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
name: 'groups',
|
||||
iterator: 'group',
|
||||
editTitle: '{{ host.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
trackBy: 'group.id',
|
||||
basePath: 'api/v2/hosts/{{$stateParams.host_id}}/groups/',
|
||||
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: i18n._('Groups'),
|
||||
key: true,
|
||||
ngClick: "editGroup(group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
}
|
||||
},
|
||||
name: {
|
||||
label: 'Groups',
|
||||
key: true,
|
||||
ngClick: "editGroup(group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: i18n._("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('REFRESH')
|
||||
},
|
||||
associate: {
|
||||
mode: 'all',
|
||||
ngClick: "associateGroup()",
|
||||
awToolTip: i18n._("Associate this host with a new group"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ' + i18n._('ASSOCIATE GROUP'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
associate: {
|
||||
mode: 'all',
|
||||
ngClick: "associateGroup()",
|
||||
awToolTip: "Associate this host with a new group",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ASSOCIATE GROUP',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "disassociateHost(group)",
|
||||
awToolTip: 'Disassociate host',
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.delete"
|
||||
fieldActions: {
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "disassociateHost(group)",
|
||||
awToolTip: i18n._('Disassociate host'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-content Modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title ng-binding">
|
||||
Disassociate Host
|
||||
<span translate>Disassociate Host</span>
|
||||
<a href="" id="awp-promote" href=""
|
||||
aw-pop-over="<dl><dt>Disassociate</dt><dd>Disassociation will remove a host from a group but the host will remain in the inventory.</dd></dl>" aw-tool-tip="Click for help"
|
||||
data-placement="right"
|
||||
@ -19,12 +19,12 @@
|
||||
</div>
|
||||
<div class="Modal-body">
|
||||
<div>
|
||||
<div class="Prompt-bodyQuery">Are you sure you want to disassociate the host below from {{disassociateGroup.name}}?</div>
|
||||
<div class="Prompt-bodyQuery"><span translate>Are you sure you want to disassociate the host below from</span> {{disassociateGroup.name}}?</div>
|
||||
<div class="Prompt-bodyTarget">{{ host.name }}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#host-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton">CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton">DISASSOCIATE</a>
|
||||
<a href="#" data-target="#host-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton" translate>CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton" translate>DISASSOCIATE</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -30,9 +30,9 @@ export default {
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
ListDefinition: ['CredentialList', function(CredentialList) {
|
||||
ListDefinition: ['CredentialList', 'i18n', function(CredentialList, i18n) {
|
||||
let list = _.cloneDeep(CredentialList);
|
||||
list.lookupConfirmText = 'SELECT';
|
||||
list.lookupConfirmText = i18n._('SELECT');
|
||||
return list;
|
||||
}],
|
||||
Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath',
|
||||
|
||||
@ -12,23 +12,22 @@
|
||||
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
addTitle: 'EXECUTE COMMAND',
|
||||
addTitle: i18n._('EXECUTE COMMAND'),
|
||||
name: 'adhoc',
|
||||
well: true,
|
||||
forceListeners: true,
|
||||
|
||||
fields: {
|
||||
module_name: {
|
||||
label: 'Module',
|
||||
label: i18n._('Module'),
|
||||
excludeModal: true,
|
||||
type: 'select',
|
||||
ngOptions: 'module.label for module in adhoc_module_options' +
|
||||
' track by module.value',
|
||||
ngChange: 'moduleChange()',
|
||||
required: true,
|
||||
awPopOver:'<p>These are the modules that Tower supports ' +
|
||||
'running commands against.',
|
||||
dataTitle: 'Module',
|
||||
awPopOver: i18n._('These are the modules that Tower supports running commands against.'),
|
||||
dataTitle: i18n._('Module'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body'
|
||||
},
|
||||
@ -37,13 +36,13 @@ export default ['i18n', function(i18n) {
|
||||
type: 'text',
|
||||
awPopOverWatch: 'argsPopOver',
|
||||
awPopOver: '{{ argsPopOver }}',
|
||||
dataTitle: 'Arguments',
|
||||
dataTitle: i18n._('Arguments'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body',
|
||||
autocomplete: false
|
||||
},
|
||||
limit: {
|
||||
label: 'Limit',
|
||||
label: i18n._('Limit'),
|
||||
type: 'text',
|
||||
|
||||
awPopOver: '<p>The pattern used to target hosts in the ' +
|
||||
@ -53,12 +52,12 @@ export default ['i18n', function(i18n) {
|
||||
'<a id=\"adhoc_form_hostpatterns_doc_link\"' +
|
||||
'href=\"http://docs.ansible.com/intro_patterns.html\" ' +
|
||||
'target=\"_blank\">here</a>.</p>',
|
||||
dataTitle: 'Limit',
|
||||
dataTitle: i18n._('Limit'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body'
|
||||
},
|
||||
credential: {
|
||||
label: 'Machine Credential',
|
||||
label: i18n._('Machine Credential'),
|
||||
type: 'lookup',
|
||||
list: 'CredentialList',
|
||||
basePath: 'credentials',
|
||||
@ -70,7 +69,7 @@ export default ['i18n', function(i18n) {
|
||||
'Choose the credential containing ' +
|
||||
'the username and SSH key or password that Ansbile ' +
|
||||
'will need to log into the remote hosts.</p>',
|
||||
dataTitle: 'Credential',
|
||||
dataTitle: i18n._('Credential'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body',
|
||||
awRequiredWhen: {
|
||||
@ -79,17 +78,17 @@ export default ['i18n', function(i18n) {
|
||||
}
|
||||
},
|
||||
become_enabled: {
|
||||
label: 'Enable Privilege Escalation',
|
||||
label: i18n._('Enable Privilege Escalation'),
|
||||
type: 'checkbox',
|
||||
|
||||
column: 2,
|
||||
awPopOver: "<p>If enabled, run this playbook as an administrator. This is the equivalent of passing the<code> --become</code> option to the <code> ansible</code> command. </p>",
|
||||
dataPlacement: 'right',
|
||||
dataTitle: 'Become Privilege Escalation',
|
||||
dataTitle: i18n._('Become Privilege Escalation'),
|
||||
dataContainer: "body"
|
||||
},
|
||||
verbosity: {
|
||||
label: 'Verbosity',
|
||||
label: i18n._('Verbosity'),
|
||||
excludeModal: true,
|
||||
type: 'select',
|
||||
ngOptions: 'verbosity.label for verbosity in ' +
|
||||
@ -98,13 +97,13 @@ export default ['i18n', function(i18n) {
|
||||
required: true,
|
||||
awPopOver:'<p>These are the verbosity levels for standard ' +
|
||||
'out of the command run that are supported.',
|
||||
dataTitle: 'Verbosity',
|
||||
dataTitle: i18n._('Verbosity'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body',
|
||||
"default": 1
|
||||
},
|
||||
forks: {
|
||||
label: 'Forks',
|
||||
label: i18n._('Forks'),
|
||||
id: 'forks-number',
|
||||
type: 'number',
|
||||
integer: true,
|
||||
@ -117,7 +116,7 @@ export default ['i18n', function(i18n) {
|
||||
awPopOver: '<p>The number of parallel or simultaneous processes to use while executing the command. 0 signifies ' +
|
||||
'the default value from the <a id="ansible_forks_docs" href=\"http://docs.ansible.com/intro_configuration.html#the-ansible-configuration-file\" ' +
|
||||
' target=\"_blank\">ansible configuration file</a>.</p>',
|
||||
dataTitle: 'Forks',
|
||||
dataTitle: i18n._('Forks'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body"
|
||||
},
|
||||
@ -143,11 +142,11 @@ export default ['i18n', function(i18n) {
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true,
|
||||
label: 'Reset',
|
||||
label: i18n._('Reset'),
|
||||
'class': 'btn btn-sm Form-cancelButton'
|
||||
},
|
||||
launch: {
|
||||
label: 'Save',
|
||||
label: i18n._('Save'),
|
||||
ngClick: 'launchJob()',
|
||||
ngDisabled: true,
|
||||
'class': 'btn btn-sm List-buttonSubmit launchButton'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export default ['templateUrl', 'Wait', '$filter', '$compile',
|
||||
function(templateUrl, Wait, $filter, $compile) {
|
||||
export default ['templateUrl', 'Wait', '$filter', '$compile', 'i18n',
|
||||
function(templateUrl, Wait, $filter, $compile, i18n) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: false,
|
||||
@ -50,9 +50,9 @@ export default ['templateUrl', 'Wait', '$filter', '$compile',
|
||||
html = "<table class=\"table table-condensed flyout\" style=\"width: 100%\">\n";
|
||||
html += "<thead>\n";
|
||||
html += "<tr>";
|
||||
html += "<th>Status</th>";
|
||||
html += "<th>Finished</th>";
|
||||
html += "<th>Name</th>";
|
||||
html += "<th>" + i18n._("Status") + "</th>";
|
||||
html += "<th>" + i18n._("Finished") + "</th>";
|
||||
html += "<th>" + i18n._("Name") + "</th>";
|
||||
html += "</tr>\n";
|
||||
html += "</thead>\n";
|
||||
html += "<tbody>\n";
|
||||
@ -70,7 +70,7 @@ export default ['templateUrl', 'Wait', '$filter', '$compile',
|
||||
html += "</table>\n";
|
||||
}
|
||||
else {
|
||||
html = "<p>No recent job data available for this inventory.</p>\n";
|
||||
html = "<p>" + i18n._("No recent job data available for this inventory.") + "</p>\n";
|
||||
}
|
||||
attachElem(event, html, title);
|
||||
};
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
function InventoriesList($scope,
|
||||
$filter, Rest, InventoryList, Prompt,
|
||||
ProcessErrors, GetBasePath, Wait, $state,
|
||||
Dataset, canAdd) {
|
||||
Dataset, canAdd, i18n) {
|
||||
|
||||
let list = InventoryList,
|
||||
defaultUrl = GetBasePath('inventory');
|
||||
@ -40,33 +40,33 @@ function InventoriesList($scope,
|
||||
if (inventory.has_inventory_sources) {
|
||||
if (inventory.inventory_sources_with_failures > 0) {
|
||||
inventory.syncStatus = 'error';
|
||||
inventory.syncTip = inventory.inventory_sources_with_failures + ' sources with sync failures. Click for details';
|
||||
inventory.syncTip = inventory.inventory_sources_with_failures + i18n._(' sources with sync failures. Click for details');
|
||||
}
|
||||
else {
|
||||
inventory.syncStatus = 'successful';
|
||||
inventory.syncTip = 'No inventory sync failures. Click for details.';
|
||||
inventory.syncTip = i18n._('No inventory sync failures. Click for details.');
|
||||
}
|
||||
}
|
||||
else {
|
||||
inventory.syncStatus = 'na';
|
||||
inventory.syncTip = 'Not configured for inventory sync.';
|
||||
inventory.syncTip = i18n._('Not configured for inventory sync.');
|
||||
inventory.launch_class = "btn-disabled";
|
||||
}
|
||||
|
||||
if (inventory.has_active_failures) {
|
||||
inventory.hostsStatus = 'error';
|
||||
inventory.hostsTip = inventory.hosts_with_active_failures + ' hosts with failures. Click for details.';
|
||||
inventory.hostsTip = inventory.hosts_with_active_failures + i18n._(' hosts with failures. Click for details.');
|
||||
}
|
||||
else if (inventory.total_hosts) {
|
||||
inventory.hostsStatus = 'successful';
|
||||
inventory.hostsTip = 'No hosts with failures. Click for details.';
|
||||
inventory.hostsTip = i18n._('No hosts with failures. Click for details.');
|
||||
}
|
||||
else {
|
||||
inventory.hostsStatus = 'none';
|
||||
inventory.hostsTip = 'Inventory contains 0 hosts.';
|
||||
inventory.hostsTip = i18n._('Inventory contains 0 hosts.');
|
||||
}
|
||||
|
||||
inventory.kind_label = inventory.kind === '' ? 'Inventory' : (inventory.kind === 'smart' ? 'Smart Inventory': 'Inventory');
|
||||
inventory.kind_label = inventory.kind === '' ? 'Inventory' : (inventory.kind === 'smart' ? i18n._('Smart Inventory'): i18n._('Inventory'));
|
||||
}
|
||||
|
||||
$scope.editInventory = function (inventory) {
|
||||
@ -97,10 +97,10 @@ function InventoriesList($scope,
|
||||
|
||||
Prompt({
|
||||
hdr: 'Delete',
|
||||
body: '<div class="Prompt-bodyQuery">Are you sure you want to delete the inventory below?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>' +
|
||||
'<div class="Prompt-bodyNote"><span class="Prompt-bodyNote--emphasis">Note:</span> The inventory will be in a pending status until the final delete is processed.</div>',
|
||||
body: '<div class="Prompt-bodyQuery">' + i18n._('Are you sure you want to delete the inventory below?') + '</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>' +
|
||||
'<div class="Prompt-bodyNote"><span class="Prompt-bodyNote--emphasis">Note:</span> ' + i18n._('The inventory will be in a pending status until the final delete is processed.') + '</div>',
|
||||
action: action,
|
||||
actionText: 'DELETE'
|
||||
actionText: i18n._('DELETE')
|
||||
});
|
||||
};
|
||||
|
||||
@ -129,5 +129,5 @@ function InventoriesList($scope,
|
||||
export default ['$scope',
|
||||
'$filter', 'Rest', 'InventoryList', 'Prompt',
|
||||
'ProcessErrors', 'GetBasePath', 'Wait',
|
||||
'$state', 'Dataset', 'canAdd', InventoriesList
|
||||
'$state', 'Dataset', 'canAdd', 'i18n', InventoriesList
|
||||
];
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export default ['templateUrl', '$compile', 'Wait', '$filter',
|
||||
function(templateUrl, $compile, Wait, $filter) {
|
||||
export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n',
|
||||
function(templateUrl, $compile, Wait, $filter, i18n) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: false,
|
||||
@ -52,16 +52,16 @@ export default ['templateUrl', '$compile', 'Wait', '$filter',
|
||||
html = "<table class=\"table table-condensed flyout\" style=\"width: 100%\">\n";
|
||||
html += "<thead>\n";
|
||||
html += "<tr>";
|
||||
html += "<th>Status</th>";
|
||||
html += "<th>Last Sync</th>";
|
||||
html += "<th>Source</th>";
|
||||
html += "<th>" + i18n._("Status") + "</th>";
|
||||
html += "<th>" + i18n._("Last Sync") + "</th>";
|
||||
html += "<th>" + i18n._("Source") + "</th>";
|
||||
html += "</tr>";
|
||||
html += "</thead>\n";
|
||||
html += "<tbody>\n";
|
||||
data.results.forEach( function(row) {
|
||||
if (row.related.last_update) {
|
||||
html += "<tr>";
|
||||
html += `<td><a href="" ng-click="viewJob('${row.related.last_update}')" aw-tool-tip="${row.status.charAt(0).toUpperCase() + row.status.slice(1)}. Click for details" aw-tip-placement="top"><i class="SmartStatus-tooltip--${row.status} fa icon-job-${row.status}"></i></a></td>`;
|
||||
html += `<td><a href="" ng-click="viewJob('${row.related.last_update}')" aw-tool-tip="${row.status.charAt(0).toUpperCase() + row.status.slice(1)}. ` + i18n._("Click for details") + `" aw-tip-placement="top"><i class="SmartStatus-tooltip--${row.status} fa icon-job-${row.status}"></i></a></td>`;
|
||||
html += "<td>" + ($filter('longDate')(row.last_updated)) + "</td>";
|
||||
html += "<td><a href=\"\" ng-click=\"viewJob('" + row.related.last_update + "')\">" + $filter('sanitize')(ellipsis(row.name)) + "</a></td>";
|
||||
html += "</tr>\n";
|
||||
|
||||
@ -35,7 +35,7 @@ export default ['i18n', function(i18n) {
|
||||
nosort: true
|
||||
},
|
||||
id: {
|
||||
label: 'ID',
|
||||
label: i18n._('ID'),
|
||||
ngClick:"viewjobResults(completed_job)",
|
||||
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumnAdjacent',
|
||||
awToolTip: "{{ completed_job.status_tip }}",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export default
|
||||
function GetHostsStatusMsg() {
|
||||
['i18n', function(i18n) {
|
||||
return function(params) {
|
||||
var active_failures = params.active_failures,
|
||||
total_hosts = params.total_hosts,
|
||||
@ -8,18 +8,18 @@ export default
|
||||
// Return values for use on host status indicator
|
||||
|
||||
if (active_failures > 0) {
|
||||
tip = total_hosts + ((total_hosts === 1) ? ' host' : ' hosts') + '. ' + active_failures + ' with failed jobs.';
|
||||
tip = total_hosts + ((total_hosts === 1) ? ' host' : ' hosts') + '. ' + active_failures + i18n._(' with failed jobs.');
|
||||
html_class = 'error';
|
||||
failures = true;
|
||||
} else {
|
||||
failures = false;
|
||||
if (total_hosts === 0) {
|
||||
// no hosts
|
||||
tip = "Contains 0 hosts.";
|
||||
tip = i18n._("Contains 0 hosts.");
|
||||
html_class = 'none';
|
||||
} else {
|
||||
// many hosts with 0 failures
|
||||
tip = total_hosts + ((total_hosts === 1) ? ' host' : ' hosts') + '. No job failures';
|
||||
tip = total_hosts + ((total_hosts === 1) ? ' host' : ' hosts') + '. ' + i18n._('No job failures');
|
||||
html_class = 'success';
|
||||
}
|
||||
}
|
||||
@ -30,4 +30,4 @@ export default
|
||||
'class': html_class
|
||||
};
|
||||
};
|
||||
}
|
||||
}];
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
export default ['i18n',
|
||||
function(i18n){
|
||||
return {
|
||||
addTitle: 'CREATE GROUP',
|
||||
addTitle: i18n._('CREATE GROUP'),
|
||||
editTitle: '{{ name }}',
|
||||
showTitle: true,
|
||||
name: 'group',
|
||||
@ -29,26 +29,26 @@ function(i18n){
|
||||
tabs: true,
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
tab: 'properties'
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
tab: 'properties'
|
||||
},
|
||||
group_variables: {
|
||||
realName: 'variables',
|
||||
label: 'Variables',
|
||||
label: i18n._('Variables'),
|
||||
type: 'textarea',
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
rows: 6,
|
||||
'default': '---',
|
||||
dataTitle: 'Group Variables',
|
||||
dataTitle: i18n._('Group Variables'),
|
||||
dataPlacement: 'right',
|
||||
parseTypeName: 'parseType',
|
||||
awPopOver: "<p>Variables defined here apply to all child groups and hosts.</p>" +
|
||||
|
||||
@ -4,102 +4,104 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'groups',
|
||||
iterator: 'group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'group.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
name: 'groups',
|
||||
iterator: 'group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'group.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: i18n._('Groups'),
|
||||
key: true,
|
||||
ngClick: "editGroup(group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
}
|
||||
},
|
||||
name: {
|
||||
label: 'Groups',
|
||||
key: true,
|
||||
ngClick: "editGroup(group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: i18n._("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('REFRESH')
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
ngDisabled: '!groupsSelected',
|
||||
ngClick: 'setAdhocPattern()',
|
||||
awToolTip: i18n._("Select an inventory source by clicking the check box beside it. The inventory source can be a single group or a selection of multiple groups."),
|
||||
dataPlacement: 'top',
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('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: i18n._("Create a new group"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ' + i18n._('ADD GROUP'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(group.id)",
|
||||
awToolTip: i18n._('Edit group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(group.id)",
|
||||
awToolTip: i18n._('View group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "!group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "deleteGroup(group)",
|
||||
awToolTip: i18n._('Disassociate group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
ngDisabled: '!groupsSelected',
|
||||
ngClick: 'setAdhocPattern()',
|
||||
awToolTip: "Select an inventory source by clicking the check box beside it. The inventory source can be a single group or a selection of multiple groups.",
|
||||
dataPlacement: 'top',
|
||||
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',
|
||||
|
||||
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: 'Disassociate group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-content Modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title ng-binding">
|
||||
Delete Group
|
||||
<span translate>Delete Group</span>
|
||||
<a href="" id="awp-promote" href=""
|
||||
aw-pop-over="<dl><dt>Delete</dt><dd>Deletes groups and hosts associated with the group being deleted. If a group or host is associated with other groups, it will still exist within those groups. Otherwise, the associated groups and hosts will no longer appear in the inventory.</dd>\n<dt style='margin-top: 5px;'>Promote</dt><dd>Groups and hosts associated with the group being removed will be promoted root level. Note: groups already associated with other groups cannot be promoted.</dd></dl>\n" aw-tool-tip="Click for help"
|
||||
data-placement="right"
|
||||
@ -21,42 +21,42 @@
|
||||
<div ng-show="toDelete.total_groups > 0 || toDelete.total_hosts > 0">
|
||||
<div>
|
||||
<p class="Prompt-bodyQuery">Deleting group <em>{{ toDelete.name }}</em>.
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0"> This group contains {{ toDelete.total_groups }} groups and {{ toDelete.total_hosts }} hosts. </span>
|
||||
<span ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0"> This group contains {{ toDelete.total_hosts }} hosts. </span>
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0"> This group contains {{ toDelete.total_groups }} groups. </span>
|
||||
Delete or promote the group's children?</p>
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0"> <translate>This group contains</translate> {{ toDelete.total_groups }} <translate>groups and</translate> {{ toDelete.total_hosts }} <translate>hosts</translate>. </span>
|
||||
<span ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0"> <translate>This group contains</translate> {{ toDelete.total_hosts }} <translate>hosts</translate>. </span>
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0"> <translate>This group contains</translate> {{ toDelete.total_groups }} <translate>groups</translate>. </span>
|
||||
<translate>Delete or promote the group's children?</translate></p>
|
||||
<div style="margin: 15px auto;">
|
||||
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> Promote groups and hosts
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> <translate>Promote groups and hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> Delete groups and hosts
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> <translate>Delete groups and hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> Promote groups
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> <translate>Promote groups</translate>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> Delete groups
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> <translate>Delete groups</translate>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio" ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> Promote hosts
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> <translate>Promote hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> Delete hosts
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> <translate>Delete hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@ -66,12 +66,12 @@
|
||||
|
||||
</div>
|
||||
<div ng-show="toDelete.total_groups == 0 && toDelete.total_hosts == 0">
|
||||
<div class="Prompt-bodyQuery">Are you sure you want to permanently delete the group below from the inventory?</div>
|
||||
<div class="Prompt-bodyQuery" translate>Are you sure you want to permanently delete the group below from the inventory?</div>
|
||||
<div class="Prompt-bodyTarget">{{ toDelete.name }}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#group-delete-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton">CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDelete()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton">DELETE</a>
|
||||
<a href="#" data-target="#group-delete-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton" translate>CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDelete()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton" translate>DELETE</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-content Modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title ng-binding">
|
||||
Disassociate Group
|
||||
<translate>Disassociate Group</translate>
|
||||
<a href="" id="awp-promote" href=""
|
||||
aw-pop-over="<dl><dt>Disassociate</dt><dd>Disassociates this group from the currently targeted parent group.</dd></dl>"
|
||||
aw-tool-tip="Click for help"
|
||||
@ -22,12 +22,12 @@
|
||||
</div>
|
||||
<div class="Modal-body">
|
||||
<div>
|
||||
<div class="Prompt-bodyQuery">Are you sure you want to disassociate the group below from {{disassociateFrom.name}}?</div>
|
||||
<div class="Prompt-bodyQuery"><translate>Are you sure you want to disassociate the group below from</translate> {{disassociateFrom.name}}?</div>
|
||||
<div class="Prompt-bodyTarget">{{ toDisassociate.name }}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#group-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton">CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton">DISASSOCIATE</a>
|
||||
<a href="#" data-target="#group-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton" translate>CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton" translate>DISASSOCIATE</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
export default ['i18n',
|
||||
function(i18n){
|
||||
return {
|
||||
addTitle: 'CREATE GROUP',
|
||||
addTitle: i18n._('CREATE GROUP'),
|
||||
editTitle: '{{ name }}',
|
||||
showTitle: true,
|
||||
name: 'nested_group',
|
||||
@ -30,26 +30,26 @@ function(i18n){
|
||||
tabs: true,
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
tab: 'properties'
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
tab: 'properties'
|
||||
},
|
||||
nested_group_variables: {
|
||||
realName: 'variables',
|
||||
label: 'Variables',
|
||||
label: i18n._('Variables'),
|
||||
type: 'textarea',
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
rows: 6,
|
||||
'default': '---',
|
||||
dataTitle: 'Group Variables',
|
||||
dataTitle: i18n._('Group Variables'),
|
||||
dataPlacement: 'right',
|
||||
parseTypeName: 'parseType',
|
||||
awPopOver: "<p>Variables defined here apply to all child groups and hosts.</p>" +
|
||||
|
||||
@ -4,116 +4,113 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'nested_groups',
|
||||
iterator: 'nested_group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'nested_group.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
name: 'nested_groups',
|
||||
iterator: 'nested_group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'nested_group.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ nested_group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + nested_group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ nested_group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + nested_group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: i18n._('Groups'),
|
||||
key: true,
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
}
|
||||
},
|
||||
name: {
|
||||
label: 'Groups',
|
||||
key: true,
|
||||
|
||||
// ngClick: "groupSelect(group.id)",
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: i18n._("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('REFRESH')
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
ngDisabled: '!groupsSelected',
|
||||
ngClick: 'setAdhocPattern()',
|
||||
awToolTip: i18n._("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."),
|
||||
dataPlacement: 'top',
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('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"
|
||||
},
|
||||
add: {
|
||||
mode: 'all',
|
||||
type: 'buttonDropdown',
|
||||
awToolTip: i18n._("Add a group"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ' + i18n._('ADD'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
options: [
|
||||
{
|
||||
optionContent: i18n._('Existing Group'),
|
||||
optionSref: '.associate',
|
||||
ngShow: 'canAdd'
|
||||
},
|
||||
{
|
||||
optionContent: i18n._('New Group'),
|
||||
optionSref: '.add',
|
||||
ngShow: 'canAdd'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
edit: {
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: i18n._('Edit group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: i18n._('View group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "!nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
mode: 'all',
|
||||
ngClick: "disassociateGroup(nested_group)",
|
||||
awToolTip: i18n._('Delete group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
ngDisabled: '!groupsSelected',
|
||||
ngClick: '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.",
|
||||
dataPlacement: 'top',
|
||||
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"
|
||||
},
|
||||
add: {
|
||||
mode: 'all',
|
||||
type: 'buttonDropdown',
|
||||
awToolTip: "Add a group",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
options: [
|
||||
{
|
||||
optionContent: 'Existing Group',
|
||||
optionSref: '.associate',
|
||||
ngShow: 'canAdd'
|
||||
},
|
||||
{
|
||||
optionContent: 'New Group',
|
||||
optionSref: '.add',
|
||||
ngShow: 'canAdd'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: 'Edit group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: 'View group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "!nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "disassociateGroup(nested_group)",
|
||||
awToolTip: 'Delete group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import {templateUrl} from '../../../../../../shared/template-url/template-url.factory';
|
||||
import { N_ } from '../../../../../../i18n';
|
||||
|
||||
export default {
|
||||
name: 'inventories.edit.groups.edit.nested_groups',
|
||||
@ -15,7 +16,7 @@ export default {
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: "inventories.edit.groups.edit",
|
||||
label: "ASSOCIATED GROUPS"
|
||||
label: N_("ASSOCIATED GROUPS")
|
||||
},
|
||||
views: {
|
||||
// 'related@inventories.edit.groups.edit': {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-content Modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title ng-binding">
|
||||
Disassociate Host
|
||||
<translate>Disassociate Host</translate>
|
||||
<a href="" id="awp-promote" href=""
|
||||
aw-pop-over="<dl><dt>Disassociate</dt><dd>Disassociates this host from the currently targeted parent group.</dd></dl>"
|
||||
aw-tool-tip="Click for help"
|
||||
@ -22,12 +22,12 @@
|
||||
</div>
|
||||
<div class="Modal-body">
|
||||
<div>
|
||||
<div class="Prompt-bodyQuery">Are you sure you want to disassociate the host below from {{disassociateFrom.name}}?</div>
|
||||
<div class="Prompt-bodyQuery"><translate>Are you sure you want to disassociate the host below from</translate> {{disassociateFrom.name}}?</div>
|
||||
<div class="Prompt-bodyTarget">{{ toDisassociate.name }}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#host-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton">CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton">DISASSOCIATE</a>
|
||||
<a href="#" data-target="#host-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton" translate>CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton" translate>DISASSOCIATE</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -22,7 +22,6 @@ function(i18n) {
|
||||
formLabelSize: 'col-lg-3',
|
||||
formFieldSize: 'col-lg-9',
|
||||
iterator: 'host',
|
||||
// activeEditState: 'inventories.edit.hosts.edit',
|
||||
activeEditState: 'inventories.edit.groups.edit.nested_hosts.edit',
|
||||
stateTree: 'inventories.edit.groups.edit.nested_hosts',
|
||||
headerFields:{
|
||||
|
||||
@ -55,7 +55,7 @@ export default {
|
||||
},
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Hosts',
|
||||
label: N_('Hosts'),
|
||||
ngClick: "editHost(nested_host.id)",
|
||||
ngClass: "{ 'host-disabled-label': !nested_host.enabled }",
|
||||
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
|
||||
@ -69,17 +69,15 @@ export default {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right',
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(nested_host.id)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit host',
|
||||
awToolTip: N_('Edit host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'nested_host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(nested_host.id)",
|
||||
awToolTip: 'View host',
|
||||
awToolTip: N_('View host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: '!nested_host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
@ -87,7 +85,7 @@ export default {
|
||||
//label: 'Delete',
|
||||
ngClick: "disassociateHost(nested_host)",
|
||||
icon: 'icon-trash',
|
||||
awToolTip: 'Disassociate host',
|
||||
awToolTip: N_('Disassociate host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'nested_host.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
@ -98,19 +96,19 @@ export default {
|
||||
mode: 'all',
|
||||
ngDisabled: '!hostsSelected',
|
||||
ngClick: '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.",
|
||||
awToolTip: N_("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."),
|
||||
dataPlacement: 'top',
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'RUN COMMANDS',
|
||||
buttonContent: N_('RUN COMMANDS'),
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
// TODO: we don't always want to show this
|
||||
ngShow: true
|
||||
},
|
||||
system_tracking: {
|
||||
buttonContent: 'System Tracking',
|
||||
buttonContent: N_('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.",
|
||||
awToolTip: N_("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',
|
||||
@ -122,28 +120,28 @@ export default {
|
||||
},
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
awToolTip: N_("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
buttonContent: N_('REFRESH')
|
||||
},
|
||||
add: {
|
||||
mode: 'all',
|
||||
type: 'buttonDropdown',
|
||||
awToolTip: "Add a host",
|
||||
awToolTip: N_("Add a host"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD',
|
||||
buttonContent: '+ ' + N_('ADD'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
options: [
|
||||
{
|
||||
optionContent: 'Existing Host',
|
||||
optionContent: N_('Existing Host'),
|
||||
optionSref: '.associate',
|
||||
ngShow: 'canAdd'
|
||||
},
|
||||
{
|
||||
optionContent: 'New Host',
|
||||
optionContent: N_('New Host'),
|
||||
optionSref: '.add',
|
||||
ngShow: 'canAdd'
|
||||
}
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
// import HostsService from './../hosts/host.service';
|
||||
export default ['$scope', 'ListDefinition', '$rootScope', 'GetBasePath',
|
||||
'rbacUiControlService', 'Dataset', '$state', '$filter', 'Prompt', 'Wait',
|
||||
'HostsService', 'SetStatus', 'canAdd',
|
||||
'HostsService', 'SetStatus', 'canAdd', 'i18n',
|
||||
function($scope, ListDefinition, $rootScope, GetBasePath,
|
||||
rbacUiControlService, Dataset, $state, $filter, Prompt, Wait,
|
||||
HostsService, SetStatus, canAdd) {
|
||||
HostsService, SetStatus, canAdd, i18n) {
|
||||
|
||||
let list = ListDefinition;
|
||||
|
||||
@ -90,7 +90,7 @@ export default ['$scope', 'ListDefinition', '$rootScope', 'GetBasePath',
|
||||
$state.go('inventories.edit.hosts.edit.insights', {inventory_id: host.inventory_id, host_id:host.id});
|
||||
};
|
||||
$scope.deleteHost = function(id, name){
|
||||
var body = '<div class=\"Prompt-bodyQuery\">Are you sure you want to permanently delete the host below from the inventory?</div><div class=\"Prompt-bodyTarget\">' + $filter('sanitize')(name) + '</div>';
|
||||
var body = '<div class=\"Prompt-bodyQuery\">' + i18n._('Are you sure you want to permanently delete the host below from the inventory?') + '</div><div class=\"Prompt-bodyTarget\">' + $filter('sanitize')(name) + '</div>';
|
||||
var action = function(){
|
||||
delete $rootScope.promptActionBtnClass;
|
||||
Wait('start');
|
||||
|
||||
@ -9,7 +9,8 @@ export default
|
||||
'$q',
|
||||
'$filter',
|
||||
'$state',
|
||||
function(templateUrl, Wait, Rest, GetBasePath, ProcessErrors, Prompt, $q, $filter, $state) {
|
||||
'i18n',
|
||||
function(templateUrl, Wait, Rest, GetBasePath, ProcessErrors, Prompt, $q, $filter, $state, i18n) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: false,
|
||||
@ -78,7 +79,7 @@ export default
|
||||
|
||||
Prompt({
|
||||
hdr: 'Remove host from ' + group.name ,
|
||||
body: '<div class="Prompt-bodyQuery">Confirm the removal of the <span class="Prompt-emphasis">' + $filter('sanitize')(host.name) + '</span> from the <span class="Prompt-emphasis">' + $filter('sanitize')(group.name) + '</span> group.</div>',
|
||||
body: '<div class="Prompt-bodyQuery">' + i18n._('Confirm the removal of the') + ' <span class="Prompt-emphasis">' + $filter('sanitize')(host.name) + '</span> ' + i18n._('from the') + ' <span class="Prompt-emphasis">' + $filter('sanitize')(group.name) + '</span> ' + i18n._('group') + '.</div>',
|
||||
action: action,
|
||||
actionText: 'REMOVE'
|
||||
});
|
||||
|
||||
@ -9,6 +9,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="LabelList-seeMoreLess" ng-show="count > 5 && seeMoreInactive"
|
||||
ng-click="seeMore()">View More</div>
|
||||
ng-click="seeMore()" translate>View More</div>
|
||||
<div class="LabelList-seeMoreLess" ng-show="count > 5 && !seeMoreInactive"
|
||||
ng-click="seeLess()">View Less</div>
|
||||
ng-click="seeLess()" translate>View Less</div>
|
||||
|
||||
@ -22,8 +22,6 @@ function(i18n) {
|
||||
formLabelSize: 'col-lg-3',
|
||||
formFieldSize: 'col-lg-9',
|
||||
iterator: 'host',
|
||||
// activeEditState: 'inventories.edit.hosts.edit',
|
||||
// activeEditState: 'inventories.edit.groups.edit.nested_hosts.edit',
|
||||
stateTree: 'inventories.edit.hosts',
|
||||
headerFields:{
|
||||
enabled: {
|
||||
|
||||
@ -14,7 +14,6 @@ export default ['i18n', function(i18n) {
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
// hasChildren: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'host.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/hosts/',
|
||||
@ -54,7 +53,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Hosts',
|
||||
label: i18n._('Hosts'),
|
||||
ngClick: "editHost(host)",
|
||||
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
||||
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
|
||||
@ -63,18 +62,11 @@ export default ['i18n', function(i18n) {
|
||||
class: 'InventoryManage-breakWord'
|
||||
},
|
||||
groups: {
|
||||
label: "Related Groups",
|
||||
label: i18n._("Related Groups"),
|
||||
type: 'related_groups',
|
||||
nosort: true,
|
||||
showDelete: true,
|
||||
columnClass: 'RelatedGroupsLabelsCell List-tableCell col-lg-2 col-md-3 hidden-sm hidden-xs'
|
||||
// ngBind: 'host.summary_fields.groups',
|
||||
// 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'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@ -84,30 +76,27 @@ export default ['i18n', function(i18n) {
|
||||
insights: {
|
||||
ngClick: "goToInsights(host)",
|
||||
icon: 'fa-info',
|
||||
awToolTip: 'View Insights Data',
|
||||
awToolTip: i18n._('View Insights Data'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.insights_system_id'
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit host',
|
||||
awToolTip: i18n._('Edit host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.edit'
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
ngClick: "editHost(host)",
|
||||
awToolTip: 'View host',
|
||||
awToolTip: i18n._('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',
|
||||
awToolTip: i18n._('Delete host'),
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.summary_fields.user_capabilities.delete'
|
||||
}
|
||||
@ -118,19 +107,19 @@ export default ['i18n', function(i18n) {
|
||||
mode: 'all',
|
||||
ngDisabled: '!hostsSelected',
|
||||
ngClick: 'setAdhocPattern()',
|
||||
awToolTip: "Select an inventory source by clicking the check box beside it. The inventory source can be a single host or a selection of multiple hosts.",
|
||||
awToolTip: i18n._("Select an inventory source by clicking the check box beside it. The inventory source can be a single host or a selection of multiple hosts."),
|
||||
dataPlacement: 'top',
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'RUN COMMANDS',
|
||||
buttonContent: i18n._('RUN COMMANDS'),
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
// TODO: we don't always want to show this
|
||||
ngShow: true
|
||||
},
|
||||
system_tracking: {
|
||||
buttonContent: 'System Tracking',
|
||||
buttonContent: i18n._('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.",
|
||||
awToolTip: i18n._("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',
|
||||
@ -143,9 +132,9 @@ export default ['i18n', function(i18n) {
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createHost()",
|
||||
awToolTip: "Create a new host",
|
||||
awToolTip: i18n._("Create a new host"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD HOST',
|
||||
buttonContent: '+ ' + i18n._('ADD HOST'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-content Modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title ng-binding">
|
||||
Disassociate Group
|
||||
<translate>Disassociate Group</translate>
|
||||
<a href="" id="awp-promote" href=""
|
||||
aw-pop-over="<dl><dt>Disassociate</dt><dd>Disassociates this group from the currently targeted parent group.</dd></dl>"
|
||||
aw-tool-tip="Click for help"
|
||||
@ -22,12 +22,12 @@
|
||||
</div>
|
||||
<div class="Modal-body">
|
||||
<div>
|
||||
<div class="Prompt-bodyQuery">Are you sure you want to disassociate the host below from {{disassociateFrom.name}}?</div>
|
||||
<div class="Prompt-bodyQuery"><translate>Are you sure you want to disassociate the host below from</translate> {{disassociateFrom.name}}?</div>
|
||||
<div class="Prompt-bodyTarget">{{ toDisassociate.name }}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#group-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton">CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton">DISASSOCIATE</a>
|
||||
<a href="#" data-target="#group-disassociate-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton" translate>CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDisassociate()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton" translate>DISASSOCIATE</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -4,104 +4,101 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'nested_groups',
|
||||
iterator: 'nested_group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'nested_group.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
name: 'nested_groups',
|
||||
iterator: 'nested_group',
|
||||
editTitle: '{{ inventory.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
multiSelect: true,
|
||||
trackBy: 'nested_group.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ nested_group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + nested_group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
fields: {
|
||||
failed_hosts: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
awToolTip: "{{ nested_group.hosts_status_tip }}",
|
||||
dataPlacement: "top",
|
||||
icon: "{{ 'fa icon-job-' + nested_group.hosts_status_class }}",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: i18n._('Groups'),
|
||||
key: true,
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
}
|
||||
},
|
||||
name: {
|
||||
label: 'Groups',
|
||||
key: true,
|
||||
|
||||
// ngClick: "groupSelect(group.id)",
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
|
||||
class: 'InventoryManage-breakWord',
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: i18n._("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('REFRESH')
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
ngDisabled: '!groupsSelected',
|
||||
ngClick: 'setAdhocPattern()',
|
||||
awToolTip: i18n._("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."),
|
||||
dataPlacement: 'top',
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('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"
|
||||
},
|
||||
associate: {
|
||||
mode: 'all',
|
||||
ngClick: 'associateGroup()',
|
||||
awToolTip: i18n._("Associate an existing group"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ' + i18n._('ASSOCIATE GROUP'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
edit: {
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: i18n._('Edit group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: i18n._('View group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "!nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
mode: 'all',
|
||||
ngClick: "disassociateGroup(nested_group)",
|
||||
awToolTip: i18n._('Disassociate group'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
launch: {
|
||||
mode: 'all',
|
||||
ngDisabled: '!groupsSelected',
|
||||
ngClick: '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.",
|
||||
dataPlacement: 'top',
|
||||
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"
|
||||
},
|
||||
associate: {
|
||||
mode: 'all',
|
||||
ngClick: 'associateGroup()',
|
||||
awToolTip: "Associate an existing group",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ASSOCIATE GROUP',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
|
||||
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: 'Edit group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editGroup(nested_group.id)",
|
||||
awToolTip: 'View group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "!nested_group.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "disassociateGroup(nested_group)",
|
||||
awToolTip: 'Disassociate group',
|
||||
dataPlacement: "top",
|
||||
ngShow: "nested_group.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import {templateUrl} from '../../../../../../shared/template-url/template-url.factory';
|
||||
import { N_ } from '../../../../../../i18n';
|
||||
|
||||
export default {
|
||||
name: 'inventories.edit.hosts.edit.nested_groups',
|
||||
@ -15,7 +16,7 @@ export default {
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: "inventories.edit.hosts.edit",
|
||||
label: "ASSOCIATED GROUPS"
|
||||
label: N_("ASSOCIATED GROUPS")
|
||||
},
|
||||
views: {
|
||||
// 'related@inventories.edit.groups.edit': {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
export default
|
||||
function GetSyncStatusMsg() {
|
||||
function GetSyncStatusMsg(i18n) {
|
||||
return function(params) {
|
||||
var status = params.status,
|
||||
launch_class = '',
|
||||
launch_tip = 'Start sync process',
|
||||
schedule_tip = 'Schedule future inventory syncs',
|
||||
launch_tip = i18n._('Start sync process'),
|
||||
schedule_tip = i18n._('Schedule future inventory syncs'),
|
||||
stat, stat_class, status_tip;
|
||||
|
||||
stat = status;
|
||||
@ -14,7 +14,7 @@ export default
|
||||
case 'never updated':
|
||||
stat = 'never';
|
||||
stat_class = 'na';
|
||||
status_tip = 'Sync not performed. Click <i class="fa fa-refresh"></i> to start it now.';
|
||||
status_tip = i18n._('Sync not performed. Click') + ' <i class="fa fa-refresh"></i> ' + i18n._('to start it now.');
|
||||
break;
|
||||
case 'none':
|
||||
case 'ok':
|
||||
@ -22,28 +22,28 @@ export default
|
||||
launch_class = 'btn-disabled';
|
||||
stat = 'n/a';
|
||||
stat_class = 'na';
|
||||
status_tip = 'Cloud source not configured. Click <i class="fa fa-pencil"></i> to update.';
|
||||
launch_tip = 'Cloud source not configured.';
|
||||
status_tip = i18n._('Cloud source not configured. Click') + ' <i class="fa fa-pencil"></i> ' + i18n._('to update.');
|
||||
launch_tip = i18n._('Cloud source not configured.');
|
||||
break;
|
||||
case 'canceled':
|
||||
status_tip = 'Sync canceled. Click to view log.';
|
||||
status_tip = i18n._('Sync canceled. Click to view log.');
|
||||
break;
|
||||
case 'failed':
|
||||
status_tip = 'Sync failed. Click to view log.';
|
||||
status_tip = i18n._('Sync failed. Click to view log.');
|
||||
break;
|
||||
case 'successful':
|
||||
status_tip = 'Sync completed. Click to view log.';
|
||||
status_tip = i18n._('Sync completed. Click to view log.');
|
||||
break;
|
||||
case 'pending':
|
||||
status_tip = 'Sync pending.';
|
||||
status_tip = i18n._('Sync pending.');
|
||||
launch_class = "btn-disabled";
|
||||
launch_tip = "Sync pending";
|
||||
break;
|
||||
case 'updating':
|
||||
case 'running':
|
||||
launch_class = "btn-disabled";
|
||||
launch_tip = "Sync running";
|
||||
status_tip = "Sync running. Click to view log.";
|
||||
launch_tip = i18n._("Sync running");
|
||||
status_tip = i18n._("Sync running. Click to view log.");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -58,4 +58,4 @@ export default
|
||||
};
|
||||
}
|
||||
|
||||
GetSyncStatusMsg.$inject = [];
|
||||
GetSyncStatusMsg.$inject = ['i18n'];
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
'ViewUpdateStatus', 'rbacUiControlService', 'GetBasePath',
|
||||
'GetSyncStatusMsg', 'Dataset', 'Find', 'QuerySet',
|
||||
'inventoryData', '$filter', 'Prompt', 'Wait', 'SourcesService', 'inventorySourceOptions',
|
||||
'canAdd', 'hasSyncableSources',
|
||||
'canAdd', 'hasSyncableSources', 'i18n',
|
||||
function($scope, $rootScope, $state, $stateParams, SourcesListDefinition,
|
||||
InventoryUpdate, CancelSourceUpdate,
|
||||
ViewUpdateStatus, rbacUiControlService, GetBasePath, GetSyncStatusMsg,
|
||||
Dataset, Find, qs, inventoryData, $filter, Prompt,
|
||||
Wait, SourcesService, inventorySourceOptions, canAdd, hasSyncableSources){
|
||||
Wait, SourcesService, inventorySourceOptions, canAdd, hasSyncableSources, i18n){
|
||||
|
||||
let list = SourcesListDefinition;
|
||||
var inventory_source;
|
||||
@ -117,7 +117,7 @@
|
||||
$state.go('inventories.edit.inventory_sources.edit', {inventory_source_id: id});
|
||||
};
|
||||
$scope.deleteSource = function(inventory_source){
|
||||
var body = '<div class=\"Prompt-bodyQuery\">Are you sure you want to permanently delete the inventory source below from the inventory?</div><div class=\"Prompt-bodyTarget\">' + $filter('sanitize')(inventory_source.name) + '</div>';
|
||||
var body = '<div class=\"Prompt-bodyQuery\">' + i18n._('Are you sure you want to permanently delete the inventory source below from the inventory?') + '</div><div class=\"Prompt-bodyTarget\">' + $filter('sanitize')(inventory_source.name) + '</div>';
|
||||
var action = function(){
|
||||
delete $rootScope.promptActionBtnClass;
|
||||
Wait('start');
|
||||
@ -139,10 +139,10 @@
|
||||
};
|
||||
// Prompt depends on having $rootScope.promptActionBtnClass available...
|
||||
Prompt({
|
||||
hdr: 'Delete Source',
|
||||
hdr: i18n._('Delete Source'),
|
||||
body: body,
|
||||
action: action,
|
||||
actionText: 'DELETE',
|
||||
actionText: i18n._('DELETE'),
|
||||
});
|
||||
$rootScope.promptActionBtnClass = 'Modal-errorButton';
|
||||
};
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-content Modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title ng-binding">
|
||||
Delete Group
|
||||
<translate>Delete Group</translate>
|
||||
<a href="" id="awp-promote" href=""
|
||||
aw-pop-over="<dl><dt>Delete</dt><dd>Deletes groups and hosts associated with the inventory source being deleted. If a group or host is associated with other inventory sources, it will still exist within those inventory sources. Otherwise, the associated groups and hosts will no longer appear in the inventory.</dd>\n<dt style='margin-top: 5px;'>Promote</dt><dd>Groups and hosts associated with the inventory source being removed will be promoted root level. Note: groups already associated with other inventory sources cannot be promoted.</dd></dl>\n" aw-tool-tip="Click for help"
|
||||
data-placement="right"
|
||||
@ -20,43 +20,43 @@
|
||||
<div class="Modal-body">
|
||||
<div ng-show="toDelete.total_groups > 0 || toDelete.total_hosts > 0">
|
||||
<div>
|
||||
<p class="Prompt-bodyQuery">Deleting group <em>{{ toDelete.name }}</em>.
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0"> This group contains {{ toDelete.total_groups }} groups and {{ toDelete.total_hosts }} hosts. </span>
|
||||
<span ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0"> This group contains {{ toDelete.total_hosts }} hosts. </span>
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0"> This group contains {{ toDelete.total_groups }} groups. </span>
|
||||
Delete or promote the group's children?</p>
|
||||
<p class="Prompt-bodyQuery"><translate>Deleting group</translate> <em>{{ toDelete.name }}</em>.
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0"> <translate>This group contains</translate> {{ toDelete.total_groups }} <translate>groups and</translate> {{ toDelete.total_hosts }} <translate>hosts</translate>. </span>
|
||||
<span ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0"> <translate>This group contains</translate> {{ toDelete.total_hosts }} <translate>hosts</translate>. </span>
|
||||
<span ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0"> <translate>This group contains</translate> {{ toDelete.total_groups }} <translate>groups</translate>. </span>
|
||||
<translate>Delete or promote the group's children?</translate></p>
|
||||
<div style="margin: 15px auto;">
|
||||
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> Promote groups and hosts
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> <translate>Promote groups and hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> Delete groups and hosts
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> <translate>Delete groups and hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> Promote groups
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> <translate>Promote groups</translate>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" ng-show="toDelete.total_groups > 0 && toDelete.total_hosts == 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> Delete groups
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> <translate>Delete groups</translate>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio" ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> Promote hosts
|
||||
<input type="radio" ng-model="deleteOption" value="promote"> <translate>Promote hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" ng-show="toDelete.total_groups == 0 && toDelete.total_hosts > 0">
|
||||
<label>
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> Delete hosts
|
||||
<input type="radio" ng-model="deleteOption" value="delete"> <translate>Delete hosts</translate>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@ -66,12 +66,12 @@
|
||||
|
||||
</div>
|
||||
<div ng-show="toDelete.total_groups == 0 && toDelete.total_hosts == 0">
|
||||
<div class="Prompt-bodyQuery">Are you sure you want to permanently delete the inventory source below from the inventory?</div>
|
||||
<div class="Prompt-bodyQuery" translate>Are you sure you want to permanently delete the inventory source below from the inventory?</div>
|
||||
<div class="Prompt-bodyTarget">{{ toDelete.name }}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#group-delete-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton">CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDelete()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton">DELETE</a>
|
||||
<a href="#" data-target="#group-delete-modal" data-dismiss="modal" id="prompt_cancel_btn_groups_list" class="btn Modal-defaultButton Modal-footerButton" translate>CANCEL</a>
|
||||
<a href="" ng-class="promptActionBtnClass" ng-click="confirmDelete()" id="prompt_action_btn_groups_list" class="btn Modal-footerButton Modal-errorButton" translate>DELETE</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -29,7 +29,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n){
|
||||
let clone = _.clone(NotificationsList);
|
||||
notifications_object = angular.extend(clone, notifications_object);
|
||||
return {
|
||||
addTitle: 'CREATE SOURCE',
|
||||
addTitle: i18n._('CREATE SOURCE'),
|
||||
editTitle: '{{ name }}',
|
||||
showTitle: true,
|
||||
name: 'inventory_source',
|
||||
@ -45,20 +45,20 @@ return {
|
||||
well: false,
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
tab: 'properties'
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
tab: 'properties'
|
||||
},
|
||||
source: {
|
||||
label: 'Source',
|
||||
label: i18n._('Source'),
|
||||
type: 'select',
|
||||
ngOptions: 'source.label for source in source_type_options track by source.value',
|
||||
ngChange: 'sourceChange(source)',
|
||||
@ -66,7 +66,7 @@ return {
|
||||
ngModel: 'source'
|
||||
},
|
||||
credential: {
|
||||
label: 'Credential',
|
||||
label: i18n._('Credential'),
|
||||
type: 'lookup',
|
||||
list: 'CredentialList',
|
||||
basePath: 'credentials',
|
||||
@ -84,7 +84,7 @@ return {
|
||||
project: {
|
||||
// initializes a default value for this search param
|
||||
// search params with default values set will not generate user-interactable search tags
|
||||
label: 'Project',
|
||||
label: i18n._('Project'),
|
||||
type: 'lookup',
|
||||
list: 'ProjectList',
|
||||
basePath: 'projects',
|
||||
@ -118,23 +118,20 @@ return {
|
||||
includeInventoryFileNotFoundError: true
|
||||
},
|
||||
source_regions: {
|
||||
label: 'Regions',
|
||||
label: i18n._('Regions'),
|
||||
type: 'select',
|
||||
ngOptions: 'source.label for source in source_region_choices track by source.value',
|
||||
multiSelect: true,
|
||||
ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce' || source.value == 'azure' || source.value == 'azure_rm')",
|
||||
|
||||
|
||||
dataTitle: 'Source Regions',
|
||||
dataTitle: i18n._('Source Regions'),
|
||||
dataPlacement: 'right',
|
||||
awPopOver: "<p>Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, " +
|
||||
"or choose <em>All</em> to include all regions. Tower will only be updated with Hosts associated with the selected regions." +
|
||||
"</p>",
|
||||
awPopOver: "<p>" + i18n._("Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, or choose") +
|
||||
"<em>" + i18n._("All") + "</em> " + i18n._("to include all regions. Tower will only be updated with Hosts associated with the selected regions.") + "</p>",
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
instance_filters: {
|
||||
label: 'Instance Filters',
|
||||
label: i18n._('Instance Filters'),
|
||||
type: 'text',
|
||||
ngShow: "source && source.value == 'ec2'",
|
||||
dataTitle: 'Instance Filters',
|
||||
@ -153,7 +150,7 @@ return {
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
group_by: {
|
||||
label: 'Only Group By',
|
||||
label: i18n._('Only Group By'),
|
||||
type: 'select',
|
||||
ngShow: "source && source.value == 'ec2'",
|
||||
ngOptions: 'source.label for source in group_by_choices track by source.value',
|
||||
@ -177,7 +174,7 @@ return {
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
inventory_script: {
|
||||
label : "Custom Inventory Script",
|
||||
label : i18n._("Custom Inventory Script"),
|
||||
type: 'lookup',
|
||||
basePath: 'inventory_scripts',
|
||||
list: 'InventoryScriptsList',
|
||||
@ -192,14 +189,14 @@ return {
|
||||
},
|
||||
custom_variables: {
|
||||
id: 'custom_variables',
|
||||
label: 'Environment Variables', //"{{vars_label}}" ,
|
||||
label: i18n._('Environment Variables'), //"{{vars_label}}" ,
|
||||
ngShow: "source && source.value=='custom' || source.value === 'scm'",
|
||||
type: 'textarea',
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
rows: 6,
|
||||
'default': '---',
|
||||
parseTypeName: 'envParseType',
|
||||
dataTitle: "Environment Variables",
|
||||
dataTitle: i18n._("Environment Variables"),
|
||||
dataPlacement: 'right',
|
||||
awPopOver: "<p>Provide environment variables to pass to the custom inventory script.</p>" +
|
||||
"<p>Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
||||
@ -213,14 +210,14 @@ return {
|
||||
},
|
||||
ec2_variables: {
|
||||
id: 'ec2_variables',
|
||||
label: 'Source Variables', //"{{vars_label}}" ,
|
||||
label: i18n._('Source Variables'), //"{{vars_label}}" ,
|
||||
ngShow: "source && source.value == 'ec2'",
|
||||
type: 'textarea',
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
rows: 6,
|
||||
'default': '---',
|
||||
parseTypeName: 'envParseType',
|
||||
dataTitle: "Source Variables",
|
||||
dataTitle: i18n._("Source Variables"),
|
||||
dataPlacement: 'right',
|
||||
awPopOver: "<p>Override variables found in ec2.ini and used by the inventory update script. For a detailed description of these variables " +
|
||||
"<a href=\"https://github.com/ansible/ansible/blob/devel/contrib/inventory/ec2.ini\" target=\"_blank\">" +
|
||||
@ -236,7 +233,7 @@ return {
|
||||
},
|
||||
vmware_variables: {
|
||||
id: 'vmware_variables',
|
||||
label: 'Source Variables', //"{{vars_label}}" ,
|
||||
label: i18n._('Source Variables'), //"{{vars_label}}" ,
|
||||
ngShow: "source && source.value == 'vmware'",
|
||||
type: 'textarea',
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
@ -259,7 +256,7 @@ return {
|
||||
},
|
||||
openstack_variables: {
|
||||
id: 'openstack_variables',
|
||||
label: 'Source Variables', //"{{vars_label}}" ,
|
||||
label: i18n._('Source Variables'), //"{{vars_label}}" ,
|
||||
ngShow: "source && source.value == 'openstack'",
|
||||
type: 'textarea',
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
@ -295,60 +292,56 @@ return {
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
},
|
||||
checkbox_group: {
|
||||
label: 'Update Options',
|
||||
label: i18n._('Update Options'),
|
||||
type: 'checkbox_group',
|
||||
ngShow: "source && (source.value !== '' && source.value !== null)",
|
||||
class: 'Form-checkbox--stacked',
|
||||
fields: [{
|
||||
name: 'overwrite',
|
||||
label: 'Overwrite',
|
||||
label: i18n._('Overwrite'),
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
|
||||
|
||||
awPopOver: '<p>If checked, all child groups and hosts not found on the external source will be deleted from ' +
|
||||
'the local inventory.</p><p>When not checked, local child hosts and groups not found on the external source will ' +
|
||||
'remain untouched by the inventory update process.</p>',
|
||||
dataTitle: 'Overwrite',
|
||||
dataTitle: i18n._('Overwrite'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
ngDisabled: "(!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd))"
|
||||
}, {
|
||||
name: 'overwrite_vars',
|
||||
label: 'Overwrite Variables',
|
||||
label: i18n._('Overwrite Variables'),
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
|
||||
|
||||
awPopOver: '<p>If checked, all variables for child groups and hosts will be removed and replaced by those ' +
|
||||
'found on the external source.</p><p>When not checked, a merge will be performed, combining local variables with ' +
|
||||
'those found on the external source.</p>',
|
||||
dataTitle: 'Overwrite Variables',
|
||||
dataTitle: i18n._('Overwrite Variables'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
ngDisabled: "(!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd) || source.value === 'scm')"
|
||||
}, {
|
||||
name: 'update_on_launch',
|
||||
label: 'Update on Launch',
|
||||
label: i18n._('Update on Launch'),
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
awPopOver: '<p>Each time a job runs using this inventory, refresh the inventory from the selected source before ' +
|
||||
'executing job tasks.</p>',
|
||||
dataTitle: 'Update on Launch',
|
||||
dataTitle: i18n._('Update on Launch'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'update_on_project_update',
|
||||
label: 'Update on Project Update',
|
||||
label: i18n._('Update on Project Update'),
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value === 'scm'",
|
||||
awPopOver: '<p>Each time the selected project is updated, refresh the inventory from the selected source before ' +
|
||||
'executing job tasks.</p>',
|
||||
dataTitle: 'Update on Project Update',
|
||||
dataTitle: i18n._('Update on Project Update'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
@ -356,7 +349,7 @@ return {
|
||||
}]
|
||||
},
|
||||
update_cache_timeout: {
|
||||
label: "Cache Timeout <span class=\"small-text\"> (seconds)</span>",
|
||||
label: i18n._("Cache Timeout") + " <span class=\"small-text\"> " + i18n._("(seconds)") + "</span>",
|
||||
id: 'source-cache-timeout',
|
||||
type: 'number',
|
||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
@ -368,7 +361,7 @@ return {
|
||||
awPopOver: '<p>Time in seconds to consider an inventory sync to be current. During job runs and callbacks the task system will ' +
|
||||
'evaluate the timestamp of the latest sync. If it is older than Cache Timeout, it is not considered current, ' +
|
||||
'and a new inventory sync will be performed.</p>',
|
||||
dataTitle: 'Cache Timeout',
|
||||
dataTitle: i18n._('Cache Timeout'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body"
|
||||
}
|
||||
|
||||
@ -4,131 +4,128 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default {
|
||||
name: 'inventory_sources',
|
||||
iterator: 'inventory_source',
|
||||
editTitle: '{{ inventory_source.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
trackBy: 'inventory_source.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/inventory_sources/',
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
name: 'inventory_sources',
|
||||
iterator: 'inventory_source',
|
||||
editTitle: '{{ inventory_source.name }}',
|
||||
well: true,
|
||||
wellOverride: true,
|
||||
index: false,
|
||||
hover: true,
|
||||
trackBy: 'inventory_source.id',
|
||||
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/inventory_sources/',
|
||||
|
||||
fields: {
|
||||
sync_status: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
ngClick: 'viewUpdateStatus(inventory_source.id)',
|
||||
awToolTip: "{{ inventory_source.status_tooltip }}",
|
||||
dataTipWatch: "inventory_source.status_tooltip",
|
||||
icon: "{{ 'fa icon-cloud-' + inventory_source.status_class }}",
|
||||
ngClass: "inventory_source.status_class",
|
||||
dataPlacement: "top",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
fields: {
|
||||
sync_status: {
|
||||
label: '',
|
||||
nosort: true,
|
||||
mode: 'all',
|
||||
iconOnly: true,
|
||||
ngClick: 'viewUpdateStatus(inventory_source.id)',
|
||||
awToolTip: "{{ inventory_source.status_tooltip }}",
|
||||
dataTipWatch: "inventory_source.status_tooltip",
|
||||
icon: "{{ 'fa icon-cloud-' + inventory_source.status_class }}",
|
||||
ngClass: "inventory_source.status_class",
|
||||
dataPlacement: "top",
|
||||
columnClass: 'status-column List-staticColumn--smallStatus'
|
||||
},
|
||||
name: {
|
||||
label: i18n._('Sources'),
|
||||
key: true,
|
||||
ngClick: "editSource(inventory_source.id)",
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||
class: 'InventoryManage-breakWord',
|
||||
},
|
||||
source: {
|
||||
label: i18n._('Type'),
|
||||
ngBind: 'inventory_source.source_label',
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
label: 'Sources',
|
||||
key: true,
|
||||
ngClick: "editSource(inventory_source.id)",
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||
class: 'InventoryManage-breakWord',
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: i18n._("Refresh the page"),
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('REFRESH')
|
||||
},
|
||||
sync_all: {
|
||||
mode: 'all',
|
||||
awToolTip: i18n._("Sync all inventory sources"),
|
||||
ngClick: "syncAllSources()",
|
||||
ngShow: "showSyncAll",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: i18n._('SYNC ALL'),
|
||||
dataPlacement: "top"
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createSource()",
|
||||
awToolTip: i18n._("Create a new source"),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ' + i18n._('ADD SOURCE'),
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
source: {
|
||||
label: 'Type',
|
||||
ngBind: 'inventory_source.source_label',
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4 text-right',
|
||||
|
||||
source_update: {
|
||||
mode: 'all',
|
||||
ngClick: 'updateSource(inventory_source)',
|
||||
awToolTip: "{{ inventory_source.launch_tooltip }}",
|
||||
dataTipWatch: "inventory_source.launch_tooltip",
|
||||
ngShow: "(inventory_source.status !== 'running' && inventory_source.status " +
|
||||
"!== 'pending' && inventory_source.status !== 'updating') && inventory_source.summary_fields.user_capabilities.start",
|
||||
ngClass: "inventory_source.launch_class",
|
||||
dataPlacement: "top",
|
||||
},
|
||||
cancel: {
|
||||
mode: 'all',
|
||||
ngClick: "cancelUpdate(inventory_source.id)",
|
||||
awToolTip: i18n._("Cancel sync process"),
|
||||
'class': 'red-txt',
|
||||
ngShow: "(inventory_source.status == 'running' || inventory_source.status == 'pending' " +
|
||||
"|| inventory_source.status == 'updating') && inventory_source.summary_fields.user_capabilities.start",
|
||||
dataPlacement: "top",
|
||||
iconClass: "fa fa-minus-circle"
|
||||
},
|
||||
schedule: {
|
||||
mode: 'all',
|
||||
ngClick: "scheduleSource(inventory_source.id)",
|
||||
awToolTip: "{{ inventory_source.group_schedule_tooltip }}",
|
||||
ngClass: "inventory_source.scm_type_class",
|
||||
dataPlacement: 'top',
|
||||
ngShow: "!(inventory_source.summary_fields.inventory_source.source === '') && inventory_source.summary_fields.user_capabilities.schedule"
|
||||
},
|
||||
edit: {
|
||||
mode: 'all',
|
||||
ngClick: "editSource(inventory_source.id)",
|
||||
awToolTip: i18n._('Edit source'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "inventory_source.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
mode: 'all',
|
||||
ngClick: "editSource(inventory_source.id)",
|
||||
awToolTip: i18n._('View source'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "!inventory_source.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
mode: 'all',
|
||||
ngClick: "deleteSource(inventory_source)",
|
||||
awToolTip: i18n._('Delete source'),
|
||||
dataPlacement: "top",
|
||||
ngShow: "inventory_source.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshGroups()",
|
||||
ngShow: "socketStatus == 'error'",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH'
|
||||
},
|
||||
sync_all: {
|
||||
mode: 'all',
|
||||
awToolTip: "Sync all inventory sources",
|
||||
ngClick: "syncAllSources()",
|
||||
ngShow: "showSyncAll",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'SYNC ALL',
|
||||
dataPlacement: "top"
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
ngClick: "createSource()",
|
||||
awToolTip: "Create a new source",
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD SOURCE',
|
||||
ngShow: 'canAdd',
|
||||
dataPlacement: "top",
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4 text-right',
|
||||
|
||||
source_update: {
|
||||
//label: 'Sync',
|
||||
mode: 'all',
|
||||
ngClick: 'updateSource(inventory_source)',
|
||||
awToolTip: "{{ inventory_source.launch_tooltip }}",
|
||||
dataTipWatch: "inventory_source.launch_tooltip",
|
||||
ngShow: "(inventory_source.status !== 'running' && inventory_source.status " +
|
||||
"!== 'pending' && inventory_source.status !== 'updating') && inventory_source.summary_fields.user_capabilities.start",
|
||||
ngClass: "inventory_source.launch_class",
|
||||
dataPlacement: "top",
|
||||
},
|
||||
cancel: {
|
||||
//label: 'Cancel',
|
||||
mode: 'all',
|
||||
ngClick: "cancelUpdate(inventory_source.id)",
|
||||
awToolTip: "Cancel sync process",
|
||||
'class': 'red-txt',
|
||||
ngShow: "(inventory_source.status == 'running' || inventory_source.status == 'pending' " +
|
||||
"|| inventory_source.status == 'updating') && inventory_source.summary_fields.user_capabilities.start",
|
||||
dataPlacement: "top",
|
||||
iconClass: "fa fa-minus-circle"
|
||||
},
|
||||
schedule: {
|
||||
mode: 'all',
|
||||
ngClick: "scheduleSource(inventory_source.id)",
|
||||
awToolTip: "{{ inventory_source.group_schedule_tooltip }}",
|
||||
ngClass: "inventory_source.scm_type_class",
|
||||
dataPlacement: 'top',
|
||||
ngShow: "!(inventory_source.summary_fields.inventory_source.source === '') && inventory_source.summary_fields.user_capabilities.schedule"
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editSource(inventory_source.id)",
|
||||
awToolTip: 'Edit source',
|
||||
dataPlacement: "top",
|
||||
ngShow: "inventory_source.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
view: {
|
||||
//label: 'Edit',
|
||||
mode: 'all',
|
||||
ngClick: "editSource(inventory_source.id)",
|
||||
awToolTip: 'View source',
|
||||
dataPlacement: "top",
|
||||
ngShow: "!inventory_source.summary_fields.user_capabilities.edit"
|
||||
},
|
||||
"delete": {
|
||||
//label: 'Delete',
|
||||
mode: 'all',
|
||||
ngClick: "deleteSource(inventory_source)",
|
||||
awToolTip: 'Delete source',
|
||||
dataPlacement: "top",
|
||||
ngShow: "inventory_source.summary_fields.user_capabilities.delete"
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header Form-header">
|
||||
<div class="Form-title Form-title--uppercase">DYNAMIC HOSTS</div>
|
||||
<div class="Form-title Form-title--uppercase" translate>DYNAMIC HOSTS</div>
|
||||
<!-- optional: transclude header fields -->
|
||||
<div class="Form-header--fields"></div>
|
||||
<div class="Form-exitHolder">
|
||||
@ -13,8 +13,8 @@
|
||||
</div>
|
||||
<div class="modal-body" id="host-filter-modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" ng-click="cancelForm()" class="Lookup-cancel btn btn-default">CANCEL</button>
|
||||
<button type="button" ng-click="saveForm()" ng-disabled="!searchTags || searchTags.length === 0" class="Lookup-save btn btn-primary">SAVE</button>
|
||||
<button type="button" ng-click="cancelForm()" class="Lookup-cancel btn btn-default" translate>CANCEL</button>
|
||||
<button type="button" ng-click="saveForm()" ng-disabled="!searchTags || searchTags.length === 0" class="Lookup-save btn btn-primary" translate>SAVE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -29,7 +29,7 @@ export default ['i18n', 'InventoryCompletedJobsList', function(i18n, InventoryCo
|
||||
editTitle: '{{ name }}',
|
||||
name: 'smartinventory',
|
||||
basePath: 'inventory',
|
||||
breadcrumbName: 'SMART INVENTORY',
|
||||
breadcrumbName: i18n._('SMART INVENTORY'),
|
||||
stateTree: 'inventories',
|
||||
activeEditState: 'inventories.editSmartInventory',
|
||||
detailsClick: "$state.go('inventories.editSmartInventory')",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<form class="Form ng-pristine ng-valid ng-valid-required" name="host_form" id="host_form" autocomplete="off" novalidate="">
|
||||
<div class="form-group Form-formGroup Form-formGroup--fullWidth">
|
||||
<label class="Form-inputLabelContainer " for="facts">
|
||||
<span class="Form-inputLabel">FACTS</span>
|
||||
<span class="Form-inputLabel" translate>FACTS</span>
|
||||
</label>
|
||||
<div>
|
||||
<textarea rows="6" ng-model="facts" name="facts" class="form-control Form-textArea Form-formGroup--fullWidth" id="host_facts"></textarea>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header Form-header">
|
||||
<div class="Form-title Form-title--uppercase">SELECT GROUP</div>
|
||||
<div class="Form-title Form-title--uppercase" translate>SELECT GROUP</div>
|
||||
<div class="Form-header--fields"></div>
|
||||
<div class="Form-exitHolder">
|
||||
<button type="button" class="Form-exit" ng-click="closeModal()">
|
||||
@ -13,8 +13,8 @@
|
||||
</div>
|
||||
<div class="modal-body AssociateGroups-modalBody" id="associate-groups-list"></div>
|
||||
<div class="modal-footer">
|
||||
<button ng-click="closeModal()" class="Lookup-cancel btn btn-default">CANCEL</button>
|
||||
<button ng-click="linkGroups()" class="Lookup-save btn btn-primary" ng-disabled="!selectedItems || selectedItems.length === 0">SAVE</button>
|
||||
<button ng-click="closeModal()" class="Lookup-cancel btn btn-default" translate>CANCEL</button>
|
||||
<button ng-click="linkGroups()" class="Lookup-save btn btn-primary" ng-disabled="!selectedItems || selectedItems.length === 0" translate>SAVE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header Form-header">
|
||||
<div class="Form-title Form-title--uppercase">SELECT HOST</div>
|
||||
<div class="Form-title Form-title--uppercase" translate>SELECT HOST</div>
|
||||
<div class="Form-header--fields"></div>
|
||||
<div class="Form-exitHolder">
|
||||
<button type="button" class="Form-exit" ng-click="closeModal()">
|
||||
@ -13,8 +13,8 @@
|
||||
</div>
|
||||
<div class="modal-body AssociateHosts-modalBody" id="associate-hosts-list"></div>
|
||||
<div class="modal-footer">
|
||||
<button ng-click="closeModal()" class="Lookup-cancel btn btn-default">CANCEL</button>
|
||||
<button ng-click="linkhosts()" class="Lookup-save btn btn-primary" ng-disabled="!selectedItems || selectedItems.length === 0">SAVE</button>
|
||||
<button ng-click="closeModal()" class="Lookup-cancel btn btn-default" translate>CANCEL</button>
|
||||
<button ng-click="linkhosts()" class="Lookup-save btn btn-primary" ng-disabled="!selectedItems || selectedItems.length === 0" translate>SAVE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
export default
|
||||
function SetEnabledMsg() {
|
||||
function SetEnabledMsg(i18n) {
|
||||
return function(host) {
|
||||
if (host.has_inventory_sources) {
|
||||
// Inventory sync managed, so not clickable
|
||||
host.enabledToolTip = (host.enabled) ? 'Host is available' : 'Host is not available';
|
||||
host.enabledToolTip = (host.enabled) ? i18n._('Host is available') : i18n._('Host is not available');
|
||||
}
|
||||
else {
|
||||
// Clickable
|
||||
host.enabledToolTip = (host.enabled) ? 'Host is available. Click to toggle.' : 'Host is not available. Click to toggle.';
|
||||
host.enabledToolTip = (host.enabled) ? i18n._('Host is available. Click to toggle.') : i18n._('Host is not available. Click to toggle.');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
SetEnabledMsg.$inject =
|
||||
[ 'i18n', ];
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export default
|
||||
function SetStatus($filter, SetEnabledMsg, Empty) {
|
||||
function SetStatus($filter, SetEnabledMsg, Empty, i18n) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
host = params.host,
|
||||
@ -13,8 +13,8 @@ export default
|
||||
}
|
||||
|
||||
function noRecentJobs() {
|
||||
title = 'No job data';
|
||||
html = "<p>No recent job data available for this host.</p>\n";
|
||||
title = i18n._('No job data');
|
||||
html = "<p>" + i18n._("No recent job data available for this host.") + "</p>\n";
|
||||
}
|
||||
|
||||
function setMsg(host) {
|
||||
@ -22,11 +22,11 @@ export default
|
||||
|
||||
if (host.has_active_failures === true || (host.has_active_failures === false && host.last_job !== null)) {
|
||||
if (host.has_active_failures === true) {
|
||||
host.badgeToolTip = 'Most recent job failed. Click to view jobs.';
|
||||
host.badgeToolTip = i18n._('Most recent job failed. Click to view jobs.');
|
||||
host.active_failures = 'error';
|
||||
}
|
||||
else {
|
||||
host.badgeToolTip = "Most recent job successful. Click to view jobs.";
|
||||
host.badgeToolTip = i18n._("Most recent job successful. Click to view jobs.");
|
||||
host.active_failures = 'successful';
|
||||
}
|
||||
if (host.summary_fields.recent_jobs.length > 0) {
|
||||
@ -40,9 +40,9 @@ export default
|
||||
html = "<table class=\"table table-condensed flyout\" style=\"width: 100%\">\n";
|
||||
html += "<thead>\n";
|
||||
html += "<tr>\n";
|
||||
html += "<th>Status</th>\n";
|
||||
html += "<th>Finished</th>\n";
|
||||
html += "<th>Name</th>\n";
|
||||
html += "<th>" + i18n._("Status") + "</th>\n";
|
||||
html += "<th>" + i18n._("Finished") + "</th>\n";
|
||||
html += "<th>" + i18n._("Name") + "</th>\n";
|
||||
html += "</tr>\n";
|
||||
html += "</thead>\n";
|
||||
html += "<tbody>\n";
|
||||
@ -72,7 +72,7 @@ export default
|
||||
}
|
||||
}
|
||||
else if (host.has_active_failures === false && host.last_job === null) {
|
||||
host.badgeToolTip = "No job data available.";
|
||||
host.badgeToolTip = i18n._("No job data available.");
|
||||
host.active_failures = 'none';
|
||||
noRecentJobs();
|
||||
}
|
||||
@ -98,5 +98,6 @@ export default
|
||||
SetStatus.$inject =
|
||||
[ '$filter',
|
||||
'SetEnabledMsg',
|
||||
'Empty'
|
||||
'Empty',
|
||||
'i18n'
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user