trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject svn commit: r1059969 [3/6] - in /trafficserver/traffic/trunk: ./ ci/ proxy/config/ proxy/mgmt/ proxy/mgmt/api/ proxy/mgmt/api/include/ proxy/mgmt/api/remote/ proxy/mgmt/cli/ proxy/mgmt/cli2/ proxy/mgmt/cluster/ proxy/mgmt/html2/ proxy/mgmt/html2/charti...
Date Mon, 17 Jan 2011 16:11:34 GMT
Copied: trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc (from r1059438, trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc)
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc?p2=trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc&p1=trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc&r1=1059438&r2=1059969&rev=1059969&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc Mon Jan 17 16:11:27 2011
@@ -54,8 +54,3321 @@
 #define MAX_RULE_PART_SIZE    64
 #define BORDER_COLOR          "#cccccc"
 
+//---------------------- TABLE FUNCTIONS ----------------------------------
+
+
+
+
+//-------------------------------------------------------------------------
+// writeCacheConfigTable
+//-------------------------------------------------------------------------
+int
+writeCacheConfigTable(WebHttpContext * whc)
+{
+  INKCacheEle *ele;
+  char ruleType[MAX_RULE_PART_SIZE];
+  char pdType[MAX_RULE_PART_SIZE];
+  char time[MAX_RULE_PART_SIZE];
+  char src_ip[MAX_RULE_PART_SIZE];
+  char prefix[MAX_RULE_PART_SIZE];
+  char suffix[MAX_RULE_PART_SIZE];
+  char port[MAX_RULE_PART_SIZE];
+  char method[MAX_RULE_PART_SIZE];
+  char scheme[MAX_RULE_PART_SIZE];
+  char time_period[MAX_RULE_PART_SIZE];
+  char mixt[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_CACHE_OBJ);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeCacheConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_RULE_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TIME_PERIOD);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SECONDARY_SPEC);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKCacheEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(ruleType, 0, MAX_RULE_PART_SIZE);
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(time, 0, MAX_RULE_PART_SIZE);
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(prefix, 0, MAX_RULE_PART_SIZE);
+    memset(suffix, 0, MAX_RULE_PART_SIZE);
+    memset(port, 0, MAX_RULE_PART_SIZE);
+    memset(method, 0, MAX_RULE_PART_SIZE);
+    memset(scheme, 0, MAX_RULE_PART_SIZE);
+    memset(time_period, 0, MAX_RULE_PART_SIZE);
+    memset(mixt, 0, MAX_RULE_PART_SIZE);
+    if (convert_cache_ele_to_html_format(ele, ruleType, pdType, time, src_ip,
+                                         prefix, suffix, port, method, scheme,
+                                         time_period, mixt) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeCacheConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ruleType, strlen(ruleType));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(pdType, strlen(pdType));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->cache_info.pd_val, strlen(ele->cache_info.pd_val));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(time_period) > 0)
+      output->copyFrom(time_period, strlen(time_period));
+    HtmlRndrTdClose(output);
+
+    writeSecondarySpecsTableElem(output, time, src_ip, prefix, suffix, port, method, scheme, mixt);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 5);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeHostingConfigTable
+//-------------------------------------------------------------------------
+int
+writeHostingConfigTable(WebHttpContext * whc)
+{
+  INKHostingEle *ele;
+  char pdType[MAX_RULE_PART_SIZE];
+  char partitions[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_HOSTING);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    Debug("config", "[writeHostingConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PARTITIONS);
+  HtmlRndrTdClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKHostingEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(partitions, 0, MAX_RULE_PART_SIZE);
+    if (convert_hosting_ele_to_html_format(ele, pdType, partitions) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeHostingConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(pdType, strlen(pdType));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->pd_val, strlen(ele->pd_val));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(partitions) > 0)
+      output->copyFrom(partitions, strlen(partitions));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 3);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeIcpConfigTable
+//-------------------------------------------------------------------------
+int
+writeIcpConfigTable(WebHttpContext * whc)
+{
+  INKIcpEle *ele;
+  char name[MAX_RULE_PART_SIZE];
+  char host_ip[MAX_RULE_PART_SIZE];
+  char peer_type[MAX_RULE_PART_SIZE];
+  char proxy_port[MAX_RULE_PART_SIZE];
+  char icp_port[MAX_RULE_PART_SIZE];
+  char mc_state[MAX_RULE_PART_SIZE];
+  char mc_ip[MAX_RULE_PART_SIZE];
+  char mc_ttl[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_ICP_PEER);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    Debug("config", "[writeICPConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_HOST);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_PORT);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ICP_PORT);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_MCAST_STATE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_MCAST_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_MCAST_TTL);
+  HtmlRndrTdClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKIcpEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(name, 0, MAX_RULE_PART_SIZE);
+    memset(host_ip, 0, MAX_RULE_PART_SIZE);
+    memset(peer_type, 0, MAX_RULE_PART_SIZE);
+    memset(proxy_port, 0, MAX_RULE_PART_SIZE);
+    memset(icp_port, 0, MAX_RULE_PART_SIZE);
+    memset(mc_state, 0, MAX_RULE_PART_SIZE);
+    memset(mc_ip, 0, MAX_RULE_PART_SIZE);
+    memset(mc_ttl, 0, MAX_RULE_PART_SIZE);
+    if (convert_icp_ele_to_html_format(ele, name, host_ip, peer_type, proxy_port, icp_port, mc_state, mc_ip, mc_ttl) !=
+        WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeIcpConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(name, strlen(name));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(host_ip, strlen(host_ip));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(peer_type, strlen(peer_type));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(proxy_port, strlen(proxy_port));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(icp_port, strlen(icp_port));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(mc_state, strlen(mc_state));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(mc_ip) > 0)
+      output->copyFrom(mc_ip, strlen(mc_ip));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(mc_ttl) > 0)
+      output->copyFrom(mc_ttl, strlen(mc_ttl));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 8);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeIpAllowConfigTable
+//-------------------------------------------------------------------------
+int
+writeIpAllowConfigTable(WebHttpContext * whc)
+{
+  INKIpAllowEle *ele;
+  char src_ip[MAX_RULE_PART_SIZE];
+  char action[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_IP_ALLOW);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeIpAllowConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_IP_ACTION);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SOURCE_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKIpAllowEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(action, 0, MAX_RULE_PART_SIZE);
+
+    if (convert_ip_allow_ele_to_html_format(ele, src_ip, action) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeIpAllowConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(action, strlen(action));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(src_ip, strlen(src_ip));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 2);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+
+//-------------------------------------------------------------------------
+// writeMgmtAllowConfigTable
+//-------------------------------------------------------------------------
+int
+writeMgmtAllowConfigTable(WebHttpContext * whc)
+{
+  INKMgmtAllowEle *ele;
+  char src_ip[MAX_RULE_PART_SIZE];
+  char action[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_MGMT_ALLOW);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeMgmtAllowConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_IP_ACTION);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SOURCE_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKMgmtAllowEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(action, 0, MAX_RULE_PART_SIZE);
+    if (convert_mgmt_allow_ele_to_html_format(ele, src_ip, action) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeMgmtAllowConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(action, strlen(action));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(src_ip, strlen(src_ip));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 2);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeParentConfigTable
+//-------------------------------------------------------------------------
+int
+writeParentConfigTable(WebHttpContext * whc)
+{
+  INKParentProxyEle *ele;
+  char pdType[MAX_RULE_PART_SIZE];
+  char time[MAX_RULE_PART_SIZE];
+  char src_ip[MAX_RULE_PART_SIZE];
+  char prefix[MAX_RULE_PART_SIZE];
+  char suffix[MAX_RULE_PART_SIZE];
+  char port[MAX_RULE_PART_SIZE];
+  char method[MAX_RULE_PART_SIZE];
+  char scheme[MAX_RULE_PART_SIZE];
+  char mixt[MAX_RULE_PART_SIZE];
+  char parents[MAX_RULE_PART_SIZE];
+  char round_robin[MAX_RULE_PART_SIZE];
+  char direct[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_PARENT_PROXY);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeParentConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PARENTS);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ROUND_ROBIN);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_GO_DIRECT);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SECONDARY_SPEC);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKParentProxyEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(time, 0, MAX_RULE_PART_SIZE);
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(prefix, 0, MAX_RULE_PART_SIZE);
+    memset(suffix, 0, MAX_RULE_PART_SIZE);
+    memset(port, 0, MAX_RULE_PART_SIZE);
+    memset(method, 0, MAX_RULE_PART_SIZE);
+    memset(scheme, 0, MAX_RULE_PART_SIZE);
+    memset(mixt, 0, MAX_RULE_PART_SIZE);
+    memset(parents, 0, MAX_RULE_PART_SIZE);
+    memset(round_robin, 0, MAX_RULE_PART_SIZE);
+    memset(direct, 0, MAX_RULE_PART_SIZE);
+    if (convert_parent_ele_to_html_format
+        (ele, pdType, time, src_ip, prefix, suffix, port, method, scheme, mixt, parents, round_robin,
+         direct) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeParentConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(pdType, strlen(pdType));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->parent_info.pd_val, strlen(ele->parent_info.pd_val));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(parents) > 0)
+      output->copyFrom(parents, strlen(parents));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(round_robin) > 0)
+      output->copyFrom(round_robin, strlen(round_robin));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(direct) > 0)
+      output->copyFrom(direct, strlen(direct));
+    HtmlRndrTdClose(output);
+
+    writeSecondarySpecsTableElem(output, time, src_ip, prefix, suffix, port, method, scheme, mixt);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 6);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writePartionConfigTable
+//-------------------------------------------------------------------------
+int
+writePartitionConfigTable(WebHttpContext * whc)
+{
+  // now write each rule as a row in the table
+  INKPartitionEle *ele;
+  char part_num[MAX_RULE_PART_SIZE];
+  char scheme[MAX_RULE_PART_SIZE];
+  char size[MAX_RULE_PART_SIZE];
+  char size_fmt[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_PARTITION);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    Debug("config", "[writePartitionConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PARTITION_NUM);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SCHEME);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PSIZE);
+  HtmlRndrTdClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKPartitionEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(part_num, 0, MAX_RULE_PART_SIZE);
+    memset(scheme, 0, MAX_RULE_PART_SIZE);
+    memset(size, 0, MAX_RULE_PART_SIZE);
+    memset(size_fmt, 0, MAX_RULE_PART_SIZE);
+    if (convert_partition_ele_to_html_format(ele, part_num, scheme, size, size_fmt) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writePartitionConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(part_num, strlen(part_num));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(scheme, strlen(scheme));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(size, strlen(size));
+    switch (ele->size_format) {
+    case INK_SIZE_FMT_PERCENT:
+      output->copyFrom("%", strlen("%"));
+      break;
+    case INK_SIZE_FMT_ABSOLUTE:
+      output->copyFrom(" MB", strlen(" MB"));
+      break;
+    default:
+      // Handled here:
+      // INK_SIZE_FMT_UNDEFINED
+      break;
+    }
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 3);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeRemapConfigTable
+//-------------------------------------------------------------------------
+int
+writeRemapConfigTable(WebHttpContext * whc)
+{
+  INKRemapEle *ele;
+  char rule_type[MAX_RULE_PART_SIZE];
+  char from_scheme[MAX_RULE_PART_SIZE];
+  char from_port[MAX_RULE_PART_SIZE];
+  char from_path[MAX_RULE_PART_SIZE];
+  char to_scheme[MAX_RULE_PART_SIZE];
+  char to_port[MAX_RULE_PART_SIZE];
+  char to_path[MAX_RULE_PART_SIZE];
+  char mixt[MAX_RULE_PART_SIZE];
+
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_REMAP);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeRemapConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_RULE_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_FROM_SCHEME);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_FROM_HOST);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_FROM_PORT);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_FROM_PATH);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TO_SCHEME);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TO_HOST);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TO_PORT);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TO_PATH);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKRemapEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(rule_type, 0, MAX_RULE_PART_SIZE);
+    memset(from_scheme, 0, MAX_RULE_PART_SIZE);
+    memset(from_port, 0, MAX_RULE_PART_SIZE);
+    memset(from_path, 0, MAX_RULE_PART_SIZE);
+    memset(to_scheme, 0, MAX_RULE_PART_SIZE);
+    memset(to_port, 0, MAX_RULE_PART_SIZE);
+    memset(to_path, 0, MAX_RULE_PART_SIZE);
+    memset(mixt, 0, MAX_RULE_PART_SIZE);
+    if (convert_remap_ele_to_html_format
+        (ele, rule_type, from_scheme, from_port, from_path, to_scheme, to_port, to_path, mixt) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeRemapConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(rule_type, strlen(rule_type));
+    HtmlRndrTdClose(output);
+
+    // from url
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(from_scheme, strlen(from_scheme));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->from_host, strlen(ele->from_host));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(from_port, strlen(from_port));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(from_path, strlen(from_path));
+    HtmlRndrTdClose(output);
+
+    // to url
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(to_scheme, strlen(to_scheme));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->to_host, strlen(ele->to_host));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(to_port, strlen(to_port));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(to_path, strlen(to_path));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(mixt, strlen(mixt));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 10);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeSocksConfigTable
+//-------------------------------------------------------------------------
+int
+writeSocksConfigTable(WebHttpContext * whc)
+{
+  INKSocksEle *ele;
+  char rule_type[MAX_RULE_PART_SIZE];
+  char user[MAX_RULE_PART_SIZE];
+  char passwd[MAX_RULE_PART_SIZE];
+  char servers[MAX_RULE_PART_SIZE];
+  char dest_ip[MAX_RULE_PART_SIZE];
+  char rr[MAX_RULE_PART_SIZE];
+
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_SOCKS);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeSocksConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_RULE_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_USER);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PASSWORD);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_DEST_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SOCKS_SERVER);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ROUND_ROBIN);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKSocksEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(rule_type, 0, MAX_RULE_PART_SIZE);
+    memset(user, 0, MAX_RULE_PART_SIZE);
+    memset(passwd, 0, MAX_RULE_PART_SIZE);
+    memset(dest_ip, 0, MAX_RULE_PART_SIZE);
+    memset(servers, 0, MAX_RULE_PART_SIZE);
+    memset(rr, 0, MAX_RULE_PART_SIZE);
+    if (convert_socks_ele_to_html_format(ele, rule_type, dest_ip, user, passwd, servers, rr) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeSocksConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(rule_type, strlen(rule_type));
+    HtmlRndrTdClose(output);
+
+    // username
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(user, strlen(user));
+    HtmlRndrTdClose(output);
+
+    // password
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(passwd, strlen(passwd));
+    HtmlRndrTdClose(output);
+
+    // dest ips
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(dest_ip, strlen(dest_ip));
+    HtmlRndrTdClose(output);
+
+    // socks servers
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(servers, strlen(servers));
+    HtmlRndrTdClose(output);
+
+    // round robin
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(rr, strlen(rr));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 7);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeSplitDnsConfigTable
+//-------------------------------------------------------------------------
+int
+writeSplitDnsConfigTable(WebHttpContext * whc)
+{
+  // now write each rule as a row in the table
+  INKSplitDnsEle *ele;
+  char pdType[MAX_RULE_PART_SIZE];
+  char dns_server[MAX_RULE_PART_SIZE];
+  char def_domain[MAX_RULE_PART_SIZE];
+  char search_list[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_SPLIT_DNS);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    Debug("config", "[writeSplitDnsConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_DNS_SERVER_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_DOMAIN_NAME);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SEARCH_LIST);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKSplitDnsEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(dns_server, 0, MAX_RULE_PART_SIZE);
+    memset(def_domain, 0, MAX_RULE_PART_SIZE);
+    memset(search_list, 0, MAX_RULE_PART_SIZE);
+    if (convert_split_dns_ele_to_html_format(ele, pdType, dns_server, def_domain, search_list) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeSplitDnsConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(pdType, strlen(pdType));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->pd_val, strlen(ele->pd_val));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(dns_server) > 0)
+      output->copyFrom(dns_server, strlen(dns_server));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(def_domain) > 0)
+      output->copyFrom(def_domain, strlen(def_domain));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(search_list) > 0)
+      output->copyFrom(search_list, strlen(search_list));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 5);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeUpdateConfigTable
+//-------------------------------------------------------------------------
+int
+writeUpdateConfigTable(WebHttpContext * whc)
+{
+  // now write each rule as a row in the table
+  INKUpdateEle *ele;
+  char hdrs[MAX_RULE_PART_SIZE];
+  char offset[MAX_RULE_PART_SIZE];
+  char interval[MAX_RULE_PART_SIZE];
+  char depth[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_UPDATE_URL);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    Debug("config", "[writeUpdateConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_URL);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_REQUEST_HDR);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_OFFSET_HOUR);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_INTERVAL);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_RECUR_DEPTH);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKUpdateEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(hdrs, 0, MAX_RULE_PART_SIZE);
+    memset(offset, 0, MAX_RULE_PART_SIZE);
+    memset(interval, 0, MAX_RULE_PART_SIZE);
+    memset(depth, 0, MAX_RULE_PART_SIZE);
+    if (convert_update_ele_to_html_format(ele, hdrs, offset, interval, depth) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeUpdateConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->url, strlen(ele->url));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(hdrs) > 0)
+      output->copyFrom(hdrs, strlen(hdrs));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(offset, strlen(offset));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(interval, strlen(interval));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    if (strlen(depth) > 0)
+      output->copyFrom(depth, strlen(depth));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 5);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeVaddrsConfigTable
+//-------------------------------------------------------------------------
+int
+writeVaddrsConfigTable(WebHttpContext * whc)
+{
+  // now write each rule as a row in the table
+  INKVirtIpAddrEle *ele;
+  char ip[MAX_RULE_PART_SIZE];
+  char sub_intr[MAX_RULE_PART_SIZE];
+  int count;
+
+  textBuffer *output = whc->response_bdy;
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_VADDRS);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    Debug("config", "[writeVaddrsConfigTable] Error: INKCfgContextGet failed");
+    INKCfgContextDestroy(ctx);
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  HtmlRndrTableOpen(output, "100%", 1, 0, 0, BORDER_COLOR);
+
+  // write the table headings
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_VIRTUAL_IP);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ETH_INTERFACE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_CENTER, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_SUB_INTERFACE);
+  HtmlRndrTdClose(output);
+
+  HtmlRndrTrClose(output);
+
+  count = INKCfgContextGetCount(ctx);
+  for (int i = 0; i < count; i++) {
+    ele = (INKVirtIpAddrEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(ip, 0, MAX_RULE_PART_SIZE);
+    memset(sub_intr, 0, MAX_RULE_PART_SIZE);
+    if (convert_virt_ip_addr_ele_to_html_format(ele, ip, sub_intr) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeVaddrsConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+    // write the rule info into the table row
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_CENTER);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ip, strlen(ip));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(ele->intr, strlen(ele->intr));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+    HtmlRndrSpace(output, 2);
+    output->copyFrom(sub_intr, strlen(sub_intr));
+    HtmlRndrTdClose(output);
+
+    HtmlRndrTrClose(output);
+  }                             // end for loop
+
+  // no rules
+  if (count == 0) {
+    HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+    HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 3);
+    HtmlRndrSpace(output, 2);
+    HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_NO_RULES);
+    HtmlRndrTdClose(output);
+    HtmlRndrTrClose(output);
+  }
+
+  HtmlRndrTableClose(output);
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
 //-------------------- RULE LIST FUNCTIONS --------------------------------
 
