bring demo changes from node33 and node36 into master
diff --git a/planetstack/core/static/hpc_historical.css b/planetstack/core/static/hpc_historical.css
new file mode 100644
index 0000000..412e986
--- /dev/null
+++ b/planetstack/core/static/hpc_historical.css
@@ -0,0 +1,812 @@
+.row {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+
+.row:before,
+.row:after {
+ display: table;
+ content: " ";
+}
+
+.row:after {
+ clear: both;
+}
+
+.row:before,
+.row:after {
+ display: table;
+ content: " ";
+}
+
+.row:after {
+ clear: both;
+}
+
+.col-xs-1,
+.col-sm-1,
+.col-md-1,
+.col-lg-1,
+.col-xs-2,
+.col-sm-2,
+.col-md-2,
+.col-lg-2,
+.col-xs-3,
+.col-sm-3,
+.col-md-3,
+.col-lg-3,
+.col-xs-4,
+.col-sm-4,
+.col-md-4,
+.col-lg-4,
+.col-xs-5,
+.col-sm-5,
+.col-md-5,
+.col-lg-5,
+.col-xs-6,
+.col-sm-6,
+.col-md-6,
+.col-lg-6,
+.col-xs-7,
+.col-sm-7,
+.col-md-7,
+.col-lg-7,
+.col-xs-8,
+.col-sm-8,
+.col-md-8,
+.col-lg-8,
+.col-xs-9,
+.col-sm-9,
+.col-md-9,
+.col-lg-9,
+.col-xs-10,
+.col-sm-10,
+.col-md-10,
+.col-lg-10,
+.col-xs-11,
+.col-sm-11,
+.col-md-11,
+.col-lg-11,
+.col-xs-12,
+.col-sm-12,
+.col-md-12,
+.col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11 {
+ float: left;
+}
+
+.col-xs-12 {
+ width: 100%;
+}
+
+.col-xs-11 {
+ width: 91.66666666666666%;
+}
+
+.col-xs-10 {
+ width: 83.33333333333334%;
+}
+
+.col-xs-9 {
+ width: 75%;
+}
+
+.col-xs-8 {
+ width: 66.66666666666666%;
+}
+
+.col-xs-7 {
+ width: 58.333333333333336%;
+}
+
+.col-xs-6 {
+ width: 50%;
+}
+
+.col-xs-5 {
+ width: 41.66666666666667%;
+}
+
+.col-xs-4 {
+ width: 33.33333333333333%;
+}
+
+.col-xs-3 {
+ width: 25%;
+}
+
+.col-xs-2 {
+ width: 16.666666666666664%;
+}
+
+.col-xs-1 {
+ width: 8.333333333333332%;
+}
+
+.col-xs-pull-12 {
+ right: 100%;
+}
+
+.col-xs-pull-11 {
+ right: 91.66666666666666%;
+}
+
+.col-xs-pull-10 {
+ right: 83.33333333333334%;
+}
+
+.col-xs-pull-9 {
+ right: 75%;
+}
+
+.col-xs-pull-8 {
+ right: 66.66666666666666%;
+}
+
+.col-xs-pull-7 {
+ right: 58.333333333333336%;
+}
+
+.col-xs-pull-6 {
+ right: 50%;
+}
+
+.col-xs-pull-5 {
+ right: 41.66666666666667%;
+}
+
+.col-xs-pull-4 {
+ right: 33.33333333333333%;
+}
+
+.col-xs-pull-3 {
+ right: 25%;
+}
+
+.col-xs-pull-2 {
+ right: 16.666666666666664%;
+}
+
+.col-xs-pull-1 {
+ right: 8.333333333333332%;
+}
+
+.col-xs-pull-0 {
+ right: 0;
+}
+
+.col-xs-push-12 {
+ left: 100%;
+}
+
+.col-xs-push-11 {
+ left: 91.66666666666666%;
+}
+
+.col-xs-push-10 {
+ left: 83.33333333333334%;
+}
+
+.col-xs-push-9 {
+ left: 75%;
+}
+
+.col-xs-push-8 {
+ left: 66.66666666666666%;
+}
+
+.col-xs-push-7 {
+ left: 58.333333333333336%;
+}
+
+.col-xs-push-6 {
+ left: 50%;
+}
+
+.col-xs-push-5 {
+ left: 41.66666666666667%;
+}
+
+.col-xs-push-4 {
+ left: 33.33333333333333%;
+}
+
+.col-xs-push-3 {
+ left: 25%;
+}
+
+.col-xs-push-2 {
+ left: 16.666666666666664%;
+}
+
+.col-xs-push-1 {
+ left: 8.333333333333332%;
+}
+
+.col-xs-push-0 {
+ left: 0;
+}
+
+.col-xs-offset-12 {
+ margin-left: 100%;
+}
+
+.col-xs-offset-11 {
+ margin-left: 91.66666666666666%;
+}
+
+.col-xs-offset-10 {
+ margin-left: 83.33333333333334%;
+}
+
+.col-xs-offset-9 {
+ margin-left: 75%;
+}
+
+.col-xs-offset-8 {
+ margin-left: 66.66666666666666%;
+}
+
+.col-xs-offset-7 {
+ margin-left: 58.333333333333336%;
+}
+
+.col-xs-offset-6 {
+ margin-left: 50%;
+}
+
+.col-xs-offset-5 {
+ margin-left: 41.66666666666667%;
+}
+
+.col-xs-offset-4 {
+ margin-left: 33.33333333333333%;
+}
+
+.col-xs-offset-3 {
+ margin-left: 25%;
+}
+
+.col-xs-offset-2 {
+ margin-left: 16.666666666666664%;
+}
+
+.col-xs-offset-1 {
+ margin-left: 8.333333333333332%;
+}
+
+.col-xs-offset-0 {
+ margin-left: 0;
+}
+
+@media (min-width: 768px) {
+ .container {
+ width: 750px;
+ }
+ .col-sm-1,
+ .col-sm-2,
+ .col-sm-3,
+ .col-sm-4,
+ .col-sm-5,
+ .col-sm-6,
+ .col-sm-7,
+ .col-sm-8,
+ .col-sm-9,
+ .col-sm-10,
+ .col-sm-11 {
+ float: left;
+ }
+ .col-sm-12 {
+ width: 100%;
+ }
+ .col-sm-11 {
+ width: 91.66666666666666%;
+ }
+ .col-sm-10 {
+ width: 83.33333333333334%;
+ }
+ .col-sm-9 {
+ width: 75%;
+ }
+ .col-sm-8 {
+ width: 66.66666666666666%;
+ }
+ .col-sm-7 {
+ width: 58.333333333333336%;
+ }
+ .col-sm-6 {
+ width: 50%;
+ }
+ .col-sm-5 {
+ width: 41.66666666666667%;
+ }
+ .col-sm-4 {
+ width: 33.33333333333333%;
+ }
+ .col-sm-3 {
+ width: 25%;
+ }
+ .col-sm-2 {
+ width: 16.666666666666664%;
+ }
+ .col-sm-1 {
+ width: 8.333333333333332%;
+ }
+ .col-sm-pull-12 {
+ right: 100%;
+ }
+ .col-sm-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .col-sm-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .col-sm-pull-9 {
+ right: 75%;
+ }
+ .col-sm-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .col-sm-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .col-sm-pull-6 {
+ right: 50%;
+ }
+ .col-sm-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .col-sm-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .col-sm-pull-3 {
+ right: 25%;
+ }
+ .col-sm-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .col-sm-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .col-sm-pull-0 {
+ right: 0;
+ }
+ .col-sm-push-12 {
+ left: 100%;
+ }
+ .col-sm-push-11 {
+ left: 91.66666666666666%;
+ }
+ .col-sm-push-10 {
+ left: 83.33333333333334%;
+ }
+ .col-sm-push-9 {
+ left: 75%;
+ }
+ .col-sm-push-8 {
+ left: 66.66666666666666%;
+ }
+ .col-sm-push-7 {
+ left: 58.333333333333336%;
+ }
+ .col-sm-push-6 {
+ left: 50%;
+ }
+ .col-sm-push-5 {
+ left: 41.66666666666667%;
+ }
+ .col-sm-push-4 {
+ left: 33.33333333333333%;
+ }
+ .col-sm-push-3 {
+ left: 25%;
+ }
+ .col-sm-push-2 {
+ left: 16.666666666666664%;
+ }
+ .col-sm-push-1 {
+ left: 8.333333333333332%;
+ }
+ .col-sm-push-0 {
+ left: 0;
+ }
+ .col-sm-offset-12 {
+ margin-left: 100%;
+ }
+ .col-sm-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .col-sm-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .col-sm-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .col-sm-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .col-sm-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .col-sm-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .col-sm-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .col-sm-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+ .col-sm-offset-0 {
+ margin-left: 0;
+ }
+}
+
+@media (min-width: 992px) {
+ .container {
+ width: 970px;
+ }
+ .col-md-1,
+ .col-md-2,
+ .col-md-3,
+ .col-md-4,
+ .col-md-5,
+ .col-md-6,
+ .col-md-7,
+ .col-md-8,
+ .col-md-9,
+ .col-md-10,
+ .col-md-11 {
+ float: left;
+ }
+ .col-md-12 {
+ width: 100%;
+ }
+ .col-md-11 {
+ width: 91.66666666666666%;
+ }
+ .col-md-10 {
+ width: 83.33333333333334%;
+ }
+ .col-md-9 {
+ width: 75%;
+ }
+ .col-md-8 {
+ width: 66.66666666666666%;
+ }
+ .col-md-7 {
+ width: 58.333333333333336%;
+ }
+ .col-md-6 {
+ width: 50%;
+ }
+ .col-md-5 {
+ width: 41.66666666666667%;
+ }
+ .col-md-4 {
+ width: 33.33333333333333%;
+ }
+ .col-md-3 {
+ width: 25%;
+ }
+ .col-md-2 {
+ width: 16.666666666666664%;
+ }
+ .col-md-1 {
+ width: 8.333333333333332%;
+ }
+ .col-md-pull-12 {
+ right: 100%;
+ }
+ .col-md-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .col-md-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .col-md-pull-9 {
+ right: 75%;
+ }
+ .col-md-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .col-md-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .col-md-pull-6 {
+ right: 50%;
+ }
+ .col-md-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .col-md-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .col-md-pull-3 {
+ right: 25%;
+ }
+ .col-md-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .col-md-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .col-md-pull-0 {
+ right: 0;
+ }
+ .col-md-push-12 {
+ left: 100%;
+ }
+ .col-md-push-11 {
+ left: 91.66666666666666%;
+ }
+ .col-md-push-10 {
+ left: 83.33333333333334%;
+ }
+ .col-md-push-9 {
+ left: 75%;
+ }
+ .col-md-push-8 {
+ left: 66.66666666666666%;
+ }
+ .col-md-push-7 {
+ left: 58.333333333333336%;
+ }
+ .col-md-push-6 {
+ left: 50%;
+ }
+ .col-md-push-5 {
+ left: 41.66666666666667%;
+ }
+ .col-md-push-4 {
+ left: 33.33333333333333%;
+ }
+ .col-md-push-3 {
+ left: 25%;
+ }
+ .col-md-push-2 {
+ left: 16.666666666666664%;
+ }
+ .col-md-push-1 {
+ left: 8.333333333333332%;
+ }
+ .col-md-push-0 {
+ left: 0;
+ }
+ .col-md-offset-12 {
+ margin-left: 100%;
+ }
+ .col-md-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .col-md-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .col-md-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .col-md-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .col-md-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .col-md-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .col-md-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .col-md-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+ .col-md-offset-0 {
+ margin-left: 0;
+ }
+}
+
+@media (min-width: 1200px) {
+ .container {
+ width: 1170px;
+ }
+ .col-lg-1,
+ .col-lg-2,
+ .col-lg-3,
+ .col-lg-4,
+ .col-lg-5,
+ .col-lg-6,
+ .col-lg-7,
+ .col-lg-8,
+ .col-lg-9,
+ .col-lg-10,
+ .col-lg-11 {
+ float: left;
+ }
+ .col-lg-12 {
+ width: 100%;
+ }
+ .col-lg-11 {
+ width: 91.66666666666666%;
+ }
+ .col-lg-10 {
+ width: 83.33333333333334%;
+ }
+ .col-lg-9 {
+ width: 75%;
+ }
+ .col-lg-8 {
+ width: 66.66666666666666%;
+ }
+ .col-lg-7 {
+ width: 58.333333333333336%;
+ }
+ .col-lg-6 {
+ width: 50%;
+ }
+ .col-lg-5 {
+ width: 41.66666666666667%;
+ }
+ .col-lg-4 {
+ width: 33.33333333333333%;
+ }
+ .col-lg-3 {
+ width: 25%;
+ }
+ .col-lg-2 {
+ width: 16.666666666666664%;
+ }
+ .col-lg-1 {
+ width: 8.333333333333332%;
+ }
+ .col-lg-pull-12 {
+ right: 100%;
+ }
+ .col-lg-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .col-lg-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .col-lg-pull-9 {
+ right: 75%;
+ }
+ .col-lg-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .col-lg-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .col-lg-pull-6 {
+ right: 50%;
+ }
+ .col-lg-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .col-lg-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .col-lg-pull-3 {
+ right: 25%;
+ }
+ .col-lg-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .col-lg-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .col-lg-pull-0 {
+ right: 0;
+ }
+ .col-lg-push-12 {
+ left: 100%;
+ }
+ .col-lg-push-11 {
+ left: 91.66666666666666%;
+ }
+ .col-lg-push-10 {
+ left: 83.33333333333334%;
+ }
+ .col-lg-push-9 {
+ left: 75%;
+ }
+ .col-lg-push-8 {
+ left: 66.66666666666666%;
+ }
+ .col-lg-push-7 {
+ left: 58.333333333333336%;
+ }
+ .col-lg-push-6 {
+ left: 50%;
+ }
+ .col-lg-push-5 {
+ left: 41.66666666666667%;
+ }
+ .col-lg-push-4 {
+ left: 33.33333333333333%;
+ }
+ .col-lg-push-3 {
+ left: 25%;
+ }
+ .col-lg-push-2 {
+ left: 16.666666666666664%;
+ }
+ .col-lg-push-1 {
+ left: 8.333333333333332%;
+ }
+ .col-lg-push-0 {
+ left: 0;
+ }
+ .col-lg-offset-12 {
+ margin-left: 100%;
+ }
+ .col-lg-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .col-lg-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .col-lg-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .col-lg-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .col-lg-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .col-lg-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .col-lg-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .col-lg-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+ .col-lg-offset-0 {
+ margin-left: 0;
+ }
+}
diff --git a/planetstack/core/static/page_analytics.js b/planetstack/core/static/page_analytics.js
new file mode 100644
index 0000000..017b403
--- /dev/null
+++ b/planetstack/core/static/page_analytics.js
@@ -0,0 +1,83 @@
+function getObjectQuery() {
+ var selectedNodeTxt = $('.currentOriginalNode').text();
+ selectedNodeTxt = selectedNodeTxt.trim();
+ selectedNodeTxt = selectedNodeTxt.split(' ').join('');//selectedNodeTxt.replace(" ", "")
+ var parentNodeTxt = $('.selectedMainNav').text();
+ parentNodeTxt = parentNodeTxt.replace("/\n","");
+ parentNodeTxt = parentNodeTxt.replace("»","");
+ parentNodeTxt = parentNodeTxt.trim();
+ if (parentNodeTxt.length > 0 && parentNodeTxt.charAt(parentNodeTxt.length-1)=='s') {
+ parentNodeTxt = parentNodeTxt.substring(0, parentNodeTxt.length-1);
+ }
+
+ if (parentNodeTxt == "Slice") {
+ return "&slice=" + selectedNodeTxt;
+ } else if (parentNodeTxt == "Site") {
+ return "&site=" + selectedNodeTxt;
+ } else if (parentNodeTxt == "Node") {
+ return "&node=" + selectedNodeTxt;
+ } else {
+ return "";
+ }
+}
+
+
+function setPageStatInt(labelName, valueName, legend, units, value) {
+ $('.'+labelName).text(legend).show();
+ $('.'+valueName).text(Math.round(value)+units).show();
+}
+
+function setPageStatFloat(labelName, valueName, legend, units, value, dp) {
+ $('.'+labelName).text(legend).show();
+ $('.'+valueName).text(Number(value).toFixed(dp)+units).show();
+}
+
+// ----------------------------------------------------------------------------
+// node count and average cpu utilization
+
+function updatePageAnalyticsData(summaryData) {
+ window.pageAnalyticsData = summaryData;
+ lastRow = summaryData.rows.length-1;
+ setPageStatInt("nodesLabel", "nodesValue", "Node Count", "", summaryData.rows[lastRow]["count_hostname"]);
+ setPageStatInt("cpuLabel", "cpuValue", "Avg Load", "%", summaryData.rows[lastRow]["avg_cpu"]);
+}
+
+function updatePageAnalytics() {
+ $.ajax({
+ url : '/analytics/bigquery/?avg=%cpu&count=%hostname' + getObjectQuery(),
+ dataType : 'json',
+ type : 'GET',
+ success: function(newData)
+ {
+ updatePageAnalyticsData(newData);
+ }
+});
+ setTimeout(updatePageAnalytics, 30000);
+}
+
+setTimeout(updatePageAnalytics, 5000);
+
+// ----------------------------------------------------------------------------
+// bandwidth
+
+function updatePageBandwidthData(summaryData) {
+ window.pageBandData = summaryData;
+ lastRow = summaryData.rows.length-1;
+ setPageStatFloat("bandwidthLabel", "bandwidthValue", "Bandwidth", "Gbps", summaryData.rows[lastRow]["sum_computed_bytes_sent_div_elapsed"]*8.0/1024/1024/1024,2);
+}
+
+function updatePageBandwidth() {
+ $.ajax({
+ url : '/analytics/bigquery/?computed=%bytes_sent/%elapsed' + getObjectQuery(),
+ dataType : 'json',
+ type : 'GET',
+ success: function(newData)
+ {
+ updatePageBandwidthData(newData);
+ }
+});
+ setTimeout(updatePageBandwidth, 30000);
+}
+
+setTimeout(updatePageBandwidth, 5000);
+
diff --git a/planetstack/core/static/planetstack.css b/planetstack/core/static/planetstack.css
index d59adb7..76bc23b 100644
--- a/planetstack/core/static/planetstack.css
+++ b/planetstack/core/static/planetstack.css
@@ -1,3 +1,64 @@
+.alignCenter {
+ text-align: center !important;
+ align: center !important;
+}
+table.dataTable tr.odd {
+background-color: white !important;
+}
+table.dataTable tr.odd td.sorting_1 {
+background-color: white !important;
+}
+table.dataTable tr.even td.sorting_1 {
+background-color: white !important;
+}
+table.dataTable thead th div.DataTables_sort_wrapper {
+ font-weight: bold;
+}
+.dashboard-hpc-sliver .ui-widget-header, .dashboard-hpc-sliver .ui-dialog-title, .dashboard-hpc-sliver .ui-dialog-titlebar{
+}
+.ui-widget-overlay {
+ background: black !important;
+}
+.ui-corner-all {
+border-bottom-left-radius: 0px !important;
+border-bottom-right-radius: 0px !important;
+}
+
+#suit-center {
+ min-width: 977px !important;
+}
+#minDashboard {
+ min-width:625px;
+ display:inline;
+ float: right;
+}
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default{
+background: none !important;
+border-top: 0px !important;
+border-left: 0px !important;
+border-right: 0px !important;
+}
+.ui-widget-header {
+background: none !important;
+border-top: 0px !important;
+border-left: 0px !important;
+border-right: 0px !important;
+}
+#suit_form_tabs {
+border-bottom: 1px solid #B5D1EA;
+border-bottom-width: 1px;
+border-bottom-style: solid;
+border-bottom-color: rgb(181, 209, 234);
+color:#105E9E;
+}
+#tabs {
+font-size: 12px;
+border: 0px;
+}
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
+color: #105E9E ;
+}
+
.required:after {color: red ! important; font-size: 18px }
#.btn-success {color:black}
#suit-center {
@@ -25,6 +86,7 @@
/*For increasing the header height*/
.header {
height: 90px;
+min-width: 1321px;
}
/*For changing the background color of the left side navigation list items*/
@@ -488,12 +550,15 @@
background-position: 0;*/
}
-.icon-home ,.icon-deployment ,.icon-site ,.icon-slice ,.icon-user, .icon-reservation{
+.icon-home ,.icon-deployment ,.icon-site ,.icon-slice ,.icon-user, .icon-reservation, .icon-app{
background-position: left center;
width:22px;
height:22px;
}
+.icon-app {
+background-image: url("opencloudApp.png");
+}
.icon-home {
background-image: url("Home.png");
}
diff --git a/planetstack/core/static/planetstack_graphs.js b/planetstack/core/static/planetstack_graphs.js
new file mode 100644
index 0000000..6e62c4b
--- /dev/null
+++ b/planetstack/core/static/planetstack_graphs.js
@@ -0,0 +1,139 @@
+google.load('visualization', '1', {'packages' : ['controls','table','corechart','geochart']});
+
+function renderChartJson(jsondata, yField, xField, legend) {
+ $('#graph').empty();
+ $('#chartsModal').modal('show');
+ $('.modal-body').scrollTop(0);
+
+ var data = new google.visualization.DataTable();
+ data.addColumn("number", "Date");
+ data.addColumn("number", "NodeCount");
+
+ var arr = [];
+ jsondata.rows.forEach(function(d) {
+ arr.push([ +d[yField], +d[xField] ]);
+ });
+
+ console.log(arr);
+
+ data.addRows(arr);
+
+ var lineChart = new google.visualization.ChartWrapper({
+ 'chartType': 'LineChart',
+ 'containerId': 'graph',
+ 'options': {
+ 'width': 520,
+ 'height': 300,
+ 'title': 'Network-wide usage',
+ 'pages': true,
+ 'numRows': 9
+ },
+ 'view': {'columns': [0, 1]}
+ });
+ lineChart.setDataTable(data);
+ lineChart.draw();
+}
+
+function renderChart(origQuery, yColumn, xColumn) {
+ $('#graph').empty();
+ $('#chartsModal').modal('show');
+ $('.modal-body').scrollTop(0)
+
+ var queryString = encodeURIComponent(origQuery);
+ var serverPart = "http://cloud-scrutiny.appspot.com/command?action=send_query&force=ColumnChart&q=";
+ var dataSourceUrl = serverPart + queryString;
+
+ //var dataSourceUrl = "http://node36.princeton.vicci.org:8000/analytics/bigquery/?avg=%25cpu&count=%25hostname&format=raw";
+
+ var query = new google.visualization.Query(dataSourceUrl)
+ query && query.abort();
+ console.log("query.send")
+ query.send(function(response) {handleResponse_psg(response, yColumn, xColumn);});
+ console.log("query.sent")
+}
+
+// NOTE: appended _psg to showLine() and handleResponse() to prevent conflict
+// with Sapan's analytics page.
+
+function showLine_psg(dt) {
+ console.log("showline")
+ var lineChart = new google.visualization.ChartWrapper({
+ 'chartType': 'LineChart',
+ 'containerId': 'graph',
+ 'options': {
+ 'width': 520,
+ 'height': 300,
+ 'title': 'Network-wide usage',
+ 'pages': true,
+ 'numRows': 9
+ },
+ 'view': {'columns': [0, 1]}
+ });
+ lineChart.setDataTable(dt);
+ lineChart.draw();
+}
+
+function handleResponse_psg(response, yColumn, xColumn) {
+ console.log("handleResponse")
+
+ var supportedClasses = {
+ 'Table':google.visualization.Table,
+ 'LineChart':google.visualization.LineChart,
+ 'ScatterChart':google.visualization.ScatterChart,
+ 'ColumnChart':google.visualization.ColumnChart,
+ 'GeoChart':google.visualization.GeoChart,
+ 'PieChart':google.visualization.PieChart,
+ 'Histogram':google.visualization.Histogram};
+
+ var proxy = new google.visualization.ChartWrapper({
+ 'chartType': 'Table',
+ 'containerId': 'graph_work',
+ 'options': {
+ 'width': 800,
+ 'height': 300,
+ pageSize:5,
+ page:'enable',
+ 'legend': 'none',
+ 'title': 'Nodes'
+ },
+ 'view': {'columns': [0,1]}
+ });
+
+ google.visualization.events.addListener(proxy, 'ready', function () {
+ // 0 - time 1 - city 2 - node 3 - site 4 - cpu 5 - bytes
+ var dt = proxy.getDataTable();
+ var groupedData1 = google.visualization.data.group(dt, [yColumn], [{
+ column: xColumn,
+ type: 'number',
+ label: dt.getColumnLabel(xColumn),
+ aggregation: google.visualization.data.sum}]);
+
+ showLine_psg(groupedData1);
+
+ console.log(xColumn);
+ });
+
+ console.log(response.getReasons());
+ console.log(response.getDataTable());
+ console.log(response.getDetailedMessage());
+ console.log(response.getMessage());
+
+ proxy.setDataTable(response.getDataTable());
+
+ proxy.draw();
+}
+
+$('.nodesLabel, .nodesValue').click(function() {
+ var jsonData = window.pageAnalyticsData;
+ renderChart(jsonData.query, 0, 2);
+ //renderChartJson(jsonData, "MinuteTime", "count_hostname", "Node Count");
+});
+
+$('.cpuLabel, .cpuValue').click(function() {
+ var jsonData = window.pageAnalyticsData;
+ renderChart(jsonData.query,0, 1);
+});
+$('.bandwidthLabel, .bandwidthValue').click(function() {
+ var jsonData = window.pageBandData;
+ renderChart(jsonData.query, 0, 1);
+});
diff --git a/planetstack/core/static/planetstack_graphs_old.js b/planetstack/core/static/planetstack_graphs_old.js
new file mode 100644
index 0000000..806afe6
--- /dev/null
+++ b/planetstack/core/static/planetstack_graphs_old.js
@@ -0,0 +1,89 @@
+$(document).ready(function() {
+
+function renderChart(jsonData, yField, xField, legend) {
+ $('#graph').empty();
+ $('#chartsModal').modal('show');
+ $('.modal-body').scrollTop(0)
+ var margin = {top: 0, right: 100, bottom: 100, left: 175},
+ width = 520 - margin.left - margin.right,
+ height = 300 - margin.top - margin.bottom;
+
+ var parseDate = d3.time.format("%Y-%m-%m-%H-%M").parse;
+
+ var x = d3.time.scale()
+ .range([0, width]);
+
+ var y = d3.scale.linear()
+ .range([height, 0]);
+
+ var xAxis = d3.svg.axis()
+ .scale(x)
+ .ticks(d3.time.minutes, 15)
+ .orient("bottom");
+
+ var yAxis = d3.svg.axis()
+ .scale(y)
+ .ticks(4)
+ .orient("left");
+
+ var line = d3.svg.line()
+ .x(function(d) { return x(d.date); })
+ .y(function(d) { return y(d.value); });
+
+ var svg = d3.select("#graph").append("svg")
+ .attr("width", width + margin.left + margin.right)
+ .attr("height", height + margin.top + margin.bottom)
+ .append("g")
+ .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+ data = jsonData.rows;
+ $('#chartHeading').text(legend);
+ data.forEach(function(d) {
+ d.date = new Date(d[yField]*1000);
+ d.value = +d[xField];
+ });
+
+ x.domain(d3.extent(data, function(d) { return d.date; }));
+
+ var e = d3.extent(data, function(d) { return d.value;});
+ e = [e[0]-1,e[1]+1];
+
+ y.domain(e);
+
+ svg.append("g")
+ .attr("class", "x axis")
+ .attr("transform", "translate(0," + height + ")")
+ .attr("x", 5)
+ .call(xAxis);
+
+ svg.append("g")
+ .attr("class", "y axis")
+ .call(yAxis)
+ .append("text")
+ .attr("transform", "rotate(-90)")
+ .attr("y", 6)
+ .attr("dy", ".71em")
+ .style("text-anchor", "end")
+ .text(legend)
+ .attr("class", "legend");
+
+ svg.append("path")
+ .datum(data)
+ .attr("class", "line")
+ .attr("d", line);
+}
+
+$('.nodesLabel, .nodesValue').click(function() {
+ var jsonData = window.pageAnalyticsData;
+ renderChart(jsonData, "MinuteTime", "count_hostname", "Node Count");
+});
+$('.cpuLabel, .cpuValue').click(function() {
+ var jsonData = window.pageAnalyticsData;
+ renderChart(jsonData, "MinuteTime", "avg_cpu", "Average Cpu");
+});
+$('.bandwidthLabel, .bandwidthValue').click(function() {
+ var jsonData = window.pageBandData;
+ renderChart(jsonData, "MinuteTime", "sum_computed_bytes_sent_div_elapsed", "Bandwidth");
+});
+
+})