Added hysteresis and LQ to admin settings
authorAndreas Tonnesen <andreto@olsr.org>
Thu, 6 Jan 2005 21:27:22 +0000 (21:27 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Thu, 6 Jan 2005 21:27:22 +0000 (21:27 +0000)
lib/httpinfo/src/html.h
lib/httpinfo/src/olsrd_httpinfo.c

index 9ad75a5..6447eeb 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: html.h,v 1.2 2005/01/05 20:39:50 kattemat Exp $
+ * $Id: html.h,v 1.3 2005/01/06 21:27:22 kattemat Exp $
  */
 
 /*
@@ -210,17 +210,17 @@ static const char *admin_frame[] =
     "</form>\n",
     "<h2>Add/remove local HNA entries</h2>\n",
     "<form action=\"set_values\" method=\"post\">\n",
-    "<center><b>Network:</b>\n",
-    "<input type=\"text\" name=\"foo\" maxlength=\"100\" class=\"input_text\">\n",
-    "<b>Netmask/Prefix:</b>\n",
-    "<input type=\"text\" name=\"foo\" maxlength=\"16\" class=\"input_text\">\n",
-    "<input type=\"submit\" value=\"Add entry\" class=\"input_button\">\n",
-    "</center><hr>\n",
+    "<table width=\"100%%\"><tr><td><b>Network:</b></td>\n",
+    "<td><input type=\"text\" name=\"foo\" maxlength=\"100\" class=\"input_text\"></td>\n",
+    "<td><b>Netmask/Prefix:</b></td>\n",
+    "<td><input type=\"text\" name=\"foo\" maxlength=\"16\" class=\"input_text\"></td>\n",
+    "<td><input type=\"submit\" value=\"Add entry\" class=\"input_button\"></td>\n",
+    "</table><hr>\n",
     "<form action=\"set_values\" method=\"post\">\n",
     "<table width=\"100%%\">\n",
     "<tr><th width=50 halign=\"middle\">Delete</th><th>Network</th><th>Netmask</th></tr>\n",
     "<!-- HNAENTRIES -->\n",
-    "<tr><td><input type=\"checkbox\" name=\"foo\" class=\"input_checkbox\"></td><td>%s</td><td>%s</td></tr>\n",
+    "<tr><td halign=\"middle\"><input type=\"checkbox\" name=\"foo\" class=\"input_checkbox\"></td><td>%s</td><td>%s</td></tr>\n",
     "</table>\n<br>\n",
     "<center><input type=\"submit\" value=\"Delete selected\" class=\"input_button\"></center>\n",
     "</form>\n",
index 52ce9eb..c8e8b34 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: olsrd_httpinfo.c,v 1.36 2005/01/05 20:39:50 kattemat Exp $
+ * $Id: olsrd_httpinfo.c,v 1.37 2005/01/06 21:27:22 kattemat Exp $
  */
 
 /*
@@ -1127,6 +1127,40 @@ build_admin_body(char *buf, olsr_u32_t bufsize)
   size += sprintf(&buf[size], "</tr>\n");
   size += sprintf(&buf[size], "<tr>\n");
 
+  if(cfg->use_hysteresis)
+    {
+      size += sprintf(&buf[size], admin_basic_setting_float,
+                     "Hyst scaling:", "hyst_scaling", 4, cfg->hysteresis_param.scaling);
+
+      size += sprintf(&buf[size], admin_basic_setting_float,
+                     "Lower thr:", "hyst_lower", 4, cfg->hysteresis_param.thr_low);
+      size += sprintf(&buf[size], admin_basic_setting_float,
+                     "Upper thr:", "hyst_upper", 4, cfg->hysteresis_param.thr_high);
+    }
+  else
+    {
+      size += sprintf(&buf[size], "<td>Hysteresis disabled</td>\n");
+    }
+
+  size += sprintf(&buf[size], "</tr>\n");
+  size += sprintf(&buf[size], "<tr>\n");
+  
+  if(cfg->lq_level)
+    {
+      size += sprintf(&buf[size], admin_basic_setting_int,
+                     "LQ level:", "lq_level", 1, cfg->lq_level);
+      size += sprintf(&buf[size], admin_basic_setting_int,
+                     "LQ winsize:", "lq_wsize", 1, cfg->lq_wsize);
+    }
+  else
+    {
+      size += sprintf(&buf[size], "<td>LQ disabled</td>\n");
+    }
+
+
+  size += sprintf(&buf[size], "</tr>\n");
+  size += sprintf(&buf[size], "<tr>\n");
+
   size += sprintf(&buf[size], "</tr>\n");
   
   i++;