[Pki-devel] [PATCH] 608 Cleaned up links in main page.

Endi Sukma Dewata edewata at redhat.com
Thu Jun 11 21:59:07 UTC 2015


The ROOT's index.jsp has been modified to show the links to all
subsystems installed on the instance. When opened, it will show
the services provided by the subsystem.

The pkispawn output has been modified to show the subsystem URL
more consistently:
    https://<hostname>:<port>/<subsystem>

In all subsystems except TPS the page will redirect to:
    https://<hostname>:<port>/<subsystem>/services

-- 
Endi S. Dewata
-------------- next part --------------
From 6b32cf01fa061d98451a400419ddeff1da483313 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata at redhat.com>
Date: Thu, 11 Jun 2015 17:48:05 -0400
Subject: [PATCH] Cleaned up links in main page.

The ROOT's index.jsp has been modified to show the links to all
subsystems installed on the instance. When opened, it will show
the services provided by the subsystem.

The pkispawn output has been modified to show the subsystem URL
more consistently:
   https://<hostname>:<port>/<subsystem>

In all subsystems except TPS the page will redirect to:
   https://<hostname>:<port>/<subsystem>/services
---
 base/ca/shared/webapps/ca/index.html               |   3 +-
 base/kra/shared/webapps/kra/index.html             |   3 +-
 base/ocsp/shared/webapps/ocsp/index.html           |   3 +-
 .../python/pki/server/deployment/pkimessages.py    |   3 -
 base/server/sbin/pkispawn                          |  11 +-
 base/server/share/webapps/ROOT/index.jsp           | 129 +++------------------
 base/tks/shared/webapps/tks/index.html             |   3 +-
 7 files changed, 20 insertions(+), 135 deletions(-)

diff --git a/base/ca/shared/webapps/ca/index.html b/base/ca/shared/webapps/ca/index.html
index 30662d47aa6a0c3f7aafc03acf16b02cf2ac93bf..81d6c7a5a388cbab90200b65523e9b9f1d4d4140 100644
--- a/base/ca/shared/webapps/ca/index.html
+++ b/base/ca/shared/webapps/ca/index.html
@@ -17,7 +17,6 @@
      --- END COPYRIGHT BLOCK --- -->
 <html>
 <script lang="javascript">
-    // redirect to 'ROOT'
-    window.location = "/";
+    window.location = '/ca/services';
 </script>
 </html>
diff --git a/base/kra/shared/webapps/kra/index.html b/base/kra/shared/webapps/kra/index.html
index 30662d47aa6a0c3f7aafc03acf16b02cf2ac93bf..11897c49fb7f10d42e24867bb9badc129340259d 100644
--- a/base/kra/shared/webapps/kra/index.html
+++ b/base/kra/shared/webapps/kra/index.html
@@ -17,7 +17,6 @@
      --- END COPYRIGHT BLOCK --- -->
 <html>
 <script lang="javascript">
-    // redirect to 'ROOT'
-    window.location = "/";
+    window.location = '/kra/services';
 </script>
 </html>
diff --git a/base/ocsp/shared/webapps/ocsp/index.html b/base/ocsp/shared/webapps/ocsp/index.html
index 30662d47aa6a0c3f7aafc03acf16b02cf2ac93bf..8fe876ff34e5bb1f63b027476ed10b949c40f375 100644
--- a/base/ocsp/shared/webapps/ocsp/index.html
+++ b/base/ocsp/shared/webapps/ocsp/index.html
@@ -17,7 +17,6 @@
      --- END COPYRIGHT BLOCK --- -->
 <html>
 <script lang="javascript">
-    // redirect to 'ROOT'
-    window.location = "/";
+    window.location = '/ocsp/services';
 </script>
 </html>
