Skip to content

Commit 146b473

Browse files
authored
POC properly define links (#137)
* POC properly define links * Rewrite more links * [ISSUE-136] Rewrite view/index page + add test coverage * rewrite /stream template urls + simple test coverage * rewrite home controller template linkes + test coverage * rewrite /cluster templates + test coverage * rewrite more templates * Rewrite user edit template * Reduce debug output on tests * add test logging config * add test logging config * add test logging config * more cleanup * more cleanup * Cleanup * Cleanup
1 parent e510529 commit 146b473

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+861
-202
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
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+
## 2.1.4 (UNRELEASED)
6+
- [ISSUE-136](https://github.com/SourceLabOrg/kafka-webview/issues/136) Incomplete fix for running Kafka-Webview behind a reverse proxy. Additional work needs to be done to completely resolve this issue.
7+
58
## 2.1.3 (01/19/2019)
69

710
#### Bug fixes

dev-cluster/pom.xml

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

1212
<artifactId>dev-cluster</artifactId>
13-
<version>2.1.3</version>
13+
<version>2.1.4</version>
1414

1515
<!-- Require Maven 3.3.9 -->
1616
<prerequisites>

dev-cluster/src/main/java/org/sourcelab/kafka/devcluster/LdapServer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig;
2929
import com.unboundid.ldap.listener.InMemoryListenerConfig;
3030
import com.unboundid.ldap.sdk.LDAPException;
31+
import com.unboundid.ldap.sdk.OperationType;
3132
import org.slf4j.Logger;
3233
import org.slf4j.LoggerFactory;
3334

@@ -55,7 +56,9 @@ public static void main(final String[] args) throws LDAPException, InterruptedEx
5556
);
5657

5758
// Require bind username and password
58-
config.addAdditionalBindCredentials("cn=BindUser", "password");
59+
// config.setAuthenticationRequiredOperationTypes(
60+
// OperationType.values()
61+
// );
5962

6063
final String ldifFile = LdapServer.class.getClassLoader().getResource("test-server.ldif").getFile();
6164

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>2.1.3</version>
8+
<version>2.1.4</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>2.1.3</version>
8+
<version>2.1.4</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>kafka-webview-ui</artifactId>
12-
<version>2.1.3</version>
12+
<version>2.1.4</version>
1313

1414
<!-- Module Description and Ownership -->
1515
<name>Kafka WebView UI</name>

kafka-webview-ui/src/main/resources/templates/404.html

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
-->
88
<!DOCTYPE html>
99
<html
10-
lang="en"
11-
xmlns:th="http://www.thymeleaf.org">
10+
lang="en"
11+
xmlns:th="http://www.thymeleaf.org">
1212

1313
<head>
1414
<meta charset="utf-8">
@@ -19,39 +19,39 @@
1919
<meta name="keyword" content="Kafka WebView">
2020
<meta name="_csrf" th:content="${_csrf.token}"/>
2121
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
22-
<link rel="shortcut icon" href="/img/favicon.png">
22+
<link rel="shortcut icon" th:href="@{/img/favicon.png}">
2323
<title>Error!</title>
2424

2525
<!-- Icons -->
26-
<link href="/vendors/css/font-awesome.min.css" rel="stylesheet">
27-
<link href="/vendors/css/simple-line-icons.min.css" rel="stylesheet">
26+
<link th:href="@{/vendors/css/font-awesome.min.css}" rel="stylesheet">
27+
<link th:href="@{/vendors/css/simple-line-icons.min.css}" rel="stylesheet">
2828

2929
<!-- Main styles for this application -->
30-
<link href="/css/style.css" rel="stylesheet">
31-
<link href="/css/jquery-ui.min.css" rel="stylesheet">
32-
<link href="/css/jquery-ui-timepicker-addon.min.css" rel="stylesheet">
30+
<link th:href="@{/css/style.css}" rel="stylesheet">
31+
<link th:href="@{/css/jquery-ui.min.css}" rel="stylesheet">
32+
<link th:href="@{/css/jquery-ui-timepicker-addon.min.css}" rel="stylesheet">
3333

3434
<!-- Bootstrap and necessary plugins -->
35-
<script src="/vendors/js/jquery.min.js"></script>
36-
<script src="/vendors/js/popper.min.js"></script>
37-
<script src="/vendors/js/bootstrap.min.js"></script>
38-
<script src="/vendors/js/pace.min.js"></script>
35+
<script th:src="@{/vendors/js/jquery.min.js}"></script>
36+
<script th:src="@{/vendors/js/popper.min.js}"></script>
37+
<script th:src="@{/vendors/js/bootstrap.min.js}"></script>
38+
<script th:src="@{/vendors/js/pace.min.js}"></script>
3939

4040
<!-- Plugins and scripts required by all views -->
41-
<script src="/vendors/js/Chart.min.js"></script>
41+
<script th:src="@{/vendors/js/Chart.min.js}"></script>
4242

4343
<!-- Handlebars -->
44-
<script src="/vendors/js/handlebars.min.js"></script>
44+
<script th:src="@{/vendors/js/handlebars.min.js}"></script>
4545

4646
<!-- Fancy Multi-select -->
47-
<script src="/js/multiselect.min.js"></script>
47+
<script th:src="@{/js/multiselect.min.js}"></script>
4848

4949
<!-- Fancy DateTime -->
50-
<script src="/js/jquery-ui.min.js"></script>
51-
<script src="/js/jquery-ui-timepicker-addon.min.js"></script>
50+
<script th:src="@{/js/jquery-ui.min.js}"></script>
51+
<script th:src="@{/js/jquery-ui-timepicker-addon.min.js}"></script>
5252

5353
<!-- GenesisUI main scripts -->
54-
<script src="/js/app.js"></script>
54+
<script th:src="@{/js/app.js}"></script>
5555
</head>
5656

5757
<body class="app flex-row align-items-center">

kafka-webview-ui/src/main/resources/templates/cluster/index.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html
33
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
4+
xmlns:th="http://www.thymeleaf.org"
45
layout:decorate="~{layout}">
56

67
<head>
@@ -10,7 +11,12 @@
1011
<body>
1112
<section layout:fragment="content">
1213
<div class="container">
13-
<div class="row">
14+
<div th:replace="fragments/noKafkaClustersFound :: display(${clusterList})">
15+
<!-- Display no kafka clusters found -->
16+
</div>
17+
18+
<div class="row" th:if="${not clusterList.isEmpty()}">
19+
<!-- Clusters found -->
1420
<div class="col-lg-12">
1521
<div class="card">
1622
<div class="card-header">
@@ -29,10 +35,10 @@
2935
<tbody>
3036
<tr th:each="cluster : ${clusterList}">
3137
<td>
32-
<a th:href="'/cluster/' + ${cluster.id}" th:text="${cluster.name}"></a>
38+
<a th:href="@{/cluster/{id}(id=${cluster.id})}" th:text="${cluster.name}"></a>
3339
</td>
3440
<td>
35-
<a th:href="'/view?clusterId=' + ${cluster.id}" th:text="${viewsByClusterId.get(cluster.getId())} + ' Views'"></a>
41+
<a th:href="@{/view?clusterId={id}(id=${cluster.id})}" th:text="${viewsByClusterId.get(cluster.getId())} + ' Views'"></a>
3642
</td>
3743
<td>
3844
<span

kafka-webview-ui/src/main/resources/templates/configuration/cluster/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html
33
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
4+
xmlns:th="http://www.thymeleaf.org"
45
layout:decorate="~{layout}">
56

67
<head>
@@ -17,7 +18,7 @@
1718
<i class="fa fa-align-justify"></i>
1819
Kafka Clusters
1920
<div class="btn-group float-right" role="group" aria-label="Button group">
20-
<a class="btn" href="/configuration/cluster/create" style="padding-bottom: 0;">
21+
<a class="btn" th:href="@{/configuration/cluster/create}" style="padding-bottom: 0;">
2122
<i class="icon-settings"></i>
2223
&nbsp;Create new
2324
</a>

kafka-webview-ui/src/main/resources/templates/configuration/filter/create.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<i class="fa fa-dot-circle-o"></i>
7575
Submit
7676
</button>
77-
<a class="btn btn-sm btn-danger" href="/configuration/filter" role="button">
77+
<a class="btn btn-sm btn-danger" th:href="@{/configuration/filter}" role="button">
7878
<i class="fa fa-ban"></i>
7979
Cancel
8080
</a>

kafka-webview-ui/src/main/resources/templates/configuration/filter/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html
33
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
4+
xmlns:th="http://www.thymeleaf.org"
45
layout:decorate="~{layout}">
56

67
<head>
@@ -18,12 +19,12 @@
1819
Filters
1920

2021
<div class="btn-group float-right" role="group" aria-label="Button group">
21-
<a class="btn" href="/help#filters" style="padding-bottom: 0;">
22+
<a class="btn" th:href="@{/help#filters}" style="padding-bottom: 0;">
2223
<i class="icon-question"></i>
2324
&nbsp; Help
2425
</a>
2526

26-
<a class="btn" href="/configuration/filter/create" style="padding-bottom: 0;">
27+
<a class="btn" th:href="@{/configuration/filter/create}" style="padding-bottom: 0;">
2728
<i class="icon-settings"></i>
2829
&nbsp;Create new
2930
</a>

0 commit comments

Comments
 (0)