dashboard
Version:
Create dashboards with gadgets on node.js
83 lines (68 loc) • 2.41 kB
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/';
var specUrl = [
'wwt_viewport.xml',
'name_resolve.xml',
'viewport_sky.xml',
'data_gadget.xml',
'get_data.xml',
'plot_dataset.xml',
'dataset_selector.xml',
];
// othe gadget names
//'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) - 45;
function renderGadgets() {
for (var i=0; i<specUrl.length; i++) {
var g = shindig.container.createGadget({specUrl: specHostUrl + specUrl[i], width: gadgetWidth});
shindig.container.addGadget(g);
}
shindig.container.layoutManager.setGadgetChromeIds(['gadgets-left-1', 'gadgets-right-1', 'gadgets-right-2', 'gadgets-left-3', 'gadgets-right-3', 'gadgets-right-4', 'gadgets-left-4']);
shindig.container.renderGadgets();
};
</script>
</head>
<body onLoad="renderGadgets();">
<h2>Ascot</h2>
<div class="demo-intro">
<h4>World Wide Telescope Demo</h4>
<p>
</p>
</div>
<div>
<div id="layout-root-left" class="gadgets-layout-root-left">
<div id="gadgets-left-1" class="gadgets-gadget-chrome"></div>
<div id="gadgets-left-2" class="gadgets-gadget-chrome"></div>
<div id="gadgets-left-3" class="gadgets-gadget-chrome"></div>
<div id="gadgets-left-4" class="gadgets-gadget-chrome"></div>
</div>
<div id="layout-root-right" class="gadgets-layout-root-right">
<div id="gadgets-right-1" class="gadgets-gadget-chrome"></div>
<div id="gadgets-right-2" class="gadgets-gadget-chrome"></div>
<div id="gadgets-right-3" class="gadgets-gadget-chrome"></div>
<div id="gadgets-right-4" class="gadgets-gadget-chrome"></div>
</div>
<div style="clear:both;"></div>
</div>
</body>
</html>