summaryrefslogtreecommitdiffstats
path: root/base/tps/shared/webapps
diff options
context:
space:
mode:
Diffstat (limited to 'base/tps/shared/webapps')
-rwxr-xr-xbase/tps/shared/webapps/tps/404.html145
-rwxr-xr-xbase/tps/shared/webapps/tps/500.html138
-rw-r--r--base/tps/shared/webapps/tps/GenUnexpectedError.template67
-rw-r--r--base/tps/shared/webapps/tps/WEB-INF/velocity.properties13
-rw-r--r--base/tps/shared/webapps/tps/WEB-INF/web.xml297
-rw-r--r--base/tps/shared/webapps/tps/index.html73
-rw-r--r--base/tps/shared/webapps/tps/js/account.js37
-rw-r--r--base/tps/shared/webapps/tps/js/activity.js97
-rw-r--r--base/tps/shared/webapps/tps/js/audit.js232
-rw-r--r--base/tps/shared/webapps/tps/js/authenticator.js109
-rw-r--r--base/tps/shared/webapps/tps/js/cert.js100
-rw-r--r--base/tps/shared/webapps/tps/js/config.js51
-rw-r--r--base/tps/shared/webapps/tps/js/connector.js109
-rw-r--r--base/tps/shared/webapps/tps/js/group.js232
-rw-r--r--base/tps/shared/webapps/tps/js/profile-mapping.js109
-rw-r--r--base/tps/shared/webapps/tps/js/profile.js109
-rw-r--r--base/tps/shared/webapps/tps/js/selftest.js88
-rw-r--r--base/tps/shared/webapps/tps/js/token.js258
-rw-r--r--base/tps/shared/webapps/tps/js/tps.js231
-rw-r--r--base/tps/shared/webapps/tps/js/user.js150
-rw-r--r--base/tps/shared/webapps/tps/services.template106
-rw-r--r--base/tps/shared/webapps/tps/ui/activities.html83
-rw-r--r--base/tps/shared/webapps/tps/ui/activity.html47
-rw-r--r--base/tps/shared/webapps/tps/ui/audit.html134
-rw-r--r--base/tps/shared/webapps/tps/ui/authenticator.html131
-rw-r--r--base/tps/shared/webapps/tps/ui/authenticators.html74
-rw-r--r--base/tps/shared/webapps/tps/ui/cert.html49
-rw-r--r--base/tps/shared/webapps/tps/ui/certs.html87
-rw-r--r--base/tps/shared/webapps/tps/ui/config.html116
-rw-r--r--base/tps/shared/webapps/tps/ui/connector.html131
-rw-r--r--base/tps/shared/webapps/tps/ui/connectors.html75
-rw-r--r--base/tps/shared/webapps/tps/ui/group.html125
-rw-r--r--base/tps/shared/webapps/tps/ui/groups.html75
-rw-r--r--base/tps/shared/webapps/tps/ui/home.html60
-rw-r--r--base/tps/shared/webapps/tps/ui/index.html429
-rw-r--r--base/tps/shared/webapps/tps/ui/profile-mapping.html131
-rw-r--r--base/tps/shared/webapps/tps/ui/profile-mappings.html75
-rw-r--r--base/tps/shared/webapps/tps/ui/profile.html131
-rw-r--r--base/tps/shared/webapps/tps/ui/profiles.html75
-rw-r--r--base/tps/shared/webapps/tps/ui/selftest.html42
-rw-r--r--base/tps/shared/webapps/tps/ui/selftests.html79
-rw-r--r--base/tps/shared/webapps/tps/ui/token.html96
-rw-r--r--base/tps/shared/webapps/tps/ui/tokens.html135
-rw-r--r--base/tps/shared/webapps/tps/ui/user.html57
-rw-r--r--base/tps/shared/webapps/tps/ui/users.html75
45 files changed, 5263 insertions, 0 deletions
diff --git a/base/tps/shared/webapps/tps/404.html b/base/tps/shared/webapps/tps/404.html
new file mode 100755
index 000000000..0bf93578c
--- /dev/null
+++ b/base/tps/shared/webapps/tps/404.html
@@ -0,0 +1,145 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2009 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<script language=javascript>
+var url = document.URL;
+var protocol = location.protocol;
+var hostname = location.hostname;
+var port = location.port;
+</script>
+
+<head>
+<title>TPS 404 Error!</title>
+<!-- always expand ALL relative paths -->
+<script language=javascript>
+document.write('<link rel="shortcut icon" href="');
+document.write(protocol);
+document.write('//');
+document.write(hostname);
+document.write(':');
+document.write(port);
+document.write('/pki/images/favicon.ico');
+document.write('" />');
+document.write('<link rel="stylesheet" href="');
+document.write(protocol);
+document.write('//');
+document.write(hostname);
+document.write(':');
+document.write(port);
+document.write('/pki/css/pki-base.css');
+document.write('" type="text/css" />');
+document.write('<META http-equiv=Content-Type content="text/html; charset=UTF-8">');
+</script>
+</head>
+<body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
+<div id="header">
+<!-- always expand ALL relative paths -->
+<script language=javascript>
+document.write('<a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="');
+document.write(protocol);
+document.write('//');
+document.write(hostname);
+document.write(':');
+document.write(port);
+document.write('/pki/images/logo_header.gif');
+document.write('" alt="Dogtag" id="myLogo" /></a>');
+</script>
+ <div id="headertitle">
+ <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">&reg;</font></sup> Certificate System</a>
+ </div>
+ <div id="account">
+ <dl><dt><span></span></dt><dd></dd></dl>
+ </div>
+</div>
+
+<div id="mainNavOuter">
+<div id="mainNav">
+<div id="mainNavInner">
+
+</div><!-- end mainNavInner -->
+</div><!-- end mainNav -->
+</div><!-- end mainNavOuter -->
+
+
+<div id="bar">
+
+<div id="systembar">
+<div id="systembarinner">
+
+<div>
+ -
+</div>
+
+
+</div>
+</div>
+
+</div>
+<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
+Certificate System TPS Error Page
+</font><br>
+<p>
+</font>
+<p>
+<script language=javascript>
+document.write('<center>');
+document.write('<table border="1" cellspacing="0" cellpadding="0">');
+document.write('<tr valign="TOP">');
+document.write('<td bgcolor="grey" align="center"><b><font color="BLACK">HTTP STATUS</font></b></td>');
+document.write('<td bgcolor="grey" align="center"><b><font color="BLACK">DESCRIPTION</font></b></td>');
+document.write('</tr>');
+document.write('<tr valign="TOP">');
+document.write('<td align="center"><b><font size="+3" color="red">');
+document.write('404');
+document.write('</font></b></td>');
+document.write('<td><b><font size="+1" color="RED">');
+document.write('The requested resource could not be found but may be available again in the future.');
+document.write('</font></b><br><b><font size="+1" color="RED">');
+document.write('Please check the validity of the URL listed below:');
+document.write('</font></b><br><br>');
+document.write('<center><b><font size="+1"><a href="');
+document.write(url);
+document.write('">');
+document.write(url);
+document.write('</a>');
+document.write('</font></b></center><br></td>');
+document.write('</tr>');
+document.write('</table>');
+document.write('</center>');
+</script>
+<div id="footer">
+</div>
+<!--
+To prevent Internet Explorer from overriding the display of this custom error
+page by displaying it's own "Friendly HTTP Error Message", always include the
+following 'padding' to ensure that the text size exceeds 512 bytes:
+
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+-->
+</body>
+</html>
diff --git a/base/tps/shared/webapps/tps/500.html b/base/tps/shared/webapps/tps/500.html
new file mode 100755
index 000000000..3e1e8bb66
--- /dev/null
+++ b/base/tps/shared/webapps/tps/500.html
@@ -0,0 +1,138 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2009 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<script language=javascript>
+var url = document.URL;
+var protocol = location.protocol;
+var hostname = location.hostname;
+var port = location.port;
+</script>
+
+<head>
+<title>TPS 500 Error!</title>
+<!-- always expand ALL relative paths -->
+<script language=javascript>
+document.write('<link rel="shortcut icon" href="');
+document.write(protocol);
+document.write('//');
+document.write(hostname);
+document.write(':');
+document.write(port);
+document.write('/pki/images/favicon.ico');
+document.write('" />');
+document.write('<link rel="stylesheet" href="');
+document.write(protocol);
+document.write('//');
+document.write(hostname);
+document.write(':');
+document.write(port);
+document.write('/pki/css/pki-base.css');
+document.write('" type="text/css" />');
+document.write('<META http-equiv=Content-Type content="text/html; charset=UTF-8">');
+</script>
+</head>
+<body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
+<div id="header">
+<!-- always expand ALL relative paths -->
+<script language=javascript>
+document.write('<a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="');
+document.write(protocol);
+document.write('//');
+document.write(hostname);
+document.write(':');
+document.write(port);
+document.write('/pki/images/logo_header.gif');
+document.write('" alt="Dogtag" id="myLogo" /></a>');
+</script>
+ <div id="headertitle">
+ <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">&reg;</font></sup> Certificate System</a>
+ </div>
+ <div id="account">
+ <dl><dt><span></span></dt><dd></dd></dl>
+ </div>
+</div>
+
+<div id="mainNavOuter">
+<div id="mainNav">
+<div id="mainNavInner">
+
+</div><!-- end mainNavInner -->
+</div><!-- end mainNav -->
+</div><!-- end mainNavOuter -->
+
+
+<div id="bar">
+
+<div id="systembar">
+<div id="systembarinner">
+
+<div>
+ -
+</div>
+
+
+</div>
+</div>
+
+</div>
+<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
+Certificate System TPS Error Page
+</font><br>
+<p>
+</font>
+<p>
+<script language=javascript>
+document.write('<center>');
+document.write('<table border="1" cellspacing="0" cellpadding="0">');
+document.write('<tr valign="TOP">');
+document.write('<td bgcolor="grey" align="center"><b><font color="BLACK">HTTP STATUS</font></b></td>');
+document.write('<td bgcolor="grey" align="center"><b><font color="BLACK">DESCRIPTION</font></b></td>');
+document.write('</tr>');
+document.write('<tr valign="TOP">');
+document.write('<td align="center"><b><font size="+3" color="red">');
+document.write('500');
+document.write('</font></b></td>');
+document.write('<td><b><font size="+1" color="RED">');
+document.write('The server encountered an unexpected condition which prevented it from fulfilling the request.<br>');
+document.write('Please consult your local administrator for further assistance. The Certificate System logs may provide further information.');
+document.write('</font></b><br></td>');
+document.write('</tr>');
+document.write('</table>');
+document.write('</center>');
+</script>
+<div id="footer">
+</div>
+<!--
+To prevent Internet Explorer from overriding the display of this custom error
+page by displaying it's own "Friendly HTTP Error Message", always include the
+following 'padding' to ensure that the text size exceeds 512 bytes:
+
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+[IE padding][IE padding][IE padding][IE padding][IE padding][IE padding]
+-->
+</body>
+</html>
diff --git a/base/tps/shared/webapps/tps/GenUnexpectedError.template b/base/tps/shared/webapps/tps/GenUnexpectedError.template
new file mode 100644
index 000000000..ea545c145
--- /dev/null
+++ b/base/tps/shared/webapps/tps/GenUnexpectedError.template
@@ -0,0 +1,67 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<CMS_TEMPLATE>
+
+<TITLE>TPS Processing Error!</TITLE>
+
+<BODY BGCOLOR="white">
+
+<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
+Problem Processing Your Request
+</font>
+
+<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" BACKGROUND="/pki/images/hr.gif" >
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+</table>
+
+<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
+
+<SCRIPT LANGUAGE="JavaScript">
+var authority = 'Certificate System';
+if (result.fixed.authorityName != null) {
+ authority = result.fixed.authorityName;
+}
+
+document.writeln('<P>');
+document.write('The '+authority+' encountered an unexpected error ');
+document.writeln(' while processing your request.');
+document.writeln(
+ 'The following is a detailed message of the error that occurred.');
+
+document.writeln('<P>');
+document.writeln('<BLOCKQUOTE><B><PRE>');
+if (result.fixed.unexpectedError != null) {
+ document.write(result.fixed.unexpectedError);
+} else {
+ document.write('No further details provided.');
+}
+document.writeln('</PRE></B></BLOCKQUOTE>');
+
+document.writeln('<P>');
+document.writeln(
+ 'Please consult your local administrator for further assistance.');
+document.writeln('The Certificate System logs may provide further information.');
+</SCRIPT>
+
+</font>
+</BODY>
+</HTML>
diff --git a/base/tps/shared/webapps/tps/WEB-INF/velocity.properties b/base/tps/shared/webapps/tps/WEB-INF/velocity.properties
new file mode 100644
index 000000000..c1c6e4ea9
--- /dev/null
+++ b/base/tps/shared/webapps/tps/WEB-INF/velocity.properties
@@ -0,0 +1,13 @@
+# --- BEGIN COPYRIGHT BLOCK ---
+# Copyright (C) 2006 Red Hat, Inc.
+# All rights reserved.
+# --- END COPYRIGHT BLOCK ---
+#
+resource.loader = file
+file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
+file.resource.loader.path = /usr/share/pki/server/webapps/pki
+file.resource.loader.cache = true
+file.resource.loader.modificationCheckInterval = 2
+input.encoding=UTF-8
+output.encoding=UTF-8
+runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogSystem
diff --git a/base/tps/shared/webapps/tps/WEB-INF/web.xml b/base/tps/shared/webapps/tps/WEB-INF/web.xml
new file mode 100644
index 000000000..8506b2725
--- /dev/null
+++ b/base/tps/shared/webapps/tps/WEB-INF/web.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- BEGIN COPYRIGHT BLOCK
+ Copyright (C) 2006 Red Hat, Inc.
+ All rights reserved.
+ END COPYRIGHT BLOCK -->
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "file:///usr/share/pki/setup/web-app_2_3.dtd">
+<web-app>
+
+ <display-name>Token Processing Service</display-name>
+
+ <servlet>
+ <servlet-name>tpsstart</servlet-name>
+ <servlet-class>com.netscape.cms.servlet.base.CMSStartServlet</servlet-class>
+ <init-param>
+ <param-name>AuthzMgr</param-name>
+ <param-value>BasicAclAuthz</param-value>
+ </init-param>
+ <init-param>
+ <param-name>ID</param-name>
+ <param-value>tpsstart</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>tpsug</servlet-name>
+ <servlet-class>com.netscape.cms.servlet.admin.UsrGrpAdminServlet</servlet-class>
+ <init-param>
+ <param-name>ID</param-name>
+ <param-value>tpsug</param-value>
+ </init-param>
+ <init-param>
+ <param-name>AuthzMgr</param-name>
+ <param-value>BasicAclAuthz</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet>
+ <servlet-name>tpslog</servlet-name>
+ <servlet-class>com.netscape.cms.servlet.admin.LogAdminServlet</servlet-class>
+ <init-param>
+ <param-name>ID</param-name>
+ <param-value>tpslog</param-value> </init-param>
+ <init-param>
+ <param-name>AuthzMgr</param-name>
+ <param-value>BasicAclAuthz</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet>
+ <servlet-name>tpsGetStatus </servlet-name>
+ <servlet-class> com.netscape.cms.servlet.csadmin.GetStatus</servlet-class>
+ <init-param>
+ <param-name>GetClientCert</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>authority</param-name>
+ <param-value>tps</param-value>
+ </init-param>
+ <init-param>
+ <param-name>ID</param-name>
+ <param-value>tpsGetStatus</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet>
+ <servlet-name>phoneHome</servlet-name>
+ <servlet-class>org.dogtagpki.server.tps.TPSPhoneHome</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>tps</servlet-name>
+ <servlet-class>org.dogtagpki.server.tps.TPSServlet</servlet-class>
+ </servlet>
+
+ <listener>
+ <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
+ </listener>
+
+ <context-param>
+ <param-name>resteasy.servlet.mapping.prefix</param-name>
+ <param-value>/rest</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>resteasy.resource.method-interceptors</param-name>
+ <param-value>org.jboss.resteasy.core.ResourceMethodSecurityInterceptor</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Resteasy</servlet-name>
+ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ <init-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.dogtagpki.server.tps.rest.TPSApplication</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Resteasy</servlet-name>
+ <url-pattern>/rest/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>tpsstart</servlet-name>
+ <url-pattern>/start</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>tpsug</servlet-name>
+ <url-pattern>/ug</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>tpslog</servlet-name>
+ <url-pattern>/log</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>tpsGetStatus</servlet-name>
+ <url-pattern>/admin/tps/getStatus</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>phoneHome</servlet-name>
+ <url-pattern>/phoneHome</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>tps</servlet-name>
+ <url-pattern>/tps</url-pattern>
+ </servlet-mapping>
+
+ <!-- ==================== Default Session Configuration =============== -->
+ <!-- You can set the default session timeout (in minutes) for all newly -->
+ <!-- created sessions by modifying the value below. -->
+ <!-- -->
+ <!-- To disable session timeouts for this instance, set a value of -1. -->
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Account Services</web-resource-name>
+ <url-pattern>/rest/account/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Admin Services</web-resource-name>
+ <url-pattern>/rest/admin/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Audit</web-resource-name>
+ <url-pattern>/rest/audit/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Authenticators</web-resource-name>
+ <url-pattern>/rest/authenticators/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Configuration</web-resource-name>
+ <url-pattern>/rest/config/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Connectors</web-resource-name>
+ <url-pattern>/rest/connectors/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Profiles</web-resource-name>
+ <url-pattern>/rest/profiles/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Profile Mappings</web-resource-name>
+ <url-pattern>/rest/profile-mappings/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Self Tests</web-resource-name>
+ <url-pattern>/rest/selftests/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Token Services</web-resource-name>
+ <url-pattern>/rest/tokens/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>UI</web-resource-name>
+ <url-pattern>/ui/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <login-config>
+ <realm-name>Token Processing Service</realm-name>
+ </login-config>
+
+ <security-role>
+ <role-name>*</role-name>
+ </security-role>
+
+</web-app>
diff --git a/base/tps/shared/webapps/tps/index.html b/base/tps/shared/webapps/tps/index.html
new file mode 100644
index 000000000..c48da3307
--- /dev/null
+++ b/base/tps/shared/webapps/tps/index.html
@@ -0,0 +1,73 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link href="/pki/css/patternfly.css" rel="stylesheet" media="screen, print">
+ <script src="/pki/js/jquery.js"></script>
+ <script src="/pki/js/bootstrap.js"></script>
+ <script src="/tps/js/account.js"></script>
+ <script>
+$(function() {
+ var account = new Account();
+ $("form").submit(function(e) {
+ account.login({
+ success: function() {
+ window.location.href = "/tps/ui";
+ },
+ error: function() {
+ PKI.logout();
+ }
+ });
+ e.preventDefault();
+ });
+});
+ </script>
+</head>
+<body>
+
+<nav id="navigation" class="navbar navbar-default navbar-pf" role="navigation">
+<div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="/tps">
+ <b>Token Processing Service</b>
+ </a>
+</div>
+</nav>
+
+<div id="content">
+
+<form action="/tps/ui">
+<div class="col-sm-5 col-md-6 col-lg-7 details">
+<p><strong>Welcome to the Dogtag Token Processing System 10.2</strong>
+<p>The Token Processing System (TPS) is the conduit between the user-centered Enterprise Security Client,
+which interacts with the tokens, and the Certificate System backend subsystems, such as the Certificate Manager.
+</p>
+<button type="submit" class="btn btn-primary btn-lg" tabindex="4">Log In</button>
+</div>
+</form>
+
+</div>
+
+</body>
+</html>
diff --git a/base/tps/shared/webapps/tps/js/account.js b/base/tps/shared/webapps/tps/js/account.js
new file mode 100644
index 000000000..97b222aaa
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/account.js
@@ -0,0 +1,37 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+function Account() {
+
+ this.url = "/tps/rest/account";
+
+ this.login = function(options) {
+ var jqxhr = $.get(this.url + "/login", null, null, "json");
+ jqxhr.done(options.success);
+ jqxhr.fail(options.error);
+ };
+
+ this.logout = function(options) {
+ var jqxhr = $.get(this.url + "/logout");
+ jqxhr.done(options.success);
+ jqxhr.fail(options.error);
+ };
+}; \ No newline at end of file
diff --git a/base/tps/shared/webapps/tps/js/activity.js b/base/tps/shared/webapps/tps/js/activity.js
new file mode 100644
index 000000000..cbc724e23
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/activity.js
@@ -0,0 +1,97 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var ActivityModel = Model.extend({
+ urlRoot: "/tps/rest/activities",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ tokenID: response.TokenID,
+ userID: response.UserID,
+ ip: response.IP,
+ operation: response.Operation,
+ result: response.Result,
+ message: response.Message,
+ date: new Date(response.Date)
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.id,
+ TokenID: attributes.tokenID,
+ UserID: attributes.userID,
+ IP: attributes.ip,
+ Operation: attributes.operation,
+ Result: attributes.result,
+ Message: attributes.message,
+ Date: attributes.date.getTime()/1000 + 'Z'
+ };
+ }
+});
+
+var ActivityCollection = Collection.extend({
+ urlRoot: "/tps/rest/activities",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new ActivityModel({
+ id: entry.id,
+ tokenID: entry.TokenID,
+ userID: entry.UserID,
+ ip: entry.IP,
+ operation: entry.Operation,
+ result: entry.Result,
+ message: entry.Message,
+ date: new Date(entry.Date)
+ });
+ }
+});
+
+var ActivityPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ ActivityPage.__super__.initialize.call(self, options);
+ }
+});
+
+var ActivitiesTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ ActivitiesTable.__super__.initialize.call(self, options);
+ }
+});
+
+var ActivitiesPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new ActivitiesTable({
+ el: $("table[name='activities']"),
+ collection: new ActivityCollection()
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/audit.js b/base/tps/shared/webapps/tps/js/audit.js
new file mode 100644
index 000000000..986596e1d
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/audit.js
@@ -0,0 +1,232 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var AuditModel = Model.extend({
+ url: function() {
+ return "/tps/rest/audit";
+ },
+ parseResponse: function(response) {
+ return {
+ id: "audit",
+ status: response.Status,
+ signed: response.Signed,
+ interval: response.Interval,
+ bufferSize: response.BufferSize,
+ events: response.Events.Event
+ };
+ },
+ createRequest: function(entry) {
+ return {
+ Status: entry.status,
+ Signed: entry.signed,
+ Interval: entry.interval,
+ BufferSize: entry.bufferSize,
+ Events: {
+ Event: entry.events
+ }
+ };
+ },
+ enable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=enable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ },
+ disable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=disable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ }
+});
+
+var AuditTableItem = TableItem.extend({
+ initialize: function(options) {
+ var self = this;
+ AuditTableItem.__super__.initialize.call(self, options);
+ },
+ renderColumn: function(td, templateTD) {
+ var self = this;
+
+ AuditTableItem.__super__.renderColumn.call(self, td, templateTD);
+
+ $("a", td).click(function(e) {
+ e.preventDefault();
+ self.open();
+ });
+ },
+ open: function() {
+ var self = this;
+
+ var value = self.get("value");
+ var dialog;
+
+ if (self.table.mode == "view" || value == "mandatory") {
+ // In view mode all events are read-only.
+ // Mandatory events are always read-only.
+ dialog = new Dialog({
+ el: self.table.parent.$("#event-dialog"),
+ title: "Event",
+ readonly: ["name", "value"],
+ actions: ["close"]
+ });
+
+ } else if (self.table.mode == "edit" && value != "mandatory") {
+ // Optional events are editable in edit mode.
+ dialog = new Dialog({
+ el: self.table.parent.$("#event-dialog"),
+ title: "Edit Event",
+ readonly: ["name"],
+ actions: ["cancel", "save"]
+ });
+
+ dialog.handler("save", function() {
+
+ // save changes
+ dialog.save();
+ _.extend(self.entry, dialog.entry);
+
+ // redraw table
+ self.table.render();
+ dialog.close();
+ });
+ }
+
+ dialog.entry = _.clone(self.entry);
+
+ dialog.open();
+ }
+});
+
+var AuditPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ options.model = new AuditModel();
+ options.editable = ["signed", "interval", "bufferSize"];
+ AuditPage.__super__.initialize.call(self, options);
+ },
+ setup: function() {
+ var self = this;
+
+ AuditPage.__super__.setup.call(self);
+
+ self.enableLink = $("a[name='enable']", self.menu);
+ self.disableLink = $("a[name='disable']", self.menu);
+
+ self.enableLink.click(function(e) {
+
+ e.preventDefault();
+
+ var message = "Are you sure you want to enable this entry?";
+ if (!confirm(message)) return;
+ self.model.enable({
+ success: function(data, textStatus, jqXHR) {
+ self.entry = _.clone(self.model.attributes);
+ self.render();
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ new ErrorDialog({
+ el: $("#error-dialog"),
+ title: "HTTP Error " + jqXHR.responseJSON.Code,
+ content: jqXHR.responseJSON.Message
+ }).open();
+ }
+ });
+ });
+
+ self.disableLink.click(function(e) {
+
+ e.preventDefault();
+
+ var message = "Are you sure you want to disable this entry?";
+ if (!confirm(message)) return;
+ self.model.disable({
+ success: function(data, textStatus, jqXHR) {
+ self.entry = _.clone(self.model.attributes);
+ self.render();
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ new ErrorDialog({
+ el: $("#error-dialog"),
+ title: "HTTP Error " + jqXHR.responseJSON.Code,
+ content: jqXHR.responseJSON.Message
+ }).open();
+ }
+ });
+ });
+
+ self.eventsTable = new Table({
+ el: self.$("table[name='events']"),
+ columnMappings: {
+ id: "name"
+ },
+ pageSize: 10,
+ tableItem: AuditTableItem,
+ parent: self
+ });
+ },
+ renderContent: function() {
+ var self = this;
+
+ AuditPage.__super__.renderContent.call(self);
+
+ var status = self.entry.status;
+ if (status == "Disabled") {
+ self.enableLink.show();
+ self.disableLink.hide();
+
+ } else if (status == "Enabled") {
+ self.enableLink.hide();
+ self.disableLink.show();
+ }
+
+ if (self.mode == "edit") {
+ self.eventsTable.mode = "edit";
+
+ } else { // self.mode == "view"
+ self.eventsTable.mode = "view";
+ }
+
+ self.eventsTable.entries = self.entry.events;
+ self.eventsTable.render();
+ },
+ saveFields: function() {
+ var self = this;
+
+ AuditPage.__super__.saveFields.call(self);
+
+ self.entry.events = self.eventsTable.entries;
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/authenticator.js b/base/tps/shared/webapps/tps/js/authenticator.js
new file mode 100644
index 000000000..f91cf6bfe
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/authenticator.js
@@ -0,0 +1,109 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var AuthenticatorModel = Model.extend({
+ urlRoot: "/tps/rest/authenticators",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ authenticatorID: response.id,
+ status: response.Status,
+ properties: response.Properties.Property
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.authenticatorID,
+ Status: attributes.status,
+ Properties: {
+ Property: attributes.properties
+ }
+ };
+ },
+ enable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=enable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ },
+ disable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=disable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ }
+});
+
+var AuthenticatorCollection = Collection.extend({
+ urlRoot: "/tps/rest/authenticators",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new AuthenticatorModel({
+ id: entry.id,
+ status: entry.Status
+ });
+ }
+});
+
+var AuthenticatorsTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ AuthenticatorsTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-authenticator";
+ }
+});
+
+var AuthenticatorsPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new AuthenticatorsTable({
+ el: $("table[name='authenticators']"),
+ collection: new AuthenticatorCollection(),
+ parent: self
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/cert.js b/base/tps/shared/webapps/tps/js/cert.js
new file mode 100644
index 000000000..016b56ee0
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/cert.js
@@ -0,0 +1,100 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var CertificateModel = Model.extend({
+ urlRoot: "/tps/rest/certs",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ serialNumber: response.SerialNumber,
+ subject: response.Subject,
+ tokenID: response.TokenID,
+ userID: response.UserID,
+ keyType: response.KeyType,
+ status: response.Status,
+ createTime: response.CreateTime,
+ modifyTime: response.ModifyTime
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.id,
+ SerialNumber: attributes.serialNumber,
+ Subject: attributes.subject,
+ TokenID: attributes.tokenID,
+ UserID: attributes.userID,
+ KeyType: attributes.keyType,
+ Status: attributes.status,
+ CreateTime: attributes.createTime,
+ ModifyTime: attributes.modifyTime
+ };
+ }
+});
+
+var CertificateCollection = Collection.extend({
+ urlRoot: "/tps/rest/certs",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new CertificateModel({
+ id: entry.id,
+ serialNumber: entry.SerialNumber,
+ subject: entry.Subject,
+ tokenID: entry.TokenID,
+ userID: entry.UserID,
+ keyType: entry.KeyType,
+ status: entry.Status,
+ createTime: entry.CreateTime,
+ modifyTime: entry.ModifyTime
+ });
+ }
+});
+
+var CertificatePage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ CertificatePage.__super__.initialize.call(self, options);
+ }
+});
+
+var CertificatesTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ CertificatesTable.__super__.initialize.call(self, options);
+ }
+});
+
+var CertificatesPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new CertificatesTable({
+ el: $("table[name='certificates']"),
+ collection: new CertificateCollection()
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/config.js b/base/tps/shared/webapps/tps/js/config.js
new file mode 100644
index 000000000..5b651a09d
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/config.js
@@ -0,0 +1,51 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var ConfigModel = Model.extend({
+ url: function() {
+ return "/tps/rest/config";
+ },
+ parseResponse: function(response) {
+ return {
+ id: "config",
+ status: response.Status,
+ properties: response.Properties.Property
+ };
+ },
+ createRequest: function(entry) {
+ return {
+ Status: entry.status,
+ Properties: {
+ Property: entry.properties
+ }
+ };
+ }
+});
+
+var ConfigPage = ConfigEntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ options.model = new ConfigModel();
+ options.tableItem = PropertiesTableItem;
+ options.tableSize = 15;
+ ConfigPage.__super__.initialize.call(self, options);
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/connector.js b/base/tps/shared/webapps/tps/js/connector.js
new file mode 100644
index 000000000..bc7e4c2bd
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/connector.js
@@ -0,0 +1,109 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var ConnectorModel = Model.extend({
+ urlRoot: "/tps/rest/connectors",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ connectorID: response.id,
+ status: response.Status,
+ properties: response.Properties.Property
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.connectorID,
+ Status: attributes.status,
+ Properties: {
+ Property: attributes.properties
+ }
+ };
+ },
+ enable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=enable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ },
+ disable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=disable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ }
+});
+
+var ConnectorCollection = Collection.extend({
+ urlRoot: "/tps/rest/connectors",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new ConnectorModel({
+ id: entry.id,
+ status: entry.Status
+ });
+ }
+});
+
+var ConnectorsTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ ConnectorsTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-connector";
+ }
+});
+
+var ConnectorsPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new ConnectorsTable({
+ el: $("table[name='connectors']"),
+ collection: new ConnectorCollection(),
+ parent: self
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/group.js b/base/tps/shared/webapps/tps/js/group.js
new file mode 100644
index 000000000..50d7d6c67
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/group.js
@@ -0,0 +1,232 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var GroupModel = Model.extend({
+ urlRoot: "/tps/rest/admin/groups",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ groupID: response.GroupID,
+ description: response.Description
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: this.id,
+ GroupID: attributes.groupID,
+ Description: attributes.description
+ };
+ }
+});
+
+var GroupCollection = Collection.extend({
+ model: GroupModel,
+ urlRoot: "/tps/rest/admin/groups",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new GroupModel({
+ id: entry.id,
+ groupID: entry.GroupID,
+ description: entry.Description
+ });
+ }
+});
+
+var GroupMemberModel = Model.extend({
+ url: function() {
+ var self = this;
+
+ // There's an attribute name mismatch for group ID: the
+ // server uses GroupID and the client uses groupID. In other
+ // models the mismatch can be translated just fine, but in
+ // this model it becomes a problem because the model needs
+ // to construct the URL using the attribute.
+ //
+ // During read operation it needs to use the attribute that's
+ // already translated for client (i.e. groupID), but during
+ // add it needs to use the attribute meant for server (i.e.
+ // GroupID). So the workaround is to read whichever available.
+ var groupID = self.get("groupID"); // for read
+ groupID = groupID || self.get("GroupID"); // for add
+
+ var url = "/tps/rest/admin/groups/" + groupID + "/members";
+
+ // append member ID for read
+ if (self.id) url = url + "/" + self.id;
+
+ return url;
+ },
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ memberID: response.id,
+ groupID: response.GroupID
+ };
+ },
+ createRequest: function(entry) {
+ return {
+ id: entry.memberID,
+ GroupID: entry.groupID
+ };
+ }
+});
+
+var GroupMemberCollection = Collection.extend({
+ initialize: function(models, options) {
+ var self = this;
+ GroupMemberCollection.__super__.initialize.call(self, models, options);
+ options = options || {};
+ self.groupID = options.groupID;
+ self.urlRoot = "/tps/rest/admin/groups/" + self.groupID + "/members";
+ },
+ getEntries: function(response) {
+ return response.Member;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ model: function(attrs, options) {
+ return new GroupMemberModel({
+ groupID: this.groupID
+ });
+ },
+ parseEntry: function(entry) {
+ return new GroupMemberModel({
+ id: entry.id,
+ memberID: entry.id,
+ groupID: entry.GroupID
+ });
+ }
+});
+
+var GroupMembersTableItem = TableItem.extend({
+ initialize: function(options) {
+ var self = this;
+ GroupMembersTableItem.__super__.initialize.call(self, options);
+ },
+ renderColumn: function(td, templateTD) {
+ var self = this;
+
+ GroupMembersTableItem.__super__.renderColumn.call(self, td, templateTD);
+
+ $("a", td).click(function(e) {
+ e.preventDefault();
+ self.table.open(self);
+ });
+ }
+});
+
+var GroupPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ GroupPage.__super__.initialize.call(self, options);
+ },
+ setup: function() {
+ var self = this;
+
+ GroupPage.__super__.setup.call(self);
+
+ var dialog = self.$("#member-dialog");
+
+ var addDialog = new Dialog({
+ el: dialog,
+ title: "Add Member",
+ readonly: ["groupID"],
+ actions: ["cancel", "add"]
+ });
+
+ var editDialog = new Dialog({
+ el: dialog,
+ title: "Member",
+ readonly: ["groupID", "memberID"],
+ actions: ["close"]
+ });
+
+ self.membersTable = new ModelTable({
+ el: self.$("table[name='members']"),
+ pageSize: 10,
+ addDialog: addDialog,
+ editDialog: editDialog,
+ tableItem: GroupMembersTableItem,
+ parent: self
+ });
+ },
+ renderContent: function() {
+ var self = this;
+
+ GroupPage.__super__.renderContent.call(self);
+
+ // Since the members table is backed by a REST resource any
+ // changes will be executed immediately even if the page is
+ // in view mode. To avoid confusion, the members table will
+ // be disabled in page edit mode.
+ if (self.mode == "edit") {
+ // In page edit mode, the members tables is read-only.
+ self.membersTable.mode = "view";
+
+ self.membersTable.collection = new GroupMemberCollection(null, { groupID: self.entry.id });
+
+ } else if (self.mode == "add") {
+ // In page add mode, the members table is read-only.
+ self.membersTable.mode = "view";
+
+ // self.membersTable.collection is undefined for new group
+
+ } else { // self.mode == "view"
+ // In page view mode, the members table is editable.
+ self.membersTable.mode = "edit";
+
+ self.membersTable.collection = new GroupMemberCollection(null, { groupID: self.entry.id });
+ }
+
+ self.membersTable.render();
+ }
+});
+
+var GroupsTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ GroupsTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-group";
+ }
+});
+
+var GroupsPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new GroupsTable({
+ el: $("table[name='groups']"),
+ collection: new GroupCollection()
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/profile-mapping.js b/base/tps/shared/webapps/tps/js/profile-mapping.js
new file mode 100644
index 000000000..54c042562
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/profile-mapping.js
@@ -0,0 +1,109 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2014 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var ProfileMappingModel = Model.extend({
+ urlRoot: "/tps/rest/profile-mappings",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ profileMappingID: response.id,
+ status: response.Status,
+ properties: response.Properties.Property
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.profileMappingID,
+ Status: attributes.status,
+ Properties: {
+ Property: attributes.properties
+ }
+ };
+ },
+ enable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=enable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ },
+ disable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=disable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ }
+});
+
+var ProfileMappingCollection = Collection.extend({
+ urlRoot: "/tps/rest/profile-mappings",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new ProfileMappingModel({
+ id: entry.id,
+ status: entry.Status
+ });
+ }
+});
+
+var ProfileMappingsTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ ProfileMappingsTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-profile-mapping";
+ }
+});
+
+var ProfileMappingsPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new ProfileMappingsTable({
+ el: $("table[name='profile-mappings']"),
+ collection: new ProfileMappingCollection(),
+ parent: self
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/profile.js b/base/tps/shared/webapps/tps/js/profile.js
new file mode 100644
index 000000000..0454686a9
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/profile.js
@@ -0,0 +1,109 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var ProfileModel = Model.extend({
+ urlRoot: "/tps/rest/profiles",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ profileID: response.id,
+ status: response.Status,
+ properties: response.Properties.Property
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.profileID,
+ Status: attributes.status,
+ Properties: {
+ Property: attributes.properties
+ }
+ };
+ },
+ enable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=enable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ },
+ disable: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?action=disable",
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ }
+});
+
+var ProfileCollection = Collection.extend({
+ urlRoot: "/tps/rest/profiles",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new ProfileModel({
+ id: entry.id,
+ status: entry.Status
+ });
+ }
+});
+
+var ProfilesTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ ProfilesTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-profile";
+ }
+});
+
+var ProfilesPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new ProfilesTable({
+ el: $("table[name='profiles']"),
+ collection: new ProfileCollection(),
+ parent: self
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/selftest.js b/base/tps/shared/webapps/tps/js/selftest.js
new file mode 100644
index 000000000..d28907817
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/selftest.js
@@ -0,0 +1,88 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var SelfTestModel = Model.extend({
+ urlRoot: "/tps/rest/selftests",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ enabledAtStartup: response.EnabledAtStartup,
+ criticalAtStartup: response.CriticalAtStartup,
+ enabledOnDemand: response.EnabledOnDemand,
+ criticalOnDemand: response.CriticalOnDemand,
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: attributes.id,
+ EnabledAtStartup: attributes.enabledAtStartup,
+ CriticalAtStartup: attributes.criticalAtStartup,
+ EnabledOnDemand: attributes.enabledOnDemand,
+ CriticalOnDemand: attributes.criticalOnDemand
+ };
+ }
+});
+
+var SelfTestCollection = Collection.extend({
+ urlRoot: "/tps/rest/selftests",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new SelfTestModel({
+ id: entry.id,
+ enabledAtStartup: entry.EnabledAtStartup,
+ criticalAtStartup: entry.CriticalAtStartup,
+ enabledOnDemand: entry.EnabledOnDemand,
+ criticalOnDemand: entry.CriticalOnDemand,
+ });
+ }
+});
+
+var SelfTestPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ SelfTestPage.__super__.initialize.call(self, options);
+ }
+});
+
+var SelfTestsTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ SelfTestsTable.__super__.initialize.call(self, options);
+ }
+});
+
+var SelfTestsPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new SelfTestsTable({
+ el: $("table[name='selftests']"),
+ collection: new SelfTestCollection()
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/token.js b/base/tps/shared/webapps/tps/js/token.js
new file mode 100644
index 000000000..2ea17714e
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/token.js
@@ -0,0 +1,258 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var TokenStatus = {
+ UNINITIALIZED: "Uninitialized",
+ ACTIVE: "Active",
+ TEMP_LOST: "Temporarily lost",
+ PERM_LOST: "Permanently lost",
+ DAMAGED: "Physically damaged",
+ TERMINATED: "Terminated"
+};
+
+var TokenModel = Model.extend({
+ urlRoot: "/tps/rest/tokens",
+ parseResponse: function(response) {
+ return {
+ id: response.id,
+ tokenID: response.TokenID,
+ userID: response.UserID,
+ type: response.Type,
+ status: response.Status,
+ statusLabel: TokenStatus[response.Status],
+ appletID: response.AppletID,
+ keyInfo: response.KeyInfo,
+ policy: response.Policy,
+ createTimestamp: response.CreateTimestamp,
+ modifyTimestamp: response.ModifyTimestamp
+ };
+ },
+ createRequest: function(attributes) {
+ return {
+ id: this.id,
+ TokenID: attributes.tokenID,
+ UserID: attributes.userID,
+ Type: attributes.type,
+ Status: attributes.status,
+ AppletID: attributes.appletID,
+ KeyInfo: attributes.keyInfo,
+ Policy: attributes.policy,
+ CreateTimestamp: attributes.createTimestamp,
+ ModifyTimestamp: attributes.modifyTimestamp
+ };
+ },
+ changeStatus: function(options) {
+ var self = this;
+ $.ajax({
+ type: "POST",
+ url: self.url() + "?status=" + options.status,
+ dataType: "json"
+ }).done(function(data, textStatus, jqXHR) {
+ self.set(self.parseResponse(data));
+ if (options.success) options.success.call(self, data, textStatus, jqXHR);
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ if (options.error) options.error.call(self, jqXHR, textStatus, errorThrown);
+ });
+ }
+});
+
+var TokenCollection = Collection.extend({
+ model: TokenModel,
+ urlRoot: "/tps/rest/tokens",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new TokenModel({
+ id: entry.id,
+ tokenID: entry.TokenID,
+ userID: entry.UserID,
+ type: entry.Type,
+ status: entry.Status,
+ statusLabel: TokenStatus[entry.Status],
+ appletID: entry.AppletID,
+ keyInfo: entry.KeyInfo,
+ policy: entry.Policy,
+ createTimestamp: entry.CreateTimestamp,
+ modifyTimestamp: entry.ModifyTimestamp
+ });
+ }
+});
+
+var TokenPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ TokenPage.__super__.initialize.call(self, options);
+ },
+ setup: function() {
+ var self = this;
+
+ TokenPage.__super__.setup.call(self);
+
+ self.changeStatusLink = $("a[name='changeStatus']", self.menu);
+
+ self.changeStatusLink.click(function(e) {
+
+ e.preventDefault();
+
+ var dialog = new Dialog({
+ el: $("#token-status-dialog"),
+ title: "Change Token Status",
+ readonly: ["tokenID"],
+ actions: ["cancel", "save"]
+ });
+
+ dialog.entry = _.clone(self.model.attributes);
+
+ dialog.handler("save", function() {
+
+ // save changes
+ dialog.save();
+
+ // check if the status was changed
+ if (dialog.entry.status != self.model.attributes.status) {
+
+ self.model.changeStatus({
+ status: dialog.entry.status,
+ success: function(data, textStatus, jqXHR) {
+ self.render();
+ },
+ error: function(jqXHR, textStatus, errorThrow) {
+ new ErrorDialog({
+ el: $("#error-dialog"),
+ title: "HTTP Error " + jqXHR.responseJSON.Code,
+ content: jqXHR.responseJSON.Message
+ }).open();
+ }
+ });
+ }
+
+ dialog.close();
+ });
+
+ dialog.open();
+ });
+ },
+ renderContent: function() {
+ var self = this;
+
+ TokenPage.__super__.renderContent.call(self);
+
+ if (self.mode == "add") {
+ self.changeStatusLink.hide();
+ } else {
+ self.changeStatusLink.show();
+ }
+ }
+});
+
+var TokenTableItem = TableItem.extend({
+ initialize: function(options) {
+ var self = this;
+ TokenTableItem.__super__.initialize.call(self, options);
+ },
+ renderColumn: function(td, templateTD) {
+ var self = this;
+
+ TokenTableItem.__super__.renderColumn.call(self, td, templateTD);
+
+ var name = td.attr("name");
+ if (name == "status") {
+ $("a", td).click(function(e) {
+ e.preventDefault();
+ self.editStatus();
+ });
+ }
+ },
+ editStatus: function() {
+ var self = this;
+
+ var model = self.table.collection.get(self.entry.id);
+
+ var dialog = new Dialog({
+ el: $("#token-status-dialog"),
+ title: "Change Token Status",
+ readonly: ["tokenID", "userID", "type",
+ "appletID", "keyInfo", "policy",
+ "createTimestamp", "modifyTimestamp"],
+ actions: ["cancel", "save"]
+ });
+
+ dialog.entry = _.clone(model.attributes);
+
+ dialog.handler("save", function() {
+
+ // save changes
+ dialog.save();
+
+ // check if the status was changed
+ if (dialog.entry.status != model.attributes.status) {
+
+ model.changeStatus({
+ status: dialog.entry.status,
+ success: function(data, textStatus, jqXHR) {
+ self.table.render();
+ },
+ error: function(jqXHR, textStatus, errorThrow) {
+ new ErrorDialog({
+ el: $("#error-dialog"),
+ title: "HTTP Error " + jqXHR.responseJSON.Code,
+ content: jqXHR.responseJSON.Message
+ }).open();
+ }
+ });
+ }
+
+ dialog.close();
+ });
+
+ dialog.open();
+ }
+});
+
+var TokensTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ options.tableItem = TokenTableItem;
+ TokensTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-token";
+ }
+});
+
+var TokensPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new TokensTable({
+ el: $("table[name='tokens']"),
+ collection: new TokenCollection()
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/tps.js b/base/tps/shared/webapps/tps/js/tps.js
new file mode 100644
index 000000000..476533759
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/tps.js
@@ -0,0 +1,231 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2014 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var PropertiesTableItem = TableItem.extend({
+ initialize: function(options) {
+ var self = this;
+ PropertiesTableItem.__super__.initialize.call(self, options);
+ },
+ get: function(name) {
+ var self = this;
+
+ if (name.substring(0, 7) == "parent.") {
+ name = name.substring(7);
+ return self.table.parent.entry[name];
+ }
+
+ return PropertiesTableItem.__super__.get.call(self, name);
+ },
+ renderColumn: function(td, templateTD) {
+ var self = this;
+
+ PropertiesTableItem.__super__.renderColumn.call(self, td, templateTD);
+
+ $("a", td).click(function(e) {
+ e.preventDefault();
+ self.open();
+ });
+ },
+ open: function() {
+ var self = this;
+
+ var dialog;
+
+ if (self.table.mode == "view") {
+ // In view mode all properties are read-only.
+ dialog = new Dialog({
+ el: self.table.parent.$("#property-dialog"),
+ title: "Property",
+ readonly: ["name", "value"],
+ actions: ["close"]
+ });
+
+ } else {
+ // In edit mode all properties are editable.
+ dialog = new Dialog({
+ el: self.table.parent.$("#property-dialog"),
+ title: "Edit Property",
+ readonly: ["name"],
+ actions: ["cancel", "save"]
+ });
+
+ dialog.handler("save", function() {
+
+ // save changes
+ dialog.save();
+ _.extend(self.entry, dialog.entry);
+
+ // redraw table
+ self.table.render();
+ dialog.close();
+ });
+ }
+
+ dialog.entry = _.clone(self.entry);
+
+ dialog.open();
+ }
+});
+
+var PropertiesTable = Table.extend({
+ initialize: function(options) {
+ var self = this;
+ options.columnMappings = {
+ id: "name"
+ };
+ PropertiesTable.__super__.initialize.call(self, options);
+ },
+ sort: function() {
+ var self = this;
+
+ // sort properties by name
+ self.filteredEntries = _.sortBy(self.filteredEntries, function(entry) {
+ return entry.name;
+ });
+ },
+ remove: function(items) {
+ var self = this;
+
+ // remove selected entries
+ self.entries = _.reject(self.entries, function(entry) {
+ return _.contains(items, entry.name);
+ });
+
+ // redraw table
+ self.render();
+ }
+});
+
+var ConfigEntryPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ ConfigEntryPage.__super__.initialize.call(self, options);
+ self.tableItem = options.tableItem || PropertiesTableItem;
+ self.tableSize = options.tableSize || 10;
+ },
+ setup: function() {
+ var self = this;
+
+ ConfigEntryPage.__super__.setup.call(self);
+
+ self.enableLink = $("a[name='enable']", self.menu);
+ self.disableLink = $("a[name='disable']", self.menu);
+
+ self.enableLink.click(function(e) {
+
+ e.preventDefault();
+
+ var message = "Are you sure you want to enable this entry?";
+ if (!confirm(message)) return;
+ self.model.enable({
+ success: function(data, textStatus, jqXHR) {
+ self.entry = _.clone(self.model.attributes);
+ self.render();
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ new ErrorDialog({
+ el: $("#error-dialog"),
+ title: "HTTP Error " + jqXHR.responseJSON.Code,
+ content: jqXHR.responseJSON.Message
+ }).open();
+ }
+ });
+ });
+
+ self.disableLink.click(function(e) {
+
+ e.preventDefault();
+
+ var message = "Are you sure you want to disable this entry?";
+ if (!confirm(message)) return;
+ self.model.disable({
+ success: function(data, textStatus, jqXHR) {
+ self.entry = _.clone(self.model.attributes);
+ self.render();
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ new ErrorDialog({
+ el: $("#error-dialog"),
+ title: "HTTP Error " + jqXHR.responseJSON.Code,
+ content: jqXHR.responseJSON.Message
+ }).open();
+ }
+ });
+ });
+
+ var dialog = self.$("#property-dialog");
+
+ var addDialog = new Dialog({
+ el: dialog,
+ title: "Add Property",
+ actions: ["cancel", "add"]
+ });
+
+ var table = self.$("table[name='properties']");
+ self.addButton = $("button[name='add']", table);
+ self.removeButton = $("button[name='remove']", table);
+
+ self.propertiesTable = new PropertiesTable({
+ el: table,
+ addDialog: addDialog,
+ tableItem: self.tableItem,
+ pageSize: self.tableSize,
+ parent: self
+ });
+ },
+ renderContent: function() {
+ var self = this;
+
+ ConfigEntryPage.__super__.renderContent.call(self);
+
+ var status = self.entry.status;
+ if (status == "Disabled") {
+ self.enableLink.show();
+ self.disableLink.hide();
+
+ } else if (status == "Enabled") {
+ self.enableLink.hide();
+ self.disableLink.show();
+ }
+
+ if (self.mode == "add") {
+ self.propertiesTable.mode = "edit";
+ self.propertiesTable.entries = [];
+
+ } else if (self.mode == "edit") {
+ self.propertiesTable.mode = "edit";
+ self.propertiesTable.entries = self.entry.properties;
+
+ } else { // self.mode == "view"
+ self.propertiesTable.mode = "view";
+ self.propertiesTable.entries = self.entry.properties;
+ }
+
+ self.propertiesTable.render();
+ },
+ saveFields: function() {
+ var self = this;
+
+ ConfigEntryPage.__super__.saveFields.call(self);
+
+ self.entry.properties = self.propertiesTable.entries;
+ }
+});
diff --git a/base/tps/shared/webapps/tps/js/user.js b/base/tps/shared/webapps/tps/js/user.js
new file mode 100644
index 000000000..3a29f1dd1
--- /dev/null
+++ b/base/tps/shared/webapps/tps/js/user.js
@@ -0,0 +1,150 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ *
+ * @author Endi S. Dewata
+ */
+
+var UserModel = Model.extend({
+ urlRoot: "/tps/rest/admin/users",
+ parseResponse: function(response) {
+
+ var attrs = {};
+ if (response.Attributes) {
+ var attributes = response.Attributes.Attribute;
+ attributes = attributes == undefined ? [] : [].concat(attributes);
+
+ _(attributes).each(function(attribute) {
+ var name = attribute.name;
+ var value = attribute.value;
+ attrs[name] = value;
+ });
+ }
+
+ return {
+ id: response.id,
+ userID: response.UserID,
+ fullName: response.FullName,
+ email: response.Email,
+ state: response.State,
+ type: response.Type,
+ attributes: attrs
+ };
+ },
+ createRequest: function(attributes) {
+ var attrs = [];
+ _(attributes.attributes).each(function(value, name) {
+ attrs.push({
+ name: name,
+ value: value
+ });
+ });
+
+ return {
+ id: this.id,
+ UserID: attributes.userID,
+ FullName: attributes.fullName,
+ Email: attributes.email,
+ State: attributes.state,
+ Type: attributes.type,
+ Attributes: {
+ Attribute: attrs
+ }
+ };
+ }
+});
+
+var UserCollection = Collection.extend({
+ model: UserModel,
+ urlRoot: "/tps/rest/admin/users",
+ getEntries: function(response) {
+ return response.entries;
+ },
+ getLinks: function(response) {
+ return response.Link;
+ },
+ parseEntry: function(entry) {
+ return new UserModel({
+ id: entry.id,
+ userID: entry.UserID,
+ fullName: entry.FullName
+ });
+ }
+});
+
+var UserPage = EntryPage.extend({
+ initialize: function(options) {
+ var self = this;
+ UserPage.__super__.initialize.call(self, options);
+ },
+ loadField: function(input) {
+ var self = this;
+
+ var name = input.attr("name");
+ if (name != "tpsProfiles") {
+ UserPage.__super__.loadField.call(self, input);
+ return;
+ }
+
+ var attributes = self.entry.attributes;
+ if (attributes) {
+ var value = attributes.tpsProfiles;
+ input.val(value);
+ }
+ },
+ saveField: function(input) {
+ var self = this;
+
+ var name = input.attr("name");
+ if (name != "tpsProfiles") {
+ UserPage.__super__.saveField.call(self, input);
+ return;
+ }
+
+ var attributes = self.entry.attributes;
+ if (attributes == undefined) {
+ attributes = {};
+ self.entry.attributes = attributes;
+ }
+ attributes.tpsProfiles = input.val();
+ }
+});
+
+var UsersTable = ModelTable.extend({
+ initialize: function(options) {
+ var self = this;
+ UsersTable.__super__.initialize.call(self, options);
+ },
+ add: function() {
+ var self = this;
+
+ window.location.hash = "#new-user";
+ }
+});
+
+var UsersPage = Page.extend({
+ load: function() {
+ var self = this;
+
+ var table = new UsersTable({
+ el: $("table[name='users']"),
+ collection: new UserCollection()
+ });
+
+ table.render();
+ }
+});
diff --git a/base/tps/shared/webapps/tps/services.template b/base/tps/shared/webapps/tps/services.template
new file mode 100644
index 000000000..c6792fea1
--- /dev/null
+++ b/base/tps/shared/webapps/tps/services.template
@@ -0,0 +1,106 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<CMS_TEMPLATE>
+<title>TKS Services</title>
+ <link rel="shortcut icon" href="/pki/images/favicon.ico" />
+ <link rel="stylesheet" href="/pki/css/pki-base.css" type="text/css" />
+ <META http-equiv=Content-Type content="text/html; charset=UTF-8">
+
+</head>
+<body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
+
+<div id="header">
+ <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+ <div id="headertitle">
+ <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">&reg;</font></sup> Certificate System</a>
+ </div>
+ <div id="account">
+ <dl><dt><span></span></dt><dd></dd></dl>
+ </div>
+</div>
+
+<div id="mainNavOuter">
+<div id="mainNav">
+<div id="mainNavInner">
+
+</div><!-- end mainNavInner -->
+</div><!-- end mainNav -->
+</div><!-- end mainNavOuter -->
+
+
+<div id="bar">
+
+<div id="systembar">
+<div id="systembarinner">
+
+<div>
+ -
+</div>
+
+
+</div>
+</div>
+
+</div>
+
+
+<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
+Certificate System TKS Services Page
+</font><br>
+<p>
+</font>
+<p>
+<center>
+<table border="0" cellspacing="0" cellpadding="0">
+<tr valign="TOP">
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<script language=javascript>
+for (var i=0; i<result.recordSet.length; ++i) {
+ document.write('<tr valign="TOP">');
+ document.write('<td>');
+ document.write('<td>');
+ document.write('<font size=4 face="PrimaSans BT, Verdana, sans-serif">');
+ document.write('<li><a href="');
+ document.write(result.recordSet[i].prefix + "://" +
+ result.recordSet[i].host + ":" + result.recordSet[i].port + "/"+
+ result.recordSet[i].uri);
+ if (result.recordSet[i].type == "admin") {
+ document.write('">Admin Services</a></font>');
+ } else if (result.recordSet[i].type == "agent") {
+ document.write('">Agent Services</a></font>');
+ } else if (result.recordSet[i].type == "ee") {
+ document.write('">SSL End Users Services</a></font>');
+ }
+
+ document.write('</font></td></tr>');
+}
+</script>
+<tr valign="TOP">
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</table>
+</center>
+<div id="footer">
+</div>
+</body>
+</html>
diff --git a/base/tps/shared/webapps/tps/ui/activities.html b/base/tps/shared/webapps/tps/ui/activities.html
new file mode 100644
index 000000000..0762401fd
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/activities.html
@@ -0,0 +1,83 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Activities</strong></li>
+</ol>
+
+<span class="pki-title">Activities</span>
+</div>
+
+<table name="activities">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="8">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="activity_selectall" type="checkbox"><label for="activity_selectall">&nbsp;</label></th>
+ <th>Activity ID</th>
+ <th>Token ID</th>
+ <th>User ID</th>
+ <th>IP</th>
+ <th>Operation</th>
+ <th>Result</th>
+ <th>Date</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="activity_select" type="checkbox"><label for="activity_select">&nbsp;</label></td>
+ <td name="id"><a href="#activities/${id}">${id}</a></td>
+ <td name="tokenID">${tokenID}</td>
+ <td name="userID">${userID}</td>
+ <td name="ip">${ip}</td>
+ <td name="operation">${operation}</td>
+ <td name="result">${result}</td>
+ <td name="date">${date}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="8">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/activity.html b/base/tps/shared/webapps/tps/ui/activity.html
new file mode 100644
index 000000000..5ba96a4e1
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/activity.html
@@ -0,0 +1,47 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#activities">Activities</a></li>
+ <li class="active"><strong><span name="title">Activity ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Activity ${id}</span>
+</div>
+
+<div name="activity" class="pki-fields">
+<fieldset>
+ <label>Activity ID</label>
+ <input name="id" readonly="readonly"><br>
+ <label>Token ID</label>
+ <input name="tokenID" readonly="readonly"><br>
+ <label>User ID</label>
+ <input name="userID" readonly="readonly"><br>
+ <label>IP</label>
+ <input name="ip" readonly="readonly"><br>
+ <label>operation</label>
+ <input name="operation" readonly="readonly"><br>
+ <label>Result</label>
+ <input name="result" readonly="readonly"><br>
+ <label>Date</label>
+ <input name="date" readonly="readonly"><br>
+ <label>Message</label>
+ <input name="message" readonly="readonly"><br>
+</fieldset>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/audit.html b/base/tps/shared/webapps/tps/ui/audit.html
new file mode 100644
index 000000000..3e6cc6cbb
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/audit.html
@@ -0,0 +1,134 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Audit Logging</strong></li>
+</ol>
+
+<span class="pki-title">Audit Logging</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+<a name="enable" href="#">Enable</a><a name="disable" href="#" style="display: none;">Disable</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="audit" class="pki-fields">
+<fieldset>
+ <label>Status</label>
+ <input name="status" readonly="readonly">
+ <br>
+ <label>Signed</label>
+ <input name="signed" readonly="readonly">
+ <br>
+ <label>Interval</label>
+ <input name="interval" readonly="readonly">
+ <br>
+ <label>Buffer Size</label>
+ <input name="bufferSize" readonly="readonly">
+ <br>
+</fieldset>
+</div>
+
+<h2>Events</h2>
+
+<table name="events">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons" style="display: none;">
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="events_selectall" type="checkbox"><label for="events_selectall">&nbsp;</label></th>
+ <th class="pki-property-name-column">Name</th>
+ <th>Value</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="events_select" type="checkbox"><label for="events_select">&nbsp;</label></td>
+ <td name="id" class="pki-property-name-column"><a href="/tps/ui/audit/events/${id}">${id}</a></td>
+ <td name="value">${value}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="event-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Edit Event</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Name</label>
+ <input name="name" readonly="readonly"><br>
+ <label>Value</label>
+ <input name="value" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/authenticator.html b/base/tps/shared/webapps/tps/ui/authenticator.html
new file mode 100644
index 000000000..6da1fbf12
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/authenticator.html
@@ -0,0 +1,131 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#authenticators">Authentication Sources</a></li>
+ <li class="active"><strong><span name="title">Authentication Source ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Authentication Source ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+<a name="enable" href="#">Enable</a><a name="disable" href="#" style="display: none;">Disable</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="authenticator" class="pki-fields">
+<fieldset>
+ <label>Source ID</label>
+ <input name="authenticatorID" readonly="readonly">
+ <br>
+ <label>Status</label>
+ <input name="status" readonly="readonly">
+ <br>
+</fieldset>
+</div>
+
+<h2>Properties</h2>
+
+<table name="properties">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons" style="display: none;">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="authenticator_selectall" type="checkbox"><label for="authenticator_selectall">&nbsp;</label></th>
+ <th class="pki-property-name-column">Name</th>
+ <th>Value</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="authenticator_select" type="checkbox"><label for="authenticator_select">&nbsp;</label></td>
+ <td name="id" class="pki-property-name-column"><a href="/tps/ui/authenticators/${parent.id}/properties/${id}">${id}</a></td>
+ <td name="value">${value}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="property-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Edit Property</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Name</label>
+ <input name="name" readonly="readonly"><br>
+ <label>Value</label>
+ <input name="value" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/authenticators.html b/base/tps/shared/webapps/tps/ui/authenticators.html
new file mode 100644
index 000000000..f9b0b0a28
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/authenticators.html
@@ -0,0 +1,74 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Authentication Sources</strong></li>
+</ol>
+<span class="pki-title">Authentication Sources</span>
+</div>
+
+<table name="authenticators">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="authenticator_selectall" type="checkbox"><label for="authenticator_selectall">&nbsp;</label></th>
+ <th>Source ID</th>
+ <th>Status</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="authenticator_select" type="checkbox"><label for="authenticator_select">&nbsp;</label></td>
+ <td name="id"><a href="#authenticators/${id}">${id}</a></td>
+ <td name="status">${status}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/cert.html b/base/tps/shared/webapps/tps/ui/cert.html
new file mode 100644
index 000000000..456f23355
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/cert.html
@@ -0,0 +1,49 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#certs">Certificates</a></li>
+ <li class="active"><strong><span name="title">Certificate ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Certificate ${id}</span>
+</div>
+
+<div name="certificate" class="pki-fields">
+<fieldset>
+ <label>Certificate ID</label>
+ <input name="id" readonly="readonly"><br>
+ <label>Serial Number</label>
+ <input name="serialNumber" readonly="readonly"><br>
+ <label>Subject</label>
+ <input name="subject" readonly="readonly"><br>
+ <label>Token ID</label>
+ <input name="tokenID" readonly="readonly"><br>
+ <label>User ID</label>
+ <input name="userID" readonly="readonly"><br>
+ <label>Key Type</label>
+ <input name="keyType" readonly="readonly"><br>
+ <label>Status</label>
+ <input name="status" readonly="readonly"><br>
+ <label>Created</label>
+ <input name="createTime" readonly="readonly"><br>
+ <label>Modified</label>
+ <input name="modifyTime" readonly="readonly"><br>
+</fieldset>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/certs.html b/base/tps/shared/webapps/tps/ui/certs.html
new file mode 100644
index 000000000..a87c2dd32
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/certs.html
@@ -0,0 +1,87 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Certificates</strong></li>
+</ol>
+
+<span class="pki-title">Certificates</span>
+</div>
+
+<table name="certificates">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="10">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="cert_selectall" type="checkbox"><label for="cert_selectall">&nbsp;</label></tdh>
+ <th>Certificate ID</th>
+ <th>Serial Number</th>
+ <th>Subject</th>
+ <th>Token ID</th>
+ <th>User ID</th>
+ <th>Key Type</th>
+ <th>Status</th>
+ <th>Create Time</th>
+ <th>Modify Time</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="cert_select" type="checkbox"><label for="cert_select">&nbsp;</label></td>
+ <td name="id"><a href="#certs/${id}">${id}</a></td>
+ <td name="serialNumber">${serialNumber}</td>
+ <td name="subject">${subject}</td>
+ <td name="tokenID">${tokenID}</td>
+ <td name="userID">${userID}</td>
+ <td name="keyType">${keyType}</td>
+ <td name="status">${status}</td>
+ <td name="createTime">${createTime}</td>
+ <td name="modifyTime">${modifyTime}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="10">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/config.html b/base/tps/shared/webapps/tps/ui/config.html
new file mode 100644
index 000000000..d94a0fa28
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/config.html
@@ -0,0 +1,116 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>General Configuration</strong></li>
+</ol>
+
+<span class="pki-title">General Configuration</span></span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<table name="properties">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons" style="display: none;">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="properties_selectall" type="checkbox"><label for="properties_selectall">&nbsp;</label></th>
+ <th class="pki-property-name-column">Name</th>
+ <th>Value</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="properties_select" type="checkbox"><label for="properties_select">&nbsp;</label></td>
+ <td name="id" class="pki-property-name-column"><a href="/tps/ui/config/properties/${id}">${id}</a></td>
+ <td name="value">${value}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="property-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Edit Property</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Name</label>
+ <input name="name" readonly="readonly"><br>
+ <label>Value</label>
+ <input name="value" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/connector.html b/base/tps/shared/webapps/tps/ui/connector.html
new file mode 100644
index 000000000..015a7ac6d
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/connector.html
@@ -0,0 +1,131 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#connectors">Subsystem Connections</a></li>
+ <li class="active"><strong><span name="title">Subsystem Connection ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Subsystem Connection ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+<a name="enable" href="#">Enable</a><a name="disable" href="#" style="display: none;">Disable</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="connector" class="pki-fields">
+<fieldset>
+ <label>Connector ID</label>
+ <input name="connectorID" readonly="readonly">
+ <br>
+ <label>Status</label>
+ <input name="status" readonly="readonly">
+ <br>
+</fieldset>
+</div>
+
+<h2>Properties</h2>
+
+<table name="properties">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons" style="display: none;">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="connector_selectall" type="checkbox"><label for="connector_selectall">&nbsp;</label></th>
+ <th class="pki-property-name-column">Name</th>
+ <th>Value</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="connector_select" type="checkbox"><label for="connector_select">&nbsp;</label></td>
+ <td name="id" class="pki-property-name-column"><a href="/tps/ui/connectors/${parent.id}/properties/${id}">${id}</a></td>
+ <td name="value">${value}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="property-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Edit Property</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Name</label>
+ <input name="name" readonly="readonly"><br>
+ <label>Value</label>
+ <input name="value" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/connectors.html b/base/tps/shared/webapps/tps/ui/connectors.html
new file mode 100644
index 000000000..4d4d59772
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/connectors.html
@@ -0,0 +1,75 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Subsystem Connections</strong></li>
+</ol>
+
+<span class="pki-title">Subsystem Connections</span>
+</div>
+
+<table name="connectors">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="connector_selectall" type="checkbox"><label for="connector_selectall">&nbsp;</label></th>
+ <th>Connector ID</th>
+ <th>Status</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="connector_select" type="checkbox"><label for="connector_select">&nbsp;</label></td>
+ <td name="id"><a href="#connectors/${id}">${id}</a></td>
+ <td name="status">${status}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/group.html b/base/tps/shared/webapps/tps/ui/group.html
new file mode 100644
index 000000000..493b79488
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/group.html
@@ -0,0 +1,125 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#groups">Groups</a></li>
+ <li class="active"><strong><span name="title">Group ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Group ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="group" class="pki-fields">
+<fieldset>
+ <label>Group ID</label>
+ <input name="groupID" readonly="readonly"><br>
+ <label>Description</label>
+ <input name="description" readonly="readonly"><br>
+</fieldset>
+</div>
+
+<h2>Members</h2>
+
+<table name="members">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="2">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="members_selectall" type="checkbox"><label for="members_selectall">&nbsp;</label></th>
+ <th>User ID</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="members_select" type="checkbox"><label for="members_select">&nbsp;</label></td>
+ <td name="id">${id}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="2">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="member-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Group Member</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Group ID</label>
+ <input name="groupID" readonly="readonly"><br>
+ <label>User ID</label>
+ <input name="memberID" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/groups.html b/base/tps/shared/webapps/tps/ui/groups.html
new file mode 100644
index 000000000..9f4239db8
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/groups.html
@@ -0,0 +1,75 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Groups</strong></li>
+</ol>
+
+<span class="pki-title">Groups</span>
+</div>
+
+<table name="groups">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="group_selectall" type="checkbox"><label for="group_selectall">&nbsp;</label></th>
+ <th>Group ID</th>
+ <th>Description</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="group_select" type="checkbox"><label for="group_select">&nbsp;</label></td>
+ <td name="id"><a href="#groups/${id}">${id}</a></td>
+ <td name="description">${description}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/home.html b/base/tps/shared/webapps/tps/ui/home.html
new file mode 100644
index 000000000..8502ca448
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/home.html
@@ -0,0 +1,60 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+</ol>
+
+<span name="title" class="pki-title">Token Processing Service</span>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Token Management</h3>
+ </div>
+ <div class="panel-body">
+ <a href="#tokens">Tokens</a><br>
+ <a href="#certs">Certificates</a><br>
+ <a href="#activities">Activities</a><br>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Account Management</h3>
+ </div>
+ <div class="panel-body">
+ <a href="#users">Users</a><br>
+ <a href="#groups">Groups</a><br>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">System Management</h3>
+ </div>
+ <div class="panel-body">
+ <a href="#config">General Configuration</a><br>
+ <a href="#authenticators">Authentication Sources</a><br>
+ <a href="#connections">Subsystem Connections</a><br>
+ <a href="#profiles">Profiles</a><br>
+ <a href="#profile-mappings">Profile Mappings</a><br>
+ <a href="#audit">Audit Logging</a><br>
+ <a href="#selftests">Self Tests</a><br>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/index.html b/base/tps/shared/webapps/tps/ui/index.html
new file mode 100644
index 000000000..eddceefd7
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/index.html
@@ -0,0 +1,429 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link href="/pki/css/patternfly.css" rel="stylesheet" media="screen, print">
+ <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css">
+ <script src="/pki/js/jquery.js"></script>
+ <script src="/pki/js/underscore.js"></script>
+ <script src="/pki/js/backbone.js"></script>
+ <script src="/pki/js/bootstrap.js"></script>
+ <script src="/pki/js/patternfly.js"></script>
+ <script src="/pki/js/pki-ui.js"></script>
+ <script src="/tps/js/tps.js"></script>
+ <script src="/tps/js/account.js"></script>
+ <script src="/tps/js/activity.js"></script>
+ <script src="/tps/js/audit.js"></script>
+ <script src="/tps/js/authenticator.js"></script>
+ <script src="/tps/js/cert.js"></script>
+ <script src="/tps/js/config.js"></script>
+ <script src="/tps/js/connector.js"></script>
+ <script src="/tps/js/group.js"></script>
+ <script src="/tps/js/profile.js"></script>
+ <script src="/tps/js/profile-mapping.js"></script>
+ <script src="/tps/js/selftest.js"></script>
+ <script src="/tps/js/token.js"></script>
+ <script src="/tps/js/user.js"></script>
+ <script>
+$(function() {
+
+ var account = new Account();
+ account.login({
+ success: function(data, textStatus, jqXHR) {
+ var user = $("#user");
+ user.text(data.FullName);
+ },
+ error: function() {
+ window.location.href = "/tps";
+ }
+ });
+
+ var content = $("#content");
+
+ var router = new Backbone.Router();
+
+ router.route("", "home", function() {
+ new Page({
+ el: content,
+ url: "home.html"
+ }).open();
+ });
+
+ router.route("activities", "activities", function() {
+ new ActivitiesPage({
+ el: content,
+ url: "activities.html"
+ }).open();
+ });
+
+ router.route("activities/:id", "activity", function(id) {
+ new ActivityPage({
+ el: content,
+ url: "activity.html",
+ model: new ActivityModel({ id: id })
+ }).open();
+ });
+
+ router.route("audit", "audit", function() {
+ new AuditPage({
+ el: content,
+ url: "audit.html"
+ }).open();
+ });
+
+ router.route("authenticators", "authenticators", function() {
+ new AuthenticatorsPage({
+ el: content,
+ url: "authenticators.html"
+ }).open();
+ });
+
+ router.route("authenticators/:id", "authenticator", function(id) {
+ new ConfigEntryPage({
+ el: content,
+ url: "authenticator.html",
+ model: new AuthenticatorModel({ id: id })
+ }).open();
+ });
+
+ router.route("new-authenticator", "new-authenticator", function() {
+ new ConfigEntryPage({
+ el: content,
+ url: "authenticator.html",
+ model: new AuthenticatorModel(),
+ mode: "add",
+ title: "New Authenticator",
+ editable: ["authenticatorID"],
+ parentHash: "#authenticators"
+ }).open();
+ });
+
+ router.route("certs", "certs", function() {
+ new CertificatesPage({
+ el: content,
+ url: "certs.html"
+ }).open();
+ });
+
+ router.route("certs/:id", "cert", function(id) {
+ new CertificatePage({
+ el: content,
+ url: "cert.html",
+ model: new CertificateModel({ id: id })
+ }).open();
+ });
+
+ router.route("config", "config", function() {
+ new ConfigPage({
+ el: content,
+ url: "config.html"
+ }).open();
+ });
+
+ router.route("connectors", "connectors", function() {
+ new ConnectorsPage({
+ el: content,
+ url: "connectors.html"
+ }).open();
+ });
+
+ router.route("connectors/:id", "connector", function(id) {
+ new ConfigEntryPage({
+ el: content,
+ url: "connector.html",
+ model: new ConnectorModel({ id: id })
+ }).open();
+ });
+
+ router.route("new-connector", "new-connector", function() {
+ new ConfigEntryPage({
+ el: content,
+ url: "connector.html",
+ model: new ConnectorModel(),
+ mode: "add",
+ title: "New Connector",
+ editable: ["connectorID"],
+ parentHash: "#connectors"
+ }).open();
+ });
+
+ router.route("groups", "groups", function() {
+ new GroupsPage({
+ el: content,
+ url: "groups.html"
+ }).open();
+ });
+
+ router.route("groups/:id", "group", function(id) {
+ new GroupPage({
+ el: content,
+ url: "group.html",
+ model: new GroupModel({ id: id }),
+ editable: ["description"]
+ }).open();
+ });
+
+ router.route("new-group", "new-group", function() {
+ new GroupPage({
+ el: content,
+ url: "group.html",
+ model: new GroupModel(),
+ mode: "add",
+ title: "New Group",
+ editable: ["groupID", "description"],
+ parentHash: "#groups"
+ }).open();
+ });
+
+ router.route("profiles", "profiles", function() {
+ new ProfilesPage({
+ el: content,
+ url: "profiles.html"
+ }).open();
+ });
+
+ router.route("profiles/:id", "profile", function(id) {
+ new ConfigEntryPage({
+ el: content,
+ url: "profile.html",
+ model: new ProfileModel({ id: id })
+ }).open();
+ });
+
+ router.route("new-profile", "new-profile", function() {
+ new ConfigEntryPage({
+ el: content,
+ url: "profile.html",
+ model: new ProfileModel(),
+ mode: "add",
+ title: "New Profile",
+ editable: ["profileID"],
+ parentHash: "#profiles"
+ }).open();
+ });
+
+ router.route("profile-mappings", "profile-mappings", function() {
+ new ProfileMappingsPage({
+ el: content,
+ url: "profile-mappings.html"
+ }).open();
+ });
+
+ router.route("profile-mappings/:id", "profile-mapping", function(id) {
+ new ConfigEntryPage({
+ el: content,
+ url: "profile-mapping.html",
+ model: new ProfileMappingModel({ id: id }),
+ }).open();
+ });
+
+ router.route("new-profile-mapping", "new-profile-mapping", function() {
+ new ConfigEntryPage({
+ el: content,
+ url: "profile-mapping.html",
+ model: new ProfileMappingModel(),
+ mode: "add",
+ title: "New Profile Mapping",
+ editable: ["profileMappingID"],
+ parentHash: "#profile-mappings"
+ }).open();
+ });
+
+ router.route("selftests", "selftests", function() {
+ new SelfTestsPage({
+ el: content,
+ url: "selftests.html"
+ }).open();
+ });
+
+ router.route("selftests/:id", "selftest", function(id) {
+ new SelfTestPage({
+ el: content,
+ url: "selftest.html",
+ model: new SelfTestModel({ id: id })
+ }).open();
+ });
+
+ router.route("tokens", "tokens", function() {
+ new TokensPage({
+ el: content,
+ url: "tokens.html"
+ }).open();
+ });
+
+ router.route("tokens/:id", "token", function(id) {
+ new TokenPage({
+ el: content,
+ url: "token.html",
+ model: new TokenModel({ id: id }),
+ editable: ["userID", "type", "appletID", "keyInfo", "policy"]
+ }).open();
+ });
+
+ router.route("new-token", "new-token", function() {
+ new TokenPage({
+ el: content,
+ url: "token.html",
+ model: new TokenModel(),
+ mode: "add",
+ title: "New Token",
+ editable: ["tokenID", "userID", "type", "appletID", "keyInfo", "policy"],
+ parentHash: "#tokens"
+ }).open();
+ });
+
+ router.route("users", "users", function() {
+ new UsersPage({
+ el: content,
+ url: "users.html"
+ }).open();
+ });
+
+ router.route("users/:id", "user", function(id) {
+ new UserPage({
+ el: content,
+ url: "user.html",
+ model: new UserModel({ id: id }),
+ editable: ["fullName", "email", "tpsProfiles"]
+ }).open();
+ });
+
+ router.route("new-user", "new-user", function() {
+ new UserPage({
+ el: content,
+ url: "user.html",
+ model: new UserModel(),
+ mode: "add",
+ title: "New User",
+ editable: ["userID", "fullName", "email", "tpsProfiles"],
+ parentHash: "#users"
+ }).open();
+ });
+
+ router.route("logout", "logout", function() {
+ // destroy server session
+ account.logout({
+ success: function() {
+ // clear browser cache
+ PKI.logout({
+ success: function() {
+ window.location.href = "/tps";
+ },
+ error: function() {
+ alert("Logout failed. Please close the browser.");
+ }
+ });
+ },
+ error: function() {
+ alert("Logout failed. Please close the browser.");
+ }
+ });
+ });
+
+ Backbone.history.start();
+});
+ </script>
+</head>
+<body>
+
+<nav id="navigation" class="navbar navbar-default navbar-pf" role="navigation">
+<div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="/tps">
+ <b>Token Processing Service</b>
+ </a>
+</div>
+<div class="collapse navbar-collapse navbar-collapse-1">
+ <ul class="nav navbar-nav navbar-utility">
+ <li><a href="#">Status</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ <span class="pficon pficon-user"></span>
+ <span id="user"></span><b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="#logout">Logout</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-primary">
+ <li><a href="#"><span class="glyphicon glyphicon-home"></span> Home</a></li>
+ <li><a href="#tokens">Tokens</a></li>
+ <li><a href="#certs">Certificates</a></li>
+ <li><a href="#activities">Activities</a></li>
+ <li class="dropdown context">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ Accounts
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="#users">Users</a></li>
+ <li><a href="#groups">Groups</a></li>
+ </ul>
+ </li>
+ <li class="dropdown context">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ System
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="#config">General Configuration</a></li>
+ <li><a href="#authenticators">Authentication Sources</a></li>
+ <li><a href="#connectors">Subsystem Connections</a></li>
+ <li><a href="#profiles">Profiles</a></li>
+ <li><a href="#profile-mappings">Profile Mappings</a></li>
+ <li><a href="#audit">Audit Logging</a></li>
+ <li><a href="#selftests">Self Tests</a></li>
+ </ul>
+ </li>
+ </ul>
+</div>
+</nav>
+
+<div id="content">
+</div>
+
+<div id="error-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Error</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <span name="content"></span>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="close" class="btn btn-primary">Close</button>
+ </div>
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/base/tps/shared/webapps/tps/ui/profile-mapping.html b/base/tps/shared/webapps/tps/ui/profile-mapping.html
new file mode 100644
index 000000000..139d21262
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/profile-mapping.html
@@ -0,0 +1,131 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#profile-mappings">Profile Mappings</a></li>
+ <li class="active"><strong><span name="title">Profile Mapping ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Profile Mapping ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+<a name="enable" href="#">Enable</a><a name="disable" href="#" style="display: none;">Disable</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="profile-mapping" class="pki-fields">
+<fieldset>
+ <label>Profile Mapping ID</label>
+ <input name="profileMappingID" readonly="readonly">
+ <br>
+ <label>Status</label>
+ <input name="status" readonly="readonly">
+ <br>
+</fieldset>
+</div>
+
+<h2>Properties</h2>
+
+<table name="properties">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons" style="display: none;">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="profile_selectall" type="checkbox"><label for="profile_selectall">&nbsp;</label></th>
+ <th class="pki-property-name-column">Name</th>
+ <th>Value</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="profile_select" type="checkbox"><label for="profile_select">&nbsp;</label></td>
+ <td name="id" class="pki-property-name-column"><a href="/tps/ui/profile-mappings/${parent.id}/properties/${id}">${id}</a></td>
+ <td name="value">${value}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="property-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Edit Property</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Name</label>
+ <input name="name" readonly="readonly"><br>
+ <label>Value</label>
+ <input name="value" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/profile-mappings.html b/base/tps/shared/webapps/tps/ui/profile-mappings.html
new file mode 100644
index 000000000..dc797bc18
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/profile-mappings.html
@@ -0,0 +1,75 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Profile Mappings</strong></li>
+</ol>
+
+<span class="pki-title">Profile Mappings</span>
+</div>
+
+<table name="profile-mappings">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="profile_mapping_selectall" type="checkbox"><label for="profile_mapping_selectall">&nbsp;</label></th>
+ <th>Profile Mapping ID</th>
+ <th>Status</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="profile_mapping_select" type="checkbox"><label for="profile_mapping_select">&nbsp;</label></td>
+ <td name="id"><a href="#profile-mappings/${id}">${id}</a></td>
+ <td name="status">${status}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/profile.html b/base/tps/shared/webapps/tps/ui/profile.html
new file mode 100644
index 000000000..61811bcc3
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/profile.html
@@ -0,0 +1,131 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#profiles">Profiles</a></li>
+ <li class="active"><strong><span name="title">Profile ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Profile ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+<a name="enable" href="#">Enable</a><a name="disable" href="#" style="display: none;">Disable</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="profile" class="pki-fields">
+<fieldset>
+ <label>Profile ID</label>
+ <input name="profileID" readonly="readonly">
+ <br>
+ <label>Status</label>
+ <input name="status" readonly="readonly">
+ <br>
+</fieldset>
+</div>
+
+<h2>Properties</h2>
+
+<table name="properties">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons" style="display: none;">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="profile_selectall" type="checkbox"><label for="profile_selectall">&nbsp;</label></th>
+ <th class="pki-property-name-column">Name</th>
+ <th>Value</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="profile_select" type="checkbox"><label for="profile_select">&nbsp;</label></td>
+ <td name="id" class="pki-property-name-column"><a href="/tps/ui/profiles/${parent.id}/properties/${id}">${id}</a></td>
+ <td name="value">${value}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="property-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Edit Property</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Name</label>
+ <input name="name" readonly="readonly"><br>
+ <label>Value</label>
+ <input name="value" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="add" class="btn btn-primary">Add</button>
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="close" class="btn btn-primary">Close</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/profiles.html b/base/tps/shared/webapps/tps/ui/profiles.html
new file mode 100644
index 000000000..00218e5f7
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/profiles.html
@@ -0,0 +1,75 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Profiles</strong></li>
+</ol>
+
+<span class="pki-title">Profiles</span>
+</div>
+
+<table name="profiles">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="profile_selectall" type="checkbox"><label for="profile_selectall">&nbsp;</label></th>
+ <th>Profile ID</th>
+ <th>Status</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="profile_select" type="checkbox"><label for="profile_select">&nbsp;</label></td>
+ <td name="id"><a href="#profiles/${id}">${id}</a></td>
+ <td name="status">${status}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/selftest.html b/base/tps/shared/webapps/tps/ui/selftest.html
new file mode 100644
index 000000000..8a680355a
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/selftest.html
@@ -0,0 +1,42 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#selftests">Self Tests</a></li>
+ <li class="active"><strong><span name="title">Self Test ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Self Test ${id}</span>
+
+</div>
+
+<div name="user" class="pki-fields">
+<fieldset>
+ <label>Self Test ID</label>
+ <input name="id" readonly="readonly"><br>
+ <label>Enabled at Startup</label>
+ <input name="enabledAtStartup" readonly="readonly"><br>
+ <label>Critical at Startup</label>
+ <input name="criticalAtStartup" readonly="readonly"><br>
+ <label>Enabled on Demand</label>
+ <input name="enabledOnDemand" readonly="readonly"><br>
+ <label>Critical on Demand</label>
+ <input name="criticalOnDemand" readonly="readonly"><br>
+</fieldset>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/selftests.html b/base/tps/shared/webapps/tps/ui/selftests.html
new file mode 100644
index 000000000..2b428e2d2
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/selftests.html
@@ -0,0 +1,79 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Self Tests</strong></li>
+</ol>
+
+<span class="pki-title">Self Tests</span>
+</div>
+
+<table name="selftests">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="6">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="selftest_selectall" type="checkbox"><label for="selftest_selectall">&nbsp;</label></th>
+ <th>Self Test ID</th>
+ <th>Enabled at Statup</th>
+ <th>Critical at Startup</th>
+ <th>Enabled on Demand</th>
+ <th>Critical on Demand</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="selftest_select" type="checkbox"><label for="selftest_select">&nbsp;</label></td>
+ <td name="id"><a href="#selftests/${id}">${id}</a></td>
+ <td name="enabledAtStartup">${enabledAtStartup}</td>
+ <td name="criticalAtStartup">${criticalAtStartup}</td>
+ <td name="enabledOnDemand">${enabledOnDemand}</td>
+ <td name="criticalOnDemand">${criticalOnDemand}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="6">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
diff --git a/base/tps/shared/webapps/tps/ui/token.html b/base/tps/shared/webapps/tps/ui/token.html
new file mode 100644
index 000000000..78384acfe
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/token.html
@@ -0,0 +1,96 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#tokens">Tokens</a></li>
+ <li class="active"><strong><span name="title">Token ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">Token ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+<a name="changeStatus" href="#">Change Status</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="token" class="pki-fields">
+<fieldset>
+ <label>Token ID</label>
+ <input name="tokenID" readonly="readonly"><br>
+ <label>User ID</label>
+ <input name="userID" readonly="readonly"><br>
+ <label>Type</label>
+ <input name="type" readonly="readonly"><br>
+ <label>Status</label>
+ <input name="statusLabel" readonly="readonly"><br>
+ <label>Applet ID</label>
+ <input name="appletID" readonly="readonly"><br>
+ <label>Key Info</label>
+ <input name="keyInfo" readonly="readonly"><br>
+ <label>Policy</label>
+ <input name="policy" readonly="readonly"><br>
+ <label>Created</label>
+ <input name="createTimestamp" readonly="readonly"><br>
+ <label>Modified</label>
+ <input name="modifyTimestamp" readonly="readonly"><br>
+</fieldset>
+</div>
+
+<div id="token-status-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Change Token Status</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Token ID</label>
+ <input name="tokenID" readonly="readonly"><br>
+ <label>Status</label>
+ <select name="status">
+ <option value="UNINITIALIZED">Uninitialized</option>
+ <option value="ACTIVE">Active</option>
+ <option value="TEMP_LOST">Temporarily lost</option>
+ <option value="PERM_LOST">Permanently lost</option>
+ <option value="DAMAGED">Physically damaged</option>
+ <option value="TERMINATED">Terminated</option>
+ </select><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/tokens.html b/base/tps/shared/webapps/tps/ui/tokens.html
new file mode 100644
index 000000000..aca579a68
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/tokens.html
@@ -0,0 +1,135 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Tokens</strong></li>
+</ol>
+
+<span class="pki-title">Tokens</span>
+</div>
+
+<table name="tokens">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="10">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="token_selectall" type="checkbox"><label for="token_selectall">&nbsp;</label></th>
+ <th>Token ID</th>
+ <th>User ID</th>
+ <th>Type</th>
+ <th>Status</th>
+ <th>Applet ID</th>
+ <th>Key Info</th>
+ <th>Policy</th>
+ <th>Created</th>
+ <th>Modified</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="token_select" type="checkbox"><label for="token_select">&nbsp;</label></td>
+ <td name="id"><a href="#tokens/${id}">${id}</a></td>
+ <td name="userID">${userID}</td>
+ <td name="type">${type}</td>
+ <td name="status"><a href="#tokens/${id}/status">${statusLabel}</a></td>
+ <td name="appletID">${appletID}</td>
+ <td name="keyInfo">${keyInfo}</td>
+ <td name="policy">${policy}</td>
+ <td name="created">${createTimestamp}</td>
+ <td name="modified">${modifyTimestamp}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="10">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>
+
+<div id="token-status-dialog" class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+ <span class="pficon pficon-close"></span>
+ </button>
+ <h4 class="modal-title">Change Token Status</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <label>Token ID</label>
+ <input name="tokenID" readonly="readonly"><br>
+ <label>User ID</label>
+ <input name="userID" readonly="readonly"><br>
+ <label>Type</label>
+ <input name="type" readonly="readonly"><br>
+ <label>Status</label>
+ <select name="status">
+ <option value="UNINITIALIZED">Uninitialized</option>
+ <option value="ACTIVE">Active</option>
+ <option value="TEMP_LOST">Temporarily lost</option>
+ <option value="PERM_LOST">Permanently lost</option>
+ <option value="DAMAGED">Physically damaged</option>
+ <option value="TERMINATED">Terminated</option>
+ </select><br>
+ <label>Applet ID</label>
+ <input name="appletID" readonly="readonly"><br>
+ <label>Key Info</label>
+ <input name="keyInfo" readonly="readonly"><br>
+ <label>Policy</label>
+ <input name="policy" readonly="readonly"><br>
+ <label>Created</label>
+ <input name="createTimestamp" readonly="readonly"><br>
+ <label>Modified</label>
+ <input name="modifyTimestamp" readonly="readonly"><br>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <button name="save" class="btn btn-primary">Save</button>
+ <button name="cancel" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/user.html b/base/tps/shared/webapps/tps/ui/user.html
new file mode 100644
index 000000000..8463d0bef
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/user.html
@@ -0,0 +1,57 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2014 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li><a href="#users">Users</a></li>
+ <li class="active"><strong><span name="title">User ${id}</span></strong></li>
+</ol>
+
+<span name="title" class="pki-title">User ${id}</span>
+
+<span class="pki-actions">
+
+<span class="pki-menu" style="display: none;">
+<a name="edit" href="#">Edit</a><br>
+</span>
+
+<span class="pki-buttons" style="display: none;">
+<button name="cancel">Cancel</button>
+<button name="save" class="primary">Save</button>
+</span>
+
+</span>
+
+</div>
+
+<div name="user" class="pki-fields">
+<fieldset>
+ <label>User ID</label>
+ <input name="userID" readonly="readonly"><br>
+ <label>Full Name</label>
+ <input name="fullName" readonly="readonly"><br>
+ <label>Email</label>
+ <input name="email" readonly="readonly"><br>
+ <label>Type</label>
+ <input name="type" readonly="readonly"><br>
+ <label>State</label>
+ <input name="state" readonly="readonly"><br>
+ <label>TPS Profiles</label>
+ <input name="tpsProfiles" readonly="readonly"><br>
+</fieldset>
+</div>
diff --git a/base/tps/shared/webapps/tps/ui/users.html b/base/tps/shared/webapps/tps/ui/users.html
new file mode 100644
index 000000000..18d59c9de
--- /dev/null
+++ b/base/tps/shared/webapps/tps/ui/users.html
@@ -0,0 +1,75 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2013 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<div class="pki-header">
+<ol class="breadcrumb">
+ <li><a href="#">Home</a></li>
+ <li class="active"><strong>Users</strong></li>
+</ol>
+
+<span class="pki-title">Users</span>
+</div>
+
+<table name="users">
+<thead>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <span name="search">
+ <input name="search" type="text" placeholder="Search...">
+ </span>
+ <span class="pki-table-buttons">
+ <button name="add">Add</button>
+ <button name="remove">Remove</button>
+ </span>
+ </th>
+ </tr>
+ <tr>
+ <th class="pki-select-column"><input id="user_selectall" type="checkbox"><label for="user_selectall">&nbsp;</label></th>
+ <th>User ID</th>
+ <th>Full Name</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td class="pki-select-column"><input id="user_select" type="checkbox"><label for="user_select">&nbsp;</label></td>
+ <td name="id"><a href="#users/${id}">${id}</a></td>
+ <td name="fullName">${fullName}</td>
+ </tr>
+</tbody>
+<tfoot>
+ <tr>
+ <th class="pki-table-actions" colspan="3">
+ <div class="pki-table-info">
+ Total: <span name="totalEntries">0</span> entries
+ </div>
+ <div class="pki-page-controls">
+ <ul class="pagination">
+ <li><a href="#" name="first"><span class="i fa fa-angle-double-left"></span></a></li>
+ <li><a href="#" name="prev"><span class="i fa fa-angle-left"></span></a></li>
+ </ul>
+ <span class="pki-page-jump">
+ <input name="page" type="text" value="1"> of <span name="totalPages">1</span>
+ </span>
+ <ul class="pagination">
+ <li><a href="#" name="next"><span class="i fa fa-angle-right"></span></a></li>
+ <li><a href="#" name="last"><span class="i fa fa-angle-double-right"></span></a></li>
+ </ul>
+ </div>
+ </th>
+ </tr>
+</tfoot>
+</table>