OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / WebContent / replication_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(41343,
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(41344,
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
64
65 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
66 <html>
67 <head>
68         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
69         <meta http-equiv="Pragma" content="no-cache">
70         <meta http-equiv="Cache-Control" content="no-cache">
71         <meta http-equiv="Expires" content="0">                 
72         <meta http-equiv="Content-Script-Type" content="text/javascript" />
73         <meta http-equiv="Content-Style-Type" content="text/css" />
74         <noscript>
75         <meta http-equiv="refresh"
76                 content="<%= RedirectPages.NOSCRIPT_TIME %>; url=<%= RedirectPages.LOGIN %>" />
77         </noscript>
78         <link rel="stylesheet" type="text/css" href="<%=cssSeat %>" />
79         <link rel="shortcut icon" href="images/favicon.ico" />
80         <title>Failed To Replicate</title>
81 </head>
82
83
84 <body class="normal">
85
86 <jsp:include page="menu.jsp" flush="false" />
87
88 <div id="content">
89 <h1 class="title">Failed : Replication</h1>
90
91 <h2>Error Reason :</h2>
92 <%
93         if (errorMessage != null) {
94                 out.println("<p class=\"error\"> [" + category + " - " + errorNumber + "] </p>");
95                 out.println("<p class=\"error\">" + errorMessage + "</p>");
96         }
97 %>
98 </div>
99 </body>
100 </html>
101
102