Browse Source

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

Xi Wang 10 years ago
parent
commit
1ab3bb551d

+ 1 - 1
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';

+ 1 - 0
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',

+ 1 - 1
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>

+ 3 - 2
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}}

+ 7 - 5
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);