Changeset 4888 for modules

Show
Ignore:
Timestamp:
08/15/07 23:11:01 (6 years ago)
Author:
gregmac
Message:

Fix #2278

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/dashboard/module.xml

    r4877 r4888  
    22  <rawname>dashboard</rawname> 
    33  <name>System Dashboard</name> 
    4   <version>0.3.3</version> 
     4  <version>0.3.3.1</version> 
    55  <candisable>no</candisable> 
    66  <canuninstall>no</canuninstall> 
     
    1818  </depends> 
    1919  <changelog> 
     20    *0.3.3.1* Cosmetic fix (#2278 - long mount point paths) 
    2021    *0.3.3* Improved detection of webserver failing, More MySQL detection fixes 
    2122    *0.3.2.1* #2246 make FreePBX Connections visible, #2250 check for SSHPORT 
  • modules/branches/2.3/dashboard/page.index.php

    r4876 r4888  
    5757  } 
    5858 
     59  $chars_per_pixel = 7; 
     60  if (strlen($text) * $chars_per_pixel > $total_width - 35) { 
     61    $text_trimmed = substr($text,0, floor(($total_width - 35) / $chars_per_pixel)).'..'; 
     62  } else { 
     63    $text_trimmed = $text; 
     64  } 
     65 
    5966  $clean_val = preg_replace("/[^0-9\.]*/","",$val); 
    6067 
     
    8491  $display_value = ($show_percent ? $percent."%" : $val.$real_units);  
    8592   
    86   $out = "<div class=\"databox graphbox\" style=\"width:".$total_width."px;\">\n"; 
     93  $out = "<div class=\"databox graphbox\" style=\"width:".$total_width."px;\" title=\"".$tooltip."\">\n"; 
    8794  $out .= " <div class=\"bargraph ".$graph_class."\" style=\"width:".$width."px;\"></div>\n"; 
    88   $out .= " <div class=\"dataname\">".$text."</div>\n"; 
    89   $out .= " <div class=\"datavalue\"><a href=\"#\" title=\"".$tooltip."\">".$display_value."</a></div>\n"; 
     95  $out .= " <div class=\"dataname\">".$text_trimmed."</div>\n"; 
     96  $out .= " <div class=\"datavalue\">".$display_value."</div>\n"; 
    9097  $out .= "</div>\n"; 
    9198   
     
    186193   
    187194  $out .= "<h4>"._("Disks")."</h4>"; 
    188   foreach ($sysinfo->filesystems() as $fs) {  
     195  foreach ($sysinfo->filesystems() as $fs) { 
    189196    $out .= draw_graph($fs["mount"], "GB", number_format($fs["used"]/1024/1024, 2), $fs["size"]/1024/1024); 
    190197  }