This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch activemq-6.1.x
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/activemq-6.1.x by this push:
     new c5f23dc381 AMQ-9697: Removed inline JS and CSS from the Web Console. 
Added CSP header to jetty.xml (#1428)
c5f23dc381 is described below

commit c5f23dc3810d7ebd09da8d764b5e5b88c7752d2e
Author: Sérgio Lemos <[email protected]>
AuthorDate: Thu May 29 21:45:19 2025 -0700

    AMQ-9697: Removed inline JS and CSS from the Web Console. Added CSP header 
to jetty.xml (#1428)
    
    (cherry picked from commit 4db953d5de532d26b1f54dc069637468191a6e5d)
---
 activemq-web-console/src/main/webapp/403.html      | 14 ++--
 activemq-web-console/src/main/webapp/404.html      | 14 ++--
 activemq-web-console/src/main/webapp/500.html      | 14 ++--
 .../src/main/webapp/connections.jsp                |  2 +-
 .../src/main/webapp/decorators/head.jsp            | 11 ++-
 .../src/main/webapp/decorators/header.jsp          |  6 +-
 activemq-web-console/src/main/webapp/js/head.js    | 20 ++++++
 activemq-web-console/src/main/webapp/js/message.js | 78 +++++++++++++++++++++
 .../src/main/webapp/js/queueGraph.js               | 38 ++++++++++
 activemq-web-console/src/main/webapp/login.html    | 12 +---
 activemq-web-console/src/main/webapp/message.jsp   | 80 ++++------------------
 activemq-web-console/src/main/webapp/network.jsp   |  2 +-
 .../src/main/webapp/queueGraph.jsp                 | 33 +++------
 activemq-web-console/src/main/webapp/scheduled.jsp |  4 +-
 activemq-web-console/src/main/webapp/slave.jsp     | 14 ++--
 .../src/main/webapp/styles/head.css                | 26 +++++++
 .../src/main/webapp/styles/header.css              | 46 +++++++++++++
 .../src/main/webapp/styles/site.css                |  4 ++
 .../src/main/webapp/xml/queues.jsp                 |  3 -
 assembly/src/release/conf/jetty.xml                | 11 +++
 assembly/src/release/webapps/index.html            | 17 ++---
 21 files changed, 281 insertions(+), 168 deletions(-)

diff --git a/activemq-web-console/src/main/webapp/403.html 
b/activemq-web-console/src/main/webapp/403.html
index bfc95506f6..7503723b73 100644
--- a/activemq-web-console/src/main/webapp/403.html
+++ b/activemq-web-console/src/main/webapp/403.html
@@ -26,13 +26,7 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     <title>Apache ActiveMQ</title>
-    <style type="text/css" media="screen">
-        @import url('styles/type-settings.css');
-        @import url('styles/site.css');
-    </style>
-
-
-
+    <link rel="stylesheet" media="screen" href="/styles/head.css" />
 </head>
 
 <body>
@@ -54,10 +48,10 @@
                     <!-- Banner -->
                     <div id="asf_logo">
                         <div id="activemq_logo">
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                href="http://activemq.apache.org/";
                                title="The most popular and powerful open 
source Message Broker">ActiveMQ</a>
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                href="http://www.apache.org/"; title="The Apache 
Software Foundation">ASF</a>
                         </div>
                     </div>
@@ -75,7 +69,7 @@
                     <table border="0">
                         <tbody>
                             <tr>
-                                <td valign="top" width="100%" 
style="overflow:hidden;">
+                                <td valign="top" width="100%" 
class="body-container">
                                     <div class="body-content">
                                         <p class="error">Restricted!</p>
 
diff --git a/activemq-web-console/src/main/webapp/404.html 
b/activemq-web-console/src/main/webapp/404.html
index cf11458a4e..98638913a9 100644
--- a/activemq-web-console/src/main/webapp/404.html
+++ b/activemq-web-console/src/main/webapp/404.html
@@ -26,13 +26,7 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     <title>Apache ActiveMQ</title>
-    <style type="text/css" media="screen">
-        @import url('styles/type-settings.css');
-        @import url('styles/site.css');
-    </style>
-
-
-
+    <link rel="stylesheet" media="screen" href="/styles/head.css" />
 </head>
 
 <body>
@@ -54,10 +48,10 @@
                     <!-- Banner -->
                     <div id="asf_logo">
                         <div id="activemq_logo">
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                href="http://activemq.apache.org/";
                                title="The most popular and powerful open 
source Message Broker">ActiveMQ</a>
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                href="http://www.apache.org/"; title="The Apache 
Software Foundation">ASF</a>
                         </div>
                     </div>
@@ -75,7 +69,7 @@
                     <table border="0">
                         <tbody>
                             <tr>
-                                <td valign="top" width="100%" 
style="overflow:hidden;">
+                                <td valign="top" width="100%" 
class="body-container">
                                     <div class="body-content">
                                         <p class="error">Page Not Found!</p>
 
diff --git a/activemq-web-console/src/main/webapp/500.html 
b/activemq-web-console/src/main/webapp/500.html
index f9305ff4ae..ee6966bc7d 100644
--- a/activemq-web-console/src/main/webapp/500.html
+++ b/activemq-web-console/src/main/webapp/500.html
@@ -26,13 +26,7 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     <title>Apache ActiveMQ</title>
-    <style type="text/css" media="screen">
-        @import url('styles/type-settings.css');
-        @import url('styles/site.css');
-    </style>
-
-
-
+    <link rel="stylesheet" media="screen" href="/styles/head.css" />
 </head>
 
 <body>
@@ -54,10 +48,10 @@
                     <!-- Banner -->
                     <div id="asf_logo">
                         <div id="activemq_logo">
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                href="http://activemq.apache.org/";
                                title="The most popular and powerful open 
source Message Broker">ActiveMQ</a>
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                href="http://www.apache.org/"; title="The Apache 
Software Foundation">ASF</a>
                         </div>
                     </div>
@@ -75,7 +69,7 @@
                     <table border="0">
                         <tbody>
                             <tr>
-                                <td valign="top" width="100%" 
style="overflow:hidden;">
+                                <td valign="top" width="100%" 
class="body-container">
                                     <div class="body-content">
                                         <p class="error">Error!</p>
                                         <p align="center">Exception occurred 
while processing this request, check the log for more information!</p>
diff --git a/activemq-web-console/src/main/webapp/connections.jsp 
b/activemq-web-console/src/main/webapp/connections.jsp
index 30d41d76f0..be280edeed 100644
--- a/activemq-web-console/src/main/webapp/connections.jsp
+++ b/activemq-web-console/src/main/webapp/connections.jsp
@@ -55,7 +55,7 @@
 </table>
 
 </c:forEach>
-<div style="margin-top: 5em">
+<div class="section-container">
 <h2>Network Connectors</h2>
 
 <table id="connections" class="sortable autostripe">
diff --git a/activemq-web-console/src/main/webapp/decorators/head.jsp 
b/activemq-web-console/src/main/webapp/decorators/head.jsp
index abb76eaf74..6da545b73e 100644
--- a/activemq-web-console/src/main/webapp/decorators/head.jsp
+++ b/activemq-web-console/src/main/webapp/decorators/head.jsp
@@ -20,17 +20,14 @@
     <title><c:out value="${requestContext.brokerQuery.brokerAdmin.brokerName} 
: ${pageTitle}" /></title>
 
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-    <style type="text/css" media="screen">
-        @import url('${pageContext.request.contextPath}/styles/sorttable.css');
-        @import 
url('${pageContext.request.contextPath}/styles/type-settings.css');
-        @import url('${pageContext.request.contextPath}/styles/site.css');
-        @import url('${pageContext.request.contextPath}/styles/prettify.css');
-    </style>
+
+    <link rel="stylesheet" media="screen" 
href="${pageContext.request.contextPath}/styles/head.css" />
+
     <c:if test="${!disableJavaScript}">
         <script type='text/javascript' 
src='${pageContext.request.contextPath}/js/common.js'></script>
         <script type='text/javascript' 
src='${pageContext.request.contextPath}/js/css.js'></script>
         <script type='text/javascript' 
src='${pageContext.request.contextPath}/js/standardista-table-sorting.js'></script>
         <script type='text/javascript' 
src='${pageContext.request.contextPath}/js/prettify.js'></script>
-        <script>addEvent(window, 'load', prettyPrint)</script>
+        <script type='text/javascript' 
src='${pageContext.request.contextPath}/js/head.js'></script>
     </c:if>
 
diff --git a/activemq-web-console/src/main/webapp/decorators/header.jsp 
b/activemq-web-console/src/main/webapp/decorators/header.jsp
index 99bd1d42de..6367488662 100644
--- a/activemq-web-console/src/main/webapp/decorators/header.jsp
+++ b/activemq-web-console/src/main/webapp/decorators/header.jsp
@@ -33,9 +33,9 @@
                     <!-- Banner -->
                     <div id="asf_logo">
                         <div id="activemq_logo">
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                 href="http://activemq.apache.org/"; title="The 
most popular and powerful open source Message Broker">ActiveMQ</a> &trade;
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                 href="http://www.apache.org/"; title="The 
Apache Software Foundation">ASF</a>
                         </div>
                     </div>
@@ -71,5 +71,5 @@
                     <table border="0">
                         <tbody>
                             <tr>
-                                <td valign="top" width="100%" 
style="overflow:hidden;">
+                                <td valign="top" width="100%" 
class="body-container">
                                     <div class="body-content">
diff --git a/activemq-web-console/src/main/webapp/js/head.js 
b/activemq-web-console/src/main/webapp/js/head.js
new file mode 100644
index 0000000000..d78cd393e5
--- /dev/null
+++ b/activemq-web-console/src/main/webapp/js/head.js
@@ -0,0 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+window.onload = function () {
+    addEvent(window, 'load', prettyPrint)
+}
diff --git a/activemq-web-console/src/main/webapp/js/message.js 
b/activemq-web-console/src/main/webapp/js/message.js
new file mode 100644
index 0000000000..d45b70a4cb
--- /dev/null
+++ b/activemq-web-console/src/main/webapp/js/message.js
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function sortSelect(selElem) {
+    const tmpAry = [];
+    for (var i=0;i<selElem.options.length;i++) {
+        tmpAry[i] = [];
+        tmpAry[i][0] = selElem.options[i].text;
+        tmpAry[i][1] = selElem.options[i].value;
+    }
+    tmpAry.sort();
+    while (selElem.options.length > 0) {
+        selElem.options[0] = null;
+    }
+    for (var i=0;i<tmpAry.length;i++) {
+        selElem.options[i] = new Option(tmpAry[i][0], tmpAry[i][1]);
+    }
+}
+
+function selectOptionByText (selElem, selText) {
+    var iter = 0;
+    while ( iter < selElem.options.length ) {
+        if ( selElem.options[iter].text === selText ) {
+            selElem.selectedIndex = iter;
+            break;
+        }
+        iter++;
+    }
+}
+
+function confirmAction(id, action, params) {
+    //TODO i18n messages
+    const select = document.getElementById(id);
+    const selectedIndex = select.selectedIndex;
+    if (select.selectedIndex === 0) {
+        alert("Please select a value");
+        return;
+    }
+    const value = select.options[selectedIndex].value;
+    const url = action + params + "&destination=" + encodeURIComponent(value);
+    console.log(url);
+
+    if (confirm("Are you sure?"))
+        location.href=url;
+}
+
+window.onload=function() {
+    sortSelect( document.getElementById('queue') );
+    selectOptionByText( document.getElementById('queue'), "-- Please select 
--" );
+
+    const params = document.getElementById('actionParams').value;
+
+    document.getElementById('actionCopy').onclick = function(e) {
+        confirmAction('queue', 'copyMessage', params);
+    }
+
+    document.getElementById('actionMove').onclick = function(e) {
+        confirmAction('queue', 'moveMessage', params);
+    }
+
+    document.getElementById('actionDelete').onclick = function(e) {
+        return confirm('Are you sure you want to delete the message?');
+    }
+}
\ No newline at end of file
diff --git a/activemq-web-console/src/main/webapp/js/queueGraph.js 
b/activemq-web-console/src/main/webapp/js/queueGraph.js
new file mode 100644
index 0000000000..bd0bda8c8c
--- /dev/null
+++ b/activemq-web-console/src/main/webapp/js/queueGraph.js
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function drawGraph() {
+    const queues = JSON.parse(document.getElementById('queues').value);
+    const options = {
+        "IECanvasHTC": document.getElementById('IecCanvasHtcUrl').value,
+        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
+        "padding": {left: 0, right: 0, top: 10, bottom: 30},
+        "xTicks": queues
+    };
+
+    const layout = new PlotKit.Layout("bar", options);
+
+    const data = JSON.parse(document.getElementById('data').value)
+    layout.addDataset("sqrt", data);
+    layout.evaluate();
+
+    const canvas = MochiKit.DOM.getElement("graph");
+    const plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
+    plotter.render();
+}
+
+MochiKit.DOM.addLoadEvent(drawGraph);
\ No newline at end of file
diff --git a/activemq-web-console/src/main/webapp/login.html 
b/activemq-web-console/src/main/webapp/login.html
index ff26d74682..13b5ad8986 100644
--- a/activemq-web-console/src/main/webapp/login.html
+++ b/activemq-web-console/src/main/webapp/login.html
@@ -26,13 +26,7 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     <title>Apache ActiveMQ - Login</title>
-    <style type="text/css" media="screen">
-        @import url('styles/type-settings.css');
-        @import url('styles/site.css');
-    </style>
-
-
-
+    <link rel="stylesheet" media="screen" href="/styles/head.css" />
 </head>
 
 <body>
@@ -54,10 +48,10 @@
                     <!-- Banner -->
                     <div id="asf_logo">
                         <div id="activemq_logo">
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                href="http://activemq.apache.org/";
                                title="The most popular and powerful open 
source Message Broker">ActiveMQ</a>
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                href="http://www.apache.org/"; title="The Apache 
Software Foundation">ASF</a>
                         </div>
                     </div>
diff --git a/activemq-web-console/src/main/webapp/message.jsp 
b/activemq-web-console/src/main/webapp/message.jsp
index e87be92899..382452d76b 100644
--- a/activemq-web-console/src/main/webapp/message.jsp
+++ b/activemq-web-console/src/main/webapp/message.jsp
@@ -131,8 +131,16 @@ No message could be found for ID <c:out 
value="${requestContext.messageQuery.id}
                     </tr>
                 </thead>
                 <tbody>
+                    <c:url value=".action" var="actionParams">
+                        <c:param name="JMSDestination" 
value="${requestContext.messageQuery.JMSDestination}" />
+                        <c:param name="messageId" value="${row.JMSMessageID}" 
/>
+                        <c:param name="JMSDestinationType" value="queue" />
+                        <c:param name="secret" 
value='${sessionScope["secret"]}' />
+                    </c:url>
+                    <input type="hidden" id="actionParams" value="<c:out 
value='${actionParams}' />" />
+
                     <tr>
-                        <td colspan="2"><a href="<c:out 
value='deleteMessage.action?JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&secret=${sessionScope["secret"]}'
 />" onclick="return confirm('Are you sure you want to delete the message?')" 
>Delete</a></td>
+                        <td colspan="2"><a id="actionDelete" href="<c:out 
value='deleteMessage.action?JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&secret=${sessionScope["secret"]}'
 />">Delete</a></td>
                     </tr>
                     <c:if test="${requestContext.messageQuery.isDLQ() || 
requestContext.messageQuery.JMSDestination eq 'ActiveMQ.DLQ'}">
                        <tr>
@@ -144,12 +152,12 @@ No message could be found for ID <c:out 
value="${requestContext.messageQuery.id}
                                           <c:param name="secret" 
value='${sessionScope["secret"]}' />
                                       </c:url>"
                                       onclick="return confirm('Are you sure 
you want to retry this message?')"
-                                     title="Retry - attempt reprocessing on 
original destination">Retry</a>
+                                      title="Retry - attempt reprocessing on 
original destination">Retry</a>
                             </td>
                        </tr>
                     </c:if>
                     <tr class="odd">
-                    <td><a href="<c:out 
value="javascript:confirmAction('queue', 'copyMessage"/>')">Copy</a></td>
+                    <td><a id="actionCopy">Copy</a></td>
                         <td rowspan="2">
                             <select id="queue">
                                 <option value=""> -- Please select --</option>
@@ -160,11 +168,9 @@ No message could be found for ID <c:out 
value="${requestContext.messageQuery.id}
                                 </c:forEach>
                             </select>
                         </td>
-
                     </tr>
                     <tr class="odd">
-                        <td><a href="<c:out 
value="javascript:confirmAction('queue', 'moveMessage"/>')"
-                            >Move</a></td>
+                        <td><a id="actionMove">Move</a></td>
                     </tr>
                 </tbody>
             </table>
@@ -193,70 +199,10 @@ No message could be found for ID <c:out 
value="${requestContext.messageQuery.id}
 </c:otherwise>
 </c:choose>
 
-<script type="text/javascript">
-function sortSelect(selElem) {
-        var tmpAry = new Array();
-        for (var i=0;i<selElem.options.length;i++) {
-            tmpAry[i] = new Array();
-            tmpAry[i][0] = selElem.options[i].text;
-            tmpAry[i][1] = selElem.options[i].value;
-        }
-        tmpAry.sort();
-        while (selElem.options.length > 0) {
-            selElem.options[0] = null;
-        }
-        for (var i=0;i<tmpAry.length;i++) {
-            var op = new Option(tmpAry[i][0], tmpAry[i][1]);
-            selElem.options[i] = op;
-        }
-        return;
-}
-
-function selectOptionByText (selElem, selText) {
-    var iter = 0;
-    while ( iter < selElem.options.length ) {
-        if ( selElem.options[iter].text === selText ) {
-            selElem.selectedIndex = iter;
-            break;
-        }
-        iter++;
-    }
-}
-
-function confirmAction(id, action) {
-       //TODO i18n messages
-       var select = document.getElementById(id);
-       var selectedIndex = select.selectedIndex; 
-       if (select.selectedIndex == 0) {
-               alert("Please select a value");
-               return;
-       }
-       var value = select.options[selectedIndex].value;
-       var url = action + ".action?destination=" + encodeURIComponent(value);
-
-       var url = action +
-               "<c:url value=".action">
-                     <c:param name="JMSDestination" 
value="${requestContext.messageQuery.JMSDestination}" />
-                     <c:param name="messageId" value="${row.JMSMessageID}" />
-                     <c:param name="JMSDestinationType" value="queue" />
-                     <c:param name="secret" value='${sessionScope["secret"]}' 
/>
-                 </c:url>";
-       url = url + "&destination=" + encodeURIComponent(value);
-
-       if (confirm("Are you sure?"))
-         location.href=url;
-}
-
-window.onload=function() {
-       sortSelect( document.getElementById('queue') );
-       selectOptionByText( document.getElementById('queue'), "-- Please select 
--" );
-}
-</script>
-
+<script type='text/javascript' 
src='${pageContext.request.contextPath}/js/message.js'></script>
 
 <%@include file="decorators/footer.jsp" %>
 
-
 </body>
 </html>
 
diff --git a/activemq-web-console/src/main/webapp/network.jsp 
b/activemq-web-console/src/main/webapp/network.jsp
index f817829a96..5772ca6fee 100644
--- a/activemq-web-console/src/main/webapp/network.jsp
+++ b/activemq-web-console/src/main/webapp/network.jsp
@@ -23,7 +23,7 @@
 
 <%@include file="decorators/header.jsp" %>
 
-<div style="margin-top: 5em">
+<div class="section-container">
 <h2>Network Bridges</h2>
 
 <table id="bridges" class="sortable autostripe">
diff --git a/activemq-web-console/src/main/webapp/queueGraph.jsp 
b/activemq-web-console/src/main/webapp/queueGraph.jsp
index 7628778900..15e1fe4355 100644
--- a/activemq-web-console/src/main/webapp/queueGraph.jsp
+++ b/activemq-web-console/src/main/webapp/queueGraph.jsp
@@ -26,36 +26,21 @@
    <script src='<c:url value="/js/plotkit/Layout.js"/>' 
type="text/javascript"></script>
    <script src='<c:url value="/js/plotkit/Canvas.js"/>' 
type="text/javascript"></script>
    <script src='<c:url value="/js/plotkit/SweetCanvas.js"/>' 
type="text/javascript"></script>
+   <script src='<c:url value="/js/queueGraph.js"/>' 
type="text/javascript"></script>
 </head>
 <body>
 
-<%@include file="decorators/header.jsp" %>
+<input id='IecCanvasHtcUrl' type='hidden' value='<c:url 
value="/js/plotkit/iecanvas.htc"/>' />
+
+<input id='queues' type='hidden'
+       value='[<c:forEach items="${requestContext.brokerQuery.queues}" 
var="row" varStatus="status"><c:if test="${status.count > 1}">, 
</c:if>{"v":${status.count}, "label":"<c:out 
value="${row.name}"/>"}</c:forEach>]' />
 
-<script>
-var options = {
-   "IECanvasHTC": "<c:url value="/js/plotkit/iecanvas.htc"/>",
-   "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
-   "padding": {left: 0, right: 0, top: 10, bottom: 30},
-   "xTicks": [<c:forEach items="${requestContext.brokerQuery.queues}" 
var="row" varStatus="status"
-         ><c:if 
-         test="${status.count > 1}">, </c:if>{v:${status.count}, label:"<c:out 
value="${row.name}"/>"}</c:forEach>]
-};
+<input id='data' type='hidden'
+       value='[<c:forEach items="${requestContext.brokerQuery.queues}" 
var="row" varStatus="status"><c:if test="${status.count > 
1}">,</c:if>[${status.count}, ${row.queueSize}]</c:forEach>]' />
 
-function drawGraph() {
-    var layout = new PlotKit.Layout("bar", options);
-    
-    layout.addDataset("sqrt",  [<c:forEach 
items="${requestContext.brokerQuery.queues}" var="row" varStatus="status"><c:if 
-         test="${status.count > 1}">, </c:if> [${status.count},  
${row.queueSize}] </c:forEach> ]);
-    layout.evaluate();
-    
-    var canvas = MochiKit.DOM.getElement("graph");
-    var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
-    plotter.render();
-}
-MochiKit.DOM.addLoadEvent(drawGraph);
-</script>
+<%@include file="decorators/header.jsp" %>
 
- <div><canvas id="graph" height="400" width="760"></canvas></div>
+<div><canvas id="graph" height="400" width="760"></canvas></div>
  
 <%---    
 Other values we can graph...
diff --git a/activemq-web-console/src/main/webapp/scheduled.jsp 
b/activemq-web-console/src/main/webapp/scheduled.jsp
index e2c8c88373..bb65854448 100644
--- a/activemq-web-console/src/main/webapp/scheduled.jsp
+++ b/activemq-web-console/src/main/webapp/scheduled.jsp
@@ -27,7 +27,7 @@
 
 <c:choose>
 <c:when test="${requestContext.brokerQuery.jobSchedulerStarted}">
-<div style="margin-top: 5em">
+<div class="section-container">
        <table id="Jobs" class="sortable autostripe">
        <thead>
                <tr>
@@ -61,7 +61,7 @@
        </table>
 </c:when>
 <c:otherwise>
-<div style="margin-top: 5em">
+<div class="section-container">
 <p align="center">Scheduler not started!</p>
 </div>
 </c:otherwise>
diff --git a/activemq-web-console/src/main/webapp/slave.jsp 
b/activemq-web-console/src/main/webapp/slave.jsp
index fe7eadfa19..52c43383f2 100644
--- a/activemq-web-console/src/main/webapp/slave.jsp
+++ b/activemq-web-console/src/main/webapp/slave.jsp
@@ -21,13 +21,7 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     <title>Apache ActiveMQ</title>
-    <style type="text/css" media="screen">
-        @import 
url('${pageContext.request.contextPath}/styles/type-settings.css');
-        @import url('${pageContext.request.contextPath}/styles/site.css');
-    </style>
-
-
-
+    <link rel="stylesheet" media="screen" href="/styles/head.css" />
 </head>
 
 <body>
@@ -49,10 +43,10 @@
                     <!-- Banner -->
                     <div id="asf_logo">
                         <div id="activemq_logo">
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                href="http://activemq.apache.org/";
                                title="The most popular and powerful open 
source Message Broker">ActiveMQ</a>
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                href="http://www.apache.org/"; title="The Apache 
Software Foundation">ASF</a>
                         </div>
                     </div>
@@ -70,7 +64,7 @@
                     <table border="0">
                         <tbody>
                             <tr>
-                                <td valign="top" width="100%" 
style="overflow:hidden;">
+                                <td valign="top" width="100%" 
class="body-container">
                                     <div class="body-content">
                                         <p align="center">Broker is currently 
in <b>slave</b> mode!</p>
                                     </div>
diff --git a/activemq-web-console/src/main/webapp/styles/head.css 
b/activemq-web-console/src/main/webapp/styles/head.css
new file mode 100644
index 0000000000..9f46a641c2
--- /dev/null
+++ b/activemq-web-console/src/main/webapp/styles/head.css
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* ===================================================== */
+/* Single place to import all css files used in head.jsp */
+/* ===================================================== */
+
+@import url('sorttable.css');
+@import url('type-settings.css');
+@import url('site.css');
+@import url('prettify.css');
+@import url('header.css');
\ No newline at end of file
diff --git a/activemq-web-console/src/main/webapp/styles/header.css 
b/activemq-web-console/src/main/webapp/styles/header.css
new file mode 100644
index 0000000000..6b74b63ce0
--- /dev/null
+++ b/activemq-web-console/src/main/webapp/styles/header.css
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* ============================== */
+/* Styles used in header.jsp      */
+/* ============================== */
+
+.header-logo-active-mq {
+    float:left;
+    width:280px;
+    display:block;
+    text-indent:-5000px;
+    text-decoration:none;
+    line-height:60px;
+    margin-top:10px;
+    margin-left:100px;
+}
+
+.header-logo-apache {
+    float:right;
+    width:210px;
+    display:block;
+    text-indent:-5000px;
+    text-decoration:none;
+    line-height:60px;
+    margin-top:15px;
+    margin-right:10px
+}
+
+.body-container {
+    overflow:hidden;
+}
\ No newline at end of file
diff --git a/activemq-web-console/src/main/webapp/styles/site.css 
b/activemq-web-console/src/main/webapp/styles/site.css
index 6ebcd0347a..687a81bd72 100644
--- a/activemq-web-console/src/main/webapp/styles/site.css
+++ b/activemq-web-console/src/main/webapp/styles/site.css
@@ -19,6 +19,10 @@ body {
     padding: 20px;
 }
 
+.section-container {
+    margin-top: 5em
+}
+
 /* ====================================================== */
 /*  Rounded Box Styles */
 /* ====================================================== */
diff --git a/activemq-web-console/src/main/webapp/xml/queues.jsp 
b/activemq-web-console/src/main/webapp/xml/queues.jsp
index 4e2ba87687..c7382a149a 100644
--- a/activemq-web-console/src/main/webapp/xml/queues.jsp
+++ b/activemq-web-console/src/main/webapp/xml/queues.jsp
@@ -20,13 +20,10 @@
 <queues>
 <c:forEach items="${requestContext.brokerQuery.queues}" var="row">
 <queue name="<c:out value="${row.name}" />">
-
   <stats size="${row.queueSize}"
          consumerCount="${row.consumerCount}"
          enqueueCount="${row.enqueueCount}"
          dequeueCount="${row.dequeueCount}"/>
-
-
   <feed>
     <atom><c:out 
value="queueBrowse/${row.name}?view=rss&amp;feedType=atom_1.0"/></atom>
     <rss><c:out 
value="queueBrowse/${row.name}?view=rss&amp;feedType=rss_2.0"/></rss>
diff --git a/assembly/src/release/conf/jetty.xml 
b/assembly/src/release/conf/jetty.xml
index e475e80810..75923e6dbe 100644
--- a/assembly/src/release/conf/jetty.xml
+++ b/assembly/src/release/conf/jetty.xml
@@ -79,6 +79,17 @@
                     <property name="name" value="Cache-Control"/>
                     <property name="value" value="no-store"/>
                 </bean>
+                <bean id="header" 
class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
+                    <property name="pattern" value="*"/>
+                    <property name="name" value="Content-Security-Policy"/>
+                    <property name="value" value="upgrade-insecure-requests; 
style-src-elem 'self'; style-src 'self'; img-src 'self'; script-src-elem 
'self'; default-src 'none'; object-src 'none'; frame-ancestors 'none'; base-uri 
'none';" />
+                </bean>
+                <!-- More relaxed rules to allow browsers to properly render 
XML -->
+                <bean id="header" 
class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
+                    <property name="pattern" value="/admin/xml/*"/>
+                    <property name="name" value="Content-Security-Policy"/>
+                    <property name="value" value="upgrade-insecure-requests; 
style-src-elem 'self' 'unsafe-inline'; style-src 'self'; img-src 'self' data:; 
script-src-elem 'self'; default-src 'none'; object-src 'none'; frame-ancestors 
'none'; base-uri 'none';" />
+                </bean>
             </list>
         </property>
     </bean>
diff --git a/assembly/src/release/webapps/index.html 
b/assembly/src/release/webapps/index.html
index 0833260962..cdfac1b98a 100644
--- a/assembly/src/release/webapps/index.html
+++ b/assembly/src/release/webapps/index.html
@@ -25,14 +25,9 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";> 
 <html> 
 <head> 
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
-    <title>Apache ActiveMQ</title> 
-    <style type="text/css" media="screen"> 
-        @import url(/styles/sorttable.css);
-        @import url(/styles/type-settings.css);
-        @import url(/styles/site.css);
-        @import url(/styles/prettify.css);
-    </style> 
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>Apache ActiveMQ</title>
+    <link rel="stylesheet" media="screen" href="/styles/head.css" />
 </head> 
  
 <body> 
@@ -54,10 +49,10 @@
                     <!-- Banner --> 
                     <div id="asf_logo"> 
                         <div id="activemq_logo"> 
-                            <a style="float:left; 
width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:10px; margin-left:100px;"
+                            <a class="header-logo-active-mq"
                                href="http://activemq.apache.org/";
                                title="The most popular and powerful open 
source Message Broker">ActiveMQ</a> 
-                            <a style="float:right; 
width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px;
 margin-top:15px; margin-right:10px;"
+                            <a class="header-logo-apache"
                                href="http://www.apache.org/"; title="The Apache 
Software Foundation">ASF</a> 
                         </div> 
                     </div> 
@@ -75,7 +70,7 @@
                     <table border="0"> 
                         <tbody> 
                             <tr> 
-                                <td valign="top" width="100%" 
style="overflow:hidden;"> 
+                                <td valign="top" width="100%" 
class="body-container">
                                     <div class="body-content"> 
                                         <h2>Welcome to the Apache 
ActiveMQ!</h2> 
                                             


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact



Reply via email to