Repository: falcon Updated Branches: refs/heads/master c96bf897d -> 1b47d2e7f
FALCON-1139 Validation issues in Falcon UI. Contributed by Pallavi Rao Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/1b47d2e7 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/1b47d2e7 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/1b47d2e7 Branch: refs/heads/master Commit: 1b47d2e7fb22622b5a327d2c0fe45af84fbfbc99 Parents: c96bf89 Author: Ajay Yadava <[email protected]> Authored: Fri Jul 17 14:25:20 2015 +0530 Committer: Ajay Yadava <[email protected]> Committed: Fri Jul 17 14:26:26 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ falcon-ui/app/html/process/processFormGeneralStepTpl.html | 8 ++++---- .../controllers/process/process-general-information-ctrl.js | 7 ++++--- falcon-ui/app/js/services/common/validation-service.js | 7 ++++--- .../controllers/process/ProcessGeneralInformationCtrlSpec.js | 6 +++--- falcon-ui/app/test/services/ValdationServiceSpec.js | 2 +- 6 files changed, 18 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/1b47d2e7/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 63298f0..5723867 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ Trunk (Unreleased) FALCON-796 Enable users to triage data processing issues through falcon (Ajay Yadava) IMPROVEMENTS + FALCON-1139 Validation issues in Falcon UI(Pallavi Rao via Ajay Yadava) + FALCON-1204 Expose default configs for feed late data handling in runtime.properties(Balu Vellanki via Ajay Yadava) FALCON-1170 Falcon Native Scheduler - Refactor existing workflow/coord/bundle builder(Pallavi Rao via Ajay Yadava) http://git-wip-us.apache.org/repos/asf/falcon/blob/1b47d2e7/falcon-ui/app/html/process/processFormGeneralStepTpl.html ---------------------------------------------------------------------- diff --git a/falcon-ui/app/html/process/processFormGeneralStepTpl.html b/falcon-ui/app/html/process/processFormGeneralStepTpl.html index 4f41e39..3f559c8 100644 --- a/falcon-ui/app/html/process/processFormGeneralStepTpl.html +++ b/falcon-ui/app/html/process/processFormGeneralStepTpl.html @@ -60,12 +60,12 @@ <div class="col-xs-24"> <div class="light">Name</div> - <input type="text" class="form-control" validation-message="{{validations.messages.name}}" + <input type="text" class="form-control" validation-message="{{validations.messages.engineName}}" id="workflowNameField" ng-model="process.workflow.name" - ng-required="true" + ng-required="false" ng-maxlength="39" - ng-pattern="validations.patterns.name"/> + ng-pattern="validations.patterns.engineName"/> </div> <div id="engineSection" class="col-xs-24"> @@ -81,7 +81,7 @@ <input type="radio" id="hiveEngineRadio" ng-change="selectWorkflow()" ng-model="process.workflow.engine" value="hive" ng-required="!process.workflow.engine"/> Hive </div> <select id="engineVersionField" ng-model="process.workflow.version" - ng-required="true" ng-show="process.workflow.engine" validation-message="{{validations.messages.engine}}"> + ng-required="false" ng-show="process.workflow.engine" validation-message="{{validations.messages.engine}}"> <option value="" disabled selected style='display:none;'>-Select {{process.workflow.engine}} version-</option> http://git-wip-us.apache.org/repos/asf/falcon/blob/1b47d2e7/falcon-ui/app/js/controllers/process/process-general-information-ctrl.js ---------------------------------------------------------------------- diff --git a/falcon-ui/app/js/controllers/process/process-general-information-ctrl.js b/falcon-ui/app/js/controllers/process/process-general-information-ctrl.js index ec689f3..ee5ab12 100644 --- a/falcon-ui/app/js/controllers/process/process-general-information-ctrl.js +++ b/falcon-ui/app/js/controllers/process/process-general-information-ctrl.js @@ -29,9 +29,9 @@ feedModule.controller('ProcessGeneralInformationCtrl', [ '$scope', function($scope) { var availableVerions = { - oozie: ['3.1.3-incubating', '3.2.0-incubating', '3.3.0', '3.3.1', '3.3.2', '4.0.0', '4.0.1'], - pig: ['pig-0.10.0', 'pig-0.10.1', 'pig-0.11.0', 'pig-0.11.1', 'pig-0.12.0', 'pig-0.12.1', 'pig-0.13.0', 'pig-0.8.0', 'pig-0.8.1', ' pig-0.9.0', ' pig-0.9.1', 'pig-0.9.2'], - hive: ['hive-0.10.0', 'hive-0.11.0', 'hive-0.12.0', 'hive-0.13.0', 'hive-0.13.1', 'hive-0.6.0', 'hive-0.7.0', 'hive-0.8.0', 'hive-0.8.1', 'hive-0.9.0'] + oozie: ['4.2.0', '4.1.0', '4.0.1', '4.0.0'], + pig: ['pig-0.13.0', 'pig-0.12.1', 'pig-0.12.0', 'pig-0.11.1', 'pig-0.11.0', 'pig-0.10.1'], + hive: ['hive-0.13.1', 'hive-0.13.0', 'hive-0.12.0', 'hive-0.11.0', 'hive-0.10.0'] }; $scope.nameValid = false; @@ -53,6 +53,7 @@ if($scope.process.workflow) { var engine = $scope.process.workflow.engine; + $scope.process.workflow.version = null; $scope.versions = availableVerions[engine]; } }; http://git-wip-us.apache.org/repos/asf/falcon/blob/1b47d2e7/falcon-ui/app/js/services/common/validation-service.js ---------------------------------------------------------------------- diff --git a/falcon-ui/app/js/services/common/validation-service.js b/falcon-ui/app/js/services/common/validation-service.js index fe45d7a..461f073 100644 --- a/falcon-ui/app/js/services/common/validation-service.js +++ b/falcon-ui/app/js/services/common/validation-service.js @@ -24,7 +24,7 @@ var checkMessages = { name: { patternInvalid: "The name has an invalid format.", - unavailable: "The name you choosed is not available", + unavailable: "The name you chose is not available", empty: "You need to specify a name" }, colo: { @@ -62,10 +62,11 @@ number: { empty: "You need to provide a number" }, option: { empty: "You need to select an option" }, user: { empty: "Please enter your user name." }, - password: { empty: "Please enter your password." } + password: { empty: "Please enter your password." }, + engineName: { patternInvalid: "The name has an invalid format." } }, checkPatterns = { - name: new RegExp("^[a-zA-Z0-9]{1,39}$"), + name: new RegExp("^(([a-zA-Z]([\\-a-zA-Z0-9])*){1,39})$"), id: new RegExp("^(([a-zA-Z]([\\-a-zA-Z0-9])*){1,39})$"), password: new RegExp("^(([a-zA-Z]([\\-a-zA-Z0-9])*){1,39})$"), freeText: new RegExp("^([\\sa-zA-Z0-9]){1,40}$"), http://git-wip-us.apache.org/repos/asf/falcon/blob/1b47d2e7/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js ---------------------------------------------------------------------- diff --git a/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js index 6008456..75d9017 100644 --- a/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js +++ b/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js @@ -81,7 +81,7 @@ describe('Versions', function() { it('Should display the oozie versions when oozie workflow is selected', function() { - var expectedVersions = ['3.1.3-incubating', '3.2.0-incubating', '3.3.0', '3.3.1', '3.3.2', '4.0.0', '4.0.1']; + var expectedVersions = ['4.2.0', '4.1.0', '4.0.1', '4.0.0']; scope.process.workflow = {engine: 'oozie'}; scope.selectWorkflow(); @@ -90,7 +90,7 @@ }); it('Should display the pig versions when pig workflow is selected', function() { - var expectedVersions = ['pig-0.10.0', 'pig-0.10.1', 'pig-0.11.0', 'pig-0.11.1', 'pig-0.12.0', 'pig-0.12.1', 'pig-0.13.0', 'pig-0.8.0', 'pig-0.8.1', ' pig-0.9.0', ' pig-0.9.1', 'pig-0.9.2']; + var expectedVersions = ['pig-0.13.0', 'pig-0.12.1', 'pig-0.12.0', 'pig-0.11.1', 'pig-0.11.0', 'pig-0.10.1']; scope.process.workflow = {engine: 'pig'}; scope.selectWorkflow(); @@ -99,7 +99,7 @@ }); it('Should display the hive versions when hive workflow is selected', function() { - var expectedVersions = ['hive-0.10.0', 'hive-0.11.0', 'hive-0.12.0', 'hive-0.13.0', 'hive-0.13.1', 'hive-0.6.0', 'hive-0.7.0', 'hive-0.8.0', 'hive-0.8.1', 'hive-0.9.0']; + var expectedVersions = ['hive-0.13.1', 'hive-0.13.0', 'hive-0.12.0', 'hive-0.11.0', 'hive-0.10.0']; scope.process.workflow = {engine: 'hive'}; scope.selectWorkflow(); http://git-wip-us.apache.org/repos/asf/falcon/blob/1b47d2e7/falcon-ui/app/test/services/ValdationServiceSpec.js ---------------------------------------------------------------------- diff --git a/falcon-ui/app/test/services/ValdationServiceSpec.js b/falcon-ui/app/test/services/ValdationServiceSpec.js index 6699892..e608dc8 100644 --- a/falcon-ui/app/test/services/ValdationServiceSpec.js +++ b/falcon-ui/app/test/services/ValdationServiceSpec.js @@ -40,7 +40,7 @@ describe('patterns', function () { it('Should return an object with the validation patterns', function () { expect(validationService.patterns).toBeDefined(); - expect(validationService.patterns.name).toEqual(/^[a-zA-Z0-9]{1,39}$/); + expect(validationService.patterns.name).toEqual(/^(([a-zA-Z]([\-a-zA-Z0-9])*){1,39})$/); }); });
