OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / WebContent / replication_modify_fail.jsp
1 <%@ page
2         import="org.ultramonkey.l7.model.*,org.ultramonkey.l7.controller.*,org.ultramonkey.l7.view.*"
3         language="java" contentType="text/html; charset=UTF-8"
4         pageEncoding="UTF-8"%>
5
6
7 <%
8          /*
9          * check session
10          */
11         L7guiServletBase base = new L7guiServletBase();
12         if (session.isNew() || base.checkSession(session) == false) {
13                 MessageView error = new MessageView(41359,
14                 LogCategorySet.GUI_USER_AUTHENTICATION,
15                 Message.INVALID_SESSSION);
16                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
17                 response.sendRedirect(RedirectPages.LOGIN);
18                 return;
19         }
20
21         /*
22          * get command message
23          */
24         MessageView message = (MessageView) session
25                         .getAttribute(SessionKeys.COMMAND_MESSAGE);
26
27         String errorMessage = "";
28         int errorNumber = 0;
29         String category = "";
30
31         if (message != null) {
32                 errorMessage = message.getMessage();
33                 errorNumber = message.getErrno();
34                 category = message.getCategory();
35                 session.setAttribute(SessionKeys.COMMAND_MESSAGE, null);
36         }
37
38         /*
39          * get cluster status
40          */
41         L7guiFramework framework = new L7guiFramework();
42         ClusterData cd = framework.getClusterData();
43         if (cd == null) {
44                 MessageView error = new MessageView(41360,
45                 LogCategorySet.GUI_IO_COMMAND,
46                 Message.CLUSTER_DATA_ERROR);
47                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
48                 response.sendRedirect(RedirectPages.LOGIN);
49                 return;
50         }
51
52         /*
53          * fix style seat
54          */
55         String cssSeat = "l7gui_single_style.css";
56         if (cd.self_status == ClusterStatus.ACTIVE) {
57                 cssSeat = "l7gui_act_style.css";
58         } else if (cd.self_status == ClusterStatus.STANDBY) {
59                 cssSeat = "l7gui_sby_style.css";
60         }
61 %>
62
63 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
64 <html>
65 <head>
66         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
67         <meta http-equiv="Pragma" content="no-cache">
68         <meta http-equiv="Cache-Control" content="no-cache">
69         <meta http-equiv="Expires" content="0">                 
70         <meta http-equiv="Content-Script-Type" content="text/javascript" />
71         <meta http-equiv="Content-Style-Type" content="text/css" />
72         <noscript>
73         <meta http-equiv="refresh"
74                 content="<%= RedirectPages.NOSCRIPT_TIME %>; url=<%= RedirectPages.LOGIN %>" />
75         </noscript>
76         
77         <link rel="stylesheet" type="text/css" href="<%=cssSeat %>" />
78         <link rel="shortcut icon" href="images/favicon.ico" />
79         <title>Failed : Modify Replication Interval</title>
80 </head>
81
82
83 <body class="normal">
84
85 <jsp:include page="menu.jsp" flush="false" />
86
87 <div id="content">
88 <h1 class="title">Failed : Modify Replication Interval</h1>
89 <h2>Error Reason :</h2>
90 <%
91         if (errorMessage != null) {
92                 out.println("<p class=\"error\"> [" + category + " - " + errorNumber + "] </p>");
93                 out.println("<p class=\"error\">" + errorMessage + "</p>");
94         }
95 %>
96 </div>
97 </body>
98 </html>
99
100