UNPKG

dashboard

Version:

Create dashboards with gadgets on node.js

90 lines (82 loc) 3.01 kB
<!-- * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. --> <!DOCTYPE html> <html> <head> <title>Ascot</title> <!-- default container look and feel --> <link rel="stylesheet" href="../css/gadgetsDemo2.css"> <script type="text/javascript" src="../../../gadgets/js/shindig-container:rpc.js?c=1&debug=0&nocache=1"></script> <script type="text/javascript"> var specHostUrl = 'http://' + window.location.hostname + '/gadgets_ian/trunk/gadgets/'; var specUrlLeft = [ 'viewport_sky.xml', 'name_resolve.xml', 'dataset_selector.xml', 'get_data.xml', 'plot_dataset.xml', 'plot_dataset.xml', 'data_table.xml', 'data_gadget.xml', ]; var specUrlRight = [ //'input_coords.xml', //'color_mag_sel_db.xml', //'hr_diagram.xml', //'plot.xml', //'galaxy_cm.xml', //'wwtViewer.xml' //'gadget_template.xml', //'kml_sandbox.xml' //'output_data.xml', //'get_objects.xml', //'frameInfo.xml', //'input_address.xml' //'hr_diagram.xml' ]; // This container lays out and renders gadgets itself. var gadgetWidth = (window.innerWidth / 2) - 50; function renderGadgetsLeft() { shindig.container.layoutManager = new shindig.ColumnLayoutManager(['layout-root-left', 'layout-root-right']); for (var i = 0; i < specUrlLeft.length ; i++) { shindig.container.addGadget( shindig.container.createGadget({specUrl: specHostUrl + specUrlLeft[i], width: gadgetWidth}) ); } shindig.container.renderGadgets(); } function renderGadgetsRight() { debugger; shindig.container.layoutManager = new shindig.FloatLeftLayoutManager('layout-root-right'); for (var j = 0; j < specUrlRight.length ; j++) { shindig.container.addGadget( shindig.container.createGadget({specUrl: specHostUrl + specUrlRight[j], width: gadgetWidth}) ); } shindig.container.renderGadgets(); }; </script> </head> <body onLoad="renderGadgetsLeft();"> <h2>Ascot</h2> <div> <div id="layout-root-left" class="gadgets-layout-root-left"></div> <div id="layout-root-right" class="gadgets-layout-root-right"></div> <div style="clear:both;"></div> </div> </body> </html>