Callback URL Label

Callback URL is now Provisioning Callback URL. Fixed missing popover footers on job template page as well.
This commit is contained in:
Chris Houseknecht
2014-07-01 16:47:47 -04:00
parent b6b3869243
commit e1ee2f4fb0
2 changed files with 14 additions and 13 deletions

View File

@@ -5,13 +5,13 @@
* Form definition for Job Template model * Form definition for Job Template model
* *
* To get the JobTemplateForm object: JobTemplateForm(); * To get the JobTemplateForm object: JobTemplateForm();
* *
*/ */
'use strict'; 'use strict';
angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'CompletedJobsDefinition']) angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'CompletedJobsDefinition'])
.value ('JobTemplateFormObject', { .value ('JobTemplateFormObject', {
addTitle: 'Create Job Templates', addTitle: 'Create Job Templates',
@@ -231,7 +231,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
dataContainer: "body" dataContainer: "body"
}, },
allow_callbacks: { allow_callbacks: {
label: 'Allow Callbacks', label: 'Allow Provisioning Callbacks',
type: 'checkbox', type: 'checkbox',
addRequired: false, addRequired: false,
editRequird: false, editRequird: false,
@@ -239,14 +239,14 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
falseValue: 'false', falseValue: 'false',
ngChange: "toggleCallback('host_config_key')", ngChange: "toggleCallback('host_config_key')",
column: 2, column: 2,
awPopOver: "<p>Enable creation of a callback URL. With a callback URL a host can contact Tower and request a configuration update " + awPopOver: "<p>Enables creation of a provisioning callback URL. Using the URL a host can contact Tower and request a configuration update " +
"using this job template.</p>", "using this job template.</p>",
dataPlacement: 'right', dataPlacement: 'right',
dataTitle: 'Allow Callbacks', dataTitle: 'Allow Provisioning Callbacks',
dataContainer: "body" dataContainer: "body"
}, },
callback_url: { callback_url: {
label: 'Callback URL', label: 'Provisioning Callback URL',
type: 'text', type: 'text',
addRequired: false, addRequired: false,
editRequired: false, editRequired: false,
@@ -256,7 +256,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
awPopOver: "callback_help", awPopOver: "callback_help",
awPopOverWatch: "callback_help", awPopOverWatch: "callback_help",
dataPlacement: 'right', dataPlacement: 'right',
dataTitle: 'Callback URL', dataTitle: 'Provisioning Callback URL',
dataContainer: "body" dataContainer: "body"
}, },
host_config_key: { host_config_key: {
@@ -274,7 +274,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
} }
}, },
buttons: { //for now always generates <button> tags buttons: { //for now always generates <button> tags
save: { save: {
ngClick: 'formSave()', //$scope.function to call on click, optional ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional ngDisabled: true //Disable when $pristine or $invalid, optional
@@ -286,7 +286,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
}, },
related: { related: {
schedules: { schedules: {
include: "SchedulesList" include: "SchedulesList"
}, },

View File

@@ -17,19 +17,20 @@ angular.module('JobTemplatesHelper', ['Utilities'])
*/ */
.factory('CallbackHelpInit', ['$location', 'GetBasePath', function($location, GetBasePath) { .factory('CallbackHelpInit', ['$location', 'GetBasePath', function($location, GetBasePath) {
return function(params) { return function(params) {
var scope = params.scope; var scope = params.scope;
// The form uses awPopOverWatch directive to 'watch' scope.callback_help for changes. Each time the // The form uses awPopOverWatch directive to 'watch' scope.callback_help for changes. Each time the
// popover is activated, a function checks the value of scope.callback_help before constructing the content. // popover is activated, a function checks the value of scope.callback_help before constructing the content.
scope.setCallbackHelp = function() { scope.setCallbackHelp = function() {
scope.callback_help = "<p>With a callback URL and a host config key a host can contact Tower and request a configuration update using this job " + scope.callback_help = "<p>With a provisioning callback URL and a host config key a host can contact Tower and request a configuration update using this job " +
"template. The request from the host must be a POST. Here is an example using curl:</p>\n" + "template. The request from the host must be a POST. Here is an example using curl:</p>\n" +
"<pre>curl --data \"host_config_key=\"" + scope.example_config_key + "\" " + "<pre>curl --data \"host_config_key=\"" + scope.example_config_key + "\" " +
scope.callback_server_path + GetBasePath('job_templates') + scope.example_template_id + "/callback/</pre>\n" + scope.callback_server_path + GetBasePath('job_templates') + scope.example_template_id + "/callback/</pre>\n" +
"<p>Note the requesting host must be defined in the inventory associated with the job template. If Tower fails to " + "<p>Note the requesting host must be defined in the inventory associated with the job template. If Tower fails to " +
"locate the host, the request will be denied.</p>" + "locate the host, the request will be denied.</p>" +
"<p>Successful requests create an entry on the Jobs page, where results and history can be viewed.</p>"; "<p>Successful requests create an entry on the Jobs page, where results and history can be viewed.</p>" +
"<div class=\"popover-footer\"><span class=\"key\">esc</span> or click to close</div>";
}; };
// The md5 helper emits NewMD5Generated whenever a new key is available // The md5 helper emits NewMD5Generated whenever a new key is available