diff -ur zabbix/include/defines.inc.php zabbix-patched/include/defines.inc.php --- zabbix/include/defines.inc.php 2013-07-31 04:33:05.000000000 -0400 +++ zabbix-patched/include/defines.inc.php 2013-08-19 18:24:27.000000000 -0400 @@ -28,7 +28,7 @@ define('ZBX_LOGIN_ATTEMPTS', 5); define('ZBX_LOGIN_BLOCK', 30); // sec -define('ZBX_MIN_PERIOD', 3600); // 1 hour +define('ZBX_MIN_PERIOD', 60); // 1 min define('ZBX_MAX_PERIOD', 63072000); // the maximum period for the time bar control, ~2 years (2 * 365 * 86400) define('ZBX_PERIOD_DEFAULT', 3600); // 1 hour diff -ur zabbix/js/functions.js zabbix-patched/js/functions.js --- zabbix/js/functions.js 2013-07-31 04:33:03.000000000 -0400 +++ zabbix-patched/js/functions.js 2013-08-19 18:27:06.000000000 -0400 @@ -887,7 +887,7 @@ var days = parseInt((timestamp - years * 31536000 - months * 2592000 - weeks * 604800) / 86400); var hours = parseInt((timestamp - years * 31536000 - months * 2592000 - weeks * 604800 - days * 86400) / 3600); - //var minutes = parseInt((timestamp - years * 31536000 - months * 2592000 - weeks * 604800 - days * 86400 - hours * 3600) / 60); + var minutes = parseInt((timestamp - years * 31536000 - months * 2592000 - weeks * 604800 - days * 86400 - hours * 3600) / 60); if (isTsDouble) { if (months.toString().length == 1) { @@ -902,9 +902,9 @@ if (hours.toString().length == 1) { hours = '0' + hours; } - /*if (minutes.toString().length == 1) { + if (minutes.toString().length == 1) { minutes = '0' + minutes; - }*/ + } } var str = (years == 0) ? '' : years + locale['S_YEAR_SHORT'] + ' '; @@ -916,7 +916,7 @@ ? '' : days + locale['S_DAY_SHORT'] + ' '; str += (hours == 0) ? '' : hours + locale['S_HOUR_SHORT'] + ' '; - //str += (minutes == 0) ? '' : minutes + locale['S_MINUTE_SHORT'] + ' '; + str += (minutes == 0) ? '' : minutes + locale['S_MINUTE_SHORT'] + ' '; return str; } diff -ur zabbix/js/gtlc.js zabbix-patched/js/gtlc.js --- zabbix/js/gtlc.js 2013-07-31 04:33:03.000000000 -0400 +++ zabbix-patched/js/gtlc.js 2013-08-19 18:31:16.000000000 -0400 @@ -309,7 +309,7 @@ _period: null, // selected period _now: false, // state if time is set to NOW _isNow: false, // state if time is set to NOW (for outside usage) - minperiod: 3600, // minimal allowed period + minperiod: 60, // minimal allowed period maxperiod: null, // max period in seconds initialize: function($super, period, starttime, usertime, endtime, maximumPeriod, isNow) { @@ -1124,7 +1124,7 @@ appendZoomLinks: function() { var timeline = timeControl.timeline.endtime() - timeControl.timeline.starttime(); var caption = ''; - var zooms = [3600, 7200, 10800, 21600, 43200, 86400, 604800, 1209600, 2592000, 7776000, 15552000, 31536000]; + var zooms = [300, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400, 604800, 1209600, 2592000, 7776000, 15552000, 31536000]; var links = 0; for (var key in zooms) { @@ -1167,7 +1167,7 @@ appendNavLinks: function() { var timeline = timeControl.timeline.endtime() - timeControl.timeline.starttime(); var caption = ''; - var moves = [3600, 43200, 86400, 604800, 2592000, 15552000, 31536000]; + var moves = [300, 900, 1800, 3600, 43200, 86400, 604800, 2592000, 15552000, 31536000]; var links = 0; var tmp_laquo = document.createElement('span'); @@ -1693,6 +1693,7 @@ if (!is_null(this.dom_box)) { this.dom_period_span.innerHTML = formatTimestamp(this.period, false, true) + (this.period < 3600 ? ' [min 1h]' : ''); + this.dom_period_span.innerHTML = formatTimestamp(this.period, false, true) + (this.period < 60 ? ' [min 1' + locale['S_MINUTE_SHORT'] + ']' : ''); } } },