Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

feat(chart): add legend name when defined #5817

Merged
merged 1 commit into from
Oct 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions www/class/centreonGraph.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,14 @@ public function initCurveList()
($ds_val['service_id'] == $metric['service_id'] || $ds_val['service_id'] == '') &&
preg_match($metricPattern, $metric['metric_name'])) {
$ds_data_associated = $ds_val;
if ($ds_val['ds_legend'] != '') {
$this->metrics[$metric["metric_id"]]["metric_legend"] = $ds_val['ds_legend'];
}
break;
} else {
if (preg_match($metricPattern, $metric['metric_name']) && $ds_val['ds_legend'] != '') {
$this->metrics[$metric["metric_id"]]["metric_legend"] = $ds_val['ds_legend'];
}
}

/* Check regular */
Expand Down