Skip to content

Commit

Permalink
fix base-path
Browse files Browse the repository at this point in the history
relate to #46
  • Loading branch information
tchiotludo committed Apr 15, 2019
1 parent 0704d8c commit 71a03fb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ cache:

script:
- set -e
# Docker Login
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Gradle
- ./gradlew --console=plain test
- ./gradlew --console=plain shadowJar
Expand All @@ -32,14 +30,17 @@ script:
- docker build . -t $TRAVIS_COMMIT
# Docker Tag
- if [ ! -z "$TRAVIS_TAG" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
docker tag $TRAVIS_COMMIT tchiotludo/kafkahq:$TRAVIS_TAG;
docker push tchiotludo/kafkahq:$TRAVIS_TAG;
fi
# Docker Branch
- if [ "$TRAVIS_BRANCH" == "master" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
docker tag $TRAVIS_COMMIT tchiotludo/kafkahq:latest;
docker push tchiotludo/kafkahq:latest;
elif [ "$TRAVIS_BRANCH" == "dev" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
docker tag $TRAVIS_COMMIT tchiotludo/kafkahq:$TRAVIS_BRANCH;
docker push tchiotludo/kafkahq:$TRAVIS_BRANCH;
fi
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/org/kafkahq/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@
import io.micronaut.runtime.Micronaut;

public class App {
// route
{
/*
use(new Whoops());
use("*", new RequestLogger()
.latency()
.extended()
);
assets("/favicon.ico");
});
*/
}

public static void main(String[] args) {
Micronaut.run(App.class);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kafkahq/controllers/SchemaController.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public HttpResponse createSubmit(String cluster,
URI redirect;

if (toast.getType() != Toast.Type.error) {
redirect = new URI("/" + cluster + "/schema/" + subject);
redirect = this.uri("/" + cluster + "/schema/" + subject);
} else {
redirect = new URI("/" + cluster + "/schema/create");
redirect = this.uri("/" + cluster + "/schema/create");
}

return response.status(HttpStatus.MOVED_PERMANENTLY)
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/views/errors/notFound.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</p>

<div class="text-right mt-5">
<a href="/" class="btn btn-primary btn-lg">Back to home</a>
<a href="${basePath}" class="btn btn-primary btn-lg">Back to home</a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/views/includes/template.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
${username} (Logout)
</a>
<#else>
<a href="${basePath}/login">
<a href="${basePath}/login" data-turbolinks="false">
<i class="fa fa-fw fa-sign-in" aria-hidden="true"></i>
Login
</a>
Expand Down

0 comments on commit 71a03fb

Please sign in to comment.