Skip to content

Commit

Permalink
Merge pull request #63 from lodygens/12.2.4-webinterface
Browse files Browse the repository at this point in the history
12.2.4 webinterface
Resources are now stored in misc/ inside the jar file
  • Loading branch information
lodygens committed Jan 15, 2018
2 parents aa9c29c + 8342901 commit f8289ce
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=12.2.3
version=12.2.4
8 changes: 4 additions & 4 deletions src/main/java/xtremweb/common/XWConfigurator.java
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public XWConfigurator(final String cfn, final boolean firstTime) {
InputStream def = null;

if ((configFile == null) || (!configFile.exists())) {
def = getClass().getResourceAsStream("/data/config.defaults");
def = getClass().getResourceAsStream("/misc/config.defaults");
} else {
def = new FileInputStream(configFile);
}
Expand Down Expand Up @@ -841,7 +841,7 @@ else if (pSysEnv != null) {
try {
keyStoreFile = new File("xwhep" + XWRole.getMyRole().toString().toLowerCase() + ".keys");
setProperty(XWPropertyDefs.SSLKEYSTORE, keyStoreFile.getAbsolutePath());
extractResource("data/xwhep" + XWRole.getMyRole().toString().toLowerCase() + ".keys", keyStoreFile);
extractResource("misc/xwhep" + XWRole.getMyRole().toString().toLowerCase() + ".keys", keyStoreFile);
} catch (final Exception e) {
logger.exception(e);
keyStoreFile = null;
Expand Down Expand Up @@ -1279,10 +1279,10 @@ else if (pSysEnv != null) {

final File iconFile = new File("xw.ico");
try {
extractResource("data/" + iconFile, iconFile);
extractResource("misc/" + iconFile, iconFile);
} catch (final Exception e) {
try {
extractResource("data/" + iconFile, iconFile);
extractResource("misc/" + iconFile, iconFile);
} catch (final Exception e2) {
logger.exception("can't extract resource " + iconFile, e2);
useNotify = false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xtremweb/dispatcher/HTTPHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class HTTPHandler extends xtremweb.dispatcher.CommHandler {
* This is the resource path in the xtremweb java archive (xtremweb.jar) :
* "data"
*/
public static final String RESOURCE_PATH = "data";
public static final String RESOURCE_PATH = "misc";
/**
* This is the Bootstrap dashboard HTML file name : dashboard.html
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xtremweb/dispatcher/HTTPStatsHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class HTTPStatsHandler extends xtremweb.dispatcher.CommHandler {
private HttpServletRequest request;
private HttpServletResponse response;

private static String RES_SERVERSTATSHTML = "data/serverstats.html";
private static String RES_SERVERSTATSHTML = "misc/serverstats.html";

private static final Version CURRENTVERSION = CommonVersion.getCurrent();
private static final String CURRENTVERSIONSTRING = CURRENTVERSION.toString();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xtremweb/worker/HTTPStatHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ private void index() throws IOException {
response.setContentType("text/html");
response.setStatus(HttpServletResponse.SC_OK);

final String resname = "data/worker.html";
final String resname = "misc/worker.html";
final InputStream ls = getClass().getClassLoader().getResourceAsStream(resname);
if ((ls != null) && (ls.available() > 0)) {
String content = new String();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/xtremweb/worker/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ public void run() {

final Properties defaults = new Properties();

try (final InputStream def = this.getClass().getClassLoader().getResourceAsStream("data/config.defaults")) {
try (final InputStream def = this.getClass().getClassLoader().getResourceAsStream("misc/config.defaults")) {
if (def != null) {
defaults.load(def);
}
setConfig((XWConfigurator) args.getOption(CommandLineOptions.CONFIG));
config.store();
} catch (final Exception e) {
logger.fatal("can retreive config file");
logger.fatal("can retreive config file misc/config.defaults");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/docker/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ LABEL description="This creates a Docker image for the XWHEP client"

EXPOSE 4327

ENV XWVERSION "12.2.3"
ENV XWVERSION "12.2.4"


RUN apt-get update
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/docker/master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LABEL version="0.4"
LABEL description="This downloads and compiles XWHEP server"
EXPOSE 4321 4322 4323 443

ENV XWVERSION "12.2.3"
ENV XWVERSION "12.2.4"

# next is only to check file is present
# before getting time to apt-get update etc.
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/docker/master/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ END_OF_USAGE
trap fatal SIGINT SIGTERM


XWVERSION="12.2.3"
XWVERSION="12.2.4"
ROOTDIR="$(dirname "$0")"
SCRIPTNAME="$(basename "$0")"

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LABEL "author"="Oleg Lodygensky"
LABEL version="0.4"
LABEL description="This creates a Docker image for the XWHEP server"
EXPOSE 4321 4322 4323 443
ENV XWVERSION "12.2.3"
ENV XWVERSION "12.2.4"

ADD . /xwhep
WORKDIR /xwhep
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/docker/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LABEL version="0.3"
LABEL description="This creates a Docker image for the XWHEP worker"
EXPOSE 4324 443

ENV XWVERSION "12.2.3"
ENV XWVERSION "12.2.4"


#
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/misc/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@



<title>XtremWeb-HEP 12.2.3</title>
<title>XtremWeb-HEP 12.2.4</title>


<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down Expand Up @@ -72,7 +72,7 @@
class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.xtremweb-hep.org/">
XtremWeb-HEP 12.2.3
XtremWeb-HEP 12.2.4
</a>
</div>

Expand Down

0 comments on commit f8289ce

Please sign in to comment.