diff --git a/base/server/python/pki/server/deployment/pkimessages.py b/base/server/python/pki/server/deployment/pkimessages.py
index 0e7d143dd0c8e187ab6a7c427c880d36a9079adf..5d357dd7f1bc1edc86ff8affba5243177ae74b6d 100644
--- a/base/server/python/pki/server/deployment/pkimessages.py
+++ b/base/server/python/pki/server/deployment/pkimessages.py
@@ -371,9 +371,6 @@ PKI_CHECK_STATUS_MESSAGE = '''
             systemctl status pki-tomcatd@%s.service'''
 PKI_ACCESS_URL = '''
       The URL for the subsystem is:
-            https://%s:%s/%s/services'''
-PKI_ACCESS_TPS_URL = '''
-      The URL for the subsystem is:
             https://%s:%s/%s'''
 PKI_INSTANCE_RESTART_MESSAGE = '''
       To restart the subsystem:
diff --git a/base/server/sbin/pkispawn b/base/server/sbin/pkispawn
index d4cfe05d73d1b08e98d6db6569fa6918bd0ae2dc..d153c031d7a4bba91b8c9a3b055ef3e87b90ccac 100755
--- a/base/server/sbin/pkispawn
+++ b/base/server/sbin/pkispawn
@@ -639,14 +639,9 @@ def print_install_information(mdict):
             # Stand-alone PKI KRA/OCSP (External CA Step 1)
             print log.PKI_CONFIGURATION_STANDALONE_1 % config.pki_subsystem
         else:
-            if (config.pki_subsystem == "TPS"):
-                print log.PKI_ACCESS_TPS_URL % (mdict['pki_hostname'],
-                                                mdict['pki_https_port'],
-                                                config.pki_subsystem.lower())
-            else:
-                print log.PKI_ACCESS_URL % (mdict['pki_hostname'],
-                                            mdict['pki_https_port'],
-                                            config.pki_subsystem.lower())
+            print log.PKI_ACCESS_URL % (mdict['pki_hostname'],
+                                        mdict['pki_https_port'],
+                                        config.pki_subsystem.lower())
             if not config.str2bool(mdict['pki_enable_on_system_boot']):
                 print log.PKI_SYSTEM_BOOT_STATUS_MESSAGE % "disabled"
             else:
diff --git a/base/server/share/webapps/ROOT/index.jsp b/base/server/share/webapps/ROOT/index.jsp
index 648a3470fd9dc49dae96571abe26a9852ce2d0bc..38e95e467ae6bc29e20e92518bbac5d29235c89c 100644
--- a/base/server/share/webapps/ROOT/index.jsp
+++ b/base/server/share/webapps/ROOT/index.jsp
@@ -87,6 +87,11 @@ $(function() {
 
 <center>
 
+<br>
+
+<table border="0" cellspacing="0" cellpadding="0">
+<tr valign="TOP">
+    <td>
 <%
     ServletContext caContext = getServletContext().getContext("/ca");
     if (caContext != null) {
@@ -94,41 +99,8 @@ $(function() {
         String caPath = caContext.getContextPath();
         if (!"".equals(caPath)) {
 %>
-<p>
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-<%= caName %>
-</font>
-</p>
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-    <td>
         <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/ca/ee/ca">End Users Services</a></font>
-    </td>
-</tr>
-<%
-            if (request.isSecure()) {
-%>
-<tr valign="TOP">
-    <td>
-        <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/ca/agent/ca">Agent Services</a></font>
-    </td>
-</tr>
-<tr valign="TOP">
-    <td>
-        <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/ca/services">Admin Services</a></font>
-    </td>
-</tr>
-<%
-            }
-%>
-</table>
-
-<br>
-
+        <a href="/ca"><%= caName %></a></font>
 <%
         }
     }
@@ -139,29 +111,8 @@ $(function() {
         String kraPath = kraContext.getContextPath();
         if (!"".equals(kraPath) && request.isSecure()) {
 %>
-<p>
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-<%= kraName %>
-</font>
-</p>
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-    <td>
         <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/kra/agent/kra">Agent Services</a></font>
-    </td>
-</tr>
-<tr valign="TOP">
-    <td>
-        <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/kra/services">Admin Services</a></font>
-    </td>
-</tr>
-</table>
-
-<br>
-
+        <a href="/kra"><%= kraName %></a></font>
 <%
         }
     }
@@ -172,29 +123,8 @@ $(function() {
         String ocspPath = ocspContext.getContextPath();
         if (!"".equals(ocspPath) && request.isSecure()) {
 %>
-<p>
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-<%= ocspName %>
-</font>
-</p>
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-    <td>
         <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/ocsp/agent/ocsp">Agent Services</a></font>
-    </td>
-</tr>
-<tr valign="TOP">
-    <td>
-        <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/ocsp/services">Admin Services</a></font>
-    </td>
-</tr>
-</table>
-
-<br>
-
+        <a href="/ocsp"><%= ocspName %></a></font>
 <%
         }
     }
@@ -205,29 +135,8 @@ $(function() {
         String tksPath = tksContext.getContextPath();
         if (!"".equals(tksPath) && request.isSecure()) {
 %>
-<p>
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-<%= tksName %>
-</font>
-</p>
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-    <td>
         <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/tks/agent/tks">Agent Services</a></font>
-    </td>
-</tr>
-<tr valign="TOP">
-    <td>
-        <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/tks/services">Admin Services</a></font>
-    </td>
-</tr>
-</table>
-
-<br>
-
+        <a href="/tks"><%= tksName %></a></font>
 <%
         }
     }
@@ -238,27 +147,15 @@ $(function() {
         String tpsPath = tpsContext.getContextPath();
         if (!"".equals(tpsPath) && request.isSecure()) {
 %>
-<p>
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-<%= tpsName %>
-</font>
-</p>
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-    <td>
         <li><font size=4 face="PrimaSans BT, Verdana, sans-serif">
-        <a href="/tps/">Agent and Admin Services</a></font>
-    </td>
-</tr>
-</table>
-
-<br>
-
+        <a href="/tps/"><%= tpsName %></a></font>
 <%
         }
     }
 %>
+    </td>
+</tr>
+</table>
 
 </center>
 
diff --git a/base/tks/shared/webapps/tks/index.html b/base/tks/shared/webapps/tks/index.html
index 30662d47aa6a0c3f7aafc03acf16b02cf2ac93bf..a113243524acb38cbad73b1d80fc2d6996301150 100644
--- a/base/tks/shared/webapps/tks/index.html
+++ b/base/tks/shared/webapps/tks/index.html
@@ -17,7 +17,6 @@
      --- END COPYRIGHT BLOCK --- -->
 <html>
 <script lang="javascript">
-    // redirect to 'ROOT'
-    window.location = "/";
+    window.location = '/tks/services';
 </script>
 </html>
-- 
1.9.3



More information about the Pki-devel mailing list