RRD Graph Custom Tab display friendly description

The other tabs of Status:RRD Graphs put the friendly description of each interface into the drop-down list for selection.
This change makes the Custom tab do that also.
This commit is contained in:
Phil Davis 2015-03-23 23:00:57 +05:45 committed by Renato Botelho
parent 383dd72d61
commit 8e2a5adf50

View File

@ -480,7 +480,11 @@ function get_dates($curperiod, $graph) {
if($curcat == "custom") {
foreach ($custom_databases as $db => $database) {
$optionc = explode("-", $database);
$search = array("-", ".rrd", $optionc);
$friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc[0]));
if (empty($friendly)) {
$friendly = $optionc[0];
}
$search = array("-", ".rrd", $optionc[0]);
$replace = array(" :: ", "", $friendly);
echo "<option value=\"{$database}\"";
$prettyprint = ucwords(str_replace($search, $replace, $database));