浏览代码

AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk)

aBabiichuk 11 年之前
父节点
当前提交
76e3bb4ba1

+ 1 - 1
ambari-web/app/templates/main/service/services/storm.hbs

@@ -19,7 +19,7 @@
 {{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}}
 <tr>
   <td>
-    <a href="#" {{action filterHosts view.superVisorComponents.[0]}}>
+    <a href="#" {{action filterHosts view.filterComponent}}>
       {{t dashboard.services.storm.supervisors}}
     </a>
   </td>

+ 8 - 0
ambari-web/app/views/main/service/services/storm.js

@@ -23,6 +23,14 @@ App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({
   templateName: require('templates/main/service/services/storm'),
   serviceName: 'STORM',
 
+  /**
+   * this parameter is used to fiter hosts by component name
+   * used in mainHostController.filterByComponent() method
+   */
+  filterComponent: function() {
+    return Em.Object.create({componentName: 'SUPERVISOR'});
+  }.property(),
+
   freeSlotsPercentage: function() {
     return Math.round(this.get('service.freeSlots')/this.get('service.totalSlots')*100);
   }.property('service.freeSlots', 'service.totalSlots'),