You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2011/03/29 22:51:23 UTC

svn commit: r1086736 [3/3] - in /trafficserver/traffic/trunk: ./ cop/ lib/ts/ mgmt/ mgmt/cluster/ mgmt/html2/ mgmt/html2/configure/ mgmt/html2/images/ mgmt/html2/include/ mgmt/html2/monitor/ mgmt/html2/mrtg/ mgmt/web2/ proxy/config/

Modified: trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc?rev=1086736&r1=1086735&r2=1086736&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc (original)
+++ trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc Tue Mar 29 20:51:21 2011
@@ -555,9 +555,6 @@ webIntr_main(void *x)
 #if !defined(linux)
   sigset_t allSigs;             // Set of all signals
 #endif
-#if TS_HAS_WEBUI
-  char webFailMsg[] = "Management Web Services Failed to Initialize";
-#endif
   char pacFailMsg[] = "Auto-Configuration Service Failed to Initialize";
   //  char gphFailMsg[] = "Dynamic Graph Service Failed to Initialize";
   char mgmtapiFailMsg[] = "Traffic server managment API service Interface Failed to Initialize.";
@@ -568,9 +565,6 @@ webIntr_main(void *x)
 
   int addrLen;
   int i;
-#if TS_HAS_WEBUI
-  int sleepTime = 2;
-#endif
   // No Warning
   NOWARN_UNUSED(x);
 
@@ -646,20 +640,8 @@ webIntr_main(void *x)
 
   // setup our language dictionary hash-table
   adminContext.lang_dict_ht = new MgmtHashTable("lang_dict_ht", false, InkHashTableKeyType_String);
-
   adminContext.SSL_Context = NULL;
 
-#if TS_HAS_WEBUI
-  // configure components
-  configAuthEnabled();
-  configAuthAdminUser();
-  configAuthAdminPasswd();
-  configAuthOtherUsers();
-  // <@record> substitution requires WebHttpInit() first
-  // configLangDict();
-  configUI();
-#endif /* TS_HAS_WEBUI */
-
   configSSLenable();
   Debug("ui", "SSL enabled is %d\n", adminContext.SSLenabled);
 
@@ -781,31 +763,6 @@ webIntr_main(void *x)
 
   // Check our web contexts to make sure everything is
   //  OK.  If it is, go ahead and fire up the interfaces
