get logs working with backbone v1
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ed8be1de Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ed8be1de Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ed8be1de Branch: refs/heads/route-events Commit: ed8be1de1c28f1d74773a33606903605f5e39473 Parents: 9dd9fa9 Author: Simon Metson <[email protected]> Authored: Thu Apr 4 13:08:20 2013 +0100 Committer: Garren Smith <[email protected]> Committed: Thu May 9 09:59:56 2013 +0200 ---------------------------------------------------------------------- src/fauxton/app/addons/logs/resources.js | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/ed8be1de/src/fauxton/app/addons/logs/resources.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/logs/resources.js b/src/fauxton/app/addons/logs/resources.js index 382fafe..d1e6d20 100644 --- a/src/fauxton/app/addons/logs/resources.js +++ b/src/fauxton/app/addons/logs/resources.js @@ -12,10 +12,11 @@ define([ "app", - "api" + "api", + "backbone" ], -function (app, FauxtonAPI) { +function (app, FauxtonAPI, Backbone) { var Log = FauxtonAPI.addon(); @@ -66,7 +67,6 @@ function (app, FauxtonAPI) { parse: function (resp) { var lines = resp.split(/\n/); - return _.foldr(lines, function (acc, logLine) { var match = logLine.match(/^\[(.*?)\]\s\[(.*?)\]\s\[(.*?)\]\s(.*)/); @@ -98,7 +98,7 @@ function (app, FauxtonAPI) { this.filters = []; this.filteredCollection = new Log.Collection(this.collection.toJSON()); - this.collection.on("reset", function () { + this.collection.on("add", function () { this.createFilteredCollection(); }, this); },
