summaryrefslogtreecommitdiff
path: root/cfg
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-03-19 22:01:53 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-03-19 22:02:59 -0400
commitde3d574804637c5f99e0993c0d4750c218fde07c (patch)
tree3f5429646ac1b9a7f6f20c86aa55ca593dbef4df /cfg
parent51ad09fc770f9eb24a0f143156610dfe850c6e8e (diff)
do page layout with golden-layout
Diffstat (limited to 'cfg')
-rw-r--r--cfg/jarmon-proton.js20
-rw-r--r--cfg/jarmon-winston.js22
2 files changed, 9 insertions, 33 deletions
diff --git a/cfg/jarmon-proton.js b/cfg/jarmon-proton.js
index 532f802..28afef2 100644
--- a/cfg/jarmon-proton.js
+++ b/cfg/jarmon-proton.js
@@ -4,15 +4,7 @@
* Some example recipes for Collectd RRD data - you *will* need to modify this
* based on the RRD data available on your system.
*/
-
-$(function() {
-
- for (var i = 0; i < jarmon.timeRangeShortcuts.length; i++) {
- if (jarmon.timeRangeShortcuts[i][0] === 'last day') {
- jarmon.timeRangeShortcuts[i][2] = true;
- }
- }
-
+define(['jarmon'], function(jarmon) {
var srv = 'https://proton.parabola.nu/collectd/proton.parabola.nu/'
var tabRecipes = [
@@ -143,13 +135,9 @@ $(function() {
}
};
- var chartTemplate = $(".jarmon.proton .chart-container").remove();
-
- jarmon.buildTabbedChartUi(
- chartTemplate,
+ return {
+ name: 'proton',
chartRecipes,
- $('.jarmon.proton .tabbed-chart-interface'),
tabRecipes,
- $('.jarmon.proton .chartRangeControl')
- );
+ };
});
diff --git a/cfg/jarmon-winston.js b/cfg/jarmon-winston.js
index 1349928..8d05999 100644
--- a/cfg/jarmon-winston.js
+++ b/cfg/jarmon-winston.js
@@ -4,15 +4,7 @@
* Some example recipes for Collectd RRD data - you *will* need to modify this
* based on the RRD data available on your system.
*/
-
-$(function() {
-
- for (var i = 0; i < jarmon.timeRangeShortcuts.length; i++) {
- if (jarmon.timeRangeShortcuts[i][0] === 'last day') {
- jarmon.timeRangeShortcuts[i][2] = true;
- }
- }
-
+define(['jarmon'], function(jarmon) {
var srv = 'https://winston.parabola.nu/collectd/winston.parabola.nu/'
var tabRecipes = [
@@ -142,13 +134,9 @@ $(function() {
*/
};
- var chartTemplate = $(".jarmon.winston .chart-container").remove();
-
- jarmon.buildTabbedChartUi(
- chartTemplate,
+ return {
+ name: 'winston',
chartRecipes,
- $('.jarmon.winston .tabbed-chart-interface'),
- tabRecipes,
- $('.jarmon.winston .chartRangeControl')
- );
+ tabRecipes
+ };
});