diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-19 22:01:53 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-19 22:02:59 -0400 |
commit | de3d574804637c5f99e0993c0d4750c218fde07c (patch) | |
tree | 3f5429646ac1b9a7f6f20c86aa55ca593dbef4df /cfg | |
parent | 51ad09fc770f9eb24a0f143156610dfe850c6e8e (diff) |
do page layout with golden-layout
Diffstat (limited to 'cfg')
-rw-r--r-- | cfg/jarmon-proton.js | 20 | ||||
-rw-r--r-- | cfg/jarmon-winston.js | 22 |
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 + }; }); |