-
-#if TS_HAS_WEBUI
-
-  if (checkWebContext(&adminContext, "Web Management") != 0) {
-    lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, webFailMsg);
-    mgmt_elog(stderr, "[WebIntrMain] Web Interface Intialization failed.\n");
-  } else {
-    // Fire up the mgmt interface
-    while ((socketFD = newTcpSocket(webPort)) < 0) {
-
-      if (sleepTime >= 30) {
-        mgmt_elog(stderr, "[WebIntrMain] Could not create Web Interface socket.  Giving Up.\n");
-        lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, webFailMsg);
-        break;
-      } else {
-        mgmt_elog(stderr, "[WebIntrMain] Unable to create Web Interface socket.  Will try again in %d seconds\n",
-                  sleepTime);
-        mgmt_sleep_sec(sleepTime);
-        sleepTime *= 2;
-      }
-    }
-  }
-
-#endif //TS_HAS_WEBUI
-
   if (checkWebContext(&autoconfContext, "Browser Auto-Configuration") != 0) {
     lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, pacFailMsg);
   } else {
@@ -817,12 +774,8 @@ webIntr_main(void *x)
 
   // Initialze WebHttp Module
   WebHttpInit();
-#if TS_HAS_WEBUI
-  configLangDict();
-#endif /* TS_HAS_WEBUI */
 
   while (1) {
-
     FD_ZERO(&selectFDs);
 
     if (socketFD >= 0) {
@@ -881,13 +834,6 @@ webIntr_main(void *x)
       // Accept OK
       ink_mutex_acquire(&wGlobals.serviceThrLock);
 
-#if TS_HAS_WEBUI
-      // Check to see if there are any unprocessed config changes
-      if (webConfigChanged > 0) {
-        updateWebConfig();
-      }
-#endif /* TS_HAS_WEBUI */
-
       // If this a web manager, make sure that it is from an allowed ip addr
       if (((serviceThr == HTTP_THR) &&
            mgmt_allow_table->match(clientInfo->sin_addr.s_addr) == false)

Modified: trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc?rev=1086736&r1=1086735&r2=1086736&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc (original)
+++ trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc Tue Mar 29 20:51:21 2011
@@ -34,7 +34,6 @@
 #include "WebOverview.h"
 #include "WebGlobals.h"
 #include "WebHttpRender.h"
-#include "WebHttpTree.h"
 #include "WebMgmtUtils.h"
 
 #include "LocalManager.h"
@@ -738,191 +737,6 @@ overviewPage::addAlarm(alarm_t type, cha
   ink_mutex_release(&accessLock);
 }
 
-#if TS_HAS_WEBUI
-// overviewPage::addHostPanel
-//
-//  Inserts stats entries for the host referenced by parameter host
-//  Called by overviewPage::generateTable
-//
-void
-overviewPage::addHostPanel(WebHttpContext * whc, overviewRecord * host)
-{
-
-  const char errorStr[] = "loading...";
-  char tmp[256];
-  in_addr ip;
-  char *ip_str;
-
-  textBuffer *output = whc->response_bdy;
-  MgmtHashTable *dict_ht = whc->lang_dict_ht;
-
-  //-----------------------------------------------------------------------
-  // SET 1: CACHE TRANSACTION SUMMARY
-  //-----------------------------------------------------------------------
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 8);
-
-  MgmtFloat hits, hit_f, hit_r;
-  MgmtFloat errs, abts, f;
-
-  // get aborts
-  abts = 0;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.errors.pre_accept_hangups", &f))
-    abts += f;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.errors.empty_hangups", &f))
-    abts += f;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.errors.early_hangups", &f))
-    abts += f;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.errors.aborts", &f))
-    abts += f;
-
-  // get errors
-  errs = 0;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.errors.connect_failed", &f))
-    errs += f;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.errors.other", &f))
-    errs += f;
-
-  // get hits
-  hits = hit_f = hit_r = 0;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.hit_fresh", &hit_f))
-    hits += hit_f;
-  if (host->varFloatFromName("proxy.node.http.transaction_frac_avg_10s.hit_revalidated", &hit_r))
-    hits += hit_r;
-#ifndef OLD_WAY
-  host->varFloatFromName("proxy.node.cache_hit_ratio_avg_10s", &hits);
-#endif /* !OLD_WAY */
-
-#define SEPARATOR output->copyFrom("&nbsp;-&nbsp;", 13)
-
-  HtmlRndrTableOpen(output, NULL, 0, 0, 0);
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_CACHE_HIT_RATE);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%.1f%% (%.1f%% ", hits * 100.0, hit_f * 100.0);
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrText(output, dict_ht, HTML_ID_FRESH);
-  snprintf(tmp, sizeof(tmp), ", %.1f%% ", hit_r * 100.0);
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrText(output, dict_ht, HTML_ID_REFRESH);
-  output->copyFrom(")", 1);
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_ERRORS);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%.1f%%", errs * 100.0);
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_ABORTS);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%.1f%%", abts * 100.0);
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  //-----------------------------------------------------------------------
-  // SET 2: ACTIVE CONNECTIONS
-  //-----------------------------------------------------------------------
-
-  MgmtInt clients, servers;
-
-  clients = servers = 0;
-
-  host->varIntFromName("proxy.node.current_client_connections", &clients);
-  host->varIntFromName("proxy.node.current_server_connections", &servers);
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_ACTIVE_CLIENTS);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%" PRId64 "", clients);
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_ACTIVE_SERVERS);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%" PRId64 "", servers);
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  //-----------------------------------------------------------------------
-  // SET 3: CLUSTER ADDRESS
-  //-----------------------------------------------------------------------
-
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_NODE_IP_ADDRESS);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  ip.s_addr = host->inetAddr;
-  ip_str = inet_ntoa(ip);
-  output->copyFrom(ip_str, strlen(ip_str));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  //-----------------------------------------------------------------------
-  // SET 4: TS Lite
-  //-----------------------------------------------------------------------
-
-  if (host->varStrFromName("proxy.node.cache.bytes_free\\b", tmp, 256) == false) {
-    ink_strncpy(tmp, errorStr, sizeof(tmp));
-  }
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_CACHE_FREE_SPACE);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  if (host->varStrFromName("proxy.node.hostdb.hit_ratio_avg_10s\\p", tmp, 256) == false) {
-    ink_strncpy(tmp, errorStr, sizeof(tmp));
-  }
-  HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_LEFT);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  HtmlRndrText(output, dict_ht, HTML_ID_HOSTDB_HIT_RATE);
-  HtmlRndrTdClose(output);
-  HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
-  SEPARATOR;
-  output->copyFrom(tmp, strlen(tmp));
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-  HtmlRndrTableClose(output);
-
-  HtmlRndrTdClose(output);
-  HtmlRndrTrClose(output);
-
-#undef SEPARATOR
-}
-#endif
 
 // int overviewPage::getClusterHosts(Expanding Array* hosts)
 //

Modified: trafficserver/traffic/trunk/proxy/config/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/config/Makefile.am?rev=1086736&r1=1086735&r2=1086736&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/config/Makefile.am (original)
+++ trafficserver/traffic/trunk/proxy/config/Makefile.am Tue Mar 29 20:51:21 2011
@@ -26,9 +26,6 @@ nodist_sysconf_DATA = \
   records.config.default \
   storage.config.default
 
-webui_conf = \
-  admin_access.config.default
-
 dist_sysconf_DATA =	\
   ae_ua.config.default \
   cache.config.default \
@@ -59,7 +56,3 @@ install-exec-hook:
 		cfgfile=`echo $$dfltcfgfile | sed 's/\.default$$//'` ; \
 		test -f $(sysconfdir)/$$cfgfile || mv $(sysconfdir)/$$dfltcfgfile $(sysconfdir)/$$cfgfile ; \
 	done
-
-if BUILD_WEBUI
-  dist_sysconf_DATA += $(webui_conf)
-endif