Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
topframe committed Jan 12, 2025
1 parent d1d2889 commit f2300ce
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 49 deletions.
8 changes: 1 addition & 7 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<automatic.module.name>com.aspectran.aspectow.appmon.backend</automatic.module.name>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aspectran-with-logback</artifactId>
<version>${aspectran.version}</version>
<type>pom</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aspectran-web</artifactId>
Expand Down
16 changes: 9 additions & 7 deletions backend/src/main/java/com/aspectran/aspectow/appmon/AboutMe.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public abstract class AboutMe {
pkg.getImplementationVersion() != null) {
VERSION = pkg.getImplementationVersion();
} else {
VERSION = System.getProperty("appmon.version", "1.0.x(20250111)");
VERSION = System.getProperty("appmon.version", "1.0.x");
}

POWERED_BY = "Powered by Aspectran " + VERSION;
POWERED_BY_LINK = "<a href=\"https://aspectran.com\">Powered by Aspectran " + VERSION + "</a>";

// Show warning when RC# or M# is in version string
STABLE = !VERSION.matches("^.*\\.(RC|M)[0-9]+$");
STABLE = !VERSION.matches("^.*[.-](RC|M|SNAPSHOT)[0-9]?$");
}

public static String getVersion() {
Expand All @@ -66,9 +66,10 @@ public static String getPoweredByLink() {
* Prints Aspectran information to the specified print stream.
* @param output a {@link PrintStream} object to print
*/
public static void printAboutMe(PrintStream output) {
public static void print(PrintStream output) {
Assert.notNull(output, "output must not be null");
output.println("Aspectran: " + VERSION);
output.println("Aspectran: " + com.aspectran.core.AboutMe.VERSION);
output.println("AppMon: " + VERSION);
output.println("JVM: " + System.getProperty("java.vm.name") + " (build " +
System.getProperty("java.vm.version") + ", " + System.getProperty("java.vm.info") + ")");
output.println("OS: " + System.getProperty("os.name") + " " +
Expand All @@ -79,10 +80,11 @@ public static void printAboutMe(PrintStream output) {
* Prints Aspectran information to the specified print stream.
* @param output a {@link PrintStream} object to print
*/
public static void printPrettyAboutMe(@NonNull PrintStream output) {
public static void printPretty(PrintStream output) {
Assert.notNull(output, "output must not be null");
output.println("---------------------------------------------------------------------");
output.printf(" %1$-9s : %2$s%n", "Aspectran", VERSION);
output.printf(" %1$-9s : %2$s%n", "Aspectran", com.aspectran.core.AboutMe.VERSION);
output.printf(" %1$-9s : %2$s%n", "AppMon", VERSION);
output.printf(" %1$-9s : %2$s%n", "JVM", System.getProperty("java.vm.name") + " (build " +
System.getProperty("java.vm.version") + ", " + System.getProperty("java.vm.info") + ")");
output.printf(" %1$-9s : %2$s%n", "OS", System.getProperty("os.name") + " " +
Expand All @@ -95,7 +97,7 @@ public static void printPrettyAboutMe(@NonNull PrintStream output) {
* @param args a string array containing the command line arguments
*/
public static void main(String[] args) {
printPrettyAboutMe(System.out);
printPretty(System.out);
}

}
12 changes: 6 additions & 6 deletions demo/app/webapps/appmon/WEB-INF/jsp/appmon/appmon.jsp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://aspectran.com/tags" prefix="aspectran" %>
<link rel="stylesheet" href="<aspectran:url value="/assets/appmon/css/appmon.css?${page.version}"/>">
<script src="<aspectran:url value="/assets/countries/countries.js?${page.version}"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/front-builder.js?${page.version}"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/front-viewer.js?${page.version}"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/websocket-client.js?${page.version}"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/polling-client.js?${page.version}"/>"></script>
<link rel="stylesheet" href="<aspectran:url value="/assets/appmon/css/appmon.css?20250112"/>">
<script src="<aspectran:url value="/assets/countries/countries.js?20250112"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/front-builder.js?20250112"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/front-viewer.js?20250112"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/websocket-client.js?20250112"/>"></script>
<script src="<aspectran:url value="/assets/appmon/js/polling-client.js?20250112"/>"></script>
<div class="grid-x endpoint-box compact horizontal">
<div class="cell options t10 b5">
<ul class="speed-options">
Expand Down
2 changes: 1 addition & 1 deletion demo/app/webapps/appmon/WEB-INF/jsp/templates/default.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<p>Copyright © 2018-2025 The Aspectran Project</p>
</section>
<section id="subfooter-right" class="medium-6 cell social-icons text-right">
<%= com.aspectran.core.Aspectran.POWERED_BY_LINK %>
<%= com.aspectran.core.AboutMe.POWERED_BY_LINK %>
</section>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/app/webapps/root/WEB-INF/jsp/templates/default.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<p class="credits">Copyright © 2018-2025 The Aspectran Project</p>
</section>
<section id="subfooter-right" class="medium-6 cell">
<%= com.aspectran.core.Aspectran.POWERED_BY_LINK %>
<%= com.aspectran.core.AboutMe.POWERED_BY_LINK %>
</section>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/app/webapps/root/WEB-INF/jsp/templates/frame.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<p class="credits">Copyright © 2018-2025 The Aspectran Project</p>
</section>
<section id="subfooter-right" class="medium-6 cell">
<%= com.aspectran.core.Aspectran.POWERED_BY_LINK %>
<%= com.aspectran.core.AboutMe.POWERED_BY_LINK %>
</section>
</nav>
</div>
Expand Down
1 change: 1 addition & 0 deletions demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<automatic.module.name>com.aspectran.aspectow.appmon.demo</automatic.module.name>
</properties>

<dependencies>
Expand Down
21 changes: 2 additions & 19 deletions front/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,15 @@
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Aspectow AppMon Frontend</name>
<name>Aspectow AppMon Front</name>
<description>AppMon provides an integrated view to observe logs and events of Aspectran-based application servers in real time.</description>

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<automatic.module.name>com.aspectran.aspectow.appmon.front</automatic.module.name>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aspectran-with-logback</artifactId>
<version>${aspectran.version}</version>
<type>pom</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aspectran-web</artifactId>
<version>${aspectran.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aspectran-with-undertow</artifactId>
<version>${aspectran.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aspectow-appmon-backend</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ public Map<String, String> front(@NonNull Translet translet, String token, Strin
try {
appMonManager.validateToken(token);
} catch (InvalidPBTokenException e) {
if (logger.isDebugEnabled()) {
logger.debug(e);
}
translet.redirect("../../../");
translet.redirect("/../");
return null;
}
return Map.of(
Expand Down
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@

<properties>
<main.basedir>${project.basedir}</main.basedir>
<automatic.module.name/>

<compiler.source>17</compiler.source>
<compiler.target>17</compiler.target>
Expand Down Expand Up @@ -261,9 +262,10 @@
<archive>
<index>true</index>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
<Specification-Version>1234</Specification-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
Expand Down

0 comments on commit f2300ce

Please sign in to comment.