Skip to content

Commit 4b97961

Browse files
authored
Fix 500 error unable to find templates when running under windows (#56)
* Fix 500 error unable to find templates when running under windows * add start.bat for windows
1 parent 658d559 commit 4b97961

File tree

8 files changed

+24
-12
lines changed

8 files changed

+24
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
The format is based on [Keep a Changelog](http://keepachangelog.com/)
33
and this project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## 1.0.2 (01/26/2018
5+
## 1.0.3 (01/26/2018)
6+
- Fix 500 error unable to find templates when running under windows.
7+
- Add start.bat script for running under windows.
8+
9+
## 1.0.2 (01/26/2018)
610
- Increase file upload limit from 15MB to 64MB.
711

812
## 1.0.1 (01/17/2018)

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ FROM openjdk:8-jre-alpine
44
# Dockerfile author / maintainer
55
MAINTAINER SourceLab.org <stephen.powis@gmail.com>
66

7+
## Define version to install
8+
ENV WV_VER=1.0.2
9+
710
# Create app and data directories
811
RUN mkdir -p /app
912
WORKDIR /app
1013

1114
# Download latest distribution inside image
1215
# Extract package into /app stripping top level directory contained within the zip.
13-
RUN wget https://github.com/SourceLabOrg/kafka-webview/releases/download/v1.0.2/kafka-webview-ui-1.0.2-bin.zip && unzip -d /app kafka-webview-ui-*-bin.zip && rm -f /app/kafka-webview-ui-*-bin.zip && f=`ls` && mv /app/*/* /app && rmdir $f && rm -f /app/kafka-webview-ui-*-sources.jar && rm -f /app/kafka-webview-ui-*-javadoc.jar && apk add --update bash && rm -rf /var/cache/apk/*
16+
RUN wget https://github.com/SourceLabOrg/kafka-webview/releases/download/v${WV_VER}/kafka-webview-ui-${WV_VER}-bin.zip && unzip -d /app kafka-webview-ui-*-bin.zip && rm -f /app/kafka-webview-ui-*-bin.zip && f=`ls` && mv /app/*/* /app && rmdir $f && rm -f /app/kafka-webview-ui-*-sources.jar && rm -f /app/kafka-webview-ui-*-javadoc.jar && apk add --update bash && rm -rf /var/cache/apk/*
1417

1518
# Create volume to persist data
1619
VOLUME /app/data

kafka-webview-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sourcelab</groupId>
77
<artifactId>kafka-webview</artifactId>
8-
<version>1.0.2</version>
8+
<version>1.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>kafka-webview-plugin</artifactId>

kafka-webview-ui/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<parent>
66
<artifactId>kafka-webview</artifactId>
77
<groupId>org.sourcelab</groupId>
8-
<version>1.0.2</version>
8+
<version>1.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>kafka-webview-ui</artifactId>
12-
<version>1.0.2</version>
12+
<version>1.0.3</version>
1313

1414
<!-- Module Description and Ownership -->
1515
<name>Kafka WebView UI</name>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Define configuration
2+
set SPRING_CONFIG_LOCATION=classpath:/config/base.yml,config.yml
3+
4+
## launch webapp
5+
java -jar kafka-webview-ui-*.jar

kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/controller/configuration/filter/FilterConfigController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public String update(
157157
bindingResult.addError(new FieldError(
158158
"filterForm", "file", "", true, null, null, "Select a jar to upload")
159159
);
160-
return "/configuration/filter/create";
160+
return "configuration/filter/create";
161161
}
162162

163163
// If filter exists
@@ -191,7 +191,7 @@ public String update(
191191
null,
192192
"Filter must have unique name")
193193
);
194-
return "/configuration/filter/create";
194+
return "configuration/filter/create";
195195
}
196196
}
197197

@@ -205,7 +205,7 @@ public String update(
205205
bindingResult.addError(new FieldError(
206206
"filterForm", "file", "", true, null, null, "File must have a .jar extension")
207207
);
208-
return "/configuration/filter/create";
208+
return "configuration/filter/create";
209209
}
210210

211211
try {
@@ -232,7 +232,7 @@ public String update(
232232
bindingResult.addError(new FieldError(
233233
"filterForm", "file", "", true, null, null, exception.getMessage())
234234
);
235-
return "/configuration/filter/create";
235+
return "configuration/filter/create";
236236
}
237237

238238
// If successful overwrite original jar

kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/controller/configuration/messageformat/MessageFormatController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public String create(
188188
bindingResult.addError(new FieldError(
189189
"messageFormatForm", "file", "", true, null, null, "Select a jar to upload")
190190
);
191-
return "/configuration/messageFormat/create";
191+
return "configuration/messageFormat/create";
192192
}
193193

194194
// If filter exists
@@ -233,7 +233,7 @@ public String create(
233233
"messageFormatForm", "file", "", true, null, null, exception.getMessage())
234234
);
235235
// And re-display the form.
236-
return "/configuration/messageFormat/create";
236+
return "configuration/messageFormat/create";
237237
}
238238
// Ok new JAR looks good.
239239
// 1 - remove pre-existing jar if it exists

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>org.sourcelab</groupId>
88
<artifactId>kafka-webview</artifactId>
99
<packaging>pom</packaging>
10-
<version>1.0.2</version>
10+
<version>1.0.3</version>
1111

1212
<!-- Define submodules -->
1313
<modules>

0 commit comments

Comments
 (0)