1) minor fixes to feed management console 2) added provision for specifying (min,max) tps to the twitter firehose adaptor
diff --git a/asterix-app/src/main/resources/feed/dashboard.html b/asterix-app/src/main/resources/feed/dashboard.html
index 97a8576..a5f1813 100644
--- a/asterix-app/src/main/resources/feed/dashboard.html
+++ b/asterix-app/src/main/resources/feed/dashboard.html
@@ -5,7 +5,7 @@
<script type="text/javascript">
$(document).ready(function() {
var feedSeries = new TimeSeries();
-
+ var state = "ACTIVE";
var dataverse = "%s";
var dataset = "%s";
var feed = "%s";
@@ -24,7 +24,7 @@
var graphNames = new Array();
$.ajaxSetup({ cache: false });
- setInterval(fetchFeedReport, 500);
+ setInterval(fetchFeedReport, 5000);
function fetchFeedReport() {
$.ajax({
url: '/feed/data?dataverse=' + dataverse + '&dataset=' + dataset + '&feed=' + feed,
@@ -36,26 +36,36 @@
function onFeedReportReceived(data) {
- var type = data["type"];
- if (type == ("reload")) {
- ingestLocations = data["ingestLocations"];
- computeLocations = data["computeLocations"];
- storageLocations = data["storageLocations"];
+ var status = data["status"];
+ if(status == ("ended")){
+ ingestLocations = " ";
+ computeLocations = " ";
+ storageLocations = " ";
+ ingestionPolicy = " ";
+ state = "INACTIVE";
document.location.reload(true);
} else {
- var report = data["value"];
- var tputArray = report.split("|");
- var covered = 0;
- var totalTput = 0;
- for( var i = 0; i < tputArray.length-1; i ++){
- ingestionTimeSeries[i].append(data["time"], tputArray[i]);
- covered++;
- totalTput += parseInt(tputArray[i]);
- }
- for( var j = covered; j < numIngestionNodes; j++){
- ingestionTimeSeries[j].append(data["time"], 0);
- }
- ingestionTimeSeries[numIngestionNodes].append(data["time"], totalTput);
+ var type = data["type"];
+ if (type == ("reload")) {
+ ingestLocations = data["ingestLocations"];
+ computeLocations = data["computeLocations"];
+ storageLocations = data["storageLocations"];
+ document.location.reload(true);
+ } else {
+ var report = data["value"];
+ var tputArray = report.split("|");
+ var covered = 0;
+ var totalTput = 0;
+ for( var i = 0; i < tputArray.length-1; i ++){
+ ingestionTimeSeries[i].append(data["time"], tputArray[i]);
+ covered++;
+ totalTput += parseInt(tputArray[i]);
+ }
+ for( var j = covered; j < numIngestionNodes; j++){
+ ingestionTimeSeries[j].append(data["time"], 0);
+ }
+ ingestionTimeSeries[numIngestionNodes].append(data["time"], totalTput);
+ }
}
}
@@ -72,7 +82,7 @@
document.write("<br />" + "Compute Locations: " + computeLocations);
document.write("<br />" + "Storage Locations: " + storageLocations);
document.write("<br />" + "Ingestion Policy: " + ingestionPolicy);
- document.write("<br />" + "Active since" + activeSince);
+ document.write("<br />" + "Status: " + state);
document.write("<br />");
document.write("<br />");
@@ -103,7 +113,7 @@
}
function drawChart(chartName, ingestionTimeSeries) {
- var ingestionChart = new SmoothieChart({ minValue:0, millisPerPixel: 20, grid: { strokeStyle: '#555555', lineWidth: 1, millisPerLine: 1000, verticalSections: 10 }});
+ var ingestionChart = new SmoothieChart({ timestampFormatter:SmoothieChart.timeFormatter, interpolation:'linear', minValue:0, millisPerPixel: 20, grid: { strokeStyle: '#555555', lineWidth: 1, millisPerLine: 1000, verticalSections: 10 }});
ingestionChart.addTimeSeries(ingestionTimeSeries, seriesOptions);
ingestionChart.streamTo(document.getElementById(chartName, 500));
}