Skip to content

Commit e3e9d5a

Browse files
author
Anders Breid
authored
Update application.properties fro EI back-end to use URI, remove build.version (#281)
* Update to use uri. * Remove all traces of build.version
1 parent 37e5606 commit e3e9d5a

File tree

9 files changed

+10
-30
lines changed

9 files changed

+10
-30
lines changed

src/integrationtest/resources/integration-test.properties

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
spring.application.name=eiffel-intelligence
22

3-
# An extra optional version tag, version will be added after GitHub release version.
4-
# Example if build.version=1.2.3-internal becomes Version 0.0.18 (1.2.3-internal)
5-
build.version=
6-
73
# Port where Eiffel Intelligence will run
84
server.port: 8090
95

@@ -42,16 +38,9 @@ rabbitmq.binding.key:#
4238
rabbitmq.waitlist.queue.suffix:waitlist
4339

4440
# Details for connection to mongoDB database
45-
spring.data.mongodb.host: localhost
46-
spring.data.mongodb.port: 27017
47-
#spring.data.mongodb.username:
48-
#spring.data.mongodb.password:
49-
# Check configuration documentation for using jasypt encrypted passswords
41+
spring.data.mongodb.uri: mongodb://localhost:27017
5042
spring.data.mongodb.database: eiffel_intelligence
51-
# We cannot have empty username and password property here
52-
# if these properties are empty, remove or comment them
53-
# spring.data.mongodb.username:
54-
# spring.data.mongodb.password:
43+
5544
# Configure the session storage expiration time for logged in users of Eiffel Intelligence front-end
5645
server.session-timeout: 1200
5746
# Configure the database collection name to store sessions

src/main/docker/env.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ export MAILSERVER_IMAGE="mailhog/mailhog"
1414
export REMREM_GENERATE_IMAGE="eiffelericsson/eiffel-remrem-generate:2.0.4"
1515
export REMREM_PUBLISH_IMAGE="eiffelericsson/eiffel-remrem-publish:2.0.2"
1616
export JENKINS_IMAGE="bitnami/jenkins:2.138.3"
17+
export LDAP_IMAGE="osixia/openldap:1.2.4"
18+
19+
# Update EI in docker-compose.yml to use spring.data.mongodb.uri when updating this image version to version 3+
1720
export EI_BACKEND_IMAGE="eiffelericsson/eiffel-intelligence-backend:2.0.0"
21+
# Update EI front-end in docker-compose.yml, remove ei.backend.instances.filepath= property when updating to EI-f version 3+
1822
export EI_FRONTEND_IMAGE="eiffelericsson/eiffel-intelligence-frontend:2.0.0"
19-
export LDAP_IMAGE="osixia/openldap:1.2.4"
2023

2124
export MONGODB_PORT=27017
2225
export RABBITMQ_AMQP_PORT=5672

src/main/java/com/ericsson/ei/frontend/WebController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public String testRules(Model model) {
5959
public String info(Model model, HttpServletRequest request) {
6060
model.addAttribute("frontendServiceUrl", frontEndUtils.getFrontEndServiceUrl());
6161
model.addAttribute("version", frontEndUtils.getVersion());
62-
model.addAttribute("applicationPropertiesVersion", frontEndUtils.getApplicationPropertiesVersion());
6362
model.addAttribute("frontendAppName", frontEndUtils.getApplicationName());
6463
return "information";
6564
}

src/main/java/com/ericsson/ei/frontend/config/ConfigurationLogger.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public void logAndCheckConfiguration() {
2727
+ "ei.frontend.service.host: " + env.getProperty("ei.frontend.service.host") + "\n"
2828
+ "ei.frontend.context.path: " + env.getProperty("ei.frontend.context.path") + "\n"
2929
+ "ei.use.secure.http.frontend: " + env.getProperty("ei.use.secure.http.frontend") + "\n"
30-
+ "ei.backend.instances.filepath: " + env.getProperty("ei.backend.instances.filepath") + "\n"
3130
+ "ei.backend.instances.list.json.content: " + env.getProperty("ei.backend.instances.list.json.content") + "\n"
3231
+ "ei.eiffel.documentation.urls: " + env.getProperty("ei.eiffel.documentation.urls") + "\n"
3332
+ "logging.level.root: " + env.getProperty("logging.level.root") + "\n"

src/main/java/com/ericsson/ei/frontend/utils/WebControllerUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ public class WebControllerUtils {
5252
@Value("${ei.eiffel.documentation.urls:#{null}}")
5353
private String eiffelDocumentationUrls;
5454

55-
@Value("${build.version:#{null}}")
56-
private String applicationPropertiesVersion;
57-
5855
private String version;
5956

6057
private String applicationName;

src/main/resources/application.properties

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# REST api returns json in pretty format with jackson
22
spring.jackson.default-property-inclusion=non_null
33

4-
# An extra optional version tag, version will be added after github release version
5-
# Example if build.version=1.2.3-internal becomes Version 0.0.18 (1.2.3-internal)
6-
#build.version=
7-
84
######## EI Front-End
95
server.port=8080
106
ei.frontend.service.port=${server.port}
@@ -19,7 +15,6 @@ ei.use.secure.http.frontend=false
1915
#server.ssl.key-alias: <tomcat>
2016

2117
######## EI Default Back-Ends
22-
ei.backend.instances.filepath=
2318
#ei.backend.instances.list.json.content=
2419
ei.backend.instances.list.json.content=[{"name":"EI-Backend-1","host":"localhost","port":8090,"contextPath":"","https":false,"defaultBackend":true}]
2520

src/main/resources/static/js/information.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ jQuery(document).ready(function () {
33

44
// Fetch injected URL from DOM
55
var frontEndVersion = $("#frontEndVersion").text();
6-
var frontEndApplicationPropertiesVersion = $("#frontEndApplicationPropertiesVersion").text();
76
var frontEndAppName = $("#frontendAppName").text();
87

98
var body = document.getElementById("eiPageFrame");
@@ -24,9 +23,6 @@ jQuery(document).ready(function () {
2423
}
2524

2625
function createFrontEndGeneralInfo() {
27-
if (frontEndApplicationPropertiesVersion) {
28-
frontEndVersion = frontEndVersion + " (" + frontEndApplicationPropertiesVersion + ")";
29-
}
3026
var tableContent = [
3127
{ key: "Application name", value: frontEndAppName },
3228
{ key: "Version", value: frontEndVersion },

src/main/resources/templates/information.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div class="d-none" id="frontEndVersion" th:text="${version}"></div>
2-
<div class="d-none" id="frontEndApplicationPropertiesVersion" th:text="${applicationPropertiesVersion}"></div>
32
<div class="d-none" id="frontendAppName" th:text="${frontendAppName}"></div>
43
<div class="d-none" id="backendServerUrl" th:text="${backendServerUrl}"></div>
54

src/test/java/com/ericsson/ei/frontend/WebControllerUtilsTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ public class WebControllerUtilsTest {
3535
@Test
3636
public void testGetFrontEndServiceUrl() throws Exception {
3737
String expectedUrl = String.format("http://%s:%s%s", HOST, PORT, CONTEXT_PATH);
38-
controllerUtils = new WebControllerUtils(HOST, PORT, CONTEXT_PATH, false, null, null, null, null, null);
38+
controllerUtils = new WebControllerUtils();
39+
controllerUtils.setFrontendServiceHost(HOST);
40+
controllerUtils.setFrontendServicePort(PORT);
41+
controllerUtils.setFrontendContextPath(CONTEXT_PATH);
3942
assertEquals(expectedUrl, controllerUtils.getFrontEndServiceUrl());
4043
}
4144
}

0 commit comments

Comments
 (0)