minidashboard, WIP
Scott Baker [Tue, 13 Jan 2015 09:05:09 +0000 (01:05 -0800)]
planetstack/templates/admin/newminidashboard.html

index 1c87c57..cef5b94 100644 (file)
@@ -3,6 +3,7 @@
 <script>
     admin_object_name = "{{ opts.object_name }}";
     admin_object_id = "{{ original.id }}";
+    admin_object_controller = "princeton"; // XXX fix this
     if (admin_object_id == "") {
         admin_object_id = undefined;
     } else {
 
 <script src="{% static 'page_analytics.js' %}"></script>
 
-<script>
-/** If the analytics have already been set -- read them in on page load **/
-if (typeof window != "undefined") {
-    if (typeof window.pageAnalyticsData != "undefined") {
-        updatePageAnalyticsData(window.pageAnalyticsData);
-    }
-}
-
-var loadingDiv = '<div class="loading">Loading ...</div>';
-
-$( "#nodeCountDialog" ).dialog({ title: "OpenCloud Node Count", modal: true, position: ['middle', 40], resizable: true, autoOpen: false, width: 527, height: 400});
-$( "#miniDashNodeCount" ).click(function() {
-    $( "#nodeCountGraph" ).html(loadingDiv);
-    $( "#nodeCountDialog" ).dialog("open");
-    var options = {"title": "Node Count", "vAxis": {"title": "Number of Nodes", "minValue": 0, "maxValue": 250}};
-    renderChart(true,"#nodeCountDialog", "#nodeCountGraph", window.pageAnalyticsUrl, 0, 2, google.visualization.data.sum, options);
-    });
-
-$( "#bandwidthDialog" ).dialog({ title: "OpenCloud Bandwidth", modal: true, position: ['middle', 40], resizable: true, autoOpen: false, width: 527, height: 400});
-$( "#miniDashBandwidth" ).click(function() {
-    $("#bandwidthGraph").html(loadingDiv);
-    $( "#bandwidthDialog" ).dialog("open");
-    var options = {"title": "Total Bandwidth", "vAxis": {"title": "Total Bandwidth (Gbps)"}};
-    renderChart(true,"#bandwidthDialog", "#bandwidthGraph", window.pageBandwidthUrl, 0, 1, agg_bandwidth, options);
-    });
-
-$( "#avgLoadDialog" ).dialog({ title: "OpenCloud Average Load", modal: true, position: ['middle', 40], resizable: true, autoOpen: false, width: 527, height: 400});
-$( "#miniDashAvgLoad" ).click(function() {
-    $("#avgLoadGraph").html(loadingDiv);
-    $( "#avgLoadDialog" ).dialog("open");
-    var options = {"title": "Average CPU Utilization", "vAxis": {"title": "CPU Utilization (%)"}};
-    renderChart(true,"#avgLoadDialog", "#avgLoadGraph", window.pageAnalyticsUrl, 0, 1, google.visualization.data.sum, options);
-    });
-
-</script>
-
 {% endif %}