Commit 7ecef4be authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Updating to new admin ui


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@293 b35dd754-fafc-0310-a699-88a17e54d16e
parent 319736c7
......@@ -5,18 +5,26 @@
- $Date$
--%>
<P>
<%@ page import="org.jivesoftware.messenger.audit.AuditManager, org.jivesoftware.util.*, java.util.*"%>
<%@ page import="org.jivesoftware.messenger.audit.AuditManager,
org.jivesoftware.admin.*,
org.jivesoftware.util.*,
java.util.*"%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Audit Policy" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="audit-policy.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Audit Policy";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "audit-policy.jsp"));
pageinfo.setPageID("server-audit-policy");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
......
......@@ -9,6 +9,7 @@
<%@ page import="org.jivesoftware.util.*,
java.util.*,
org.jivesoftware.messenger.*,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.HistoryStrategy"
%>
......@@ -16,12 +17,16 @@
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Chatroom Message History Settings" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="chatroom-history-settings.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Chat Room History Settings";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "chatroom-history-settings.jsp"));
pageinfo.setPageID("server-chatroom-history");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<%! // Global vars and methods:
......
......@@ -7,6 +7,7 @@
<%@ page import="org.jivesoftware.util.*,
java.util.*,
org.jivesoftware.messenger.*,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.MultiUserChatServer,
java.util.Iterator"
%>
......@@ -14,11 +15,16 @@
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Users allowed to create rooms" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="muc-create-permission.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Users allowed to create rooms";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-create-permission.jsp"));
pageinfo.setPageID("muc-perms");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
......@@ -62,12 +68,6 @@
int curPage = (start/range) + 1;
%>
<jsp:include page="top.jsp" flush="true" />
<table cellpadding="3" cellspacing="1" border="0" width="600">
<tr><td colspan="8">
Below is a list of users allowed to create rooms. An empty list means that <b>anyone</b> can create
......
......@@ -8,19 +8,23 @@
<%@ page import="org.jivesoftware.util.*,
java.util.*,
org.jivesoftware.messenger.*,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.HistoryStrategy,
org.jivesoftware.messenger.muc.MultiUserChatServer"%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager"/>
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Multi-User Chat History Settings"/>
<c:set var="breadcrumbs" value="${admin.breadCrumbs}"/>
<c:set target="${breadcrumbs}" property="Home" value="main.jsp"/>
<c:set target="${breadcrumbs}" property="${title}" value="muc-history-settings.jsp"/>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "MultiUser Chat History Settings";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-history-settings.jsp"));
pageinfo.setPageID("muc-history");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<%! // Global vars and methods:
......
......@@ -11,6 +11,7 @@
java.util.Map,
org.jivesoftware.messenger.XMPPServerInfo,
org.jivesoftware.messenger.muc.MultiUserChatServer,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.JiveGlobals"
%>
<%
......@@ -26,13 +27,17 @@
<c:set var="admin" value="${admin.manager}" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Edit Multi-User Chat Server Properties" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="muc-server-props-edit-form.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Edit MultiUser Chat Properties";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-server-props-edit-form.jsp"));
pageinfo.setPageID("muc-server-props");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<% // Get parameters
boolean save = ParamUtils.getBooleanParameter(request,"save");
......
......@@ -7,6 +7,7 @@
<%@ page import="org.jivesoftware.util.*,
java.util.*,
org.jivesoftware.messenger.*,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.MultiUserChatServer,
java.util.Iterator"
%>
......@@ -14,11 +15,17 @@
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="System Administrators of the Multi-User Chat service" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="muc-sysadmins.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "System Administrators For MultiUser Chat Rooms";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-sysadmins.jsp"));
pageinfo.setPageID("muc-sysadmins");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<% // Get parameters
int start = ParamUtils.getIntParameter(request,"start",0);
......@@ -60,7 +67,6 @@
int curPage = (start/range) + 1;
%>
<jsp:include page="top.jsp" flush="true" />
<table cellpadding="3" cellspacing="1" border="0" width="600">
<tr><td colspan="8">
......
......@@ -12,17 +12,23 @@
java.util.Date,
java.text.DateFormat,
java.util.HashMap,
java.util.Map" %>
java.util.Map,
org.jivesoftware.admin.*" %>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" scope="page" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Offline Message Settings" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="offline-messages.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Offline Messages";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "offline-messages.jsp"));
pageinfo.setPageID("server-offline-messages");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<c:set var="success" />
......
......@@ -6,18 +6,23 @@
<%@ page import="org.jivesoftware.util.*,
java.util.*,
org.jivesoftware.messenger.*"
org.jivesoftware.messenger.*,
org.jivesoftware.admin.*"
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Private Data Storage" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="private-data-settings.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Private Data";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "private-data-settings.jsp"));
pageinfo.setPageID("server-data-settings");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
......
......@@ -29,6 +29,7 @@
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="reg-settings.jsp" />
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<c:set var="success" value="false" />
......
......@@ -12,7 +12,16 @@
java.util.Date,
java.text.DateFormat,
java.util.HashMap,
java.util.Map" %>
java.util.Map,
org.jivesoftware.admin.AdminPageBean" %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Conflict Policy";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Session Conflict", "session-conflict.jsp"));
pageinfo.setPageID("server-session-conflict");
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
......@@ -24,6 +33,7 @@
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="session-conflict.jsp" />
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<% // Get parameters
boolean update = request.getParameter("update") != null;
......
......@@ -13,20 +13,24 @@
java.security.KeyStore,
java.security.cert.CertificateFactory,
java.security.cert.Certificate,
java.io.ByteArrayInputStream"
java.io.ByteArrayInputStream,
org.jivesoftware.admin.*"
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="SSL/TLS Security Settings">
<P>&nbsp;</P>
</c:set>
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="ssl-settings.jsp" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "SSL Security Settings";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "ssl-settings.jsp"));
pageinfo.setPageID("server-ssl");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<% // Get parameters:
boolean update = request.getParameter("update") != null;
......@@ -76,7 +80,7 @@
<% } %>
<table class="box" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tableHeaderBlue"><td colspan="2" align="center">Current SSL/TLS Setup</td></tr>
<tr><td colspan="2" class="text">
SSL/TLS allows secure connections to be made between the server and clients.
This page displays your current SSL/TLS setup.
......
......@@ -25,19 +25,10 @@
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="errors" class="java.util.HashMap" />
<jsp:useBean id="userData" class="org.jivesoftware.messenger.user.spi.UserPrivateData" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Create User" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set var="sbar" value="users" scope="page" />
<c:set target="${breadcrumbs}" property="${title}" value="user-create.jsp" />
<jsp:include page="top.jsp" flush="true" />
<% webManager.init(request, response, session, application, out ); %>
<% // Get parameters //
boolean create = request.getParameter("create") != null;
......@@ -73,7 +64,7 @@
// do a create if there were no errors
if (errors.size() == 0) {
try {
User newUser = admin.getUserManager().createUser(username, password, email);
User newUser = webManager.getUserManager().createUser(username, password, email);
if (name != null) {
newUser.getInfo().setName(name);
}
......@@ -84,15 +75,29 @@
return;
}
catch (UserAlreadyExistsException e) {
e.printStackTrace();
errors.put("usernameAlreadyExists","");
}
catch (Exception e) {
e.printStackTrace();
errors.put("general","");
Log.error(e);
}
}
}
%>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Create User" />
<c:set var="breadcrumbs" value="${webManager.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set var="sbar" value="users" scope="page" />
<c:set target="${breadcrumbs}" property="${title}" value="user-create.jsp" />
<%@ include file="top.jsp" %>
<c:set var="submit" value="${param.create}" />
<c:set var="errors" value="${errors}" />
......
......@@ -13,17 +13,17 @@
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="User Summary" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set var="breadcrumbs" value="${webManager.breadCrumbs}" />
<c:set var="image" value="/images/user.jpg" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="user-summary.jsp" />
<c:set var="sbar" value="users"/>
<jsp:include page="top.jsp" flush="true" />
<%@ include file="top.jsp" %>
......@@ -32,10 +32,10 @@
int range = ParamUtils.getIntParameter(request,"range",15);
// Get the user manager
int userCount = admin.getUserManager().getUserCount();
int userCount = webManager.getUserManager().getUserCount();
// Get the presence manager
PresenceManager presenceManager = (PresenceManager)admin.getServiceLookup().lookup(PresenceManager.class);
PresenceManager presenceManager = (PresenceManager)webManager.getServiceLookup().lookup(PresenceManager.class);
// paginator vars
int numPages = (int)Math.ceil((double)userCount/(double)range);
......@@ -52,7 +52,7 @@ Below is a list of users in the system.
</p>
<p>
Total Users: <%= admin.getUserManager().getUserCount() %>,
Total Users: <%= webManager.getUserManager().getUserCount() %>,
<% if (numPages > 1) { %>
Showing <%= (start+1) %>-<%= (start+range) %>,
......@@ -94,7 +94,7 @@ Sorted by User ID
<th>Delete</th>
</tr>
<% // Print the list of users
Iterator users = admin.getUserManager().users(start, range);
Iterator users = webManager.getUserManager().users(start, range);
if (!users.hasNext()) {
%>
<tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment