mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
This commit is contained in:
parent
250a71907d
commit
3e94b83653
@ -444,7 +444,7 @@ var tower = angular.module('Tower', [
|
||||
}]
|
||||
},
|
||||
views: {
|
||||
'list@': {
|
||||
'@': {
|
||||
templateUrl: urlPrefix + 'partials/jobs.html',
|
||||
},
|
||||
'list@jobs': {
|
||||
|
||||
@ -35,12 +35,12 @@ export default
|
||||
type: 'text',
|
||||
required: true,
|
||||
autocomplete: false,
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
// interpolated with $rootScope
|
||||
@ -55,7 +55,7 @@ export default
|
||||
dataTitle: i18n._('Organization') + ' ',
|
||||
dataPlacement: 'bottom',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
kind: {
|
||||
label: i18n._('Type'),
|
||||
@ -86,7 +86,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
hasSubForm: true,
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
access_key: {
|
||||
label: i18n._('Access Key'),
|
||||
@ -99,7 +99,7 @@ export default
|
||||
autocomplete: false,
|
||||
apiField: 'username',
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
secret_key: {
|
||||
label: i18n._('Secret Key'),
|
||||
@ -128,7 +128,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"host": {
|
||||
labelBind: 'hostLabel',
|
||||
@ -145,7 +145,7 @@ export default
|
||||
init: false
|
||||
},
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"subscription": {
|
||||
label: i18n._("Subscription ID"),
|
||||
@ -163,7 +163,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"username": {
|
||||
labelBind: 'usernameLabel',
|
||||
@ -176,7 +176,7 @@ export default
|
||||
},
|
||||
autocomplete: false,
|
||||
subForm: "credentialSubForm",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"email_address": {
|
||||
labelBind: 'usernameLabel',
|
||||
@ -192,7 +192,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"api_key": {
|
||||
label: i18n._('API Key'),
|
||||
@ -206,7 +206,7 @@ export default
|
||||
hasShowInputButton: true,
|
||||
clear: false,
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"password": {
|
||||
labelBind: 'passwordLabel',
|
||||
@ -220,7 +220,7 @@ export default
|
||||
init: false
|
||||
},
|
||||
subForm: "credentialSubForm",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"ssh_password": {
|
||||
label: i18n._('Password'),
|
||||
@ -257,7 +257,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
subForm: "credentialSubForm",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"ssh_key_unlock": {
|
||||
label: i18n._('Private Key Passphrase'),
|
||||
@ -287,7 +287,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"become_username": {
|
||||
labelBind: 'becomeUsernameLabel',
|
||||
@ -297,7 +297,7 @@ export default
|
||||
|
||||
autocomplete: false,
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"become_password": {
|
||||
labelBind: 'becomePasswordLabel',
|
||||
@ -318,7 +318,7 @@ export default
|
||||
label: i18n._('Client ID'),
|
||||
subForm: 'credentialSubForm',
|
||||
ngShow: "kind.value === 'azure_rm'",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
secret:{
|
||||
type: 'sensitive',
|
||||
@ -327,14 +327,14 @@ export default
|
||||
label: i18n._('Client Secret'),
|
||||
subForm: 'credentialSubForm',
|
||||
ngShow: "kind.value === 'azure_rm'",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
tenant: {
|
||||
type: 'text',
|
||||
label: i18n._('Tenant ID'),
|
||||
subForm: 'credentialSubForm',
|
||||
ngShow: "kind.value === 'azure_rm'",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
authorize: {
|
||||
label: i18n._('Authorize'),
|
||||
@ -342,7 +342,7 @@ export default
|
||||
ngChange: "toggleCallback('host_config_key')",
|
||||
subForm: 'credentialSubForm',
|
||||
ngShow: "kind.value === 'net'",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
authorize_password: {
|
||||
label: i18n._('Authorize Password'),
|
||||
@ -351,7 +351,7 @@ export default
|
||||
autocomplete: false,
|
||||
subForm: 'credentialSubForm',
|
||||
ngShow: "authorize && authorize !== 'false'",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"project": {
|
||||
labelBind: 'projectLabel',
|
||||
@ -367,7 +367,7 @@ export default
|
||||
init: false
|
||||
},
|
||||
subForm: 'credentialSubForm',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
"domain": {
|
||||
labelBind: 'domainLabel',
|
||||
@ -381,7 +381,7 @@ export default
|
||||
dataTitle: i18n._('Domain Name'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
subForm: 'credentialSubForm'
|
||||
},
|
||||
"vault_password": {
|
||||
@ -403,17 +403,17 @@ export default
|
||||
buttons: {
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
label: 'Save',
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: true,
|
||||
ngShow: '(credential_obj.summary_fields.user_capabilities.edit || !canAdd)' //Disable when $pristine or $invalid, optional
|
||||
ngShow: '(credential_obj.summary_fields.user_capabilities.edit || canAdd)' //Disable when $pristine or $invalid, optional
|
||||
}
|
||||
},
|
||||
|
||||
@ -439,7 +439,7 @@ export default
|
||||
awToolTip: i18n._('Add a permission'),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: i18n._('+ ADD'),
|
||||
ngShow: '(credential_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
fields: {
|
||||
|
||||
@ -29,14 +29,14 @@ export default
|
||||
name: {
|
||||
label: 'Name',
|
||||
type: 'text',
|
||||
ngDisabled: '(!group_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
tab: 'properties'
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
type: 'text',
|
||||
ngDisabled: '(!group_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
tab: 'properties'
|
||||
},
|
||||
variables: {
|
||||
@ -65,7 +65,7 @@ export default
|
||||
type: 'select',
|
||||
ngOptions: 'source.label for source in source_type_options track by source.value',
|
||||
ngChange: 'sourceChange(source)',
|
||||
ngDisabled: '(!group_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
ngModel: 'source'
|
||||
},
|
||||
credential: {
|
||||
@ -81,7 +81,7 @@ export default
|
||||
reqExpression: "cloudCredentialRequired",
|
||||
init: "false"
|
||||
},
|
||||
ngDisabled: '(!group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
source_regions: {
|
||||
label: 'Regions',
|
||||
@ -97,7 +97,7 @@ export default
|
||||
"or choose <em>All</em> to include all regions. Tower will only be updated with Hosts associated with the selected regions." +
|
||||
"</p>",
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
instance_filters: {
|
||||
label: 'Instance Filters',
|
||||
@ -116,7 +116,7 @@ export default
|
||||
"<p>View the <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html\" target=\"_blank\">Describe Instances documentation</a> " +
|
||||
"for a complete list of supported filters.</p>",
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
group_by: {
|
||||
label: 'Only Group By',
|
||||
@ -140,7 +140,7 @@ export default
|
||||
"<li>Tag None: <strong>tags » tag_none</strong></li>" +
|
||||
"</ul><p>If blank, all groups above are created except <em>Instance ID</em>.</p>",
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
inventory_script: {
|
||||
label : "Custom Inventory Script",
|
||||
@ -152,7 +152,7 @@ export default
|
||||
sourceField: 'name',
|
||||
ngClick: 'lookUpInventory_script()' ,
|
||||
ngRequired: "source && source.value === 'custom'",
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
},
|
||||
custom_variables: {
|
||||
id: 'custom_variables',
|
||||
@ -263,7 +263,7 @@ export default
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'overwrite_vars',
|
||||
label: 'Overwrite Variables',
|
||||
@ -278,7 +278,7 @@ export default
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'update_on_launch',
|
||||
label: 'Update on Launch',
|
||||
@ -290,7 +290,7 @@ export default
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options',
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}]
|
||||
},
|
||||
update_cache_timeout: {
|
||||
@ -314,16 +314,16 @@ export default
|
||||
buttons: {
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true,
|
||||
ngShow: '(group_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(group_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -46,11 +46,11 @@ export default
|
||||
dataTitle: 'Host Name',
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)',
|
||||
type: 'text'
|
||||
},
|
||||
variables: {
|
||||
@ -80,16 +80,16 @@ export default
|
||||
buttons: {
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(host.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(host.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(host.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(host.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true,
|
||||
ngShow: '(host.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(host.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@ -30,13 +30,13 @@ angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
||||
type: 'text',
|
||||
required: true,
|
||||
capitalize: false,
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
inventory_description: {
|
||||
realName: 'description',
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
label: i18n._('Organization'),
|
||||
@ -49,7 +49,7 @@ angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
||||
reqExpression: "organizationrequired",
|
||||
init: "true"
|
||||
},
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
variables: {
|
||||
label: i18n._('Variables'),
|
||||
@ -67,23 +67,23 @@ angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
||||
dataTitle: 'Inventory Variables',
|
||||
dataPlacement: 'right',
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)' // TODO: get working
|
||||
ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || canAdd)' // TODO: get working
|
||||
}
|
||||
},
|
||||
|
||||
buttons: {
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngHide: '(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngHide: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true,
|
||||
ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
related: {
|
||||
@ -106,7 +106,7 @@ angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
||||
awToolTip: 'Add a permission',
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD',
|
||||
ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@ -31,7 +31,7 @@ export default
|
||||
name: {
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
column: 1
|
||||
},
|
||||
@ -39,7 +39,7 @@ export default
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
column: 1,
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
job_type: {
|
||||
label: i18n._('Job Type'),
|
||||
@ -61,7 +61,7 @@ export default
|
||||
ngShow: "!job_type.value || job_type.value !== 'scan'",
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
inventory: {
|
||||
label: i18n._('Inventory'),
|
||||
@ -85,7 +85,7 @@ export default
|
||||
ngShow: "!job_type.value || job_type.value !== 'scan'",
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
project: {
|
||||
label: i18n._('Project'),
|
||||
@ -108,7 +108,7 @@ export default
|
||||
dataTitle: i18n._('Project'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
playbook: {
|
||||
label: i18n._('Playbook'),
|
||||
@ -152,7 +152,7 @@ export default
|
||||
variable: 'ask_credential_on_launch',
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
cloud_credential: {
|
||||
label: i18n._('Cloud Credential'),
|
||||
@ -170,7 +170,7 @@ export default
|
||||
dataTitle: i18n._('Cloud Credential'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
network_credential: {
|
||||
label: i18n._('Network Credential'),
|
||||
@ -187,7 +187,7 @@ export default
|
||||
dataTitle: i18n._('Network Credential'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
forks: {
|
||||
label: i18n._('Forks'),
|
||||
@ -205,7 +205,7 @@ export default
|
||||
dataTitle: i18n._('Forks'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)' // TODO: get working
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)' // TODO: get working
|
||||
},
|
||||
limit: {
|
||||
label: i18n._('Limit'),
|
||||
@ -221,7 +221,7 @@ export default
|
||||
variable: 'ask_limit_on_launch',
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
verbosity: {
|
||||
label: i18n._('Verbosity'),
|
||||
@ -234,7 +234,7 @@ export default
|
||||
dataTitle: i18n._('Verbosity'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
job_tags: {
|
||||
label: i18n._('Job Tags'),
|
||||
@ -252,7 +252,7 @@ export default
|
||||
variable: 'ask_tags_on_launch',
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
skip_tags: {
|
||||
label: i18n._('Skip Tags'),
|
||||
@ -270,7 +270,7 @@ export default
|
||||
variable: 'ask_skip_tags_on_launch',
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
checkbox_group: {
|
||||
label: i18n._('Options'),
|
||||
@ -285,7 +285,7 @@ export default
|
||||
dataTitle: i18n._('Become Privilege Escalation'),
|
||||
dataContainer: "body",
|
||||
labelClass: 'stack-inline',
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'allow_callbacks',
|
||||
label: i18n._('Allow Provisioning Callbacks'),
|
||||
@ -298,7 +298,7 @@ export default
|
||||
dataTitle: i18n._('Allow Provisioning Callbacks'),
|
||||
dataContainer: "body",
|
||||
labelClass: 'stack-inline',
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}]
|
||||
},
|
||||
callback_url: {
|
||||
@ -312,7 +312,7 @@ export default
|
||||
dataPlacement: 'top',
|
||||
dataTitle: i18n._('Provisioning Callback URL'),
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
host_config_key: {
|
||||
label: i18n._('Host Config Key'),
|
||||
@ -326,7 +326,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataTitle: i18n._("Host Config Key"),
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
labels: {
|
||||
label: i18n._('Labels'),
|
||||
@ -338,7 +338,7 @@ export default
|
||||
dataPlacement: 'right',
|
||||
awPopOver: i18n._("<p>Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs in the Tower display.</p>"),
|
||||
dataContainer: 'body',
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
variables: {
|
||||
label: i18n._('Extra Variables'),
|
||||
@ -360,14 +360,14 @@ export default
|
||||
variable: 'ask_variables_on_launch',
|
||||
text: i18n._('Prompt on launch')
|
||||
},
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)' // TODO: get working
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)' // TODO: get working
|
||||
}
|
||||
},
|
||||
|
||||
buttons: { //for now always generates <button> tags
|
||||
add_survey: {
|
||||
ngClick: 'addSurvey()',
|
||||
ngShow: 'job_type.value !== "scan" && !survey_exists && (job_template_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngShow: 'job_type.value !== "scan" && !survey_exists && (job_template_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
awFeature: 'surveys',
|
||||
awToolTip: 'Surveys allow users to be prompted at job launch with a series of questions related to the job. This allows for variables to be defined that affect the playbook run at time of launch.',
|
||||
dataPlacement: 'top'
|
||||
@ -375,25 +375,25 @@ export default
|
||||
edit_survey: {
|
||||
ngClick: 'editSurvey()',
|
||||
awFeature: 'surveys',
|
||||
ngShow: 'job_type.value !== "scan" && survey_exists && (job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: 'job_type.value !== "scan" && survey_exists && (job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
view_survey: {
|
||||
ngClick: 'editSurvey()',
|
||||
awFeature: 'surveys',
|
||||
ngShow: 'job_type.value !== "scan" && survey_exists && !(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: 'job_type.value !== "scan" && survey_exists && !(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: "job_templates_form.$invalid",//true //Disable when $pristine or $invalid, optional and when can_edit = false, for permission reasons
|
||||
ngShow: '(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
@ -420,7 +420,7 @@ export default
|
||||
awToolTip: 'Add a permission',
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD',
|
||||
ngShow: '(job_template_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -25,30 +25,30 @@ export default
|
||||
name: {
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
capitalize: false
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
buttons: { //for now always generates <button> tags
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(organization_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(organization_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(organization_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(organization_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: true,
|
||||
ngShow: '(organization_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(organization_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
@ -73,7 +73,7 @@ export default
|
||||
awToolTip: i18n._('Add a permission'),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: i18n._('+ ADD'),
|
||||
ngShow: '(organization_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(organization_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -30,14 +30,14 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
name: {
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
capitalize: false
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
label: i18n._('Organization'),
|
||||
@ -50,7 +50,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
required: true,
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
scm_type: {
|
||||
label: i18n._('SCM Type'),
|
||||
@ -60,7 +60,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
ngChange: 'scmChange()',
|
||||
required: true,
|
||||
hasSubForm: true,
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
missing_path_alert: {
|
||||
type: 'alertblock',
|
||||
@ -83,7 +83,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataTitle: i18n._('Project Base Path'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
local_path: {
|
||||
label: i18n._('Playbook Directory'),
|
||||
@ -101,7 +101,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataTitle: i18n._('Project Path'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
scm_url: {
|
||||
label: 'SCM URL',
|
||||
@ -118,13 +118,13 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataTitle: 'SCM URL',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
scm_branch: {
|
||||
labelBind: "scmBranchLabel",
|
||||
type: 'text',
|
||||
ngShow: "scm_type && scm_type.value !== 'manual'",
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
subForm: 'sourceSubForm',
|
||||
},
|
||||
credential: {
|
||||
@ -139,7 +139,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
ngShow: "scm_type && scm_type.value !== 'manual'",
|
||||
sourceModel: 'credential',
|
||||
sourceField: 'name',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
subForm: 'sourceSubForm'
|
||||
},
|
||||
checkbox_group: {
|
||||
@ -156,7 +156,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options stack-inline',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'scm_delete_on_update',
|
||||
label: i18n._('Delete on Update'),
|
||||
@ -167,7 +167,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options stack-inline',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'scm_update_on_launch',
|
||||
label: i18n._('Update on Launch'),
|
||||
@ -177,7 +177,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
labelClass: 'checkbox-options stack-inline',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}]
|
||||
},
|
||||
scm_update_cache_timeout: {
|
||||
@ -195,23 +195,23 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
dataTitle: i18n._('Cache Timeout'),
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body",
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
buttons: {
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true,
|
||||
ngShow: '(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
@ -236,7 +236,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
awToolTip: i18n._('Add a permission'),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: i18n._('+ ADD'),
|
||||
ngShow: '(project_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -26,14 +26,14 @@ export default
|
||||
name: {
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(team_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(team_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
capitalize: false
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(team_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(team_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
label: i18n._('Organization'),
|
||||
@ -42,7 +42,7 @@ export default
|
||||
sourceModel: 'organization',
|
||||
basePath: 'organizations',
|
||||
sourceField: 'name',
|
||||
ngDisabled: '!(team_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(team_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
@ -50,16 +50,16 @@ export default
|
||||
buttons: {
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(team_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(team_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(team_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(team_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true,
|
||||
ngShow: '(team_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(team_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
@ -84,7 +84,7 @@ export default
|
||||
awToolTip: i18n._('Add user to team'),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: i18n._('+ ADD'),
|
||||
ngShow: '(team_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(team_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -70,10 +70,11 @@ angular.module('inventory', [
|
||||
},
|
||||
views: {
|
||||
// clear form template when views render in this substate
|
||||
'form@': {
|
||||
'form': {
|
||||
templateProvider: () => ''
|
||||
},
|
||||
'list@': {
|
||||
// target the un-named ui-view @ root level
|
||||
'@': {
|
||||
templateProvider: function(SchedulesList, generateList, ParentObject) {
|
||||
// include name of parent resource in listTitle
|
||||
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`;
|
||||
@ -96,7 +97,7 @@ angular.module('inventory', [
|
||||
label: "CREATE SCHEDULE"
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: 'schedulerAddController',
|
||||
templateUrl: templateUrl("scheduler/schedulerForm")
|
||||
}
|
||||
@ -110,7 +111,7 @@ angular.module('inventory', [
|
||||
label: "{{schedule_obj.name}}"
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
templateUrl: templateUrl("scheduler/schedulerForm"),
|
||||
controller: 'schedulerEditController',
|
||||
}
|
||||
@ -129,7 +130,6 @@ angular.module('inventory', [
|
||||
});
|
||||
|
||||
editGroup = stateDefinitions.generateTree({
|
||||
//parent: 'inventoryManage', // top-most node in the generated tree (tree will replace this node)
|
||||
url: '/edit-group/:group_id',
|
||||
name: 'inventoryManage.editGroup',
|
||||
modes: ['edit'],
|
||||
|
||||
@ -4,14 +4,18 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default ['$state', '$stateParams', '$scope', 'ToggleNotification', 'ParseVariableString',
|
||||
'ParseTypeChange', 'GroupManageService', 'GetChoices', 'GetBasePath', 'CreateSelect2', 'GetSourceTypeOptions', 'groupData', 'inventorySourceData', 'ToJSON',
|
||||
function($state, $stateParams, $scope, ToggleNotification, ParseVariableString,
|
||||
ParseTypeChange, GroupManageService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, groupData, inventorySourceData, ToJSON) {
|
||||
export default ['$state', '$stateParams', '$scope', 'ToggleNotification', 'ParseVariableString', 'rbacUiControlService', 'ToJSON',
|
||||
'ParseTypeChange', 'GroupManageService', 'GetChoices', 'GetBasePath', 'CreateSelect2', 'GetSourceTypeOptions', 'groupData', 'inventorySourceData',
|
||||
function($state, $stateParams, $scope, ToggleNotification, ParseVariableString, rbacUiControlService, ToJSON,
|
||||
ParseTypeChange, GroupManageService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, groupData, inventorySourceData) {
|
||||
|
||||
init();
|
||||
|
||||
function init() {
|
||||
rbacUiControlService.canAdd(GetBasePath('inventory') + $stateParams.inventory_id + "/groups")
|
||||
.then(function(canAdd) {
|
||||
$scope.canAdd = canAdd;
|
||||
});
|
||||
// instantiate expected $scope values from inventorySourceData & groupData
|
||||
_.assign($scope, { credential: inventorySourceData.credential }, { overwrite: inventorySourceData.overwrite }, { overwrite_vars: inventorySourceData.overwrite_vars }, { update_on_launch: inventorySourceData.update_on_launch }, { update_cache_timeout: inventorySourceData.update_cache_timeout }, { instance_filters: inventorySourceData.instance_filters }, { inventory_script: inventorySourceData.source_script });
|
||||
if (inventorySourceData.credential) {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<div class="tab-pane InventoryManage-container" id="inventory_edit">
|
||||
<div ui-view="form"></div>
|
||||
<div class="row">
|
||||
<div ui-view="groupsList" class="col-lg-6"></div>
|
||||
<div ui-view="hostsList" class="col-lg-6"></div>
|
||||
|
||||
@ -89,8 +89,8 @@ export default {
|
||||
controller: BreadcrumbsController,
|
||||
templateUrl: templateUrl('inventories/manage/breadcrumbs/breadcrumbs')
|
||||
},
|
||||
// target the ui-view with name "list" at the root view
|
||||
'list@': {
|
||||
// target the un-named ui-view @ root level
|
||||
'@': {
|
||||
templateUrl: templateUrl('inventories/manage/inventory-manage'),
|
||||
controller: InventoriesManage
|
||||
},
|
||||
@ -102,8 +102,7 @@ export default {
|
||||
mode: 'edit'
|
||||
});
|
||||
html = generateList.wrapPanel(html);
|
||||
// I'm so sorry
|
||||
// group delete modal
|
||||
// Include the custom group delete modal template
|
||||
return $templateRequest(templateUrl('inventories/manage/groups/groups-list')).then((template) => {
|
||||
return html.concat(template);
|
||||
});
|
||||
|
||||
@ -24,14 +24,14 @@ export default ['i18n', function(i18n) {
|
||||
name: {
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
capitalize: false
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
label: i18n._('Organization'),
|
||||
@ -42,7 +42,7 @@ export default ['i18n', function(i18n) {
|
||||
reqExpression: "orgrequired",
|
||||
init: true
|
||||
},
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
script: {
|
||||
label: i18n._('Custom Script'),
|
||||
@ -51,7 +51,7 @@ export default ['i18n', function(i18n) {
|
||||
elementClass: 'Form-monospace',
|
||||
required: true,
|
||||
awDropFile: true,
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
rows: 10,
|
||||
awPopOver: i18n._("<p>Drag and drop your custom inventory script file here or create one in the field to import your custom inventory. " +
|
||||
"<br><br> Script must begin with a hashbang sequence: i.e.... #!/usr/bin/env python</p>"),
|
||||
@ -64,16 +64,16 @@ export default ['i18n', function(i18n) {
|
||||
buttons: { //for now always generates <button> tags
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: 'inventory_script_form.$pristine || inventory_script_form.$invalid', //Disable when $pristine or $invalid, optional
|
||||
ngShow: '(inventory_script_obj.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -27,6 +27,7 @@ export default
|
||||
icon: 'icon-job-{{ job.status }}',
|
||||
iconOnly: true,
|
||||
ngClick:"viewJobDetails(job)",
|
||||
nosort: true
|
||||
},
|
||||
id: {
|
||||
label: 'ID',
|
||||
|
||||
@ -56,7 +56,8 @@ export default
|
||||
ngClick: 'addCredential()',
|
||||
awToolTip: i18n._('Create a new credential'),
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: i18n._('+ ADD')
|
||||
buttonContent: i18n._('+ ADD'),
|
||||
ngShow: "true"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ angular.module('managementJobScheduler', [])
|
||||
label: 'SCHEDULES'
|
||||
},
|
||||
views: {
|
||||
'list@': {
|
||||
'@': {
|
||||
templateProvider: function(SchedulesList, generateList, ParentObject) {
|
||||
// include name of parent resource in listTitle
|
||||
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`;
|
||||
@ -34,7 +34,7 @@ angular.module('managementJobScheduler', [])
|
||||
mode: 'edit'
|
||||
});
|
||||
html = generateList.wrapPanel(html);
|
||||
return html;
|
||||
return generateList.insertFormView() + html;
|
||||
},
|
||||
controller: 'managementJobController',
|
||||
}
|
||||
@ -61,7 +61,7 @@ angular.module('managementJobScheduler', [])
|
||||
label: 'CREATE SCHEDULED JOB'
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
templateUrl: templateUrl('management-jobs/scheduler/schedulerForm'),
|
||||
controller: 'managementJobAddController',
|
||||
}
|
||||
@ -75,8 +75,10 @@ angular.module('managementJobScheduler', [])
|
||||
label: 'EDIT SCHEDULED JOB'
|
||||
},
|
||||
views: {
|
||||
templateUrl: templateUrl('management-jobs/scheduler/schedulerForm'),
|
||||
controller: 'managementJobEditController',
|
||||
'form': {
|
||||
templateUrl: templateUrl('management-jobs/scheduler/schedulerForm'),
|
||||
controller: 'managementJobEditController'
|
||||
}
|
||||
}
|
||||
});
|
||||
}]);
|
||||
|
||||
@ -28,14 +28,14 @@ export default ['i18n', function(i18n) {
|
||||
name: {
|
||||
label: i18n._('Name'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)',
|
||||
required: true,
|
||||
capitalize: false
|
||||
},
|
||||
description: {
|
||||
label: i18n._('Description'),
|
||||
type: 'text',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
label: i18n._('Organization'),
|
||||
@ -48,7 +48,7 @@ export default ['i18n', function(i18n) {
|
||||
reqExpression: "organizationrequired",
|
||||
init: "true"
|
||||
},
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
notification_type: {
|
||||
label: i18n._('Type'),
|
||||
@ -58,14 +58,14 @@ export default ['i18n', function(i18n) {
|
||||
ngOptions: 'type.label for type in notification_type_options track by type.value',
|
||||
ngChange: 'typeChange()',
|
||||
hasSubForm: true,
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
username: {
|
||||
label: i18n._('Username'),
|
||||
type: 'text',
|
||||
ngShow: "notification_type.value == 'email' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
|
||||
host: {
|
||||
@ -77,7 +77,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'email' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
sender: {
|
||||
label: i18n._('Sender Email'),
|
||||
@ -88,7 +88,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'email' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
recipients: {
|
||||
label: i18n._('Recipient List'),
|
||||
@ -105,7 +105,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'email' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
password: {
|
||||
labelBind: 'passwordLabel',
|
||||
@ -117,7 +117,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'email' || notification_type.value == 'irc' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
port: {
|
||||
labelBind: 'portLabel',
|
||||
@ -132,7 +132,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'email' || notification_type.value == 'irc'",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
channels: {
|
||||
label: i18n._('Destination Channels'),
|
||||
@ -149,7 +149,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'slack'",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
rooms: {
|
||||
label: i18n._('Destination Channels'),
|
||||
@ -166,7 +166,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'hipchat'",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
token: {
|
||||
labelBind: 'tokenLabel',
|
||||
@ -178,7 +178,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'slack' || notification_type.value == 'pagerduty' || notification_type.value == 'hipchat'",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
account_token: {
|
||||
label: i18n._('Account Token'),
|
||||
@ -190,7 +190,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'twilio' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
from_number: {
|
||||
label: i18n._('Source Phone Number'),
|
||||
@ -203,7 +203,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'twilio' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
to_numbers: {
|
||||
label: i18n._('Destination SMS Number'),
|
||||
@ -220,7 +220,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'twilio' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
account_sid: {
|
||||
label: i18n._('Account SID'),
|
||||
@ -231,7 +231,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'twilio' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
subdomain: {
|
||||
label: i18n._('Pagerduty subdomain'),
|
||||
@ -242,7 +242,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'pagerduty' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
service_key: {
|
||||
label: i18n._('API Service/Integration Key'),
|
||||
@ -253,7 +253,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'pagerduty' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
client_name: {
|
||||
label: i18n._('Client Identifier'),
|
||||
@ -264,7 +264,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'pagerduty' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
message_from: {
|
||||
label: i18n._('Label to be shown with notification'),
|
||||
@ -275,7 +275,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'hipchat' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
api_url: {
|
||||
label: 'API URL',
|
||||
@ -287,7 +287,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'hipchat' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
color: {
|
||||
label: i18n._('Notification Color'),
|
||||
@ -300,14 +300,14 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'hipchat' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
notify: {
|
||||
label: i18n._('Notify Channel'),
|
||||
type: 'checkbox',
|
||||
ngShow: "notification_type.value == 'hipchat' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
url: {
|
||||
label: i18n._('Target URL'),
|
||||
@ -318,7 +318,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'webhook' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
headers: {
|
||||
label: i18n._('HTTP Headers'),
|
||||
@ -339,7 +339,7 @@ export default ['i18n', function(i18n) {
|
||||
dataPlacement: 'right',
|
||||
ngShow: "notification_type.value == 'webhook' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
server: {
|
||||
label: i18n._('IRC Server Address'),
|
||||
@ -350,7 +350,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'irc' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
nickname: {
|
||||
label: i18n._('IRC Nick'),
|
||||
@ -361,7 +361,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'irc' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
targets: {
|
||||
label: i18n._('Destination Channels or Users'),
|
||||
@ -378,14 +378,14 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
ngShow: "notification_type.value == 'irc' ",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
use_ssl: {
|
||||
label: i18n._('SSL Connection'),
|
||||
type: 'checkbox',
|
||||
ngShow: "notification_type.value == 'irc'",
|
||||
subForm: 'typeSubForm',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
checkbox_group: {
|
||||
label: i18n._('Options'),
|
||||
@ -398,14 +398,14 @@ export default ['i18n', function(i18n) {
|
||||
type: 'checkbox',
|
||||
ngShow: "notification_type.value == 'email' ",
|
||||
labelClass: 'checkbox-options stack-inline',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}, {
|
||||
name: 'use_ssl',
|
||||
label: i18n._('Use SSL'),
|
||||
type: 'checkbox',
|
||||
ngShow: "notification_type.value == 'email'",
|
||||
labelClass: 'checkbox-options stack-inline',
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
}]
|
||||
}
|
||||
},
|
||||
@ -413,15 +413,15 @@ export default ['i18n', function(i18n) {
|
||||
buttons: { //for now always generates <button> tags
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
close: {
|
||||
ngClick: 'formCancel()',
|
||||
ngShow: '!(notification_template.summary_fields.user_capabilities.edit || !canAdd)'
|
||||
ngShow: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
save: {
|
||||
ngClick: 'formSave()',
|
||||
ngShow: '(notification_template.summary_fields.user_capabilities.edit || !canAdd)', //$scope.function to call on click, optional
|
||||
ngShow: '(notification_template.summary_fields.user_capabilities.edit || canAdd)', //$scope.function to call on click, optional
|
||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ export default [{
|
||||
url: '/:organization_id/users',
|
||||
searchPrefix: 'user',
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: OrganizationsUsers,
|
||||
templateProvider: function(OrgUserList, generateList) {
|
||||
let html = generateList.build({
|
||||
@ -110,7 +110,7 @@ export default [{
|
||||
url: '/:organization_id/teams',
|
||||
searchPrefix: 'team',
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: OrganizationsTeams,
|
||||
templateProvider: function(OrgTeamList, generateList) {
|
||||
let html = generateList.build({
|
||||
@ -253,7 +253,7 @@ export default [{
|
||||
url: '/:organization_id/job_templates',
|
||||
searchPrefix: 'job_template',
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: OrganizationsJobTemplates,
|
||||
templateProvider: function(OrgJobTemplateList, generateList) {
|
||||
let html = generateList.build({
|
||||
@ -326,7 +326,7 @@ export default [{
|
||||
}
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: OrganizationsAdmins,
|
||||
templateProvider: function(OrgAdminList, generateList) {
|
||||
let html = generateList.build({
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<div ui-view="form"></div>
|
||||
<div class="tab-pane" id="organizations">
|
||||
<div ng-cloak id="htmlTemplate" class="Panel">
|
||||
<div class="List-header">
|
||||
|
||||
@ -85,7 +85,7 @@ export default
|
||||
}]
|
||||
},
|
||||
views: {
|
||||
'list@': {
|
||||
'@': {
|
||||
templateProvider: function(SchedulesList, generateList, ParentObject){
|
||||
// include name of parent resource in listTitle
|
||||
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`;
|
||||
@ -94,7 +94,7 @@ export default
|
||||
mode: 'edit'
|
||||
});
|
||||
html = generateList.wrapPanel(html);
|
||||
return html;
|
||||
return generateList.insertFormView() + html;
|
||||
},
|
||||
controller: 'schedulerListController'
|
||||
}
|
||||
@ -108,7 +108,7 @@ export default
|
||||
label: 'CREATE SCHEDULE'
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: 'schedulerAddController',
|
||||
templateUrl: templateUrl("scheduler/schedulerForm"),
|
||||
}
|
||||
@ -121,7 +121,7 @@ export default
|
||||
label: '{{schedule_obj.name}}'
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
controller: 'schedulerEditController',
|
||||
templateUrl: templateUrl("scheduler/schedulerForm"),
|
||||
}
|
||||
|
||||
@ -680,9 +680,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
return function (options) {
|
||||
|
||||
var html = '';
|
||||
|
||||
console.log(options)
|
||||
|
||||
html += '<button ';
|
||||
html += (options.mode) ? "mode=\"" + options.mode + "\" " : "";
|
||||
html += (options.awToolTip) ? "aw-tool-tip=\"" + options.awToolTip + "\" " : "";
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
mode="options.mode"
|
||||
class="{{options.actionClass}}"
|
||||
ng-disabled="{{options.ngDisabled}}"
|
||||
ng-show="{{options.ngShow}}"
|
||||
ng-click="$eval(options.ngClick)"
|
||||
toolbar="true"
|
||||
aw-feature="{{options.awFeature}}">
|
||||
@ -25,6 +26,7 @@
|
||||
data-title="{{options.dataTitle}}"
|
||||
ng-disabled="{{options.ngDisabled}}"
|
||||
ng-click="$eval(options.ngClick)"
|
||||
ng-show="{{options.ngShow}}"
|
||||
toolbar="true"
|
||||
aw-feature="{{options.awFeature}}">
|
||||
<span ng-bind-html="options.buttonContent"></span>
|
||||
|
||||
@ -508,7 +508,11 @@ export default ['$location', '$compile', '$rootScope', 'Attr', 'Icon',
|
||||
},
|
||||
|
||||
wrapPanel: function(html){
|
||||
return`<div class="Panel">${html}</div>`;
|
||||
return `<div class="Panel">${html}</div>`;
|
||||
},
|
||||
|
||||
insertFormView: function(){
|
||||
return `<div ui-view="form"></div>`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -84,7 +84,8 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
||||
mode: 'edit'
|
||||
});
|
||||
html = generateList.wrapPanel(html);
|
||||
return html;
|
||||
// generateList.formView() inserts a ui-view="form" inside the list view's hierarchy
|
||||
return generateList.insertFormView() + html;
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -106,7 +107,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
||||
ListDefinition: () => list
|
||||
},
|
||||
views: {
|
||||
'list@': {
|
||||
'@': {
|
||||
// resolves to a variable property name:
|
||||
// 'templateUrl' OR 'templateProvider'
|
||||
[params.templates && params.templates.list ? 'templateUrl' : 'templateProvider']: generateTemplateBlock(),
|
||||
@ -147,7 +148,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
||||
label: `CREATE ${form.name}`
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
templateProvider: function(FormDefinition, GenerateForm) {
|
||||
let form = typeof(FormDefinition) === 'function' ?
|
||||
FormDefinition() : FormDefinition;
|
||||
@ -178,7 +179,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
||||
label: '{{parentObject.name || name}}'
|
||||
},
|
||||
views: {
|
||||
'form@': {
|
||||
'form': {
|
||||
templateProvider: function(FormDefinition, GenerateForm) {
|
||||
let form = typeof(FormDefinition) === 'function' ?
|
||||
FormDefinition() : FormDefinition;
|
||||
|
||||
@ -33,25 +33,13 @@
|
||||
</head>
|
||||
|
||||
<body data-user-agent="{{userAgent}}">
|
||||
<div ui-view class="col-lg-12"></div>
|
||||
<main-menu></main-menu>
|
||||
<bread-crumb ng-show="!includesCurrentState('inventoryManage')"></bread-crumb>
|
||||
<div ui-view="groupBreadcrumbs" ng-show="includesCurrentState('inventoryManage')"></div>
|
||||
<toast></toast>
|
||||
<div class="container-fluid" id="content-container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div id="main-view" ng-if="configReady">
|
||||
<!-- form views -->
|
||||
<div class="tab-pane">
|
||||
<div ui-view="form"></div>
|
||||
</div>
|
||||
<!-- list views -->
|
||||
<div class="tab-pane">
|
||||
<div ui-view="list">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12" ui-view>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Password Dialog -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user