mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 07:47:44 -02:30
wip
This commit is contained in:
committed by
Jeff Bradberry
parent
151de89c26
commit
48eb502161
@@ -430,6 +430,14 @@ export default
|
|||||||
default_val: dft
|
default_val: dft
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const defaultWebhookKey = ($scope.webhook_key === "" || $scope.webhook_key === null) ? false : true;
|
||||||
|
hashSetup({
|
||||||
|
scope: $scope,
|
||||||
|
master: master,
|
||||||
|
check_field: 'enable_webhooks',
|
||||||
|
default_val: defaultWebhookKey
|
||||||
|
});
|
||||||
|
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
field_id: 'extra_vars',
|
field_id: 'extra_vars',
|
||||||
|
|||||||
@@ -338,6 +338,17 @@ function(NotificationsList, i18n) {
|
|||||||
dataTitle: i18n._('Allow Provisioning Callbacks'),
|
dataTitle: i18n._('Allow Provisioning Callbacks'),
|
||||||
dataContainer: "body",
|
dataContainer: "body",
|
||||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
|
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
|
||||||
|
}, {
|
||||||
|
name: 'enable_webhooks',
|
||||||
|
label: i18n._('Enable Webhook'),
|
||||||
|
type: 'checkbox',
|
||||||
|
ngChange: "toggleCallback('webhook_key')",
|
||||||
|
column: 2,
|
||||||
|
awPopOver: "<p>" + i18n._("Enabled webhook for this job template.") + "</p>",
|
||||||
|
dataPlacement: 'right',
|
||||||
|
dataTitle: i18n._('Enable Webhook'),
|
||||||
|
dataContainer: "body",
|
||||||
|
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
|
||||||
}, {
|
}, {
|
||||||
name: 'allow_simultaneous',
|
name: 'allow_simultaneous',
|
||||||
label: i18n._('Enable Concurrent Jobs'),
|
label: i18n._('Enable Concurrent Jobs'),
|
||||||
@@ -396,7 +407,7 @@ function(NotificationsList, i18n) {
|
|||||||
type:'select',
|
type:'select',
|
||||||
defaultText: i18n._('Choose a Webhook Service'),
|
defaultText: i18n._('Choose a Webhook Service'),
|
||||||
ngOptions: 'svc.label for svc in webhook_service_options track by svc.value',
|
ngOptions: 'svc.label for svc in webhook_service_options track by svc.value',
|
||||||
ngShow: true,
|
ngShow: "enable_webhooks && enable_webhooks !== 'false'",
|
||||||
ngDisabled: "!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate) || !canGetAllRelatedResources",
|
ngDisabled: "!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate) || !canGetAllRelatedResources",
|
||||||
id: 'webhook-service-select',
|
id: 'webhook-service-select',
|
||||||
required: false,
|
required: false,
|
||||||
@@ -409,8 +420,7 @@ function(NotificationsList, i18n) {
|
|||||||
webhook_url: {
|
webhook_url: {
|
||||||
label: i18n._('Webhook URL'),
|
label: i18n._('Webhook URL'),
|
||||||
type: 'text',
|
type: 'text',
|
||||||
readonly: true,
|
ngShow: "enable_webhooks && enable_webhooks !== 'false'",
|
||||||
//ngShow: "allow_webhooks && allow_webhooks !== 'false'",
|
|
||||||
column: 2,
|
column: 2,
|
||||||
awPopOver: "webhook_url_help",
|
awPopOver: "webhook_url_help",
|
||||||
awPopOverWatch: "webhook_url_help",
|
awPopOverWatch: "webhook_url_help",
|
||||||
@@ -419,9 +429,27 @@ function(NotificationsList, i18n) {
|
|||||||
dataContainer: "body",
|
dataContainer: "body",
|
||||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
|
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
|
||||||
},
|
},
|
||||||
|
webhook_key: {
|
||||||
|
label: i18n._('Webhook Key'),
|
||||||
|
type: 'text',
|
||||||
|
ngShow: "enable_webhooks && enable_webhooks !== 'false'",
|
||||||
|
genHash: true,
|
||||||
|
column: 2,
|
||||||
|
awPopOver: "webhook_key_help",
|
||||||
|
awPopOverWatch: "webhook_key_help",
|
||||||
|
dataPlacement: 'right',
|
||||||
|
dataTitle: i18n._("Webhook Config Key"),
|
||||||
|
dataContainer: "body",
|
||||||
|
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)',
|
||||||
|
awRequiredWhen: {
|
||||||
|
reqExpression: 'enable_webhooks',
|
||||||
|
alwaysShowAsterisk: true
|
||||||
|
}
|
||||||
|
},
|
||||||
webhook_credential: {
|
webhook_credential: {
|
||||||
label: i18n._('Webhook Credential'),
|
label: i18n._('Webhook Credential'),
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
|
ngShow: "enable_webhooks && enable_webhooks !== 'false'",
|
||||||
control: `
|
control: `
|
||||||
<webhook-credential-input
|
<webhook-credential-input
|
||||||
is-field-disabled="!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate) || !(webhookCredential.modalBaseParams.credential_type__namespace)"
|
is-field-disabled="!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate) || !(webhookCredential.modalBaseParams.credential_type__namespace)"
|
||||||
|
|||||||
Reference in New Issue
Block a user