You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/08/27 01:25:09 UTC

git commit: AMBARI-7025. Config Groups: clean up for config history page (group name filter .etc)(xiwang)

Repository: ambari
Updated Branches:
  refs/heads/trunk f8193e941 -> 1ab3bb551


AMBARI-7025. Config Groups: clean up for config history page (group name filter .etc)(xiwang)


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

Branch: refs/heads/trunk
Commit: 1ab3bb551d3e122fe1a771b98aaffe0e52434f40
Parents: f8193e9
Author: Xi Wang <xi...@apache.org>
Authored: Tue Aug 26 15:17:56 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Tue Aug 26 16:24:39 2014 -0700

----------------------------------------------------------------------
 .../main/dashboard/config_history_controller.js         |  2 +-
 ambari-web/app/messages.js                              |  1 +
 .../templates/common/configs/config_history_flow.hbs    |  2 +-
 .../app/templates/main/dashboard/config_history.hbs     |  5 +++--
 .../app/views/main/dashboard/config_history_view.js     | 12 +++++++-----
 5 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/controllers/main/dashboard/config_history_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
index 2a81c28..002504a 100644
--- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js
+++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
@@ -41,7 +41,7 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin
   colPropAssoc: function () {
     var associations = [];
     associations[1] = 'serviceVersion';
-    associations[2] = 'configGroupName';
+    associations[2] = 'configGroup';
     associations[3] = 'createTime';
     associations[4] = 'author';
     associations[5] = 'briefNotes';

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index a02b729..31d3e69 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1994,6 +1994,7 @@ Em.I18n.translations = {
   'dashboard.configHistory.table.empty' : 'No history to display',
   'dashboard.configHistory.table.version.versionText' : 'V{0}',
   'dashboard.configHistory.table.current.tooltip' : 'Current config for {0}:{1}',
+  'dashboard.configHistory.table.restart.tooltip' : 'Restart required',
   'dashboard.configHistory.table.filteredHostsInfo': '{0} of {1} versions showing',
   'dashboard.configHistory.info-bar.authoredOn': 'authored on',
   'dashboard.configHistory.info-bar.changesToHandle': 'Changes to handle',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/templates/common/configs/config_history_flow.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index 9aade90..8fe54c8 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -93,7 +93,7 @@
           {{/unless}}
         </ul>
       </div>
-        <div class="label-wrapper span9" data-toggle="tooltip" {{bindAttr data-original-title="view.displayedServiceVersion.briefNotes" }}>
+        <div class="label-wrapper span9" data-toggle="tooltip" {{bindAttr data-original-title="view.displayedServiceVersion.briefNotes"}}>
           <span class="label label-info">{{view.displayedServiceVersion.versionText}}</span>
           {{#if view.displayedServiceVersion.isCurrent}}
             <span class="label label-success">{{t common.current}}</span>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/templates/main/dashboard/config_history.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/config_history.hbs b/ambari-web/app/templates/main/dashboard/config_history.hbs
index de8680a..f0101cc 100644
--- a/ambari-web/app/templates/main/dashboard/config_history.hbs
+++ b/ambari-web/app/templates/main/dashboard/config_history.hbs
@@ -45,11 +45,12 @@
               <a {{action goToServiceConfigs item.serviceName}}>
                 {{item.serviceName}}
               </a>
-              <i {{bindAttr class=":icon-refresh :restart-required-service item.isRestartRequired::hidden"}}></i>
+              <i {{bindAttr class=":icon-refresh :restart-required-service item.isRestartRequired::hidden"}}
+                rel="Tooltip" {{translateAttr data-original-title="dashboard.configHistory.table.restart.tooltip"}}></i>
             </td>
             <td>{{item.configGroupName}}
               {{#if item.isCurrent}}
-                <span class="label label-success" rel="currentTooltip"
+                <span class="label label-success" rel="Tooltip"
                 {{bindAttr data-original-title="item.currentTooltip"}}>{{t common.current}}
                 </span>
               {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/views/main/dashboard/config_history_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js b/ambari-web/app/views/main/dashboard/config_history_view.js
index 72d37eb..feeae73 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -77,7 +77,6 @@ App.MainConfigHistoryView = App.TableView.extend({
     this.addObserver('displayLength', this, 'updatePagination');
     this.set('controller.isPolling', true);
     this.get('controller').doPolling();
-    //App.tooltip(this.$("[rel='currentTooltip']"));
   },
 
   /**
@@ -132,8 +131,12 @@ App.MainConfigHistoryView = App.TableView.extend({
     column: 2,
     fieldType: 'filter-input-width',
     content: function () {
-      return ['All'].concat(['g1','g2','gn']);
-    }.property('App.router.clusterController.isLoaded'),
+      var groupName = App.ServiceConfigVersion.find().mapProperty('groupName').uniq();
+      if (groupName.indexOf(null) > -1 ){
+        groupName.splice(groupName.indexOf(null), 1);
+      }
+      return ['All'].concat(groupName);
+    }.property('App.router.mainConfigHistoryController.content'),
     onChangeValue: function () {
       this.get('parentView').updateFilter(this.get('column'), this.get('actualValue'), 'select');
     },
@@ -187,7 +190,7 @@ App.MainConfigHistoryView = App.TableView.extend({
   ConfigVersionView: Em.View.extend({
     tagName: 'tr',
     didInsertElement: function(){
-      App.tooltip(this.$("[rel='currentTooltip']"));
+      App.tooltip(this.$("[rel='Tooltip']"));
     }
   }),
 
@@ -196,7 +199,6 @@ App.MainConfigHistoryView = App.TableView.extend({
    */
   refresh: function () {
     var self = this;
-
     this.set('filteringComplete', false);
     this.get('controller').load().done(function () {
       self.set('filteringComplete', true);