mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated devices Graphs links to use non-static time references
This commit is contained in:
@@ -99,8 +99,8 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
function submitCustomRange(frmdata) {
|
||||
var reto = /to=([0-9])+/g;
|
||||
var refrom = /from=([0-9])+/g;
|
||||
var reto = /to=([0-9a-zA-Z\-])+/g;
|
||||
var refrom = /from=([0-9a-zA-Z\-])+/g;
|
||||
var tsto = moment(frmdata.dtpickerto.value).unix();
|
||||
var tsfrom = moment(frmdata.dtpickerfrom.value).unix();
|
||||
frmdata.selfaction.value = frmdata.selfaction.value.replace(reto, 'to=' + tsto);
|
||||
|
||||
@@ -51,7 +51,7 @@ foreach ($menu_options as $option => $text) {
|
||||
if ($vars['format'] == 'graph_'.$option) {
|
||||
echo("<span class='pagemenu-selected'>");
|
||||
}
|
||||
echo('<a href="' . generate_url($vars, array('format' => 'graph_'.$option, 'from' => $config['time']['day'], 'to' => $config['time']['now'])) . '">' . $text . '</a>');
|
||||
echo('<a href="' . generate_url($vars, array('format' => 'graph_'.$option, 'from' => '-24h', 'to' => 'now')) . '">' . $text . '</a>');
|
||||
if ($vars['format'] == 'graph_'.$option) {
|
||||
echo("</span>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user