Changeset 1036


Ignore:
Timestamp:
01/02/10 20:30:15 (12 years ago)
Author:
alno
Message:

WebIf:

  • new config parameter added "httphideidleclients=0|1" default is 0

If this parameter is set to 1 you'll see in the status overview only clients which did a request within last 30 seconds.

Location:
branches/monitor-improvement
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/globals.h

    r1035 r1036  
    542542  char      http_tpl[128];
    543543  int               http_refresh;
     544  int               http_hide_idle_clients;
    544545  int       c33_port;
    545546  in_addr_t c33_srvip;
  • branches/monitor-improvement/oscam-config.c

    r1035 r1036  
    429429  if (!strcmp(token, "httptpl")) { strncpy(cfg->http_tpl, value, sizeof(cfg->http_tpl)-1); cfg->http_css[sizeof(cfg->http_tpl)-1] = '\0'; return; }
    430430  if (!strcmp(token, "httprefresh")) { cfg->http_refresh=atoi(value); return; }
     431  if (!strcmp(token, "httphideidleclients")) { cfg->http_hide_idle_clients=atoi(value); return; }
    431432  if (!strcmp(token, "hideclient_to")) { cfg->mon_hideclient_to=atoi(value); return; }
    432433  if (token[0] != '#')
     
    673674  strcpy(cfg->http_css, "");
    674675  cfg->http_refresh=0;
     676  cfg->http_hide_idle_clients=0;
    675677  strcpy(cfg->http_tpl, "");
    676678#ifdef CS_ANTICASC
  • branches/monitor-improvement/oscam-http.c

    r1034 r1036  
    266266    tpl_printf(vars, 0, "HTTPREFRESH", "%d", cfg->http_refresh);
    267267    tpl_addVar(vars, 0, "HTTPTPL", cfg->http_tpl);
     268    tpl_printf(vars, 0, "HTTPHIDEIDLECLIENTS", "%d", cfg->http_hide_idle_clients);
    268269
    269270      struct s_ip *cip;
     
    716717        if (client[i].pid) {
    717718
    718             //if((client[i].typ == 'c') && (client[i].last_srvid == 0)) continue;
     719            if((cfg->http_hide_idle_clients == 1) && (client[i].typ == 'c') && ((now - client[i].lastecm) > 30)) continue;
    719720
    720721            if ((cfg->mon_hideclient_to <= 0) ||    (((now-client[i].lastecm)/60)<cfg->mon_hideclient_to) ||
  • branches/monitor-improvement/oscam-http.h

    r1034 r1036  
    495495        <TR><TD>Httprefresh:</TD><TD><input name=\"httprefresh\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##HTTPREFRESH##\"></TD></TR>\n\
    496496        <TR><TD>Httptpl:</TD><TD><input name=\"httptpl\" type=\"text\" size=\"50\" maxlength=\"100\" value=\"##HTTPTPL##\"></TD></TR>\n\
     497    <TR><TD>HttpHideIdleClients:</TD><TD><input name=\"httphideidleclients\" type=\"text\" size=\"5\" maxlength=\"1\" value=\"##HTTPHIDEIDLECLIENTS##\"></TD></TR>\n\
    497498    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
    498499    </TABLE>\n\
Note: See TracChangeset for help on using the changeset viewer.