src/graph.[ch]: Implement "graph_inst_foreach".
[collection4.git] / share / collection.js
index 1afd64c..026d434 100644 (file)
@@ -1,6 +1,6 @@
 function format_instance(inst)
 {
-  return ("<li class=\"instance\">" + inst.description + "</li>");
+  return ("<li class=\"instance\"><a href=\"" + location.pathname + "?action=graph;" + inst.params + "\">" + inst.description + "</a></li>");
 }
 
 function format_instance_list(instances)
@@ -29,7 +29,7 @@ $(document).ready(function() {
     {
       var term = $("#search-input").val ();
       $.getJSON ("collection.fcgi",
-        { "action": "list_graphs", "format": "json", "search": term},
+        { "action": "search_json", "q": term},
         function(data)
         {
           var i;