Luckily, this patch only changes two files, include/html/inc_timespan_settings.php and include/html/inc_timespan_selector.php. Two new files for the images are needed, images/move_left.gif and images/move_right.gif.
Installing
Copy attached files to your current cacti directory.
Code: Select all
tar -zxf cacti_patch_time_shifter_images.tar.gz
Code: Select all
patch -p1 < cacti_patch_time_shifter.patch
Using
This patch extends the time selection bar with a new feature, see
It features time shifting left and time shifting right. In each case, Start and End Time of the Graph(s) are shifted by the current interval size (= time difference between start and end). Using the Default timespan of one day, shifting left will shift one day to the past. You may shift multiple times, of course.
If you do not want to only shift for one day, please select first a new Preset, e.g. one week.
Now, shifting left will shift for one week (actually, I shifted left TWO times, because my graphs did not contain any data for one week backwards)
Please notice: when shifting right, no times exceeding the actual time() are allowed. When shifting beyond that time, end time will automatically be set to the actual timestamp. Start time will be set to end time - interval.
Time Shifter will not only work in Tree Mode but also in Preview Mode
Due to the fact, that changes are little, it may be possible to apply this patch to other versions of cacti.
As always Use this at your own risk
happy cactiing
Reinhard