From 72587434bf584d3ab48542f95cada8b530600bd2 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 19 Mar 2013 15:38:09 +0100 Subject: [PATCH] cosmetic --- .gitignore | 2 ++ manifold/js/manifold.js | 2 +- manifold/manifoldquery.py | 8 ++++++-- unfold/templates/page-queries.js | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0c2bdeea..12688c5d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ TAGS *~ all-static/ all-templates/ +play/ +sample-* diff --git a/manifold/js/manifold.js b/manifold/js/manifold.js index 3589d7ea..34b9fa8c 100644 --- a/manifold/js/manifold.js +++ b/manifold/js/manifold.js @@ -2,7 +2,7 @@ function debug_dict (msg, o) { var keys=[]; for (var k in o) keys.push(k); - console.log ("debug_dict: " + msg + " Keys : " + keys); + console.log ("debug_dict: " + msg + " keys= " + keys); } function debug_value (msg, value) { console.log ("debug_value: " + msg + " " + value); diff --git a/manifold/manifoldquery.py b/manifold/manifoldquery.py index 9881f41d..ca418878 100644 --- a/manifold/manifoldquery.py +++ b/manifold/manifoldquery.py @@ -25,6 +25,11 @@ class ManifoldQuery: self.analyzed_query=None self.subqueries = {} + def __repr__ (self): + result="Q: id=%(query_uuid)s - %(action)s on %(method)s "%self.__dict__ + result += " with %d filters, %d fields"%(len(self.filters),len(self.params)) + return result + def to_json (self): query_uuid=self.query_uuid a=self.action @@ -61,8 +66,7 @@ class ManifoldQuery: setattr(self, arg, d[key]) break - - + # not used yet .. def analyze_subqueries(self): analyzed_query = ManifoldQuery() analyzed_query.query_uuid = self.query_uuid diff --git a/unfold/templates/page-queries.js b/unfold/templates/page-queries.js index 63a5aa90..515196b7 100644 --- a/unfold/templates/page-queries.js +++ b/unfold/templates/page-queries.js @@ -1,8 +1,8 @@ {% for json in queries_jsons %} manifold.insert_query({{ json|safe }}); {% endfor %} $(document).ready(function () { -var async_queries = new Array(); -{% for d in query_uuid_domids %} async_queries.push({'query_uuid':"{{ d.query_uuid }}", 'id':{{ d.domid }}}); +var query_uuid_domids = new Array(); +{% for d in query_uuid_domids %} query_uuid_domids.push({'query_uuid':"{{ d.query_uuid }}", 'id':{{ d.domid }}}); {% endfor %} -manifold_async_exec(async_queries); +manifold.asynchroneous_exec(query_uuid_domids); }) -- 2.43.0