Skip to content

Commit e8b83e0

Browse files
authored
Merge pull request #6 from tobiasake/master
New EI Frontend layout
2 parents 5a3e564 + bdc1099 commit e8b83e0

File tree

154 files changed

+134267
-1090
lines changed

Some content is hidden

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

154 files changed

+134267
-1090
lines changed

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

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,69 @@ public class WebController {
2929

3030
private String frontendServiceHost;
3131
private int frontendServicePort;
32+
private String backendServerHost;
33+
private int backendServerPort;
34+
35+
private String eiffelDocumentationUrls;
3236

3337

3438
@RequestMapping("/")
3539
public String greeting(Model model) {
3640

41+
String eiffelDocumentationUrlLinks = String.format("%s", eiffelDocumentationUrls);
42+
43+
model.addAttribute("eiffelDocumentationUrlLinks", eiffelDocumentationUrlLinks); // inject in DOM for AJAX etc
44+
45+
46+
47+
return "index";
48+
}
49+
50+
@RequestMapping("/subscriptionpage.html")
51+
public String subscription(Model model) {
52+
3753
String frontendServiceUrl = String.format("http://%s:%d", frontendServiceHost, frontendServicePort);
3854

3955
model.addAttribute("frontendServiceUrl", frontendServiceUrl); // inject in DOM for AJAX etc
4056

41-
return "index";
57+
return "subscription";
58+
}
59+
60+
@RequestMapping("/testRules.html")
61+
public String testRules(Model model) {
62+
63+
return "testRules";
64+
}
65+
66+
@RequestMapping("/eiInfo.html")
67+
public String eiInfo(Model model) {
68+
69+
String frontendServiceUrl = String.format("http://%s:%d", frontendServiceHost, frontendServicePort);
70+
model.addAttribute("frontendServiceUrl", frontendServiceUrl); // inject in DOM for AJAX etc
71+
String backendServerUrl = String.format("http://%s:%d", backendServerHost, backendServerPort);
72+
model.addAttribute("backendServerUrl", backendServerUrl);
73+
74+
return "eiInfo";
75+
}
76+
77+
@RequestMapping("/login.html")
78+
public String login(Model model) {
79+
80+
return "login";
81+
}
82+
83+
@RequestMapping("/register.html")
84+
public String register(Model model) {
85+
86+
return "register";
87+
}
88+
89+
@RequestMapping("/forgot-password.html")
90+
public String forgotPassword(Model model) {
91+
92+
return "forgot-password";
4293
}
94+
4395

4496
// Backend host and port (Getter & Setters), application.properties -> greeting.xxx
4597
public String getFrontendServiceHost() {
@@ -57,5 +109,28 @@ public int getFrontendServicePort() {
57109
public void setFrontendServicePort(int frontendServicePort) {
58110
this.frontendServicePort = frontendServicePort;
59111
}
112+
113+
public String getBackendServerHost() {
114+
return backendServerHost;
115+
}
60116

117+
public void setBackendServerHost(String backendServerHost) {
118+
this.backendServerHost = backendServerHost;
119+
}
120+
121+
public int getBackendServerPort() {
122+
return backendServerPort;
123+
}
124+
125+
public void setBackendServerPort(int backendServerPort) {
126+
this.backendServerPort = backendServerPort;
127+
}
128+
129+
public String getEiffelDocumentationUrls() {
130+
return eiffelDocumentationUrls;
131+
}
132+
133+
public void setEiffelDocumentationUrls(String eiffelDocumentationUrls) {
134+
this.eiffelDocumentationUrls = eiffelDocumentationUrls;
135+
}
61136
}

src/main/resources/application.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ ei.backendServerPort=8090
1515
###### Subscription Template file ########
1616
ei.subscriptionFilePath=subscriptions/subscriptionsTemplate.json
1717

18+
###### EI Documentation Link Url ##########
19+
ei.eiffelDocumentationUrls={ "EI GitHub": "https://github.com/Ericsson/eiffel-intelligence-frontend",\
20+
"Eiffel Github": "https://github.com/Ericsson/eiffel",\
21+
"Eiffel Github main page": "http://ericsson.github.io/eiffel" }
22+
1823
#### LOGGING #########
1924
logging.level.root: INFO
2025
logging.level.org.springframework.web: DEBUG

0 commit comments

Comments
 (0)