aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/stores/flowstore.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/stores/flowstore.js')
-rw-r--r--web/src/js/stores/flowstore.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/src/js/stores/flowstore.js b/web/src/js/stores/flowstore.js
index a5cb74ba..ba5b0788 100644
--- a/web/src/js/stores/flowstore.js
+++ b/web/src/js/stores/flowstore.js
@@ -35,9 +35,8 @@ _.extend(FlowView.prototype, EventEmitter.prototype, {
this.emit("change");
},
_update: function(flow){
- console.debug("FIXME: Use UUID");
var idx = _.findIndex(this.flows, function(f){
- return flow.request.timestamp_start == f.request.timestamp_start;
+ return flow.id === f.id;
});
if(idx < 0){
@@ -61,7 +60,13 @@ _.extend(_FlowStore.prototype, EventEmitter.prototype, {
var view = new FlowView(this, !since);
$.getJSON("/static/flows.json", function(flows){
+ flows = flows.concat(_.cloneDeep(flows)).concat(_.cloneDeep(flows));
+ var id = 1;
+ flows.forEach(function(flow){
+ flow.id = "uuid-"+id++;
+ })
view.add_bulk(flows);
+
});
return view;