You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pp...@apache.org on 2017/04/03 12:53:15 UTC
ambari git commit: AMBARI-20654.Workflow should retain job.properties
in submission modal window.(M Madhan Mohan Reddy via padmapriyanitt)
Repository: ambari
Updated Branches:
refs/heads/trunk 9fec5ac5a -> 6892e4352
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/6892e435
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6892e435
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6892e435
Branch: refs/heads/trunk
Commit: 6892e43522e40722a62d142eed8c2dfd14ac68f2
Parents: 9fec5ac
Author: padmapriyanitt <pa...@gmail.com>
Authored: Mon Apr 3 18:21:47 2017 +0530
Committer: padmapriyanitt <pa...@gmail.com>
Committed: Mon Apr 3 18:21:47 2017 +0530
----------------------------------------------------------------------
.../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/6892e435/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/6892e435/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/6892e435/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}}