AMBARI-20662.Need to auto populate the workflow parameters if its already 
defined in the global space.(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/cc88312e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc88312e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc88312e

Branch: refs/heads/branch-3.0-perf
Commit: cc88312e095ae6c025661b82cfb0207ebaceb5de
Parents: 0472e5f
Author: padmapriyanitt <[email protected]>
Authored: Tue Apr 4 16:21:27 2017 +0530
Committer: Andrew Onishuk <[email protected]>
Committed: Thu Apr 6 12:32:56 2017 +0300

----------------------------------------------------------------------
 .../wfmanager/src/main/resources/ui/app/components/job-config.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc88312e/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 e9c7c15..6aed9da 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
@@ -121,15 +121,17 @@ export default Ember.Component.extend(Validations, {
       if (value!== Constants.defaultNameNodeValue && 
value!==Constants.rmDefaultValue){
         var propName = value.trim().substring(2, value.length-1);
         var isRequired = true;
+        var val = null;
         if(jobParams && jobParams.configuration && 
jobParams.configuration.property){
           var param = jobParams.configuration.property.findBy('name', 
propName);
           if(param && param.value){
             isRequired = false;
+            val = param.value;
           }else {
             isRequired = true;
           }
         }
-        let val = null, tabData = self.get("tabInfo");
+        let tabData = self.get("tabInfo");
         if(tabData && tabData.isImportedFromDesigner && tabData.configuration 
&& tabData.configuration.settings && 
tabData.configuration.settings.configuration && 
tabData.configuration.settings.configuration.property) {
           let propVal = 
tabData.configuration.settings.configuration.property.findBy('name', propName);
           if(propVal) {

Reply via email to