You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/04/06 09:33:29 UTC

[08/41] ambari git commit: AMBARI-20654.Workflow should retain job.properties in submission modal window.(M Madhan Mohan Reddy via padmapriyanitt)

AMBARI-20654.Workflow should retain job.properties in submission modal window.(M Madhan Mohan Reddy via padmapriyanitt)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c91e400
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c91e400
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c91e400

Branch: refs/heads/branch-3.0-perf
Commit: 5c91e4003c75d6c71f58c18501791dbeba91418f
Parents: 27da4c8
Author: padmapriyanitt <pa...@gmail.com>
Authored: Mon Apr 3 18:21:47 2017 +0530
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 6 12:32:56 2017 +0300

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/flow-designer.js     | 1 +
 .../src/main/resources/ui/app/components/job-config.js        | 7 +++++++
 .../resources/ui/app/templates/components/flow-designer.hbs   | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c91e400/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
index 5f885e7..fa7c861 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
@@ -114,6 +114,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
   showingStreamImport:false,
   fileInfo:Ember.Object.create(),
   isDraft: false,
+  jobConfigProperties: Ember.A([]),
   saveJobService : Ember.inject.service('save-job'),
   initialize : function(){
     var id = 'cy-' + Math.ceil(Math.random() * 1000);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c91e400/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js
index 15c1fbf..e9c7c15 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js
@@ -68,6 +68,12 @@ export default Ember.Component.extend(Validations, {
     var configProperties = [];
     configProperties.pushObjects(this.extractJobParams());
     configProperties.pushObjects(this.extractJobProperties());
+    configProperties.forEach((configProperty)=>{
+      var oldConfigProp = this.jobConfigProperties.filterBy('name', configProperty.name);
+      if (oldConfigProp.length > 0) {
+          configProperty.value = oldConfigProp[0].value;
+      }
+    }, this);
     return configProperties;
   }),
   initialize :function(){
@@ -174,6 +180,7 @@ export default Ember.Component.extend(Validations, {
       return;
     };
     this.set('jobFilePath', Ember.copy(this.get('filePath')));
+    this.set("jobConfigProperties", Ember.copy(this.get("configMap")));
     var url = Ember.ENV.API_URL + "/submitJob?app.path=" + this.get("filePath") + "&overwrite=" + this.get("overwritePath");
     url = url + "&jobType=" + this.get('displayName').toUpperCase();
     var submitConfigs = this.get("configMap");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c91e400/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
index 0da9f71..429e874 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
@@ -273,7 +273,7 @@
   {{save-wf type='wf' close="closeSaveWorkflow" jobFilePath=workflowFilePath openFileBrowser="openFileBrowser" closeFileBrowser="closeFileBrowser" jobConfigs=configForSave}}
 {{/if}}
 {{#if showingWorkflowConfigProps}}
-  {{job-config type='wf' closeJobConfigs="closeWorkflowSubmitConfigs" jobFilePath=workflowFilePath tabInfo=tabInfo openFileBrowser="openFileBrowser" closeFileBrowser="closeFileBrowser" jobConfigs=workflowSubmitConfigs isDryrun=dryrun}}
+  {{job-config type='wf' closeJobConfigs="closeWorkflowSubmitConfigs" jobFilePath=workflowFilePath tabInfo=tabInfo openFileBrowser="openFileBrowser" closeFileBrowser="closeFileBrowser" jobConfigs=workflowSubmitConfigs isDryrun=dryrun jobConfigProperties=jobConfigProperties}}
 {{/if}}
 {{#if showGlobalConfig}}
   {{#global-config closeGlobalConfig="closeWorkflowGlobalProps" saveGlobalConfig="saveGlobalConfig" actionModel=globalConfig}}{{/global-config}}