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

brusdev pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 902cb10  ARTEMIS-3485 Improve branding context init
902cb10 is described below

commit 902cb105cfdb7d2bf5007ee694a2316805634824
Author: Domenico Francesco Bruscino <[email protected]>
AuthorDate: Wed Sep 22 07:04:46 2021 +0200

    ARTEMIS-3485 Improve branding context init
---
 .../src/main/webapp/plugin/css/activemq.css         |  7 +++++++
 .../src/main/webapp/plugin/js/brandingPlugin.js     | 21 +++------------------
 artemis-hawtio/pom.xml                              |  2 +-
 3 files changed, 11 insertions(+), 19 deletions(-)

diff --git 
a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/css/activemq.css 
b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/css/activemq.css
index 6c93ca7..46c3ced 100644
--- a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/css/activemq.css
+++ b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/css/activemq.css
@@ -82,6 +82,13 @@ svg text {
     border-top: 3px solid #B21054;
 }
 
+/* Change the background image for Login page and About modal as well as text 
color etc*/
+.pf-c-login, .pf-c-about-modal-box__hero {
+    background-image: url("../img/login-screen-background.png");
+    background-size: cover;
+    --pf-c-form__label--Color: white;
+}
+
 .pf-c-login__main {
     grid-area: main;
     background-color: transparent;
diff --git 
a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/brandingPlugin.js 
b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/brandingPlugin.js
index 70c1505..b86c35a 100644
--- 
a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/brandingPlugin.js
+++ 
b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/brandingPlugin.js
@@ -19,7 +19,6 @@
  */
 var Branding = (function (Branding) {
 
-
   /**
    * The name of this plugin
    */
@@ -34,11 +33,9 @@ var Branding = (function (Branding) {
    * The top level path of this plugin on the server
    */
   Branding.contextPath = '/activemq-branding';
-  $.get("plugin", (data) => {
-    if (data.hasOwnProperty('activemq-branding')) {
-      Branding.contextPath = data['activemq-branding'].Context;
-    }
-  });
+  if (hawtioPluginLoader.getPlugins().hasOwnProperty(Branding.pluginName)) {
+    Branding.contextPath = 
hawtioPluginLoader.getPlugins()[Branding.pluginName]['Context'];
+  }
 
   /**
    * This plugin's AngularJS module instance.
@@ -86,18 +83,6 @@ var Branding = (function (Branding) {
     // favicon settings
     Core.applyBranding(configManager);
 
-    brandingStyle = `
-      <style type='text/css'>
-        /* Change the background image for Login page and About modal as well 
as text color etc */
-        .pf-c-login, .pf-c-about-modal-box__hero {
-          background-image: 
url("${Branding.contextPath}/plugin/img/login-screen-background.png");
-          background-size: cover;
-          --pf-c-form__label--Color: white;
-        }
-      </style>
-    `;
-    $(brandingStyle).appendTo("head");
-
     Branding.log.info(Branding.pluginName, "loaded");
   }
   initPlugin.$inject = ['configManager', 'aboutService'];
diff --git a/artemis-hawtio/pom.xml b/artemis-hawtio/pom.xml
index edb1b09..0d5c4bc 100644
--- a/artemis-hawtio/pom.xml
+++ b/artemis-hawtio/pom.xml
@@ -35,7 +35,7 @@
 
         <activemq.basedir>${project.basedir}/..</activemq.basedir>
 
-        <hawtio.version>2.13.5</hawtio.version>
+        <hawtio.version>2.14.0</hawtio.version>
         <jline.version>3.2.0</jline.version>
         <junit-version>4.11</junit-version>
         <log4j-version>1.2.17</log4j-version>

Reply via email to