OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / WebContent / vs_add.jsp
1 <%@ page import="org.ultramonkey.l7.model.*,
2                                  org.ultramonkey.l7.controller.*,
3                                  org.ultramonkey.l7.view.*, java.util.*"
4         language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
5         
6 <%
7         /*
8          * check session
9          */
10         L7guiServletBase base = new L7guiServletBase();
11         if (session.isNew() || base.checkSession(session) == false) {
12                 MessageView error = new MessageView(41436, LogCategorySet.GUI_USER_AUTHENTICATION,
13                                 Message.INVALID_SESSSION);
14                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
15                 response.sendRedirect(RedirectPages.LOGIN);
16                 return;
17         }
18
19
20         /*
21          * get result message
22          */
23         MessageView message = (MessageView) session.getAttribute(SessionKeys.RESULT_MESSAGE);
24         String errorMessage = "";
25         int errorNumber = 0;
26         String  category = "";
27         if (message != null) {
28                 errorMessage = message.getMessage();
29                 errorNumber = message.getErrno();
30                 category = message.getCategory();
31                 session.setAttribute(SessionKeys.RESULT_MESSAGE, null);
32         }
33         
34         /*
35          * get validation error message
36          */
37         HashMap<String,String> errMessage = (HashMap<String,String>) session.getAttribute(SessionKeys.INVALID_MESSAGE);
38         session.setAttribute(SessionKeys.INVALID_MESSAGE,null);
39         
40         /*
41          * get previous input value
42          */
43         L7guiFramework framework = new L7guiFramework();
44         VirtualSetting vs = (VirtualSetting) session.getAttribute(SessionKeys.INPUT_VS);
45         if (vs != null) {
46                 session.setAttribute(SessionKeys.INPUT_VS, null);
47         }
48
49         /*
50          * get l7directrod.cf data
51          */
52         DirectorData dd = framework.getDirectorData();
53         if (dd == null) {
54                 MessageView error = new MessageView(41437, LogCategorySet.GUI_IO_FILE,
55                                 Message.DIRECTOR_DATA_ERROR);
56                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
57                 response.sendRedirect(RedirectPages.LOGIN);
58                 return;
59         }
60                 
61
62         /*
63          * get cluster status
64          */
65         ClusterData cd = framework.getClusterData();
66         if (cd == null) {
67                 MessageView error = new MessageView(41438, LogCategorySet.GUI_IO_COMMAND,
68                                 Message.CLUSTER_DATA_ERROR);
69                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
70                 response.sendRedirect(RedirectPages.LOGIN);
71                 return;
72         }
73         
74         /*
75          * fix style seat
76          */
77         String cssSeat = "l7gui_single_style.css";
78         if ( cd.self_status == ClusterStatus.ACTIVE ){
79                 cssSeat = "l7gui_act_style.css";
80         }
81         else if ( cd.self_status == ClusterStatus.STANDBY ){
82                 cssSeat = "l7gui_sby_style.css";
83         }
84
85 %>      
86
87
88
89 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
90 <html>
91         <head>
92                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
93                 <meta http-equiv="Pragma" content="no-cache">
94                 <meta http-equiv="Cache-Control" content="no-cache">
95                 <meta http-equiv="Expires" content="0"> 
96                 <meta http-equiv="Content-Script-Type" content="text/javascript" />
97                 <meta http-equiv="Content-Style-Type" content="text/css" />
98                 <script src="l7gui.js" type="text/javascript"></script>
99                 <noscript> 
100                         <meta http-equiv="refresh" content="<%= RedirectPages.NOSCRIPT_TIME %>; url=<%= RedirectPages.LOGIN %>"/>
101                 </noscript> 
102                 <link rel="stylesheet" type="text/css" href="<%=cssSeat %>" />
103                 <link rel="shortcut icon" href="images/favicon.ico" />
104         
105                 <title>Add VirtualService</title>
106         </head>
107
108         <body class="normal">
109                 <jsp:include page="menu.jsp" flush="false"/>
110                 <div id="content">
111                         <h1 class="title">Add a VirtualService</h1>                                             
112 <%
113 if ( (cd.self_status.equals(ClusterStatus.ACTIVE)) || (cd.self_status.equals(ClusterStatus.SINGLE) )){
114
115         if ( (message != null) && (errorMessage != null)) {
116 %>
117
118 <p class="error">[<%=category %> - <%=errorNumber %>]</p>
119 <p class="error"><%=errorMessage %></p>
120
121 <%
122         }
123 %>              
124
125                         <h2> VirtualService Info</h2>
126                         <form method="post" action="VSAddServlet" name="vs_add">
127
128
129                         <fieldset>
130                                 <legend>Basic Settings</legend>
131                         
132                                 <table class="status">
133                                 <tr>
134                                         <th>
135                                                 <label for="ip">Virtual IP address</label>
136                                         </th>
137                                         <td>
138                                                 <input type="text" id="ip" name="vip" value="<%
139                                                 if ( null != vs ) 
140                                                                         out.println(vs.virtual.host); %>" maxlength="15" />
141                                                 <% 
142                                                         if ( null != errMessage ){
143                                                                 String invalidMessage = errMessage.get("vip");
144                                                                 if( null != invalidMessage ){
145                                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
146                                                                 }
147                                                         }
148                                                 %>
149                                         </td>
150                                         <td>
151                                                 <p class="item">Required Field</p>
152                                                 <p class="required">[0-255].[0-255].[0-255].[0-255]</p>
153                                         </td>
154                                 </tr>
155                                 <tr>
156                                         <th>
157                                                 <label for="port">Port Number</label>
158                                         </th>
159                                         <td>
160                                                 <%
161                                                 {
162                                                         String invalidMessage = null;
163                                                         if ( null != errMessage ) {
164                                                                 invalidMessage = errMessage.get("port");
165                                                         }
166
167                                                         if ( (vs == null) || (vs.virtual.port == null) ){
168
169                                                                 out.println("<input type=\"text\" id=\"port\" value=\"\" name=\"port\" />");
170                                                         }                                                                                       
171                                                         else{
172                                                                 out.println("<input type=\"text\" id=\"port\" value=\"" + vs.virtual.port + "\"name=\"port\" />");
173                                                         }                                                                                                                               
174                                                         if( null != invalidMessage ){
175                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
176                                                         }
177                                                 }
178                                                 %>
179                                         </td>
180                                         <td>
181                                                 <p class="item">Required Field</p>
182                                                 <p class="required">1-65535, service name</p>
183                                         </td>
184                                 </tr>
185                                 <tr>
186                                         <th>
187                                                 <label for="protomod">Persistence Type</label>
188                                         </th>
189                                         <td>
190                                                 <select id="protomod" name="protomod">
191                                                         <option value="cinsert"<%
192                                                         if ( (vs != null ) && (vs.protomod.equals("cinsert")) )
193                                                                 out.print(" selected");
194                                                         %>>Cookie Insert</option>
195                                                         <option value="url"<%
196                                                         if ( (vs != null ) && (vs.protomod.equals("url")) )
197                                                                 out.print(" selected");
198                                                         %>>URL Pattern</option>
199                                                         <option value="sslid"<%
200                                                         if ( (vs != null ) && (vs.protomod.equals("sslid")) )
201                                                                 out.print(" selected");
202                                                         %>>SSL Session ID</option>
203                                                         <option value="sessionless"<%
204                                                         if ( (vs != null ) &&  (vs.protomod.equals("sessionless")) )
205                                                                 out.print(" selected");
206                                                         %>>Sessionless</option>
207                                                 </select>
208                                                 <% 
209                                                         if ( null != errMessage ){
210                                                                 String invalidMessage = errMessage.get("protomod");
211                                                                 if( null != invalidMessage ){
212                                                                         out.print("<p class=\"invalid\">" + invalidMessage + "</p>");
213                                                                 }
214                                                         }
215                                                 %>
216                                         </td>
217                                         <td>
218                                                 <p class="item">Required Field</p>
219                                         </td>
220                                 </tr>
221                                 <tr>
222                                         <th>
223                                                 <label for="option">Persistence option</label>
224                                         </th>
225                                         <td>
226                                                 <input type="text" id="option" name="option" value="<% 
227                                                         if ( null != vs ) 
228                                                                         out.println(vs.option); %>" maxlength="127" />
229                                                 <% 
230                                                         if ( null != errMessage ){
231                                                                 String invalidMessage = errMessage.get("option");
232                                                                 if( null != invalidMessage ){
233                                                                         out.print("<p class=\"invalid\">" + invalidMessage + "</p>");
234                                                                 }
235                                                         }
236                                                 %>
237                                         </td>
238                                         <td>
239                                                 <p class="required">Up to 127 one-byte characters in English</p>
240                                         </td>
241                                 </tr>
242                                 <tr>
243                                         <th>
244                                                 <label for="sched">Scheduler Type</label>
245                                         </th>
246                                         <td>
247                                                 <select id="sched" name="sched">
248                                                         <option value="rr"<%
249                                                         if ( (vs != null ) && (vs.sched.equals("rr")) )
250                                                                 out.print(" selected");
251                                                         %>>Round Robin</option>
252                                                         <option value="wrr"<%
253                                                         if ( (vs != null ) && (vs.sched.equals("wrr")) )
254                                                                 out.print(" selected");
255                                                         %>>Weighted Round Robin</option>
256                                                         <option value="lc"<%
257                                                         if ( (vs != null ) && (vs.sched.equals("lc")) )
258                                                                 out.print(" selected");
259                                                         %>>Least Connection</option>
260                                                 </select>
261                                                 <% 
262                                                         if ( null != errMessage ){
263                                                                 String invalidMessage = errMessage.get("sched");
264                                                                 if( null != invalidMessage ){
265                                                                         out.print("<p class=\"invalid\">" + invalidMessage + "</p>");
266                                                                 }
267                                                         }
268                                                 %>
269                                         </td>
270                                         <td>
271                                                 <p class="required"></p>
272                                         </td>
273                                 </tr>
274                                 </table>
275                         </fieldset>
276                         <fieldset class="">
277                         <legend>Advanced Settings</legend>
278                                 <table class="status">
279                                 <tr>
280                                         <th>
281                                                 <label for="qos_srv">QoS (per Virtual Service)</label>
282                                         </th>
283                                         <td>
284                                                 <%      {
285                                                         String invalidMessage = null;
286                                                         int unit_s = 0;
287                                                         if ( null != errMessage ) {
288                                                                 invalidMessage = errMessage.get("qos_service");
289                                                         }
290                                                         if ( (vs == null) || ( ( 0 == vs.qosservice ) && ( null != invalidMessage ) ) ){
291                                                                 out.println("<input type=\"text\" id=\"qos_srv\" value=\"\" name=\"qos_service\" size=\"3\" maxlength=\"3\" />");
292                                                         }                                                                                       
293                                                         else{
294                                                                 if ( null == invalidMessage ){ 
295                                                                         while ( (vs != null) && (vs.qosservice >= 1000) ) {
296                                                                                 vs.qosservice /= 1000;
297                                                                                 unit_s++;
298                                                                         }
299                                                                 }
300                                                                 out.println("<input type=\"text\" id=\"qos_srv\" value=\"" + vs.qosservice + "\"name=\"qos_service\" size=\"3\" maxlength=\"3\" />");
301                                                         }
302                                                 %>
303                                                 <select id="qos_srv" name="qos_service_unit">
304                                                         <option value="bps"<%
305                                                                 if ( (vs != null) && (unit_s == 0) )
306                                                                         out.print(" selected");
307                                                         %>>bps</option>
308                                                         <option value="Kbps"<%
309                                                                 if ( (vs != null) && (unit_s == 1) )
310                                                                         out.print(" selected");
311                                                         %>>Kbps</option>
312                                                         <option value="Mbps"<%
313                                                                 if ( (vs != null) && (unit_s == 2) )
314                                                                         out.print(" selected");
315                                                         %>>Mbps</option>
316                                                         <option value="Gbps"<%
317                                                                 if ( (vs != null) && (unit_s == 3) )
318                                                                         out.print(" selected");
319                                                         %>>Gbps</option>
320                                                 </select>
321                                                 <% 
322                                                                 if( null != invalidMessage ){
323                                                                         out.print("<p class=\"invalid\">" + invalidMessage + "</p>");
324                                                                 }
325                                                         }
326                                                 %>                              
327                                         </td>
328                                         <td>
329                                                 <p class="required">0-999(bps/Kbps/Mbps/Gbps)</p>
330                                         </td>
331                                 </tr>
332                                 <tr>
333                                         <th>
334                                                 <label for="qos_conn">QoS (per Client)</label>
335                                         </th>
336                                         <td>
337                                                 <%      {
338                                                         String invalidMessage = null;
339                                                         int unit_c = 0;
340                                                         if ( null != errMessage ) {
341                                                                 invalidMessage = errMessage.get("qos_conn");
342                                                         }                                                               
343                                                         if ( (vs == null) || ( ( 0 == vs.qosclient ) && ( null != invalidMessage ) ) ){
344                                                                 out.print("<input type=\"text\" id=\"qos_conn\" value=\"\" name=\"qos_conn\" size=\"3\" maxlength=\"3\" />");
345                                                         }                                                                                       
346                                                         else{
347                                                                 if ( null == invalidMessage ){
348                                                                         while ( (vs != null) &&  (vs.qosclient >= 1000) ) {
349                                                                                 vs.qosclient /= 1000;
350                                                                                 unit_c++;
351                                                                         }
352                                                                 }
353                                                                 out.print("<input type=\"text\" id=\"qos_conn\" value=\"" + vs.qosclient + "\" name=\"qos_conn\" size=\"3\" maxlength=\"3\" />");
354                                                         }
355                                                 %>
356                                                 <select id="qos_conn" name="qos_conn_unit">
357                                                         <option value="bps"<%
358                                                                 if ( (vs != null) && (unit_c == 0) )
359                                                                         out.print(" selected");
360                                                         %>>bps</option>
361                                                         <option value="Kbps"<%
362                                                                 if ( (vs != null) && (unit_c == 1) )
363                                                                         out.print(" selected");
364                                                         %>>Kbps</option>
365                                                         <option value="Mbps"<%
366                                                                 if ( (vs != null) && (unit_c == 2) )
367                                                                         out.print(" selected");
368                                                         %>>Mbps</option>
369                                                         <option value="Gbps"<%
370                                                                 if ( (vs != null) && (unit_c == 3) )
371                                                                         out.print(" selected");
372                                                         %>>Gbps</option>
373                                                 </select>
374                                                 <% 
375                                                                 if( null != invalidMessage ){
376                                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
377                                                                 }
378                                                         }
379                                                 %>
380                                         </td>
381                                         <td>
382                                                 <p class="required">0-999(bps/Kbps/Mbps/Gbps)</p>
383                                         </td>
384                                 </tr>
385                                 <tr>
386                                         <th>
387                                                 <label for="max_conn">Max Connections</label>
388                                         </th>
389                                         <td>
390                                                 <%
391                                                 {
392                                                         String invalidMessage = null;
393                                                         if ( null != errMessage ) {
394                                                                 invalidMessage = errMessage.get("max_conn");
395                                                         }
396                                                         if ( (vs == null) || ( ( 0 == vs.maxconn ) && ( null != invalidMessage ) ) ){
397                                                                 out.println("<input type=\"text\" id=\"max_conn\" value=\"\" name=\"max_conn\" maxlength=\"6\" />");
398                                                         }                                                                                       
399                                                         else{
400                                                                 out.println("<input type=\"text\" id=\"max_conn\" value=\"" + vs.maxconn + "\" name=\"max_conn\" maxlength=\"6\" />");
401                                                         }
402                                                         if( null != invalidMessage ){
403                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
404                                                         }
405                                                 }
406                                                 %>
407                                         </td>
408                                         <td>
409                                                 <p class="required">0-100000<br>Note : "0" means "Unlimited"</p>
410                                         </td>
411                                 </tr>                   
412                         </table>
413                 </fieldset>
414                 
415                 <fieldset class="">
416                 <legend>Monitor Settings</legend>
417                         <p class="caution">     <img src="images/exclamation3.gif" alt="Caution!!" width="16" height="14" align="middle">       
418                          Disable Area when you push "Apply" button.</p>
419                         <table class="status">
420                         <tr>
421                                 <th>
422                                         <label for="timeout">Check Timeout</label>
423                                 </th>
424                                 <td>
425                                         <%
426                                         {
427                                                 String invalidMessage = null;
428                                                 if ( null != errMessage ) {
429                                                         invalidMessage = errMessage.get("timeout");
430                                                 }
431                                                 if ( (vs == null) || (0 == vs.timeout) ){ 
432                                                         if ( dd.autoreload == true ) {
433                                                                 out.println("<input type=\"text\" id=\"timeout\" value=\"\" name=\"timeout\" maxlength=\"10\" />");
434                                                         }
435                                                         else {
436                                                                 out.println("<input class=\"read\" readonly type=\"text\" id=\"timeout\" value=\"\" name=\"timeout\" maxlength=\"10\" />");
437                                                         }
438                                                 }
439                                                 else {
440                                                         if ( dd.autoreload == true ) {
441                                                                 out.println("<input type=\"text\" id=\"timeout\" value=\"" + vs.timeout + "\" name=\"timeout\" maxlength=\"10\" />");
442                                                         }
443                                                         else {
444                                                                 out.println("<input class=\"read\" readonly type=\"text\" id=\"timeout\" value=\"\" name=\"timeout\" maxlength=\"10\" />");
445                                                         }
446                                                 }
447                                                 if( null != invalidMessage ){
448                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
449                                                 }
450                                         }
451                                         %>
452                                 </td>
453                                 <td>
454                                         <p class="required">1-2147483647(sec)</p>
455                                 </td>
456                         </tr>
457                         <tr>
458                                 <th>
459                                         <label for="check_type">Check Type</label>
460                                 </th>
461                                 <td>
462                                 <% 
463                                 if ( dd.autoreload == true ) {
464                                 %>
465                                         <input type="text" id="check_type" value="<%
466                                          if ( null != vs ) 
467                                                         out.println(vs.checktype); %>" name="check_type" maxlength="9" />                                                                                       
468                                 <% 
469                                 }
470                                 else{
471                                 %>
472                                         <input class="read" readonly type="text" id="check_type" value="<%
473                                          if ( null != vs ) 
474                                                         out.println(vs.checktype); %>" name="check_type" maxlength="9" />
475                                         <% 
476                                         }
477                                         if ( null != errMessage ) {
478                                                 String invalidMessage = errMessage.get("check_type");
479                                                 if( null != invalidMessage ){
480                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
481                                                 }
482                                         }
483                                         %>                                      
484                                 </td>
485                                 <td>
486                                         <p class="required">Any Of The Following<br>negotiate, connect, ping, off, on, 0-9</p>
487                                 </td>
488                         </tr>
489                         <tr>
490                                 <th>
491                                         <label for="check_service">Check Service</label>
492                                 </th>
493                                 <td>
494                                         <% if ( dd.autoreload == true ) {%>
495                                         <select id="check_service" name="check_service">
496                                                 <option value=""<%
497                                                 if ( ( null != vs ) && (vs.service.equals("")) )
498                                                         out.print(" selected");
499                                                 %>></option>
500                                                 <option value="ftp"<%
501                                                 if ( ( null != vs ) && (vs.service.equals("ftp")) )
502                                                         out.print(" selected");
503                                                 %>>FTP</option>
504                                                 <option value="smtp"<%
505                                                 if ( ( null != vs ) && (vs.service.equals("smtp")) )
506                                                         out.print(" selected");
507                                                 %>>SMTP</option>
508                                                 <option value="dns"<%
509                                                 if ( ( null != vs ) && (vs.service.equals("dns")))
510                                                         out.print(" selected");
511                                                 %>>DNS</option>
512                                                 <option value="http"<%
513                                                 if ( ( null != vs ) && (vs.service.equals("http")) )
514                                                         out.print(" selected");
515                                                 %>>HTTP</option>
516                                                 <option value="pop"<%
517                                                 if ( ( null != vs ) && (vs.service.equals("pop")) )
518                                                         out.print(" selected");
519                                                 %>>POP</option>
520                                                 <option value="nntp"<%
521                                                 if ( ( null != vs ) && (vs.service.equals("nntp")) )
522                                                         out.print(" selected");
523                                                 %>>NNTP</option>
524                                                 <option value="imap"<%
525                                                 if ( ( null != vs ) && (vs.service.equals("imap")) )
526                                                         out.print(" selected");
527                                                 %>>IMAP</option>
528                                                 <option value="ldap"<%
529                                                 if ( ( null != vs ) && (vs.service.equals("ldap")) )
530                                                         out.print(" selected");
531                                                 %>>LDAP</option>
532                                                 <option value="https"<%
533                                                 if ( ( null != vs ) && (vs.service.equals("https")) )
534                                                         out.print(" selected");
535                                                 %>>HTTPS</option>
536                                                 <option value="mysql"<%
537                                                 if ( ( null != vs ) && (vs.service.equals("mysql")) )
538                                                         out.print(" selected");
539                                                 %>>MySQL</option>
540                                                 <option value="pgsql"<%
541                                                 if ( ( null != vs ) && (vs.service.equals("pgsql")) )
542                                                         out.print(" selected");
543                                                 %>>PostgreSQL</option>
544                                                 <option value="sip"<%
545                                                 if ( ( null != vs ) && (vs.service.equals("sip")) )
546                                                         out.print(" selected");
547                                                 %>>SIP</option>
548                                                 <option value="none"<%
549                                                 if ( ( null != vs ) && (vs.service.equals("none")) )
550                                                         out.print(" selected");
551                                                 %>>None</option>
552                                         </select>
553                                         <%}
554                                         else
555                                         {
556                                         %>
557                                         <select class="read" disabled id="check_service" name="check_service">
558                                                 <option value=""<%
559                                                 if ( ( null != vs ) && (vs.service.equals("")) )
560                                                         out.print(" selected");
561                                                 %>></option>
562                                                 <option value="ftp"<%
563                                                 if ( ( null != vs ) && (vs.service.equals("ftp")) )
564                                                         out.print(" selected");
565                                                 %>>FTP</option>
566                                                 <option value="smtp"<%
567                                                 if ( ( null != vs ) && (vs.service.equals("smtp")) )
568                                                         out.print(" selected");
569                                                 %>>SMTP</option>
570                                                 <option value="dns"<%
571                                                 if ( ( null != vs ) && (vs.service.equals("dns")))
572                                                         out.print(" selected");
573                                                 %>>DNS</option>
574                                                 <option value="http"<%
575                                                 if ( ( null != vs ) && (vs.service.equals("http")) )
576                                                         out.print(" selected");
577                                                 %>>HTTP</option>
578                                                 <option value="pop"<%
579                                                 if ( ( null != vs ) && (vs.service.equals("pop")) )
580                                                         out.print(" selected");
581                                                 %>>POP</option>
582                                                 <option value="nntp"<%
583                                                 if ( ( null != vs ) && (vs.service.equals("nntp")) )
584                                                         out.print(" selected");
585                                                 %>>NNTP</option>
586                                                 <option value="imap"<%
587                                                 if ( ( null != vs ) && (vs.service.equals("imap")) )
588                                                         out.print(" selected");
589                                                 %>>IMAP</option>
590                                                 <option value="ldap"<%
591                                                 if ( ( null != vs ) && (vs.service.equals("ldap")) )
592                                                         out.print(" selected");
593                                                 %>>LDAP</option>
594                                                 <option value="https"<%
595                                                 if ( ( null != vs ) && (vs.service.equals("https")) )
596                                                         out.print(" selected");
597                                                 %>>HTTPS</option>
598                                                 <option value="mysql"<%
599                                                 if ( ( null != vs ) && (vs.service.equals("mysql")) )
600                                                         out.print(" selected");
601                                                 %>>MySQL</option>
602                                                 <option value="pgsql"<%
603                                                 if ( ( null != vs ) && (vs.service.equals("pgsql")) )
604                                                         out.print(" selected");
605                                                 %>>PostgreSQL</option>
606                                                 <option value="sip"<%
607                                                 if ( ( null != vs ) && (vs.service.equals("sip")) )
608                                                         out.print(" selected");
609                                                 %>>SIP</option>
610                                                 <option value="none"<%
611                                                 if ( ( null != vs ) && (vs.service.equals("none")) )
612                                                         out.print(" selected");
613                                                 %>>None</option>
614                                         </select>
615                                         <%
616                                         }
617                                                 if ( null != errMessage ) {
618                                                         String invalidMessage = errMessage.get("check_service");
619                                                         if( null != invalidMessage ){
620                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
621                                                         }
622                                                 }
623                                         %>
624                                 </td>
625                                 <td>
626                                         <p class="required"></p>
627                                 </td>
628                         </tr>
629                         <tr>
630                                 <th>
631                                         <label for="quiescent">Quiescent</label>
632                                 </th>
633                                 <td>
634                                         <%if (dd.autoreload == true) { %>
635                                         <select id="quiescent" name="quiescent">
636                                                 <option value=""<%
637                                                 if ( ( null != vs ) && (vs.quiescent.equals("")) )
638                                                         out.print(" selected");
639                                                 %>></option>
640                                                 <option value="yes"<%
641                                                 if ( ( null != vs ) && (vs.quiescent.equals("yes")) )
642                                                         out.print(" selected");
643                                                 %>>Yes</option>
644                                                 <option value="no"<%
645                                                 if ( ( null != vs ) && (vs.quiescent.equals("no")) )
646                                                         out.print(" selected");
647                                                 %>>No</option>
648                                         </select>
649                                         <%
650                                         }
651                                         else
652                                         {
653                                         %>
654                                         <select class="read" disabled id="quiescent" name="quiescent">
655                                                 <option value=""<%
656                                                 if ( ( null != vs ) && (vs.quiescent.equals("")) )
657                                                         out.print(" selected");
658                                                 %>></option>
659                                                 <option value="yes"<%
660                                                 if ( ( null != vs ) && (vs.quiescent.equals("yes")) )
661                                                         out.print(" selected");
662                                                 %>>Yes</option>
663                                                 <option value="no"<%
664                                                 if ( ( null != vs ) && (vs.quiescent.equals("no")) )
665                                                         out.print(" selected");
666                                                 %>>No</option>
667                                         </select>
668                                         
669                                         <%
670                                         }
671                                                 if ( null != errMessage ) {
672                                                         String invalidMessage = errMessage.get("quiescent");
673                                                         if( null != invalidMessage ){
674                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
675                                                         }
676                                                 }
677                                         %>
678                                 </td>
679                                 <td>
680                                         <p class="required">Default : No</p>
681                                 </td>
682                         </tr>
683                         <tr>
684                                 <th>
685                                         <label for="down_callback">Real Server Down Callback</label>
686                                 </th>
687                                 <td>
688                                         <% 
689                                         if ( dd.autoreload == true ) {
690                                         %>      
691                                                 <input type="text" id="down_callback" value="<%
692                                                  if ( null != vs ) 
693                                                                 out.println(vs.downcallback); %>" name="down_callback" maxlength=\"127\" />                                                                                     
694                                         <% 
695                                         }
696                                         else{
697                                         %>
698                                                 <input class="read" readonly type="text" id="down_callback" value="<%
699                                                  if ( null != vs ) 
700                                                                 out.println(vs.downcallback); %>" name="down_callback" maxlength=\"127\" />     
701                                         <% 
702                                         }
703                                         if ( null != errMessage ) {
704                                                 String invalidMessage = errMessage.get("down_callback");
705                                                 if( null != invalidMessage ){
706                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
707                                                 }
708                                         }
709                                         %>
710                                 </td>
711                                 <td>
712                                         <p class="required">Up to 127 one-byte characters in English<br>Be effctive only if CheckService : HTTP, HTTPS, LDAP, MySQL, PostgreSQL, SIP, None</p>
713                                 </td>                   
714                         </tr>                                   
715                         <tr>
716                                 <th>
717                                         <label for="up_callback">Real Server Up Callback</label>
718                                 </th>
719                                 <td>
720                                         <% 
721                                         if ( dd.autoreload == true ) {
722                                         %>      
723                                                 <input type="text" id="up_callback" value="<% 
724                                                 if ( null != vs ) 
725                                                                 out.println(vs.upcallback); %>" name="up_callback" maxlength=\"127\" />
726                                         <% 
727                                         }
728                                         else{
729                                         %>
730                                                 <input class="read" readonly type="text" id="up_callback" value="<%
731                                                  if ( null != vs ) 
732                                                                 out.println(vs.upcallback); %>" name="up_callback" maxlength=\"127\" />
733                                         <% 
734                                         }
735                                         if ( null != errMessage ) {
736                                                 String invalidMessage = errMessage.get("up_callback");
737                                                 if( null != invalidMessage ){
738                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
739                                                 }
740                                         }
741                                         %>
742                                 </td>
743                                 <td>
744                                         <p class="required">Up to 127 one-byte characters in English</p>
745                                 </td>
746                         </tr>
747                         <tr>
748                                 <th>
749                                         <label for="check_port">Check Port</label>
750                                 </th>
751                                 <td>
752                                         <%
753                                         {
754                                         String invalidMessage = null;
755                                         if ( null != errMessage ){
756                                                 invalidMessage = errMessage.get("check_port");
757                                         }
758                                         if ( (vs == null) || (0 == vs.checkport) ){
759                                                 if ( dd.autoreload == true ) {
760                                                 out.println("<input type=\"text\" id=\"check_port\" value=\"\" name=\"check_port\" maxlength=\"5\" />");
761                                                 }
762                                                 else{
763                                                         out.println("<input class=\"read\" readonly type=\"text\" id=\"check_port\" value=\"\" name=\"check_port\" maxlength=\"5\" />");
764                                                 }
765                                         }
766                                         else{
767                                                 if ( dd.autoreload == true ) {
768                                                         out.println("<input type=\"text\" id=\"check_port\" value=\"" + vs.checkport + "\" name=\"check_port\" maxlength=\"5\" />");
769                                                 }
770                                                 else{
771                                                         out.println("<input class=\"read\" readonly type=\"text\" id=\"check_port\" value=\"" +  vs.checkport + "\" name=\"check_port\" maxlength=\"5\" />");
772                                                 }
773                                         }
774                                         if ( null != invalidMessage ) {
775                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
776                                         }
777                                         }
778                                         %>
779                                 </td>
780                                 <td>
781                                         <p class="required">1-65535</p>
782                                 </td>
783                         </tr>
784                         <tr>
785                                 <th>
786                                         <label for="request">Request Path</label>
787                                 </th>
788                                 <td>
789                                         <% 
790                                         if ( dd.autoreload == true ) {
791                                         %>                                      
792                                                 <input type="text" id="request" value="<% 
793                                                         if ( null != vs ) 
794                                                         out.println(vs.request); %>" name="request" maxlength=\"127\" />
795                                         <% 
796                                         }
797                                         else{                                           
798                                          %>
799                                                 <input class="read" readonly type="text" id="request" value="<% 
800                                                         if ( null != vs ) 
801                                                         out.println(vs.request); %>" name="request" maxlength=\"127\" />
802                                         <%
803                                         }
804                                         if ( null != errMessage ) {
805                                                 String invalidMessage = errMessage.get("request");
806                                                 if( null != invalidMessage ){
807                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
808                                                 }
809                                         }
810                                         %>
811                                 </td>
812                                 <td>
813                                         <p class="required">Up to 127 one-byte characters in English<br>Be effctive only if CheckService : HTTP, HTTPS, LDAP, MySQL, PostgreSQL, SIP, None</p>
814                                 </td>
815                         </tr>
816                         <tr>
817                                 <th>
818                                         <label for="receive">Receive String</label>
819                                 </th>
820                                 <td>
821                                         <% 
822                                         if ( dd.autoreload == true ) {
823                                         %>                                      
824                                                 <input type="text" id="receive" value="<%
825                                                         if ( null != vs ) 
826                                                         out.println(vs.receive); %>" name="receive" maxlength=\"127\" />
827                                         <% 
828                                         }
829                                         else {
830                                          %>
831                                                 <input class="read" readonly type="text" id="receive" value="<%
832                                                         if ( null != vs ) 
833                                                         out.println(vs.receive); %>" name="receive" maxlength=\"127\" />                        
834         
835                                         <%
836                                         }
837                                                 if ( null != errMessage ) {
838                                                         String invalidMessage = errMessage.get("receive");
839                                                         if( null != invalidMessage ){
840                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
841                                                         }
842                                                 }
843                                         %>
844                                 </td>
845                                 <td>
846                                         <p class="required">Up to 127 one-byte characters in English<br>Be effctive only if CheckService : HTTP, HTTPS, LDAP, FTP, DNS</p>
847                                 </td>
848                         </tr>
849                         <tr>
850                                 <th>
851                                         <label for="method">HTTP Method</label>
852                                 </th>
853                                 <td>
854                                         <% if ( dd.autoreload == true ){
855                                         %>                      
856                                         <select id="method" name="method">
857                                                 <option value=""<%
858                                                 if ( ( vs != null ) && (vs.httpmethod.equals("")) )
859                                                         out.print(" selected");
860                                                 %>></option>
861                                                 <option value="GET"<%
862                                                 if ( ( vs != null ) && (vs.httpmethod.equals("GET")) )
863                                                         out.print(" selected");
864                                                 %>>GET</option>
865                                                 <option value="HEAD"<%
866                                                 if ( ( vs != null ) && (vs.httpmethod.equals("HEAD")) )
867                                                         out.print(" selected");
868                                                 %>>HEAD</option>
869                                         </select>
870                                         <%
871                                         }
872                                         else
873                                         {
874                                         %>
875                                         <select class="read" disabled id="method" name="method">
876                                                 <option value=""<%
877                                                 if ( ( vs != null ) && (vs.httpmethod.equals("")) )
878                                                         out.print(" selected");
879                                                 %>></option>
880                                                 <option value="GET"<%
881                                                 if ( ( vs != null ) && (vs.httpmethod.equals("GET")) )
882                                                         out.print(" selected");
883                                                 %>>GET</option>
884                                                 <option value="HEAD"<%
885                                                 if ( ( vs != null ) && (vs.httpmethod.equals("HEAD")) )
886                                                         out.print(" selected");
887                                                 %>>HEAD</option>
888                                         </select>
889                                         
890                                         <%
891                                         }
892                                                 if ( null != errMessage ) {
893                                                         String invalidMessage = errMessage.get("method");
894                                                         if( null != invalidMessage ){
895                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
896                                                         }
897                                                 }
898                                         %>
899                                 </td>
900                                 <td>
901                                         <p class="required">Be effctive only if CheckService : HTTP, HTTPS</p>
902                                 </td>
903                         </tr>
904                         <tr>
905                                 <th>
906                                         <label for="virtual_host">Virtual Host</label>
907                                 </th>
908                                 <td>
909                                         <% 
910                                         if ( dd.autoreload == true ) {
911                                         %>                                                                      
912                                                 <input type="text" id="virtual_host" value="<%
913                                                         if ( null != vs ) 
914                                                                 out.println(vs.virtualhost); %>" name="virtual_host" maxlength=\"127\" />
915                                         <% 
916                                         }
917                                         else{                                           
918                                          %>
919                                                 <input class="read" readonly type="text" id="virtual_host" value="<% 
920                                                         if ( null != vs ) 
921                                                                 out.println(vs.virtualhost); %>" name="virtual_host" maxlength=\"127\" />
922                                         <% 
923                                         }
924                                         if ( null != errMessage ) {
925                                                 String invalidMessage = errMessage.get("virtual_host");
926                                                 if( null != invalidMessage ){
927                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
928                                                 }
929                                         }
930                                         %>
931                                 </td>
932                                 <td>
933                                         <p class="required">Up to 127 one-byte characters in English<br>Be effctive only if CheckService : HTTP, HTTPS</p>
934                                 </td>
935                         </tr>
936                         
937                         <tr>
938                                 <th>
939                                         <label for="login_user">Login Username</label>
940                                 </th>
941                                 <td>
942                                         <% 
943                                         if ( dd.autoreload == true ) {
944                                         %>                                                                      
945                                                 <input type="text" id="login_user" value="<% 
946                                                         if ( null != vs ) 
947                                                                 out.println(vs.login); %>" name="login_user" maxlength=\"32\" />
948                                         <% 
949                                         }
950                                         else{                                           
951                                          %>
952                                                 <input class="read" readonly type="text" id="login_user" value="<%
953                                                         if ( null != vs ) 
954                                                                 out.println(vs.login); %>" name="login_user" maxlength=\"32\" />
955                                         <% 
956                                         }
957                                         if ( null != errMessage ) {
958                                                 String invalidMessage = errMessage.get("login_user");
959                                                 if( null != invalidMessage ){
960                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
961                                                 }
962                                         }
963                                         %>
964                                 </td>
965                                 <td>
966                                         <p class="required">Up to 32 one-byte characters in English<br>Followings : Effctive only when CheckService is FTP, POP, IMAP, MySQL, PostgreSQL, and SIP</p>
967                                 </td>
968                         </tr>
969                         
970                         
971                         
972                         <tr>
973                                 <th>
974                                         <label for="login_pass">Login Password</label>
975                                 </th>
976                                 <td>
977                                         <% 
978                                         if ( dd.autoreload == true ) {
979                                         %>                                                                      
980                                                 <input type="text" id="login_pass" value="<% 
981                                                         if ( null != vs ) 
982                                                                 out.println(vs.passwd); %>" name="login_pass" maxlength=\"32\" />
983                                         <% 
984                                         }
985                                         else{                                           
986                                          %>
987                                                 <input class="read" readonly type="text" id="login_pass" value="<%
988                                                         if ( null != vs ) 
989                                                                 out.println(vs.passwd); %>" name="login_pass" maxlength=\"32\" />
990                                         <% 
991                                         }
992                                         if ( null != errMessage ) {
993                                                 String invalidMessage = errMessage.get("login_pass");
994                                                 if( null != invalidMessage ){
995                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
996                                                 }
997                                         }
998                                         %>
999                                 </td>
1000                                 <td>
1001                                         <p class="required">Up to 32 one-byte characters in English<br>Be effctive only if CheckService : FTP, POP, IMAP, MySQL, PostgreSQL, SIP</p>
1002                                 </td>
1003                         </tr>
1004                         <tr>
1005                                 <th>
1006                                         <label for="db">Database Name</label>
1007                                 </th>
1008                                 <td>
1009                                         <% 
1010                                         if ( dd.autoreload == true ) {
1011                                         %>                                                                                                      
1012                                         <input type="text" id="db" value="<%
1013                                                 if ( null != vs ) 
1014                                                 out.println(vs.passwd); %>" name="db" maxlength=\"32\" />
1015                                         <% 
1016                                         }
1017                                         else{                                           
1018                                          %>
1019                                         <input class="read" readonly type="text" id="db" value="<% 
1020                                                 if ( null != vs ) 
1021                                                 out.println(vs.passwd); %>" name="db" maxlength=\"32\" />
1022                                         <%
1023                                         }
1024                                         if ( null != errMessage ) {
1025                                                 String invalidMessage = errMessage.get("db");
1026                                                 if( null != invalidMessage ){
1027                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1028                                                 }
1029                                         }
1030                                         %>
1031                                 </td>
1032                                 <td>
1033                                         <p class="required">Up to 32 one-byte characters in English<br>Be effctive only if CheckService : MySQL, PostgreSQL</p>
1034                                 </td>
1035                         </tr>
1036                         </table>
1037                         </fieldset>
1038         
1039                         <h2> RealServer Info</h2>
1040                         <%
1041                         if ( (vs != null) && (vs.real != null) && (vs.real.size() != 0 )) {
1042                         %>
1043                         <fieldset class="">
1044                         <legend>Real Servers</legend>
1045                         <%
1046                                         for (int i = 0; i < vs.real.size(); i++) {
1047                                                 int ripNum = i + 1;
1048                                                 EndPoint rip = (EndPoint) vs.real.elementAt(i);
1049                         %>
1050                         <table class="status">
1051                         <tr>
1052                                 <td rowspan="3" class="check">
1053                                         <input type="checkbox" name="rs<%= ripNum %>_remove" />
1054                                 </td>
1055                                 <th class="check">
1056                                         <label for="rs<%= ripNum %>_ip">IP Address</label>
1057                                 </th>
1058                                 <td>
1059                                         <input type="text" id="rs<%= ripNum %>_ip" value="<%= rip.host %>" name="rs<%= ripNum %>_ip" maxlength="15" />
1060                                         <%
1061                                                 if ( null != errMessage ) {
1062                                                         String invalidMessage = errMessage.get("rs" + ripNum + "_ip");
1063                                                         if( null != invalidMessage ){
1064                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1065                                                         }
1066                                                 }
1067                                         %>
1068                                 </td>
1069                                 <td>
1070                                         <p class="required">[0-255].[0-255].[0-255].[0-255]</p>
1071                                 </td>
1072                         </tr>
1073                         <tr>
1074                                 <th class="check">
1075                                         <label for="rs<%= ripNum %>_port">Port Number</label>
1076                                 </th>
1077                                 <td>
1078                                         <%
1079                                         {
1080                                                 String invalidMessage = null;
1081                                                 if ( null != errMessage ) {
1082                                                         invalidMessage = errMessage.get("rs" + ripNum + "_port");
1083                                                 }
1084                                                 if (null == rip.port){
1085                                                         out.print("<input type=\"text\" id=\"rs\" + ripNum + \"_port\" value=\"\" name=\"rs" + ripNum + "_port\" />");
1086                                                 }
1087                                                 else {
1088                                                         out.print("<input type=\"text\" id=\"rs\" + ripNum + \"_port\" value=\"" + rip.port + "\" name=\"rs" + ripNum + "_port\" />");
1089                                                 }
1090                                                 if( null != invalidMessage ){
1091                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1092                                                 }
1093                                         }
1094                                         %>
1095                                 </td>
1096                                 <td>
1097                                         <p class="required">1-65535, service name</p>
1098                                 </td>
1099                         </tr>
1100                         <tr>
1101                                 <th class="check">
1102                                         <label for="rs<%= ripNum %>_weight">Weight</label>
1103                                 </th>
1104                                 <td>
1105                                         <%
1106                                         {
1107                                                 String invalidMessage = null;
1108                                                 if ( null != errMessage ) {
1109                                                         invalidMessage = errMessage.get("rs" + ripNum + "_weight");
1110                                                 }
1111                                                 if ( ( null != invalidMessage ) && ( 1 == rip.weight ) ){
1112                                                         out.print("<input type=\"text\" id=\"rs\"" + ripNum + "\"_weight\" value=\"\" name=\"rs" + ripNum + "_weight\" maxlength=\"3\" />");
1113                                                 }
1114                                                 else {
1115                                                         out.print("<input type=\"text\" id=\"rs\"" + ripNum + "\"_weight\" value=\"" + rip.weight + "\" name=\"rs" + ripNum + "_weight\" maxlength=\"3\" />");
1116                                                 }
1117                                                 if( null != invalidMessage ){
1118                                                         out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1119                                                 }
1120                                         }
1121                                         %>
1122                                 </td>
1123                                 <td>
1124                                         <p class="required">0-100<br>Default:1</p>
1125                                 </td>
1126                         </tr>
1127                         </table>
1128                         <%      
1129                                 }
1130                         %>
1131                         <input name="<%= ButtonMode.REMOVE %>" type="submit" value=" >> Remove RealServers" />
1132                         </fieldset>
1133                         <%
1134                         }
1135                          %>
1136                                 
1137         
1138                         <fieldset class="">
1139                         <legend>New Real Server</legend>
1140                         <table class="status">
1141                                 <tr>
1142                                         <th>
1143                                                 <label for="new_ip">IP Address</label>
1144                                         </th>
1145                                         <td>
1146                                                 <input type="text" id="new_ip" value="" name="new_ip" maxlength="15" />
1147                                         </td>
1148                                         <td>
1149                                                 <p class="required">[0-255].[0-255].[0-255].[0-255]</p>
1150                                         </td>
1151                                 </tr>
1152                                 <tr>
1153                                         <th>
1154                                                 <label for="new_port">Port Number</label>
1155                                         </th>
1156                                         <td>
1157                                                 <input type="text" id="new_port" value="" name="new_port" />
1158                                         </td>
1159                                         <td>
1160                                                 <p class="required">1-65535, service name</p>
1161                                         </td>
1162                                 </tr>
1163                                 <tr>
1164                                         <th>
1165                                                 <label for="new_weight">Weight</label>
1166                                         </th>
1167                                         <td>
1168                                                 <input type="text" id="new_weight" value="" name="new_weight" maxlength="3" />
1169                                         </td>
1170                                         <td>
1171                                                 <p class="required">0-100</p>
1172                                         </td>
1173                                 </tr>
1174                         </table>
1175                         <input name="<%= ButtonMode.ADD %>" type="submit" value=" >> Add a RealServer" />
1176                         </fieldset>
1177         
1178                         <h2> SorryServer Info</h2>
1179                         <fieldset class="">
1180                         <legend>Sorry Settings</legend>
1181                         <table class="status">
1182                         <tr>
1183                                 <th>
1184                                         <label for="sorry_ip">IP Address</label>
1185                                 </th>
1186                                 <td>
1187                                         <input type="text" id="sorry_ip" value="<%
1188                                          if ( null != vs ) 
1189                                                         out.println(vs.sorryserver.host); %>" name="sorry_ip" maxlength="15" />
1190                                         <% 
1191                                                 if ( null != errMessage ) {
1192                                                         String invalidMessage = errMessage.get("sorry_ip");
1193                                                         if( null != invalidMessage ){
1194                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1195                                                         }
1196                                                 }
1197                                         %>
1198                                 </td>
1199                                 <td>
1200                                         <p class="required">[0-255].[0-255].[0-255].[0-255]</p>
1201                                 </td>
1202                         </tr>
1203                         <tr>
1204                                 <th>
1205                                         <label for="sorry_port">Port Number</label>
1206                                 </th>
1207                                 <td>
1208         
1209                                 <%
1210                                 {
1211                                         String invalidMessage = null;
1212                                         if ( null != errMessage ) {
1213                                                 invalidMessage = errMessage.get("sorry_port");
1214                                         }
1215
1216                                         if ( (vs == null) || (null == vs.sorryserver.port) ){
1217
1218                                                 out.println("<input type=\"text\" id=\"sorry_port\" value=\"\" name=\"sorry_port\" />");
1219                                         }                                                                                       
1220                                         else{
1221                                                 out.println("<input type=\"text\" id=\"sorry_port\" value=\"" + vs.sorryserver.port + "\"name=\"sorry_port\" />");
1222                                         }                                                                                                                               
1223                                         if( null != invalidMessage ){
1224                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1225                                         }
1226                                 }
1227                                 %>
1228                                 </td>
1229                                 <td>
1230                                         <p class="required">1-65535, service name</p>
1231                                 </td>
1232                         </tr>
1233                         <tr>
1234                                 <th>
1235                                         <label for="sorry">Sorry Flag</label>
1236                                 </th>
1237                                 <td>
1238                                         <select id="sorry" name="sorry_flag">
1239                                                 <option value=""></option>
1240                                                 <option value="on"<%
1241                                                 if ( (vs != null ) && (vs.sorryflag) )
1242                                                         out.print(" selected");
1243                                                 %>>On</option>
1244                                                 <option value="off"<%
1245                                                 if (  (vs != null ) && !(vs.sorryflag) )
1246                                                         out.print(" selected");
1247                                                 %>>Off</option>
1248                                         </select>
1249                                         <% 
1250                                                 if ( null != errMessage ) {
1251                                                         String invalidMessage = errMessage.get("sorry_flag");
1252                                                         if( null != invalidMessage ){
1253                                                                 out.println("<p class=\"invalid\">" + invalidMessage + "</p>");
1254                                                         }
1255                                                 }
1256                                         %>
1257                                 </td>
1258                                 <td>
1259                                         <p class="required">Default : Off</p>
1260                                 </td>
1261                         </tr>
1262                         </table>
1263                         </fieldset>
1264                 
1265                 <input type="submit" name="button" value="<%=ButtonMode.APPLY %>" onClick="return confirm(add_vs_apply)" />
1266                 <%
1267                         if (dd.autoreload == true) {
1268                 %>
1269                 <input type="submit" name="button" value="<%= ButtonMode.SAVE %>" onClick="return confirm(add_vs_save)" />
1270                 <%
1271                                 if (cd.self_status == ClusterStatus.ACTIVE || cd.self_status == ClusterStatus.STANDBY) {
1272                 %>
1273                 <input type="submit" name="button" value="<%= ButtonMode.SAVESYNC %>" onClick="return confirm(add_vs_savesync)" />
1274                 <%
1275                                 }
1276                         }
1277                 %>
1278                 </form>
1279         </div>
1280 <%
1281 }
1282 else{
1283         response.sendRedirect(RedirectPages.TOPMENU);
1284         return;
1285 }
1286 %>      
1287
1288         
1289         </body>
1290 </html>