+
+
+
+
+//-------------------------------------------------------------------------
+// writeCacheRuleList
+//-------------------------------------------------------------------------
+int
+writeCacheRuleList(textBuffer * output)
+{
+  INKCacheEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_CACHE_OBJ);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeCacheRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char ruleType[MAX_RULE_PART_SIZE];
+  char pdType[MAX_RULE_PART_SIZE];
+  char time[MAX_RULE_PART_SIZE];
+  char src_ip[MAX_RULE_PART_SIZE];
+  char prefix[MAX_RULE_PART_SIZE];
+  char suffix[MAX_RULE_PART_SIZE];
+  char port[MAX_RULE_PART_SIZE];
+  char method[MAX_RULE_PART_SIZE];
+  char scheme[MAX_RULE_PART_SIZE];
+  char time_period[MAX_RULE_PART_SIZE];
+  char mixt[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKCacheEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(ruleType, 0, MAX_RULE_PART_SIZE);
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(time, 0, MAX_RULE_PART_SIZE);
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(prefix, 0, MAX_RULE_PART_SIZE);
+    memset(suffix, 0, MAX_RULE_PART_SIZE);
+    memset(port, 0, MAX_RULE_PART_SIZE);
+    memset(method, 0, MAX_RULE_PART_SIZE);
+    memset(scheme, 0, MAX_RULE_PART_SIZE);
+    memset(time_period, 0, MAX_RULE_PART_SIZE);
+    memset(mixt, 0, MAX_RULE_PART_SIZE);
+    if (convert_cache_ele_to_html_format(ele, ruleType, pdType, time, src_ip,
+                                         prefix, suffix, port, method, scheme,
+                                         time_period, mixt) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeCacheRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE,
+                 "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\");\n",
+                 i, ruleType, pdType, ele->cache_info.pd_val, time, src_ip, prefix, suffix, port, method, scheme,
+                 time_period, mixt);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeHostingRuleList
+//-------------------------------------------------------------------------
+int
+writeHostingRuleList(textBuffer * output)
+{
+  INKHostingEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_HOSTING);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeHostingRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+
+  char pdType[MAX_RULE_PART_SIZE];
+  char partitions[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKHostingEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(partitions, 0, MAX_RULE_PART_SIZE);
+
+    if (convert_hosting_ele_to_html_format(ele, pdType, partitions) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeHostingRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\");\n",
+                 i, pdType, ele->pd_val, partitions);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+
+//-------------------------------------------------------------------------
+// writeIcpRuleList
+//-------------------------------------------------------------------------
+int
+writeIcpRuleList(textBuffer * output)
+{
+  INKIcpEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_ICP_PEER);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeIcpRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;   //goto Lerror;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char name[MAX_RULE_PART_SIZE];
+  char host_ip[MAX_RULE_PART_SIZE];
+  char peer_type[MAX_RULE_PART_SIZE];
+  char proxy_port[MAX_RULE_PART_SIZE];
+  char icp_port[MAX_RULE_PART_SIZE];
+  char mc_state[MAX_RULE_PART_SIZE];
+  char mc_ip[MAX_RULE_PART_SIZE];
+  char mc_ttl[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKIcpEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(name, 0, MAX_RULE_PART_SIZE);
+    memset(host_ip, 0, MAX_RULE_PART_SIZE);
+    memset(peer_type, 0, MAX_RULE_PART_SIZE);
+    memset(proxy_port, 0, MAX_RULE_PART_SIZE);
+    memset(icp_port, 0, MAX_RULE_PART_SIZE);
+    memset(mc_state, 0, MAX_RULE_PART_SIZE);
+    memset(mc_ip, 0, MAX_RULE_PART_SIZE);
+    memset(mc_ttl, 0, MAX_RULE_PART_SIZE);
+    if (convert_icp_ele_to_html_format(ele, name, host_ip, peer_type, proxy_port, icp_port, mc_state, mc_ip, mc_ttl) !=
+        WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeIcpRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE,
+                 "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\");\n", i, name,
+                 host_ip, peer_type, proxy_port, icp_port, mc_state, mc_ip, mc_ttl);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+
+//-------------------------------------------------------------------------
+// writeIpAllowRuleList
+//-------------------------------------------------------------------------
+int
+writeIpAllowRuleList(textBuffer * output)
+{
+  INKIpAllowEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_IP_ALLOW);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeIpAllowRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char src_ip[MAX_RULE_PART_SIZE];
+  char action[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKIpAllowEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(action, 0, MAX_RULE_PART_SIZE);
+
+    if (convert_ip_allow_ele_to_html_format(ele, src_ip, action) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeIpAllowRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\");\n", i, src_ip, action);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+
+//-------------------------------------------------------------------------
+// writeMgmtAllowRuleList
+//-------------------------------------------------------------------------
+int
+writeMgmtAllowRuleList(textBuffer * output)
+{
+  INKMgmtAllowEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_MGMT_ALLOW);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeMgmtAllowRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char src_ip[MAX_RULE_PART_SIZE];
+  char action[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKMgmtAllowEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(action, 0, MAX_RULE_PART_SIZE);
+
+    if (convert_mgmt_allow_ele_to_html_format(ele, src_ip, action) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeMgmtAllowRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\");\n", i, src_ip, action);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeParentRuleList
+//-------------------------------------------------------------------------
+int
+writeParentRuleList(textBuffer * output)
+{
+  INKParentProxyEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_PARENT_PROXY);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeParentRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+  char rule[MAX_RULE_SIZE];
+  char pdType[MAX_RULE_PART_SIZE];
+  char time[MAX_RULE_PART_SIZE];
+  char src_ip[MAX_RULE_PART_SIZE];
+  char prefix[MAX_RULE_PART_SIZE];
+  char suffix[MAX_RULE_PART_SIZE];
+  char port[MAX_RULE_PART_SIZE];
+  char method[MAX_RULE_PART_SIZE];
+  char scheme[MAX_RULE_PART_SIZE];
+  char mixt[MAX_RULE_PART_SIZE];
+  char parents[MAX_RULE_PART_SIZE];
+  char round_robin[MAX_RULE_PART_SIZE];
+  char direct[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKParentProxyEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(time, 0, MAX_RULE_PART_SIZE);
+    memset(src_ip, 0, MAX_RULE_PART_SIZE);
+    memset(prefix, 0, MAX_RULE_PART_SIZE);
+    memset(suffix, 0, MAX_RULE_PART_SIZE);
+    memset(port, 0, MAX_RULE_PART_SIZE);
+    memset(method, 0, MAX_RULE_PART_SIZE);
+    memset(scheme, 0, MAX_RULE_PART_SIZE);
+    memset(mixt, 0, MAX_RULE_PART_SIZE);
+    memset(parents, 0, MAX_RULE_PART_SIZE);
+    memset(round_robin, 0, MAX_RULE_PART_SIZE);
+    memset(direct, 0, MAX_RULE_PART_SIZE);
+    if (convert_parent_ele_to_html_format
+        (ele, pdType, time, src_ip, prefix, suffix, port, method, scheme, mixt, parents, round_robin,
+         direct) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeParentConfigTable] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE,
+                 "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\");\n",
+                 i, pdType, ele->parent_info.pd_val, time, src_ip, prefix, suffix, port, method, scheme, mixt, parents,
+                 round_robin, direct);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writePartitionRuleList
+//-------------------------------------------------------------------------
+int
+writePartitionRuleList(textBuffer * output)
+{
+  INKPartitionEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_PARTITION);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writePartitionRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+
+  char part_num[MAX_RULE_PART_SIZE];
+  char scheme[MAX_RULE_PART_SIZE];
+  char size[MAX_RULE_PART_SIZE];
+  char size_fmt[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKPartitionEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(part_num, 0, MAX_RULE_PART_SIZE);
+    memset(scheme, 0, MAX_RULE_PART_SIZE);
+    memset(size, 0, MAX_RULE_PART_SIZE);
+    memset(size_fmt, 0, MAX_RULE_PART_SIZE);
+    if (convert_partition_ele_to_html_format(ele, part_num, scheme, size, size_fmt) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writePartitionRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\");\n",
+                 i, part_num, scheme, size, size_fmt);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeRemapRuleList
+//-------------------------------------------------------------------------
+int
+writeRemapRuleList(textBuffer * output)
+{
+  INKRemapEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_REMAP);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeRemapRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char rule_type[MAX_RULE_PART_SIZE];
+  char from_scheme[MAX_RULE_PART_SIZE];
+  char from_port[MAX_RULE_PART_SIZE];
+  char from_path[MAX_RULE_PART_SIZE];
+  char to_scheme[MAX_RULE_PART_SIZE];
+  char to_port[MAX_RULE_PART_SIZE];
+  char to_path[MAX_RULE_PART_SIZE];
+  char mixt[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKRemapEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(rule_type, 0, MAX_RULE_PART_SIZE);
+    memset(from_scheme, 0, MAX_RULE_PART_SIZE);
+    memset(from_port, 0, MAX_RULE_PART_SIZE);
+    memset(from_path, 0, MAX_RULE_PART_SIZE);
+    memset(to_scheme, 0, MAX_RULE_PART_SIZE);
+    memset(to_port, 0, MAX_RULE_PART_SIZE);
+    memset(to_path, 0, MAX_RULE_PART_SIZE);
+    memset(mixt, 0, MAX_RULE_PART_SIZE);
+    if (convert_remap_ele_to_html_format
+        (ele, rule_type, from_scheme, from_port, from_path, to_scheme, to_port, to_path, mixt) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeRemapRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE,
+                 "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\",\"%s\",\"%s\" );\n",
+                 i, rule_type, from_scheme, ele->from_host, from_port, from_path, to_scheme, ele->to_host, to_port,
+                 to_path, mixt);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeSocksRuleList
+//-------------------------------------------------------------------------
+int
+writeSocksRuleList(textBuffer * output)
+{
+  INKSocksEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_SOCKS);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeSocksRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char rule_type[MAX_RULE_PART_SIZE];
+  char user[MAX_RULE_PART_SIZE];
+  char passwd[MAX_RULE_PART_SIZE];
+  char servers[MAX_RULE_PART_SIZE];
+  char dest_ip[MAX_RULE_PART_SIZE];
+  char rr[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKSocksEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(rule_type, 0, MAX_RULE_PART_SIZE);
+    memset(user, 0, MAX_RULE_PART_SIZE);
+    memset(passwd, 0, MAX_RULE_PART_SIZE);
+    memset(dest_ip, 0, MAX_RULE_PART_SIZE);
+    memset(servers, 0, MAX_RULE_PART_SIZE);
+    memset(rr, 0, MAX_RULE_PART_SIZE);
+    if (convert_socks_ele_to_html_format(ele, rule_type, dest_ip, user, passwd, servers, rr) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeSocksRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\");\n",
+                 i, rule_type, dest_ip, user, passwd, servers, rr);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeSplitDnsRuleList
+//-------------------------------------------------------------------------
+int
+writeSplitDnsRuleList(textBuffer * output)
+{
+  INKSplitDnsEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_SPLIT_DNS);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeSplitDnsRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+
+  char pdType[MAX_RULE_PART_SIZE];
+  char dns_server[MAX_RULE_PART_SIZE];
+  char def_domain[MAX_RULE_PART_SIZE];
+  char search_list[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKSplitDnsEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(pdType, 0, MAX_RULE_PART_SIZE);
+    memset(dns_server, 0, MAX_RULE_PART_SIZE);
+    memset(def_domain, 0, MAX_RULE_PART_SIZE);
+    memset(search_list, 0, MAX_RULE_PART_SIZE);
+
+    if (convert_split_dns_ele_to_html_format(ele, pdType, dns_server, def_domain, search_list) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeSplitDnsRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\");\n",
+                 i, pdType, ele->pd_val, dns_server, def_domain, search_list);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeUpdateRuleList
+//-------------------------------------------------------------------------
+int
+writeUpdateRuleList(textBuffer * output)
+{
+  INKUpdateEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_UPDATE_URL);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeUpdateRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+
+  char hdrs[MAX_RULE_PART_SIZE];
+  char offset[MAX_RULE_PART_SIZE];
+  char interval[MAX_RULE_PART_SIZE];
+  char depth[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKUpdateEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(hdrs, 0, MAX_RULE_PART_SIZE);
+    memset(offset, 0, MAX_RULE_PART_SIZE);
+    memset(interval, 0, MAX_RULE_PART_SIZE);
+    memset(depth, 0, MAX_RULE_PART_SIZE);
+    if (convert_update_ele_to_html_format(ele, hdrs, offset, interval, depth) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeUpdateList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\", \"%s\", \"%s\");\n",
+                 i, ele->url, hdrs, offset, interval, depth);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeVaddrsRuleList
+//-------------------------------------------------------------------------
+int
+writeVaddrsRuleList(textBuffer * output)
+{
+  INKVirtIpAddrEle *ele;
+  int count, i;
+  const char ruleList[] = "var ruleList = new Object();\n";
+
+  INKCfgContext ctx = INKCfgContextCreate(INK_FNAME_VADDRS);
+  INKError err = INKCfgContextGet(ctx);
+  if (err != INK_ERR_OKAY) {
+    mgmt_log(stderr, "[writeVaddrsRuleList] Error INKCfgContextGet");
+    return WEB_HTTP_ERR_FAIL;
+  }
+
+  output->copyFrom(ruleList, strlen(ruleList));
+
+  char rule[MAX_RULE_SIZE];
+  char ip[MAX_RULE_PART_SIZE];
+  char sub_intr[MAX_RULE_PART_SIZE];
+
+  count = INKCfgContextGetCount(ctx);
+  for (i = 0; i < count; i++) {
+    ele = (INKVirtIpAddrEle *) INKCfgContextGetEleAt(ctx, i);
+
+    memset(ip, 0, MAX_RULE_PART_SIZE);
+    memset(sub_intr, 0, MAX_RULE_PART_SIZE);
+    if (convert_virt_ip_addr_ele_to_html_format(ele, ip, sub_intr) != WEB_HTTP_ERR_OKAY) {
+      Debug("config", "[writeVaddrsRuleList] invalid Ele, can't format - SKIP");
+      continue;                 // invalid ele, so skip to next one
+    }
+
+    memset(rule, 0, MAX_RULE_SIZE);
+    snprintf(rule, MAX_RULE_SIZE, "ruleList[%d] = new Rule(\"%s\", \"%s\", \"%s\");\n", i, ip, ele->intr, sub_intr);
+
+    output->copyFrom(rule, strlen(rule));
+  }
+
+  INKCfgContextDestroy(ctx);
+  return WEB_HTTP_ERR_OKAY;
+}
+
+
+//-------------------------------------------------------------------------
+// writeCacheConfigForm
+//-------------------------------------------------------------------------
+// Form contains:
+//    Rule Type                 rule_type
+//    Primary Dest Type         pd_type
+//    Primary Dest Value        pd_value
+//    Time                      time
+//    Source IP                 src_ip
+//    Prefix                    prefix
+//    Suffix                    suffix
+//    Port                      port
+//    Method                    method
+//    Scheme                    scheme
+//    Time Period               time_period
+//    Media-IXT tag             mixt
+int
+writeCacheConfigForm(WebHttpContext * whc)
+{
+  textBuffer *output = whc->response_bdy;
+
+  // first write the hidden "filename" tag
+  HtmlRndrInput(output, HTML_CSS_NONE, HTML_TYPE_HIDDEN, HTML_CONFIG_FILE_TAG, HTML_FILE_CACHE_CONFIG, NULL, NULL);
+
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_RULE_TYPE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  writeRuleTypeSelect_cache(output, "rule_type");
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_RULE_TYPE_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  writePdTypeSelect(output, "pd_type");
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "pd_val", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE_HELP);
+  HtmlRndrBr(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE_EG);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // additional specifiers
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_LABEL_SMALL, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 3);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ADDITIONAL_SPEC);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // time period
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TIME_PERIOD);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "time_period", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TIME_PERIOD_HELP);
+  HtmlRndrBr(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_TIME_PERIOD_EG);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // secondary specifiers
+  writeSecondarySpecsForm(whc, INK_FNAME_CACHE_OBJ);
+
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeHostingConfigForm
+//-------------------------------------------------------------------------
+// Form Contains following:
+//    Primary Dest Type (only domain or hostname)    pd_type
+//    Primary Dest Value                             pd_val
+//    partitions (comma separated list of #'s)       partitions
+int
+writeHostingConfigForm(WebHttpContext * whc)
+{
+  textBuffer *output = whc->response_bdy;
+
+  // write "filename" hidden tag
+  HtmlRndrInput(output, HTML_CSS_NONE, HTML_TYPE_HIDDEN, HTML_CONFIG_FILE_TAG, HTML_FILE_HOSTING_CONFIG, NULL, NULL);
+
+  // Primary Dest Type
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  writePdTypeSelect_hosting(output, "pd_type");
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_TYPE_HELP_2);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // Primary Dest Value (name = "pd_val")
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "pd_val", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PDEST_VALUE_HELP_2);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // Partitions
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PARTITIONS);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "partitions", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PARTITIONS_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  return WEB_HTTP_ERR_OKAY;
+}
+
+//-------------------------------------------------------------------------
+// writeIcpConfigForm
+//-------------------------------------------------------------------------
+// Form contains:
+//    ICP Peer Hostname            hostname
+//    ICP Peer IP                  host_ip
+//    Peer Type (select)           peer_type
+//    TCP Proxy Port               proxy_port
+//    UDP ICP Port                 icp_port
+//    Multicast on/off             mc_state
+//    Multicast IP                 mc_ip
+//    Multicast TTL                mc_ttl
+int
+writeIcpConfigForm(WebHttpContext * whc)
+{
+  textBuffer *output = whc->response_bdy;
+
+  // write the hidden "filename" tag
+  HtmlRndrInput(output, HTML_CSS_NONE, HTML_TYPE_HIDDEN, HTML_CONFIG_FILE_TAG, HTML_FILE_ICP_CONFIG, NULL, NULL);
+
+  // peer hostname
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_HOST);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "hostname", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_HOST_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // peer IP
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_IP);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "host_ip", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_IP_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // peer type
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_TYPE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  writeCacheTypeSelect(output, "peer_type");
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_TYPE_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // peer proxy port
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_PORT);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "proxy_port", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_PEER_PORT_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // peer icp port
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ICP_PORT);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrInput(output, HTML_CSS_BODY_TEXT, "text", "icp_port", NULL, NULL, NULL);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_ICP_PORT_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // multicast enable/disabled?
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_MCAST_STATE);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  writeOnOffSelect(output, "mc_state");
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_CONFIGURE_HELP, HTML_ALIGN_LEFT, HTML_VALIGN_TOP, NULL, NULL, 0);
+  HtmlRndrUlOpen(output);
+  HtmlRndrLi(output);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_MCAST_STATE_HELP);
+  HtmlRndrUlClose(output);
+  HtmlRndrTdClose(output);
+  HtmlRndrTrClose(output);
+
+  // multicast IP
+  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_RIGHT, HTML_VALIGN_NONE, NULL, NULL, 0);
+  HtmlRndrText(output, whc->lang_dict_ht, HTML_ID_CFG_EDIT_MCAST_IP);
+  HtmlRndrTdClose(output);
+  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_LEFT, HTML_VALIGN_NONE, NULL, NULL, 0);

[... 1835 lines stripped ...]


Mime
View raw message