You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2013/11/21 18:36:00 UTC

git commit: AMBARI-3836. Unable to close manage-config-groups dialog when only Default group present (alexantonenko)

Updated Branches:
  refs/heads/trunk 3b784aba3 -> b77bf1c7d


AMBARI-3836. Unable to close manage-config-groups dialog when only Default group present (alexantonenko)


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

Branch: refs/heads/trunk
Commit: b77bf1c7dc5031950c17e408fa8531c98de6c8d7
Parents: 3b784ab
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Nov 21 18:30:43 2013 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Nov 21 18:30:43 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/item.js | 19 +++++++++++------
 ambari-web/app/messages.js                      |  4 ++--
 ambari-web/app/styles/application.less          | 22 +++++++++-----------
 .../app/templates/main/service/info/configs.hbs |  2 +-
 .../templates/main/service/new_config_group.hbs |  8 +++----
 5 files changed, 30 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b77bf1c7/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 350318b..71e56f7 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -279,17 +279,24 @@ App.MainServiceItemController = Em.Controller.extend({
       updateConfigGroupOnServicePage: function () {
         var mainServiceInfoConfigsController = App.get('router.mainServiceInfoConfigsController');
         var selectedConfigGroup = mainServiceInfoConfigsController.get('selectedConfigGroup');
+        var managedConfigGroups = this.get('subViewController.configGroups');
+
         //check whether selectedConfigGroup was selected
-        if (selectedConfigGroup) {
-          var managedConfigGroups = this.get('subViewController.configGroups');
+        if(!selectedConfigGroup){
+          return;
+        }
+
+        if(selectedConfigGroup.isDefault) {
+          mainServiceInfoConfigsController.set('selectedConfigGroup',  managedConfigGroups.findProperty('isDefault', true));
+        }else{
           selectedConfigGroup = managedConfigGroups.findProperty('id', selectedConfigGroup.id);
-          if (selectedConfigGroup) {
+          if(selectedConfigGroup){
             mainServiceInfoConfigsController.set('selectedConfigGroup', selectedConfigGroup);
-          } else {
-            mainServiceInfoConfigsController.set('selectedConfigGroup', managedConfigGroups.findProperty('isDefault', true));
+          }else{
+            mainServiceInfoConfigsController.set('selectedConfigGroup',  managedConfigGroups.findProperty('isDefault', true));
           }
         }
-        mainServiceInfoConfigsController.set('configGroups', this.get('subViewController.configGroups'));
+        mainServiceInfoConfigsController.set('configGroups',this.get('subViewController.configGroups'));
       },
       updateButtons: function(){
         var modified = this.get('subViewController.isHostsModified');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b77bf1c7/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 1c5dffc..2a59bb0 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1100,8 +1100,8 @@ Em.I18n.translations = {
   'services.service.config.saved':'Saved Configuration Changes',
   'services.service.config.notSaved':'Unable to Save Configuration Changes',
   'services.service.config.restartService.TooltipMessage':'<b>Restart Service</b><br>Stale configuration used by {0} components on {1} hosts:{2}',
-  'services.service.config.restartService.needToRestart':'<strong>Restart Service</strong> ',
-  'services.service.config.restartService.needToRestartEnd':'should be restated',
+  'services.service.config.restartService.needToRestart':'<strong>Restart Required.</strong> ',
+  'services.service.config.restartService.needToRestartEnd':'should be restarted',
   'service.service.config.restartService.hostsShouldBeRestarted':'Hosts should be restarted',
   'service.service.config.restartService.componentsShouldBeRestarted':'Components should be restarted',
   'services.service.config.saved.message':'Service configuration changes saved successfully.',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b77bf1c7/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 7e2c337..b540f1e 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4963,18 +4963,16 @@ i.icon-asterisks {
   }
 }
 
-.textarea-full-width {
-  padding-right: 10px;
-  textarea {
-    width: 100%;
-    margin: 0;
+.new-config-group-div {
+  td {
+    vertical-align: top;
   }
-}
-
-.textarea-full-width {
-  padding-right: 10px;
-  textarea {
-    width: 100%;
-    margin: 0;
+  .textarea-full-width {
+    padding-right: 10px;
+    textarea {
+      width: 100%;
+      margin: 0;
+    }
   }
 }
+

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b77bf1c7/ambari-web/app/templates/main/service/info/configs.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/configs.hbs b/ambari-web/app/templates/main/service/info/configs.hbs
index 15bc6a6..b87321f 100644
--- a/ambari-web/app/templates/main/service/info/configs.hbs
+++ b/ambari-web/app/templates/main/service/info/configs.hbs
@@ -23,7 +23,7 @@
         {{#if App.isAdmin}}
           <div>
             <div class="alert alert-warning clearfix">
-              <i class="icon-refresh"></i> {{{view.needToRestartMessage}}} <a href="#" {{action showComponentsShouldBeRestarted target="controller"}}>{{view.componentsCount}} {{t common.components}}</a> {{t on}} <a href="#" {{action showHostsShouldBeRestarted target="controller"}}>{{view.hostsCount}} {{t dashboard.services.hosts}}</a> {{t services.service.config.restartService.needToRestartEnd}}
+              <i class="icon-refresh"></i> {{{view.needToRestartMessage}}} {{t services.service.config.restartService.needToRestart}}  <a href="#" {{action showComponentsShouldBeRestarted target="controller"}}>{{view.componentsCount}} {{t common.components}}</a> {{t on}} <a href="#" {{action showHostsShouldBeRestarted target="controller"}}>{{view.hostsCount}} {{t dashboard.services.hosts}}</a> {{t services.service.config.restartService.needToRestartEnd}}
 
               <button {{bindAttr class=":btn :restart-components :pull-right view.startComponentsIsDisabled::btn-success view.startComponentsIsDisabled:disabled" }} {{action restartComponents target="controller"}}>
                 {{t hosts.host.details.needToRestart.startButton}}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b77bf1c7/ambari-web/app/templates/main/service/new_config_group.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/new_config_group.hbs b/ambari-web/app/templates/main/service/new_config_group.hbs
index 026d74c..f0a29e6 100644
--- a/ambari-web/app/templates/main/service/new_config_group.hbs
+++ b/ambari-web/app/templates/main/service/new_config_group.hbs
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<p>
+<div class="new-config-group-div">
   <table>
     <tr>
       <td>{{t services.service.config_groups_popup.group_name_lable }}:</td>
@@ -24,9 +24,9 @@
     </tr>
     <tr>
       <td>{{t services.service.config_groups_popup.group_desc_lable }}:</td>
-      <td class="textarea-full-width" style="width: 100%;">
+      <td class="textarea-full-width">
         {{view Ember.TextArea valueBinding="configGroupDesc" rows="4"}}
       </td>
     </tr>
-</table>
-</p>
\ No newline at end of file
+  </table>
+</div>
\ No newline at end of file