ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/php/graphs/graphs_config.inc.php
(Generate patch)

Comparing projects/cms/source/reports/php/graphs/graphs_config.inc.php (file contents):
Revision 1.4 by tdb, Mon Mar 10 21:17:41 2003 UTC vs.
Revision 1.9 by tdb, Sat Jun 30 11:24:38 2007 UTC

# Line 1 | Line 1
1 < <?
1 > <?php
2  
3   # The rrd directory containing the images
4   $imgdir = "/home/pkg/iscream/public_html/graphs";
# Line 44 | Line 44 | function tidyName($machine_name, $string) {
44          return "Paging";
45      }
46  
47 +    # The name Uptime information should be displayed as
48 +    if($string == "uptime") {
49 +        return "Uptime";
50 +    }
51 +
52      # Values use for escaping (need to match the perl scripts!)
53      # / converted to a decimal then hex'd
54      $hex_slash = "_2f";
55      # _ converted to a decimal then hex'd
56      $hex_underscore = "_5f";
57 +    # (space) converted to a decimal then hex'd
58 +    $hex_space = "_20";
59 +    # : converted to a decimal then hex'd
60 +    $hex_colon = "_3A";
61 +    # \ converted to a decimal then hex'd
62 +    $hex_bslash = "_5C";
63 +    # ( converted to a decimal then hex'd
64 +    $hex_rbracket = "_28";
65 +    # ) converted to a decimal then hex'd
66 +    $hex_lbracket = "_29";
67 +    # + converted to a decimal then hex'd
68 +    $hex_plus = "_2B";
69 +    # # converted to a decimal then hex'd
70 +    $hex_hash = "_23";
71      
72      # The name Disk information should be displayed as
73      if(preg_match("/^disk-(\S+)$/", $string, $matches)) {
74          $string = preg_replace("/$hex_slash/", "/", $matches[1]);
75          $string = preg_replace("/$hex_underscore/", "_", $string);
76 +        $string = preg_replace("/$hex_bslash/", "\\", $string);
77 +        $string = preg_replace("/$hex_space/", " ", $string);
78 +        $string = preg_replace("/$hex_colon/", ":", $string);
79          return "Disk usage: $string";
80      }
81  
82      # The name DiskIO information should be displayed as
83      if(preg_match("/^diskio-(\S+)$/", $string, $matches)) {
84 <        return "Disk IO: $matches[1]";
84 >        $string = preg_replace("/$hex_slash/", "/", $matches[1]);
85 >        $string = preg_replace("/$hex_underscore/", "_", $string);
86 >        $string = preg_replace("/$hex_bslash/", "\\", $string);
87 >        $string = preg_replace("/$hex_space/", " ", $string);
88 >        $string = preg_replace("/$hex_colon/", ":", $string);
89 >        return "Disk IO: $string";
90      }
91  
92      # The name Network information should be displayed as
93      if(preg_match("/^net-(\S+)$/", $string, $matches)) {
94 <        return "Network usage: $matches[1]";
94 >        $string = preg_replace("/$hex_slash/", "/", $matches[1]);
95 >        $string = preg_replace("/$hex_underscore/", "_", $string);
96 >        $string = preg_replace("/$hex_bslash/", "\\", $string);
97 >        $string = preg_replace("/$hex_space/", " ", $string);
98 >        $string = preg_replace("/$hex_colon/", ":", $string);
99 >        $string = preg_replace("/$hex_lbracket/", "(", $string);
100 >        $string = preg_replace("/$hex_rbracket/", ")", $string);
101 >        $string = preg_replace("/$hex_plus/", "+", $string);
102 >        $string = preg_replace("/$hex_hash/", "#", $string);
103 >        return "Network IO: $string";
104 >    }
105 >
106 >    # The name Mail Queue information should be displayed as
107 >    if(preg_match("/^mailq-(\S+)$/", $string, $matches)) {
108 >        return "Mail Queue Size: $matches[1]";
109      }
110      
111      # The name Queue information should be displayed as

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines