summaryrefslogtreecommitdiffstats
path: root/base/tps/apache/docroot/tokendb/selfTest.template
diff options
context:
space:
mode:
Diffstat (limited to 'base/tps/apache/docroot/tokendb/selfTest.template')
-rw-r--r--base/tps/apache/docroot/tokendb/selfTest.template129
1 files changed, 129 insertions, 0 deletions
diff --git a/base/tps/apache/docroot/tokendb/selfTest.template b/base/tps/apache/docroot/tokendb/selfTest.template
new file mode 100644
index 000000000..163437d17
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/selfTest.template
@@ -0,0 +1,129 @@
+<!-- --- 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>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Admin Operations : Run Self Tests</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function runSelfTest(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ if (enabledTests > 0) {
+ document.selfTestForm.action = uri;
+ return true;
+ } else {
+ alert("Self tests are not enabled.");
+ return false;
+ }
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="selfTestForm" METHOD="POST" onSubmit="return runSelfTest(this)" >
+<input TYPE="hidden" NAME="query" VALUE="op=run_self_test">
+
+<SCRIPT type="text/JavaScript">
+<!--
+if ((typeof(test_list) != "undefined") && (test_list.length > 0)) {
+ document.write("<center>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;Enable&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;Critical&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;Test&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("</tr>\n");
+ var enabledTests = 0
+ for (var i = 0, k = 1; i < test_list.length; i++) {
+ document.write("<tr bgcolor=#efefef>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;");
+ document.write("<input type=checkbox name=\"enable"+test_list[i]+"\" value=\"enable"+test_list[i]+"\" ");
+ if ((typeof(enabled) != "undefined") && (enabled & k)) {
+ document.write("CHECKED");
+ enabledTests++;
+ }
+ document.write(" DISABLED>\n");
+ document.write("&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;");
+ document.write("<input type=checkbox name=\"critical"+test_list[i]+"\" value=\"critical"+test_list[i]+"\" ");
+ if ((typeof(critical) != "undefined") && (critical & k)) {
+ document.write("CHECKED");
+ }
+ document.write(" DISABLED>\n");
+ document.write("&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;");
+ document.write(test_list[i]);
+ document.write("&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("</tr>\n");
+ k *= 2;
+ }
+ document.write("</table>\n");
+ document.write("<HR NOSHADE SIZE=1>\n");
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<input TYPE=submit VALUE=\"Run\">\n");
+} else {
+ document.write("Error: Missing self test list.\n");
+ document.write("<HR NOSHADE SIZE=1>\n");
+}
+//-->
+</SCRIPT>
+
+</form>
+</BODY>
+</HTML>