From 9fbd64805f62573340dfa856ed78193d9cf7618a Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 16 Feb 2015 13:42:38 -0500 Subject: [PATCH 01/58] Job Detail checks to prevent error messages If the job run completes before the JS can complete running, error messages are output to the js console. Ajusting checks to prevent errors happening. --- awx/ui/static/js/controllers/JobDetail.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index b8e0a9a194..d4c3942a4f 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -200,7 +200,7 @@ export function JobDetailController ($location, $rootScope, $scope, $compile, $r scope.removeLoadHostSummaries(); } scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() { - if(scope.job.related){ + if(scope.job){ var url = scope.job.related.job_host_summaries + '?'; url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name'; @@ -247,9 +247,11 @@ export function JobDetailController ($location, $rootScope, $scope, $compile, $r if (scope.activeTask) { var play = scope.jobData.plays[scope.activePlay], - task = play.tasks[scope.activeTask], + task, // = play.tasks[scope.activeTask], url; - + if(play){ + task = play.tasks[scope.activeTask]; + } if (play && task) { url = scope.job.related.job_events + '?parent=' + task.id + '&'; url += 'event__startswith=runner&page_size=' + scope.hostResultsMaxRows + '&order=host_name,counter'; From c8682b7820120b66179a190d066a9043afc09457 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 16 Feb 2015 13:56:25 -0500 Subject: [PATCH 02/58] Take out this stupid sync_ui thing from the 'make server' and 'make servercc' targets --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 12bd816eaf..51b14223ce 100644 --- a/Makefile +++ b/Makefile @@ -202,8 +202,6 @@ server_noattach: tmux select-pane -U tmux split-window -v 'exec make receiver' tmux split-window -h 'exec make taskmanager' - tmux select-pane -U - tmux split-window -h 'exec make sync_ui' server: server_noattach tmux -2 attach-session -t tower From c5869db5c4e46c26fc04f6a3f0e402498cefca7c Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Mon, 16 Feb 2015 15:09:58 -0600 Subject: [PATCH 03/58] Added feature flags and license types to licenses. From dda00e98f5eb9d93b1319a3705257e5a71616052 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 17 Feb 2015 16:05:12 -0500 Subject: [PATCH 04/58] Fixing job submission for textarea if textarea min is set to 0 and the question is optional, then the UI will pass the API and empty string to the job launch endpoint --- awx/ui/static/js/helpers/JobSubmission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index d352f6c4ce..cb0d3b8be6 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -81,7 +81,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential job_launch_data.extra_vars[fld] = scope[fld]; } // for optional text and text-areas, submit a blank string if min length is 0 - if(scope.survey_questions[i].required === false && (scope.survey_questions[i].type === "text" || scope.survey_questions[i].type === "textarea") && scope.survey_questions[i].min === 0 && scope[fld] ===""){ + if(scope.survey_questions[i].required === false && (scope.survey_questions[i].type === "text" || scope.survey_questions[i].type === "textarea") && scope.survey_questions[i].min === 0 && (scope[fld] === "" || scope[fld] === undefined)){ job_launch_data.extra_vars[fld] = ""; } } From 397d107380af372b681d511854515258018d74c3 Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Tue, 17 Feb 2015 17:11:03 -0500 Subject: [PATCH 05/58] Include sourcemaps in build --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index dfa5d45237..895910f06e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -17,6 +17,7 @@ recursive-exclude awx/main/tests * recursive-exclude awx/ui/static/lib/ansible * recursive-exclude awx/settings local_settings.py* include awx/ui/static/dist/tower.concat.js +include awx/ui/static/dist/tower.concat.map include awx/ui/static/dist/tower.concat.js.gz include awx/ui/static/js/config.js include tools/scripts/request_tower_configuration.sh From a2121b7288f813ce68e3e6cede9179a890f6f594 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 17 Feb 2015 17:50:43 -0500 Subject: [PATCH 06/58] More accurate survey errors For the survey question form validation, some errors messages were being thrown for errors that hadn't occured. --- awx/ui/static/js/forms/SurveyQuestion.js | 16 ++++++------ awx/ui/static/lib/ansible/directives.js | 31 +++++++++++++++--------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index d7d0fff516..fe50a0a236 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -63,8 +63,8 @@ export default 'user_id
host_name
esc or click to close
" '+ 'data-placement="right" data-container="body" data-title="Answer Variable Name" class="help-link" data-original-title="" title="" tabindex="-1"> '+ '
'+ - '
Please enter an answer variable name.
'+ - '
Please remove the illegal character from the survey question variable name.
'+ + '
Please enter an answer variable name.
'+ + '
Please remove the illegal character from the survey question variable name.
'+ '
This question variable is already in use. Please enter a different variable name.
' + '
'+ '
', @@ -106,13 +106,13 @@ export default control:'
'+ '
'+ ''+ - '
The minimum length you entered is not a number. Please enter a number.
'+ + '
The minimum length you entered is not a number. Please enter a number.
'+ '
The minimium length is too high. Please enter a lower number.
'+ '
The minimum length is too low. Please enter a positive number.
'+ '
'+ '
'+ ''+ - '
The maximum length you entered is not a number. Please enter a number.
'+ + '
The maximum length you entered is not a number. Please enter a number.
'+ '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ '
'+ '
', @@ -127,13 +127,13 @@ export default control:'
'+ '
'+ ''+ - '
The minimum length you entered is not a number. Please enter a number.
'+ + '
The minimum length you entered is not a number. Please enter a number.
'+ '
The minimium length is too high. Please enter a lower number.
'+ '
The minimum length is too low. Please enter a positive number.
'+ '
'+ '
'+ ''+ - '
The maximum length you entered is not a number. Please enter a number.
'+ + '
The maximum length you entered is not a number. Please enter a number.
'+ '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ '
'+ '
', @@ -148,13 +148,13 @@ export default control:'
'+ '
'+ ''+ - '
The minimum length you entered is not a number. Please enter a number.
'+ + '
The minimum length you entered is not a number. Please enter a number.
'+ '
The minimium length is too high. Please enter a lower number.
'+ '
The minimum length is too low. Please enter a positive number.
'+ '
'+ '
'+ ''+ - '
The maximum length you entered is not a number. Please enter a number.
'+ + '
The maximum length you entered is not a number. Please enter a number.
'+ '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ '
'+ '
', diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index 1ac2599250..cf97f9d8e8 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -70,7 +70,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job require: 'ngModel', scope: { ngModel: '=ngModel' }, template: '
' + - '