summaryrefslogtreecommitdiff
path: root/public-src/main.js
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 /public-src/main.js
parent51ad09fc770f9eb24a0f143156610dfe850c6e8e (diff)
do page layout with golden-layout
Diffstat (limited to 'public-src/main.js')
-rw-r--r--public-src/main.js59
1 files changed, 55 insertions, 4 deletions
diff --git a/public-src/main.js b/public-src/main.js
index ebb09a9..0979000 100644
--- a/public-src/main.js
+++ b/public-src/main.js
@@ -1,5 +1,56 @@
define([
- //'jquerytools/dateinput',
- 'cfg/jarmon-winston',
- 'cfg/jarmon-proton',
-], {});
+ 'golden-layout',
+ 'jarmon',
+ './cfg/jarmon-proton.js',
+ './cfg/jarmon-winston.js',
+ './components/gl/jarmon-tabbed-chart-ui.js',
+ './components/gl/html.js',
+], function(
+ GoldenLayout,
+ jarmon,
+ cfgProton,
+ cfgWinston,
+ glJarmon,
+ glHTML,
+) {
+ jQuery.migrateMute = true;
+
+ // set the default plot range
+ for (var i = 0; i < jarmon.timeRangeShortcuts.length; i++) {
+ if (jarmon.timeRangeShortcuts[i][0] === 'last day') {
+ jarmon.timeRangeShortcuts[i][2] = true;
+ }
+ }
+
+ var layoutManager = new GoldenLayout({
+ settings: {
+ },
+ content: [{
+ type: 'row',
+ content: [
+ {
+ title: 'proton',
+ type: 'component',
+ componentName: 'jarmon:tabbed-chart-ui',
+ componentState: cfgProton,
+ },
+ {
+ title: 'winston',
+ type: 'component',
+ componentName: 'jarmon:tabbed-chart-ui',
+ componentState: cfgWinston,
+ },
+ {
+ title: 'TLS',
+ type: 'component',
+ componentName: 'html',
+ componentState: document.getElementById("tls").innerHTML,
+ },
+ ],
+ }],
+ }, document.body);
+ layoutManager.registerComponent('jarmon:tabbed-chart-ui', glJarmon);
+ layoutManager.registerComponent('html', glHTML);
+
+ layoutManager.init();
+});