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.3 by tdb, Mon Oct 21 13:02:58 2002 UTC vs.
Revision 1.7 by tdb, Wed Jun 15 10:41:24 2005 UTC

# 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      
70      # The name Disk information should be displayed as
71      if(preg_match("/^disk-(\S+)$/", $string, $matches)) {
72          $string = preg_replace("/$hex_slash/", "/", $matches[1]);
73          $string = preg_replace("/$hex_underscore/", "_", $string);
74 +        $string = preg_replace("/$hex_bslash/", "\\", $string);
75 +        $string = preg_replace("/$hex_space/", " ", $string);
76 +        $string = preg_replace("/$hex_colon/", ":", $string);
77          return "Disk usage: $string";
78 +    }
79 +
80 +    # The name DiskIO information should be displayed as
81 +    if(preg_match("/^diskio-(\S+)$/", $string, $matches)) {
82 +        $string = preg_replace("/$hex_slash/", "/", $matches[1]);
83 +        $string = preg_replace("/$hex_underscore/", "_", $string);
84 +        $string = preg_replace("/$hex_bslash/", "\\", $string);
85 +        $string = preg_replace("/$hex_space/", " ", $string);
86 +        $string = preg_replace("/$hex_colon/", ":", $string);
87 +        return "Disk IO: $string";
88 +    }
89 +
90 +    # The name Network information should be displayed as
91 +    if(preg_match("/^net-(\S+)$/", $string, $matches)) {
92 +        $string = preg_replace("/$hex_slash/", "/", $matches[1]);
93 +        $string = preg_replace("/$hex_underscore/", "_", $string);
94 +        $string = preg_replace("/$hex_bslash/", "\\", $string);
95 +        $string = preg_replace("/$hex_space/", " ", $string);
96 +        $string = preg_replace("/$hex_colon/", ":", $string);
97 +        $string = preg_replace("/$hex_lbracket/", "(", $string);
98 +        $string = preg_replace("/$hex_rbracket/", ")", $string);
99 +        $string = preg_replace("/$hex_plus/", "+", $string);
100 +        return "Network IO: $string";
101 +    }
102 +
103 +    # The name Mail Queue information should be displayed as
104 +    if(preg_match("/^mailq-(\S+)$/", $string, $matches)) {
105 +        return "Mail Queue Size: $matches[1]";
106      }
107      
108      # The name Queue information should be displayed as

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines