activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [3/6] activemq-artemis git commit: ARTEMIS-1270 Management Console - Hawtio Solution
Date Tue, 01 Aug 2017 20:18:08 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/login-screen-logo.png
----------------------------------------------------------------------
diff --git a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/login-screen-logo.png
b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/login-screen-logo.png
new file mode 100644
index 0000000..d40baee
Binary files /dev/null and b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/login-screen-logo.png
differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/logo.png
----------------------------------------------------------------------
diff --git a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/logo.png b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/logo.png
new file mode 100644
index 0000000..d61b38e
Binary files /dev/null and b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/img/logo.png
differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/plugin.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/plugin.js b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/plugin.js
new file mode 100644
index 0000000..0277c21
--- /dev/null
+++ b/artemis-hawtio/activemq-branding/src/main/webapp/plugin/js/plugin.js
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+/**
+ * The activemq hawtio theme
+ *
+ * @module activemqBranding
+ * @main activemq
+ */
+var activemqBranding = (function (self) {
+
+    self.log = Logger.get("activemq");
+    self.context = '../activemq-branding/';
+    self.pluginName = 'hawtio-activemq-branding';
+
+    hawtioPluginLoader.registerPreBootstrapTask(function (task) {
+        Themes.definitions['activemq'] = {
+            label: 'activemq',
+            file: self.context + 'plugin/css/activemq.css',
+            loginBg: self.context + 'plugin/img/apache-login-background.jpg'
+        };
+        var localStorage = Core.getLocalStorage();
+        if (!('theme' in localStorage)) {
+            localStorage['theme'] = 'activemq';
+        }
+        Themes.brandings['activemq'] = {
+            label: 'activemq',
+            setFunc: function(branding) {
+                branding.appName = 'Management Console';
+                branding.appLogo = self.context + 'plugin/img/activemq.png';
+                branding.logoOnly = false;
+                branding.fullscreenLogin = true;
+                branding.css = self.context + 'plugin/css/branding.css';
+                branding.favicon = self.context + 'plugin/img/favicon.png';
+                branding.welcomePageUrl = self.context + 'plugin/doc/welcome.md';
+                return branding;
+            }
+        }
+        if (!('branding' in localStorage)) {
+            localStorage['branding'] = 'activemq';
+        }
+        task();
+    });
+
+    self.module = angular.module(self.pluginName, ['hawtioCore']);
+    self.module.run(function (branding) {
+        self.log.debug("ActivMQ theme loaded");
+    });
+
+    hawtioPluginLoader.addModule(self.pluginName);
+    return self;
+})(activemqBranding || {});
+

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-hawtio/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-hawtio/pom.xml b/artemis-hawtio/pom.xml
new file mode 100644
index 0000000..a12046d
--- /dev/null
+++ b/artemis-hawtio/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.activemq</groupId>
+        <artifactId>artemis-pom</artifactId>
+        <version>2.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>artemis-hawtio-pom</artifactId>
+    <name>ActiveMQ Artemis HawtIO</name>
+
+    <!-- hawtio plugins are almost always war files -->
+    <packaging>pom</packaging>
+
+    <properties>
+
+        <activemq.basedir>${project.basedir}/..</activemq.basedir>
+
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        
+        <hawtio.version>1.5.2</hawtio.version>
+        <jline.version>3.2.0</jline.version>
+        <jolokia-version>1.3.6</jolokia-version>
+        <junit-version>4.11</junit-version>
+        <log4j-version>1.2.17</log4j-version>
+        <maven-version>3.0.4</maven-version>
+        <maven-antrun-plugin-version>1.7</maven-antrun-plugin-version>
+        <maven-bundle-plugin-version>3.0.1</maven-bundle-plugin-version>
+        <maven-plugin-version>3.3</maven-plugin-version>
+        <maven-source-plugin-version>2.1.2</maven-source-plugin-version>
+        <maven-resources-plugin-version>2.6</maven-resources-plugin-version>
+        <maven-surefire-plugin-version>2.19.1</maven-surefire-plugin-version>
+        <servlet-api-version>2.5</servlet-api-version>
+
+        <!-- use slf4j-api 1.6.x to be easy compatible with older Karaf/Camel releases
-->
+        <slf4j-api-version>1.6.6</slf4j-api-version>
+        <slf4j-version>1.7.21</slf4j-version>
+
+        <war-plugin-version>2.1.1</war-plugin-version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <!-- we only need to embed this dependency in the war, this contains
+              a nice helper class that our plugin can use to export it's plugin
+              mbean -->
+            <dependency>
+                <groupId>io.hawt</groupId>
+                <artifactId>hawtio-plugin-mbean</artifactId>
+                <version>${hawtio.version}</version>
+            </dependency>
+
+            <!-- servlet API is provided by the container -->
+            <dependency>
+                <groupId>javax.servlet</groupId>
+                <artifactId>servlet-api</artifactId>
+                <version>${servlet-api-version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+            <!-- logging -->
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${slf4j-version}</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-log4j12</artifactId>
+                <version>${slf4j-version}</version>
+                <scope>provided</scope>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+    <modules>
+        <module>activemq-branding</module>
+    </modules>
+
+</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-server/src/main/resources/schema/artemis-configuration.xsd
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index fb1d147..87ec201 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -22,8 +22,17 @@
             elementFormDefault="qualified"
             version="1.0">
 
+   <xsd:element name="imports">
+      <xsd:complexType>
+         <xsd:sequence>
+            <xsd:element name="import" maxOccurs="unbounded" type="xsd:string"/>
+         </xsd:sequence>
+         <xsd:attribute name="type"/>
+      </xsd:complexType>
+   </xsd:element>
+   
    <xsd:element name="core" type="configurationType"/>
-
+   
    <xsd:complexType name="configurationType">
       <xsd:all>
          <xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="0">

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index ddff9af..221468a 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -58,7 +58,7 @@ import org.junit.Test;
 
 public class FileConfigurationTest extends ConfigurationImplTest {
 
-   private final String fullConfigurationName = "ConfigurationTest-full-config.xml";
+   private final String fullConfigurationName = "configurationImport.xml";
 
    @Override
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
----------------------------------------------------------------------
diff --git a/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
b/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
index ae3592e..ec60aeb 100644
--- a/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
+++ b/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
@@ -54,4 +54,8 @@ public interface ActiveMQWebLogger extends BasicLogger {
    @LogMessage(level = Logger.Level.WARN)
    @Message(id = 244003, value = "Temporary file not deleted on shutdown: {0}", format =
Message.Format.MESSAGE_FORMAT)
    void tmpFileNotDeleted(File tmpdir);
+
+   @LogMessage(level = Logger.Level.INFO)
+   @Message(id = 241004, value = "Artemis Hawtio available at {0}", format = Message.Format.MESSAGE_FORMAT)
+   void hawtioAvailable(String bind);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
----------------------------------------------------------------------
diff --git a/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
b/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
index 601ea4c..59ad7b6 100644
--- a/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
+++ b/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
@@ -55,6 +55,7 @@ public class WebServerComponent implements ExternalComponent {
    private WebServerDTO webServerConfig;
    private URI uri;
    private String jolokiaUrl;
+   private String hawtioUrl;
    private List<WebAppContext> webContexts;
    private ServerConnector connector;
 
@@ -105,6 +106,9 @@ public class WebServerComponent implements ExternalComponent {
             if (app.war.startsWith("jolokia")) {
                jolokiaUrl = webServerConfig.bind + "/" + app.url;
             }
+            if (app.war.startsWith("hawtio")) {
+               hawtioUrl = webServerConfig.bind + "/" + app.url;
+            }
          }
       }
 
@@ -136,6 +140,9 @@ public class WebServerComponent implements ExternalComponent {
       if (jolokiaUrl != null) {
          ActiveMQWebLogger.LOGGER.jolokiaAvailable(jolokiaUrl);
       }
+      if (hawtioUrl != null) {
+         ActiveMQWebLogger.LOGGER.hawtioAvailable(hawtioUrl);
+      }
    }
 
    public void internalStop() throws Exception {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cadf909f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1035f69..41db888 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,7 @@
       <module>artemis-jdbc-store</module>
       <module>artemis-maven-plugin</module>
       <module>artemis-server-osgi</module>
+      <module>artemis-hawtio</module>
       <module>integration/activemq-spring-integration</module>
       <module>artemis-distribution</module>
       <module>artemis-tools</module>


Mime
View raw message