master: null, // the master chart (state), to which all others
// are synchronized
- force_before_ms: null, // the timespan to sync all other charts
+ force_before_ms: null, // the timespan to sync all other charts
force_after_ms: null,
// set a new master
that.tm.last_hidden = new Date().getTime();
}
}
-
+
that.___chartIsHidden___ = true;
}
};
// process end event
- document.onmouseup =
- document.ontouchend =
+ document.onmouseup =
+ document.ontouchend =
this.element_legend_childs.resize_handler.onmouseup =
this.element_legend_childs.resize_handler.ontouchend =
function(e) {
if(typeof this.fixed_min_duration === 'undefined')
this.fixed_min_duration = Math.round((this.chartWidth() / 30) * this.chart.update_every * 1000);
-
+
var min_duration = this.fixed_min_duration;
var current_duration = Math.round(this.view_before - this.view_after);
// the final wanted duration
var wanted_duration = before - after;
-
+
// to allow panning, accept just a point below our minimum
if((current_duration - this.data_update_every) < min_duration)
min_duration = current_duration - this.data_update_every;
// console.log('adusting view_after from ' + this.view_after + ' to ' + this.data_after);
this.view_after = this.data_after;
}
-
+
if(this.view_before > this.data_before) {
// console.log('adusting view_before from ' + this.view_before + ' to ' + this.data_before);
this.view_before = this.data_before;
// bootstrap modal switching
$('.modal').on('hidden.bs.modal', NETDATA.onscroll);
$('.modal').on('shown.bs.modal', NETDATA.onscroll);
-
+
NETDATA.parseDom(NETDATA.chartRefresher);
}
}
else {
NETDATA.chartLibraries.sparkline.enabled = false;
- if(typeof callback === "function")
+ if(typeof callback === "function")
callback();
}
};
state.log('interactionModel.mousewheel()');
// Take the offset of a mouse event on the dygraph canvas and
- // convert it to a pair of percentages from the bottom left.
+ // convert it to a pair of percentages from the bottom left.
// (Not top left, bottom is where the lower value is.)
function offsetToPercentage(g, offsetX, offsetY) {
// This is calculating the pixel offset of the leftmost date.
}
else // stacked
state.morris_instance = new Morris.Area(state.morris_options);
-
+
return true;
};
NETDATA.percentFromValueMax = function(value, max) {
if(value === null) value = 0;
if(max < value) max = value;
-
+
var pcent = 0;
if(max !== 0) {
pcent = Math.round(value * 100 / max);
var value = data.result[0];
var max = self.data('easypiechart-max-value') || null;
var adjust = self.data('easypiechart-adjust') || null;
-
+
if(max === null) {
max = data.max;
state.easyPieChartMax = null;
animate: self.data('easypiechart-rotate') || {duration: 500, enabled: true},
easing: self.data('easypiechart-easing') || undefined
});
-
+
// when we just re-create the chart
// do not animate the first update
var animate = true;
speed = 1000000000;
else if(typeof status === 'number')
speed = status;
-
+
state.gauge_instance.animationSpeed = speed;
state.___gaugeOld__.speed = speed;
}
minLabel: null,
maxLabel: null
};
-
+
// we will always feed a percentage
state.gauge_instance.minValue = 0;
state.gauge_instance.maxValue = 100;
<meta name="author" content="costa@tsaousis.gr">
<link rel="shortcut icon" href="images/seo-performance-multi-size.ico">
-
+
<link rel="apple-touch-icon" href="images/seo-performance-72.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/seo-performance-72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/seo-performance-114.png">
position: relative;
z-index: -2;
}
- h1:before, h2:before {
- display: block;
- content: " ";
+ h1:before, h2:before {
+ display: block;
+ content: " ";
margin-top: -70px;
height: 70px;
- visibility: hidden;
+ visibility: hidden;
}
.p {
}
.chart-message {
- display: block;
+ display: block;
margin-top: 10px;
}
function gaugeChart(title, width, dimensions, colors) {
if(typeof colors === 'undefined')
colors = '';
-
+
if(typeof dimensions === 'undefined')
dimensions = '';
-
+
return '<div data-netdata="CHART_UNIQUE_ID"'
+ ' data-dimensions="' + dimensions + '"'
+ ' data-chart-library="gauge"'
height: menuHeight(charts[c].menu, options.chartsHeight)
};
}
-
+
if(charts[c].priority < menus[charts[c].menu].priority)
menus[charts[c].menu].priority = charts[c].priority;
height: submenuHeight(charts[c].menu, charts[c].submenu, menus[charts[c].menu].height)
};
}
-
+
if(charts[c].priority < menus[charts[c].menu].submenus[charts[c].submenu].priority)
menus[charts[c].menu].submenus[charts[c].submenu].priority = charts[c].priority;
document.getElementById('hostname').innerHTML = options.hostname;
document.getElementById('hostname').href = NETDATA.serverDefault;
document.title = options.hostname + ' dashboard';
-
+
renderChartsAndMenu(data);
// prepare our DOM
$('#sidebar').on('affixed.bs.affix', function() {
$(this).removeAttr('style');
});
-
+
/* activate bootstrap scrollspy (needed for sidebar) */
$(document.body).scrollspy({
target: '#sidebar',
$('#stop_updates_when_focus_is_lost').change(function() { NETDATA.setOption('stop_updates_when_focus_is_lost', $(this).prop('checked')); });
$('#smooth_plot').change(function() { NETDATA.setOption('smooth_plot', $(this).prop('checked')); });
$('#pan_and_zoom_data_padding').change(function() { NETDATA.setOption('pan_and_zoom_data_padding', $(this).prop('checked')); });
-
+
if(document.location.hostname === demo_hostname)
setTimeout(function() {
$('#welcomeModal').modal();