incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-3059 Frontend changes for "JDK options both during ambari-server setup and installer UI is confusing". (Andrii Babiichuk via atkach)
Date Tue, 03 Sep 2013 17:02:27 GMT
Updated Branches:
  refs/heads/trunk 21b02ef5c -> f0c0cd24e


AMBARI-3059 Frontend changes for "JDK options both during ambari-server setup and installer
UI is confusing". (Andrii Babiichuk via atkach)


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

Branch: refs/heads/trunk
Commit: f0c0cd24eae11e0815c4a15ffbd5d71413aaf8b7
Parents: 21b02ef
Author: atkach <andrey91.07@gmail.com>
Authored: Tue Sep 3 20:02:16 2013 +0300
Committer: atkach <andrey91.07@gmail.com>
Committed: Tue Sep 3 20:02:16 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard.js             |  1 -
 .../app/controllers/wizard/step2_controller.js   | 19 +++++++++++++++++++
 ambari-web/app/templates/wizard/step2.hbs        | 17 +----------------
 ambari-web/app/utils/ajax.js                     |  4 ++++
 4 files changed, 24 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0c0cd24/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index b2e4137..08f7440 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -438,7 +438,6 @@ App.WizardController = Em.Controller.extend({
     hostNames: "", //string
     manualInstall: false, //true, false
     useSsh: true, //bool
-    isJavaHome : false, //bool
     javaHome: App.defaultJavaHome, //string
     localRepo: false, //true, false
     sshKey: "", //string

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0c0cd24/ambari-web/app/controllers/wizard/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step2_controller.js b/ambari-web/app/controllers/wizard/step2_controller.js
index a92e39f..da77b01 100644
--- a/ambari-web/app/controllers/wizard/step2_controller.js
+++ b/ambari-web/app/controllers/wizard/step2_controller.js
@@ -333,8 +333,27 @@ App.WizardStep2Controller = Em.Controller.extend({
     return (this.get('hostsError') || this.get('sshKeyError') || this.get('sshUserError'))
 ;
   }.property('hostsError', 'sshKeyError', 'sshUserError'),
 
+  setAmbariJavaHome: function(){
+    App.ajax.send({
+      name: 'ambari.service',
+      sender: this,
+      success: 'onGetAmbariJavaHomeSuccess',
+      error: 'onGetAmbariJavaHomeError'
+    });
+  },
+
+  onGetAmbariJavaHomeSuccess: function(data) {
+    this.set('content.installOptions.javaHome',data.RootServiceComponents.properties['java.home']);
+  },
+
+  onGetAmbariJavaHomeError: function() {
+    console.warn('can\'t get java.home value from server');
+    this.set('content.installOptions.javaHome',App.defaultJavaHome);
+  },
+
   saveHosts: function(){
     this.set('content.hosts', this.getHostInfo());
+    this.setAmbariJavaHome();
     App.router.send('next');
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0c0cd24/ambari-web/app/templates/wizard/step2.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step2.hbs b/ambari-web/app/templates/wizard/step2.hbs
index 4dc09c9..685dc74 100644
--- a/ambari-web/app/templates/wizard/step2.hbs
+++ b/ambari-web/app/templates/wizard/step2.hbs
@@ -114,21 +114,6 @@
     </label>
     {{/unless}}
     
-    {{#if isInstaller}}
-    <label {{bindAttr class=":checkbox"}}>
-      <div class="java-home">
-      {{view Ember.Checkbox checkedBinding="content.installOptions.isJavaHome"}}
-        {{t installer.step2.javaHome.label}}
-        <a href="javascript:void(null)"
-           rel="popover"
-          {{translateAttr title="installer.step2.javaHome.tooltip.title" data-content="installer.step2.javaHome.tooltip.content"}}>
-            {{t installer.step2.javaHome.tooltip.title}}</a>
-      </div>
-    </label>
-    <label class="checkbox">
-      {{view view.textFieldView valueBinding="content.installOptions.javaHome" isEnabledBinding="content.installOptions.isJavaHome"
placeholderName="installer.step2.javaHome.tooltip.placeholder"}}
-    </label>
-    {{/if}}
   </div>
   <div class="btn-area">
     {{#unless view.parentView.controller.hideBackButton}}
@@ -138,4 +123,4 @@
       {{t installer.step2.registerAndConfirm}} &rarr;</a>
   </div>
 
-</div>
\ No newline at end of file
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0c0cd24/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 5783ba0..65bca1d 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -998,6 +998,10 @@ var urls = {
         async: false
       };
     }
+  },
+  'ambari.service': {
+    'real': '/services/AMBARI/components/AMBARI_SERVER',
+    'mock': ''
   }
 };
 /**


Mime
View raw message