amalgame/commit

ADDED: make sure the selected node stats are computed when serving http_node_list

authorJacco van Ossenbruggen
Thu Sep 18 09:10:21 2014 +0200
committerJacco van Ossenbruggen
Thu Sep 18 09:10:21 2014 +0200
commit3ca9f4b3d54115f85eafd6458d58565f53cd451d
tree4c48a323d11fedcba1a4f942a46d4c2bd6b7ca7f
parent712c39575a99a299e49eca7a87c8fd2556b7edc3
Diff style: patch stat
diff --git a/api/mappinglist.pl b/api/mappinglist.pl
index 7e8d5b2..e2f2da2 100644
--- a/api/mappinglist.pl
+++ b/api/mappinglist.pl
@@ -8,6 +8,7 @@
 :- use_module(library(http/http_parameters)).
 :- use_module(library(http/http_json)).
 :- use_module(library(amalgame/json_util)).
+:- use_module(library(amalgame/ag_stats)).
 
 :- http_handler(amalgame(data/mappinglist), http_mapping_list, []).
 :- http_handler(amalgame(data/nodelist), http_node_list, []).
@@ -41,8 +42,11 @@ mapping_in_strategy(Strategy, MappingId, Label, Options) :-
 http_node_list(Request) :-
 	http_parameters(Request,
 			[ strategy(Strategy,
-				   [description('URL of strategy')])
+				   [description('URL of strategy')]),
+			  selected(Selected,
+				   [description('URL of selected node')])
 			]),
+	node_stats(Strategy, Selected, _Stats, [compute(true)]),
 	js_strategy_nodes(Strategy, Nodes),
 	reply_json(Nodes).