diff -ru zabbix-2.2.1/include/defines.inc.php zabbix-test/include/defines.inc.php --- zabbix-2.2.1/include/defines.inc.php 2013-12-09 04:15:15.000000000 -0500 +++ zabbix-test/include/defines.inc.php 2014-01-06 12:28:58.000000000 -0500 @@ -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 minute 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 -ru zabbix-2.2.1/js/functions.js zabbix-test/js/functions.js --- zabbix-2.2.1/js/functions.js 2013-12-09 04:15:14.000000000 -0500 +++ zabbix-test/js/functions.js 2014-01-06 14:12:04.000000000 -0500 @@ -917,7 +917,8 @@ } var days = parseInt((timestamp - years * 31536000 - months * 2592000) / 86400), - hours = parseInt((timestamp - years * 31536000 - months * 2592000 - days * 86400) / 3600); + hours = parseInt((timestamp - years * 31536000 - months * 2592000 - days * 86400) / 3600), + minutes = parseInt((timestamp - years * 31536000 - months * 2592000 - days * 86400 - hours * 3600) / 60); // due to imprecise calculations it is possible that the remainder contains 12 whole months but no whole years if (months == 12) { @@ -935,7 +936,10 @@ if (hours.toString().length == 1) { hours = '0' + hours; } - } + if (minutes.toString().length == 1) { + minutes = '0' + minutes; + } +} var str = (years == 0) ? '' : years + locale['S_YEAR_SHORT'] + ' '; str += (months == 0) ? '' : months + locale['S_MONTH_SHORT'] + ' '; @@ -943,7 +947,7 @@ ? days + locale['S_DAY_SHORT'] + ' ' : ((days == 0) ? '' : days + locale['S_DAY_SHORT'] + ' '); str += (hours == 0) ? '' : hours + locale['S_HOUR_SHORT'] + ' '; - + str += (minutes == 0) ? '' : minutes + locale['S_MINUTE_SHORT'] + ' '; return str; } diff -ru zabbix-2.2.1/js/gtlc.js zabbix-test/js/gtlc.js --- zabbix-2.2.1/js/gtlc.js 2013-12-09 04:15:14.000000000 -0500 +++ zabbix-test/js/gtlc.js 2014-01-06 14:15:39.000000000 -0500 @@ -316,7 +316,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) { @@ -1131,7 +1131,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) { @@ -1174,7 +1174,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'); @@ -1700,7 +1700,7 @@ this.period = this.calcPeriod(); 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'] + ']' : ''); } } }, diff -ru zabbix-2.2.1/jsLoader.php zabbix-test/jsLoader.php --- zabbix-2.2.1/jsLoader.php 2013-12-09 04:15:17.000000000 -0500 +++ zabbix-test/jsLoader.php 2014-01-06 14:07:35.000000000 -0500 @@ -96,6 +96,7 @@ 'S_MONTH_SHORT' => _x('m', 'month short'), 'S_DAY_SHORT' => _x('d', 'day short'), 'S_HOUR_SHORT' => _x('h', 'hour short'), + 'S_MINUTE_SHORT' => _x('m', 'minute short'), 'S_DATE_FORMAT' => FILTER_TIMEBAR_DATE_FORMAT ), 'functions.js' => array(