Ad Widget

Collapse

Patch to frontend to add better timeline zoom factors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jhgrc
    Member
    • Jun 2009
    • 52

    #1

    Patch to frontend to add better timeline zoom factors

    This little patch adds 30h visibility to graphs, screens etc. And modifies how the data is presented on scroll bar. Default frontend cannot tidy data so well.

    So 30h => 1d6h, without this patch zabbix would show just 1d (for 30h graph).

    Code:
    Zoom:1h 2h 3h 6h 12h 1d 1d6h 1w 2w
    diff gtlc.js /usr/src/zabbix-1.8.1/frontends/php/js/gtlc.js
    Code:
    1504c1504
    <       var zooms = [3600, (2*3600), (3*3600), (6*3600), (12*3600), 86400, (30*3600), (7*86400), (14*86400), (30*86400), (90*86400), (180*86400), (365*86400)];
    ---
    >       var zooms = [3600, (2*3600), (3*3600), (6*3600), (12*3600), 86400, (7*86400), (14*86400), (30*86400), (90*86400), (180*86400), (365*86400)];
    1512c1512
    <               caption = caption.split(' 0',2)[0].split(' ').join('');
    ---
    >               caption = caption.split(' ',2)[0];
Working...