Procházet zdrojové kódy

AMBARI-2854. ResourceManager heap widget jumps on hover. (onechiporenko via yusaku)

Yusaku Sako před 11 roky
rodič
revize
e7ac8688d0

+ 4 - 1
ambari-web/app/styles/application.less

@@ -2073,6 +2073,9 @@ table.graphs {
 
 
   #dashboard-widgets{
+    .caption {
+      height: 25px;
+    }
     .thumbnails {
       margin-left: 8px;
     }
@@ -2122,6 +2125,7 @@ table.graphs {
       text-decoration: none;
       display: none;
       position: relative;
+      z-index: 7;
     }
     .hidden-info-two-line{
       padding-top: 60px;
@@ -2178,7 +2182,6 @@ table.graphs {
       }
       .hidden-info-general{
         display: block;
-        z-index: 7;
       }
       .caption{
         margin-left: -6px;

+ 5 - 1
ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js

@@ -98,7 +98,11 @@ App.PieChartDashboardWidgetView = App.DashboardWidgetView.extend({
 
     data: function() {
       return this.get('parentView.dataForPieChart');
-    }.property('parentView.dataForPieChart'),
+    }.property(),
+
+    setData: function() {
+      this.set('data', this.get('parentView.dataForPieChart'));
+    }.observes('parentView.dataForPieChart'),
 
     contentColor: function () {
       var used = parseFloat(this.get('data')[0]);

+ 0 - 10
ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js

@@ -25,16 +25,6 @@ App.ResourceManagerHeapPieChartView = App.PieChartDashboardWidgetView.extend({
   id: '24',
   model_type: 'yarn',
 
-  /*hiddenInfo: function () {
-    var memUsed = this.get('model').get('jvmMemoryHeapUsed');
-    var memCommitted = this.get('model').get('jvmMemoryHeapCommitted');
-    var percent = memCommitted > 0 ? ((100 * memUsed) / memCommitted) : 0;
-    var result = [];
-    result.pushObject(percent.toFixed(1) + '% used');
-    result.pushObject(numberUtils.bytesToSize(memUsed, 1, "parseFloat", 1000000) + ' of ' + numberUtils.bytesToSize(memCommitted, 1, "parseFloat", 1000000));
-    return result;
-  }.property('model.jvmMemoryHeapUsed', 'model.jvmMemoryHeapCommitted'),*/
-
   modelFieldMax: 'jvmMemoryHeapCommitted',
   modelFieldUsed: 'jvmMemoryHeapUsed',