Skip to content

Commit f49a61a

Browse files
author
eznedan
committed
Changes
1 parent 1fa7184 commit f49a61a

File tree

4 files changed

+41
-26
lines changed

4 files changed

+41
-26
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,19 @@ public String jmesPathRulesSetUp(Model model) {
115115
return "jmesPathRulesSetUp";
116116
}
117117

118+
@RequestMapping("/add-instances.html")
119+
public String addInstance(Model model) {
120+
return "add-instances";
121+
}
122+
118123
@RequestMapping("/switch-backend.html")
119124
public String switchBackEnd(Model model) {
120125
return "switch-backend";
121126
}
122127

123-
@RequestMapping("/add-instances.html")
124-
public String addInstance(Model model) {
125-
return "add-instances";
128+
@RequestMapping(value = "/get-instances", method = RequestMethod.GET)
129+
public ResponseEntity<String> getInstances(Model model) {
130+
return new ResponseEntity<>(utils.getInstances().toString(), HttpStatus.OK);
126131
}
127132

128133
@RequestMapping(value = "/switch-backend", method = RequestMethod.POST)
@@ -173,9 +178,4 @@ public ResponseEntity<String> addInstanceInformation(Model model, HttpServletReq
173178
return new ResponseEntity<>("Internal error", HttpStatus.INTERNAL_SERVER_ERROR);
174179
}
175180
}
176-
177-
@RequestMapping(value = "/get-instances", method = RequestMethod.GET)
178-
public ResponseEntity<String> getInstances(Model model) {
179-
return new ResponseEntity<>(utils.getInstances().toString(), HttpStatus.OK);
180-
}
181181
}

src/main/java/com/ericsson/ei/frontend/model/BackEndInformation.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Ericsson AB.
3+
For a full list of individual contributors, please see the commit history.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
117
package com.ericsson.ei.frontend.model;
218

319
import com.fasterxml.jackson.annotation.JsonIgnore;

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Ericsson AB.
3+
For a full list of individual contributors, please see the commit history.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
117
package com.ericsson.ei.frontend.utils;
218

319
import com.ericsson.ei.frontend.model.BackEndInformation;
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1 @@
1-
[
2-
{
3-
"path": "",
4-
"port": 8091,
5-
"name": "core",
6-
"host": "localhost",
7-
"checked": false,
8-
"https": false
9-
},
10-
{
11-
"path": "/eiffel",
12-
"port": 8080,
13-
"name": "test",
14-
"host": "localhost23",
15-
"checked": true,
16-
"https": false
17-
}
18-
]
1+
[{"path":"","port":8091,"name":"core","host":"localhost","checked":false,"https":false},{"path":"/eiffel","port":8080,"name":"test","host":"localhost23","checked":true,"https":false}]

0 commit comments

Comments
 (0)