AMBARI-19669. Not able to add the settings for action nodes in firefox browser (Padma Priya via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cacb1ccc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cacb1ccc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cacb1ccc Branch: refs/heads/branch-dev-patch-upgrade Commit: cacb1cccf9eda0ff13890310dc1e99208287818a Parents: 74aff7c Author: pallavkul <pallav....@gmail.com> Authored: Mon Jan 23 18:33:31 2017 +0530 Committer: pallavkul <pallav....@gmail.com> Committed: Mon Jan 23 18:33:31 2017 +0530 ---------------------------------------------------------------------- .../ui/app/components/version-settings.js | 3 +-- .../main/resources/ui/app/domain/workflow.js | 3 +-- .../main/resources/ui/app/utils/common-utils.js | 2 +- .../main/resources/ui/app/utils/constants.js | 28 ++++++++++---------- 4 files changed, 17 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js index 966313f..3c953e0 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js @@ -25,8 +25,7 @@ export default Ember.Component.extend({ this.set('workflowSchemaVersions', this.get('schemaVersions').getSupportedVersions('workflow')); this.set('selectedWorkflowVersion', this.get('workflow').schemaVersions.workflowVersion); var actionVersions = Ember.A([]); - Object.keys(Constants.actions).forEach((key)=>{ - var action = Constants.actions[key]; + Constants.actions.forEach((action)=>{ if(action.supportsSchema){ actionVersions.push({name:action.name, supporedVersions :this.get('schemaVersions').getSupportedVersions(action.name), selectedVersion: this.get('workflow').schemaVersions.actionVersions.get(action.name)}); http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js index 3c89f5c..9040bb8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js @@ -39,8 +39,7 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{ this.schemaVersions = {}; this.schemaVersions.workflowVersion = schemaVersions.getDefaultVersion('workflow'); var actionsMap = new Map(); - Object.keys(Constants.actions).forEach((key)=>{ - var action = Constants.actions[key]; + Constants.actions.forEach((action)=>{ if(action.supportsSchema){ actionsMap.set(action.name, schemaVersions.getDefaultVersion(action.name)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js b/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js index 8cc40d6..e793aac 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js @@ -28,6 +28,6 @@ export default Ember.Object.create({ window.flowDesignerTestContext=context; }, isSupportedAction(actionType){ - return Object.values(Constants.actions).findBy('name', actionType)? true : false; + return Constants.actions.findBy('name', actionType)? true : false; } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js b/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js index 9126819..1dd1c31 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js @@ -34,20 +34,20 @@ export default Ember.Object.create({ useCytoscape : true, isProjectManagerEnabled : false, autoRestoreWorkflowEnabled : true, - actions:{ - hiveAction:{name : "hive",supportsSchema : true, currentVersion:''}, - hive2Action:{name : "hive2",supportsSchema : true, currentVersion:''}, - javaAction:{name : "java",supportsSchema : false, currentVersion:''}, - pigAction:{name : "pig",supportsSchema : false, currentVersion:''}, - sqoopAction:{name : "sqoop",supportsSchema : true, currentVersion:''}, - shellAction:{name : "shell",supportsSchema : true, currentVersion:''}, - sparkAction:{name : "spark",supportsSchema : true, currentVersion:''}, - mapReduceAction:{name : "map-reduce",supportsSchema : false, currentVersion:''}, - subWorkflowAction:{name : "sub-workflow",supportsSchema : false, currentVersion:''}, - distcpAction:{name : "distcp",supportsSchema : true, currentVersion:''}, - sshAction:{name : "ssh",supportsSchema : false, currentVersion:''}, - emailAction:{name : "email",supportsSchema : true, currentVersion:''} - }, + actions: Ember.A([ + {name : "hive",supportsSchema : true, currentVersion:''}, + {name : "hive2",supportsSchema : true, currentVersion:''}, + {name : "java",supportsSchema : false, currentVersion:''}, + {name : "pig",supportsSchema : false, currentVersion:''}, + {name : "sqoop",supportsSchema : true, currentVersion:''}, + {name : "shell",supportsSchema : true, currentVersion:''}, + {name : "spark",supportsSchema : true, currentVersion:''}, + {name : "map-reduce",supportsSchema : false, currentVersion:''}, + {name : "sub-workflow",supportsSchema : false, currentVersion:''}, + {name : "distcp",supportsSchema : true, currentVersion:''}, + {name : "ssh",supportsSchema : false, currentVersion:''}, + {name : "email",supportsSchema : true, currentVersion:''} + ]), sparkMasterList :Ember.A([{value:'yarn-cluster',displayName:'Yarn Cluster'}, {value:'yarn-client',displayName:'Yarn Client'}, {value:'local',displayName:'Local'}]),