Use the Highchart library to draw graphs.
[collection4.git] / src / action_show_instance.c
index 7bf2fe8..c7de237 100644 (file)
@@ -136,8 +136,12 @@ static int show_time_selector (__attribute__((unused)) void *user_data) /* {{{ *
       "    <option value=\"-604800\">Week</option>\n"
       "    <option value=\"-2678400\">Month</option>\n"
       "    <option value=\"-31622400\">Year</option>\n"
-      "  </select>\n"
-      "  <input type=\"submit\" name=\"button\" value=\"Go\" />\n");
+      "  </select><br />\n");
+  printf ("  <input id=\"format-json\" type=\"radio\" name=\"format\" value=\"JSON\" checked=\"checked\" />"
+      "<label for=\"format-json\">&nbsp;JavaScript</label><br />\n"
+      "  <input id=\"format-rrd\" type=\"radio\" name=\"format\" value=\"RRD\" />"
+      "<label for=\"format-rrd\">&nbsp;RRDtool</label>\n<br />");
+  printf ("  <input type=\"submit\" name=\"button\" value=\"Go\" />\n");
 
   printf ("</form>\n");
 
@@ -305,7 +309,7 @@ static int show_instance_rrdtool (graph_config_t *cfg, /* {{{ */
         script_name (), params, title, descr);
 
 #if 0
-  printf ("<div><a href=\"%s?action=graph_data_json;%s%s\">"
+  printf ("<div><a href=\"%s?action=instance_data_json;%s%s\">"
       "Get graph data as JSON</a></div>\n",
       script_name (), params, time_params);
 #endif