fix: Set the from / to for graphs in the devices list #6262 (#6264)

This commit is contained in:
Neil Lathwood
2017-03-23 21:09:55 -05:00
committed by Tony Murray
co-authored by Tony Murray
parent 0c237ba9c1
commit a4be2a4892
+1 -1
View File
@@ -64,7 +64,7 @@ foreach (get_graph_subtypes($type) as $avail_type) {
} else {
$is_selected = '';
}
$graphs_types .= '<option value="' . generate_url($vars, array('format' => 'graph_' . $avail_type)) . '" ' . $is_selected . '>' . $display_type . '</option>';
$graphs_types .= '<option value="' . generate_url($vars, array('format' => 'graph_' . $avail_type, 'from' => $vars['from'] ?: $config['time']['day'], 'to' => $vars['to'] ?: $config['time']['now'])) . '" ' . $is_selected . '>' . $display_type . '</option>';
}
$graphs_types .= '</select>';