Skip to content

Commit

Permalink
Clean POM file
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed Dec 2, 2024
1 parent dc0e56e commit cd2280d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<mainClass>com.lbry.globe.Main</mainClass>
</manifest>
<manifestEntries>
Expand All @@ -36,11 +38,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
</plugins>
</build>

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/lbry/globe/handler/HTTPHandler.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lbry.globe.handler;

import com.lbry.globe.Main;
import com.lbry.globe.api.API;

import io.netty.buffer.ByteBuf;
Expand Down Expand Up @@ -62,6 +63,7 @@ private void handleResponse(ChannelHandlerContext ctx){
status = 500;
indexData = "Some error occured.".getBytes();
}
indexData = new String(indexData).replace("<div class=\"version\"></div>","<div class=\"version\">"+Main.class.getPackage().getImplementationVersion()+"</div>").getBytes();
ByteBuf responseContent = Unpooled.copiedBuffer(indexData);
FullHttpResponse response = new DefaultFullHttpResponse(request.protocolVersion(),HttpResponseStatus.valueOf(status),responseContent);
response.headers().add("Content-Length",responseContent.capacity());
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
left:0;
top:0;
}
.version{
bottom:0;
color:white;
padding:8px;
position:absolute;
left:0;
}
</style>
<title>LBRY Globe</title>
</head>
Expand All @@ -32,6 +39,7 @@
<div id="info-nodes-hub"></div>
<div id="info-nodes-total"></div>
</div>
<div class="version"></div>
<script>
const globe = Globe();

Expand Down

0 comments on commit cd2280d

Please sign in to comment.