From de3d574804637c5f99e0993c0d4750c218fde07c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 19 Mar 2018 22:01:53 -0400 Subject: do page layout with golden-layout --- cfg/jarmon-proton.js | 20 ++++---------------- cfg/jarmon-winston.js | 22 +++++----------------- 2 files changed, 9 insertions(+), 33 deletions(-) (limited to 'cfg') 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 + }; }); -- cgit v1.2.3