summaryrefslogtreecommitdiff
path: root/public-src/main.js
diff options
context:
space:
mode:
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();
+});