//
// ========================================================
// Copyright (c) 2012 Whamcloud, Inc.  All rights reserved.
// ========================================================

function LoadFSGraph_EditFS(filesystem)
{
  var spaceUsageFetchMatric = "kbytestotal kbytesfree filestotal filesfree";
  var fs_Pie_Space_Data_Api_Url = "get_fs_stats_for_targets/";
  /*******************************************************************************/
  var chartConfig_Pie_DB = 
  {
    chart:{
      renderTo: '',
      width: '100',
      height: '100',
      backgroundColor: null,
      plotShadow: false,
      borderWidth: 0,

    },
    colors: [
      '#A6C56D', 
      '#C76560'
       ],
    zoomType: 'xy',
    title: {},
    xAxis:{ categories: [], text: '' },
    yAxis:{ title:{text:''}, plotLines: [{value: 0,width: 1, color: '#808080' }]},
    credits:{ enabled:false },
    legend: {enabled: false},
    tooltip:
    {
      formatter: function() 
        {
          return '<b>'+ this.point.name +'</b>: '+ this.y +' %';
        }
     },
     plotOptions:
     {
       pie:{allowPointSelect: true,cursor: 'pointer',showInLegend: true, dataLabels: {enabled: false}}
     },
     series: []
  };
 
  obj_ost_pie_space = JSON.parse(JSON.stringify(chartConfig_Pie_DB));
  obj_ost_pie_space.title.text = null;
  obj_ost_pie_space.chart.renderTo = "editfs_space_usage";
  
  var free=0,used=0;
  free = Math.round(((filesystem.bytes_free)/(filesystem.bytes_total))*100);
  used = Math.round(100 - free);
  var freeData = [],usedData = [];
  freeData.push(free);
  usedData.push(used);

  obj_ost_pie_space.series = [{
  type: 'pie',
  name: '',
  data: [
     ['Free',    free],
     ['Used',    used]
    ]
  }];
  chart = new Highcharts.Chart(obj_ost_pie_space);

  obj_ost_pie_inode = JSON.parse(JSON.stringify(chartConfig_Pie_DB));
  obj_ost_pie_inode.title.text = null;
  obj_ost_pie_inode.chart.renderTo = "editfs_inode_usage";

  var free=0,used=0;
  free = Math.round(((filesystem.files_free)/(filesystem.files_total))*100);
  used = Math.round(100 - free);

  var freeFilesData = [],totalFilesData = [];
  freeFilesData.push(free);
  totalFilesData.push(used);

  obj_ost_pie_inode.series = [{
  type: 'pie',
  name: '',
  data: [
     ['Free',    free],
     ['Used',    used]
   ]
  }];
  chart = new Highcharts.Chart(obj_ost_pie_inode);
}

@@ -223,232 +223,8 @@
 )%0A%7B%0A
-  var spaceUsageFetchMatric = %22kbytestotal kbytesfree filestotal filesfree%22;%0A  var fs_Pie_Space_Data_Api_Url = %22get_fs_stats_for_targets/%22;%0A  /*******************************************************************************/%0A
   va
@@ -245,17 +245,16 @@
 Pie_DB =
- 
 %0A  %7B%0A   
@@ -399,16 +399,38 @@
 dth: 0,%0A
+      animation: false
 %0A    %7D,%0A
@@ -722,134 +722,24 @@
 tip:
-%0A    %7B%0A      formatter: function() %0A        %7B%0A          return '%3Cb%3E'+ this.point.name +'%3C/b%3E: '+ this.y +' %25';%0A        %7D%0A     
+ %7Benabled: false
 %7D,%0A 
@@ -774,16 +774,26 @@
    pie:%7B
+%0A         
 allowPoi
@@ -806,31 +806,51 @@
 ct: 
-true,cursor: 'pointer',
+false,%0A         cursor: 'normal',%0A         
 show
@@ -864,16 +864,25 @@
 d: true,
+%0A        
  dataLab
@@ -902,16 +902,51 @@
 : false%7D
+,%0A         animation: false%0A       
 %7D%0A     %7D
@@ -972,16 +972,20 @@
  %7D;%0A %0A  
+var 
 obj_ost_
@@ -1151,33 +1151,16 @@
  %0A  var 
-free=0,used=0;%0A  
 free = M
@@ -1220,32 +1220,36 @@
 total))*100);%0A  
+var 
 used = Math.roun
@@ -1469,33 +1469,26 @@
     %5D%0A  %7D%5D;%0A
+%0A
  
- chart =
  new Highcha
@@ -1516,24 +1516,28 @@
 _space);%0A%0A  
+var 
 obj_ost_pie_
@@ -1701,25 +1701,8 @@
 var 
-free=0,used=0;%0A  
 free
@@ -1770,24 +1770,28 @@
 l))*100);%0A  
+var 
 used = Math.
@@ -2046,16 +2046,8 @@
 %5D;%0A 
- chart =
  new

Remove animation on FS pie charts