View | Details | Raw Unified | Return to bug 46140
Collapse All | Expand All

(-)modules/proxy/mod_proxy_balancer.c (-8 / +22 lines)
Lines 760-765 Link Here
760
            else if (!strcasecmp(val, "Enable"))
760
            else if (!strcasecmp(val, "Enable"))
761
                wsel->s->status &= ~PROXY_WORKER_DISABLED;
761
                wsel->s->status &= ~PROXY_WORKER_DISABLED;
762
        }
762
        }
763
        if ((val = apr_table_get(params, "ew"))) {
764
            if (!strcasecmp(val, "Error") && !(wsel->s->status & PROXY_WORKER_IN_ERROR)) {
765
                wsel->s->error_time = apr_time_now();
766
                wsel->s->status |= PROXY_WORKER_IN_ERROR;
767
            } else if (!strcasecmp(val, "Ok") && (wsel->s->status & PROXY_WORKER_IN_ERROR))
768
                wsel->s->status &= ~PROXY_WORKER_IN_ERROR;
769
        }
763
        if ((val = apr_table_get(params, "ls"))) {
770
        if ((val = apr_table_get(params, "ls"))) {
764
            int ival = atoi(val);
771
            int ival = atoi(val);
765
            if (ival >= 0 && ival <= 99) {
772
            if (ival >= 0 && ival <= 99) {
Lines 810-818 Link Here
810
        balancer = (proxy_balancer *)conf->balancers->elts;
817
        balancer = (proxy_balancer *)conf->balancers->elts;
811
        for (i = 0; i < conf->balancers->nelts; i++) {
818
        for (i = 0; i < conf->balancers->nelts; i++) {
812
819
813
            ap_rputs("<hr />\n<h3>LoadBalancer Status for ", r);
820
            ap_rputs("<hr>\n<h3>LoadBalancer Status for ", r);
814
            ap_rvputs(r, balancer->name, "</h3>\n\n", NULL);
821
            ap_rvputs(r, balancer->name, "</h3>\n\n", NULL);
815
            ap_rputs("\n\n<table border=\"0\" style=\"text-align: left;\"><tr>"
822
            ap_rputs("\n\n<table border=\"0\"><tr align=\"left\">"
816
                "<th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>"
823
                "<th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>"
817
                "</tr>\n<tr>", r);
824
                "</tr>\n<tr>", r);
818
            if (balancer->sticky) {
825
            if (balancer->sticky) {
Lines 832-839 Link Here
832
            ap_rprintf(r, "<td>%d</td>\n", balancer->max_attempts);
839
            ap_rprintf(r, "<td>%d</td>\n", balancer->max_attempts);
833
            ap_rprintf(r, "<td>%s</td>\n",
840
            ap_rprintf(r, "<td>%s</td>\n",
834
                       balancer->lbmethod->name);
841
                       balancer->lbmethod->name);
835
            ap_rputs("</table>\n<br />", r);
842
            ap_rputs("</tr></table>\n<br>", r);
836
            ap_rputs("\n\n<table border=\"0\" style=\"text-align: left;\"><tr>"
843
            ap_rputs("\n\n<table border=\"0\"><tr align=\"left\">"
837
                "<th>Worker URL</th>"
844
                "<th>Worker URL</th>"
838
                "<th>Route</th><th>RouteRedir</th>"
845
                "<th>Route</th><th>RouteRedir</th>"
839
                "<th>Factor</th><th>Set</th><th>Status</th>"
846
                "<th>Factor</th><th>Set</th><th>Status</th>"
Lines 879-890 Link Here
879
            ap_rputs("</table>\n", r);
886
            ap_rputs("</table>\n", r);
880
            ++balancer;
887
            ++balancer;
881
        }
888
        }
882
        ap_rputs("<hr />\n", r);
889
        ap_rputs("<hr>\n", r);
883
        if (wsel && bsel) {
890
        if (wsel && bsel) {
884
            ap_rputs("<h3>Edit worker settings for ", r);
891
            ap_rputs("<h3>Edit worker settings for ", r);
885
            ap_rvputs(r, wsel->name, "</h3>\n", NULL);
892
            ap_rvputs(r, wsel->name, " ( ", bsel->name, " )</h3>\n", NULL);
886
            ap_rvputs(r, "<form method=\"GET\" action=\"", NULL);
893
            ap_rvputs(r, "<form method=\"GET\" action=\"", NULL);
887
            ap_rvputs(r, r->uri, "\">\n<dl>", NULL);
894
            ap_rvputs(r, r->uri, "\">\n", NULL);
888
            ap_rputs("<table><tr><td>Load factor:</td><td><input name=\"lf\" type=text ", r);
895
            ap_rputs("<table><tr><td>Load factor:</td><td><input name=\"lf\" type=text ", r);
889
            ap_rprintf(r, "value=\"%d\"></td></tr>\n", wsel->s->lbfactor);
896
            ap_rprintf(r, "value=\"%d\"></td></tr>\n", wsel->s->lbfactor);
890
            ap_rputs("<tr><td>LB Set:</td><td><input name=\"ls\" type=text ", r);
897
            ap_rputs("<tr><td>LB Set:</td><td><input name=\"ls\" type=text ", r);
Lines 904-909 Link Here
904
            if (!(wsel->s->status & PROXY_WORKER_DISABLED))
911
            if (!(wsel->s->status & PROXY_WORKER_DISABLED))
905
                ap_rputs(" checked", r);
912
                ap_rputs(" checked", r);
906
            ap_rputs("></td></tr>\n", r);
913
            ap_rputs("></td></tr>\n", r);
914
            ap_rputs("<tr><td>Error Status:</td><td>Error: <input name=\"ew\" value=\"Error\" type=radio", r);
915
            if (wsel->s->status & PROXY_WORKER_IN_ERROR)
916
                ap_rputs(" checked", r);
917
            ap_rputs("> | Ok: <input name=\"ew\" value=\"Ok\" type=radio", r);
918
            if (!(wsel->s->status & PROXY_WORKER_IN_ERROR))
919
                ap_rputs(" checked", r);
920
            ap_rputs("></td></tr>\n", r);
907
            ap_rputs("<tr><td colspan=2><input type=submit value=\"Submit\"></td></tr>\n", r);
921
            ap_rputs("<tr><td colspan=2><input type=submit value=\"Submit\"></td></tr>\n", r);
908
            ap_rvputs(r, "</table>\n<input type=hidden name=\"w\" ",  NULL);
922
            ap_rvputs(r, "</table>\n<input type=hidden name=\"w\" ",  NULL);
909
            ap_rvputs(r, "value=\"", ap_escape_uri(r->pool, wsel->name), "\">\n", NULL);
923
            ap_rvputs(r, "value=\"", ap_escape_uri(r->pool, wsel->name), "\">\n", NULL);
Lines 913-919 Link Here
913
            ap_rvputs(r, "<input type=hidden name=\"nonce\" value=\"", 
927
            ap_rvputs(r, "<input type=hidden name=\"nonce\" value=\"", 
914
                      balancer_nonce, "\">\n", NULL);
928
                      balancer_nonce, "\">\n", NULL);
915
            ap_rvputs(r, "</form>\n", NULL);
929
            ap_rvputs(r, "</form>\n", NULL);
916
            ap_rputs("<hr />\n", r);
930
            ap_rputs("<hr>\n", r);
917
        }
931
        }
918
        ap_rputs(ap_psignature("",r), r);
932
        ap_rputs(ap_psignature("",r), r);
919
        ap_rputs("</body></html>\n", r);
933
        ap_rputs("</body></html>\n", r);

Return to bug 46140