mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-23 16:19:49 -05:00
handle new bucket format in brozzler-webconsole
This commit is contained in:
parent
98915b3d86
commit
cb4a16e58c
@ -165,7 +165,6 @@ def api404(path):
|
||||
def root(path):
|
||||
return flask.render_template("index.html")
|
||||
|
||||
import pdb; pdb.set_trace()
|
||||
try:
|
||||
import gunicorn.app.base
|
||||
from gunicorn.six import iteritems
|
||||
@ -187,13 +186,11 @@ try:
|
||||
return self.application
|
||||
|
||||
def run(**options):
|
||||
import pdb; pdb.set_trace()
|
||||
logging.info('running brozzler-webconsole using gunicorn')
|
||||
GunicornBrozzlerWebConsole(app, options).run()
|
||||
|
||||
except ImportError:
|
||||
def run():
|
||||
import pdb; pdb.set_trace()
|
||||
logging.info('running brozzler-webconsole using simple flask app.run')
|
||||
app.run()
|
||||
|
||||
|
@ -127,8 +127,11 @@ function loadSiteStats($http, site, job) {
|
||||
|
||||
// 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];
|
||||
var bucket = site.warcprox_meta.stats.buckets[j];
|
||||
if (typeof(bucket) == "object") {
|
||||
bucket = bucket["bucket"];
|
||||
}
|
||||
if (bucket.indexOf("seed") >= 0) {
|
||||
// console.log("warcprox_meta.stats.buckets[" + j + "]=" + bucket);
|
||||
$http.get("/api/stats/" + bucket).success(statsSuccessCallback(site, bucket));
|
||||
}
|
||||
@ -146,7 +149,11 @@ brozzlerControllers.controller("JobController", ["$scope", "$routeParams", "$htt
|
||||
$scope.job = data;
|
||||
$scope.job.page_count = $scope.job.queued_count = 0;
|
||||
// console.log("job=", $scope.job);
|
||||
$http.get("/api/stats/" + $scope.job.conf.warcprox_meta.stats.buckets[0]).success(function(data) {
|
||||
var bucket = $scope.job.conf.warcprox_meta.stats.buckets[0];
|
||||
if (typeof(bucket) == "object") {
|
||||
bucket = bucket["bucket"];
|
||||
}
|
||||
$http.get("/api/stats/" + bucket).success(function(data) {
|
||||
$scope.job.stats = data;
|
||||
// console.log("job stats=", $scope.job.stats);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user