diff --git a/webconsole/brozzler-webconsole/__init__.py b/webconsole/brozzler-webconsole/__init__.py index 645b0f8..6c9b332 100644 --- a/webconsole/brozzler-webconsole/__init__.py +++ b/webconsole/brozzler-webconsole/__init__.py @@ -33,7 +33,7 @@ import rethinkdb app = flask.Flask(__name__) # configure with environment variables -SETTINGS= { +SETTINGS = { 'RETHINKDB_SERVERS': os.environ.get( 'RETHINKDB_SERVERS', 'localhost').split(','), 'RETHINKDB_DB': os.environ.get('RETHINKDB_DB', 'brozzler'), diff --git a/webconsole/brozzler-webconsole/static/js/app.js b/webconsole/brozzler-webconsole/static/js/app.js index 0497580..95d59fb 100644 --- a/webconsole/brozzler-webconsole/static/js/app.js +++ b/webconsole/brozzler-webconsole/static/js/app.js @@ -125,11 +125,10 @@ function loadSiteStats($http, site, job) { $http.get("/api/sites/" + site.id + "/page_count").success(pageCountSuccessCallback(site, job)); $http.get("/api/sites/" + site.id + "/queued_count").success(queuedCountSuccessCallback(site, job)); - // parse Warcprox-Meta to find stats bucket - var warcprox_meta = angular.fromJson(site.extra_headers["Warcprox-Meta"]); - for (var j = 0; j < warcprox_meta.stats.buckets.length; j++) { - if (warcprox_meta.stats.buckets[j].indexOf("seed") >= 0) { - var bucket = warcprox_meta.stats.buckets[j]; + // look at Warcprox-Meta to find stats bucket + for (var j = 0; j < site.warcprox_meta.stats.buckets.length; j++) { + if (site.warcprox_meta.stats.buckets[j].indexOf("seed") >= 0) { + var bucket = site.warcprox_meta.stats.buckets[j]; // console.log("warcprox_meta.stats.buckets[" + j + "]=" + bucket); $http.get("/api/stats/" + bucket).success(statsSuccessCallback(site, bucket)); } @@ -138,7 +137,7 @@ function loadSiteStats($http, site, job) { brozzlerControllers.controller("JobController", ["$scope", "$routeParams", "$http", function($scope, $routeParams, $http) { - console.log('JobController'); + // console.log('JobController'); $http.get("/api/config").success(function(data) { $scope.config = data.config; });