Revize 2a508be3
Přidáno uživatelem stepanekp před asi 3 roky(ů)
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/AppController.java | ||
---|---|---|
328 | 328 |
return ResponseEntity.ok("File uploaded successfully."); |
329 | 329 |
} |
330 | 330 |
|
331 |
/** |
|
332 |
* Method for showing login page. |
|
333 |
* |
|
334 |
* @return html file name for thymeleaf template |
|
335 |
*/ |
|
336 |
@GetMapping("/login") |
|
337 |
public String login() { |
|
338 |
return "login"; |
|
339 |
} |
|
340 |
|
|
331 | 341 |
|
332 | 342 |
} |
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/AntiPatternServiceImpl.java | ||
---|---|---|
221 | 221 |
String APCatalogueFileName = node.get("catalogueFileName") != null ? node.get("catalogueFileName").asText() : null; |
222 | 222 |
|
223 | 223 |
Map<String, Configuration> APMap = new HashMap<>(); |
224 |
|
|
224 |
|
|
225 | 225 |
JsonNode array = node.get("configurations"); |
226 | 226 |
Configuration<?> tmpConfig = null; |
227 | 227 |
|
src/main/webapp/WEB-INF/templates/login.html | ||
---|---|---|
1 |
<!DOCTYPE HTML> |
|
2 |
<html xmlns:th="http://www.thymeleaf.org"> |
|
3 |
<head> |
|
4 |
<title>Anti Pattern Detector - About</title> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
7 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
8 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> |
|
9 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
|
10 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> |
|
11 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
|
12 |
|
|
13 |
</head> |
|
14 |
<body> |
|
15 |
<!-- Navigation bar imported --> |
|
16 |
<div th:replace="fragments/navbar :: navBar"></div> |
|
17 |
<!-- ./Navigation bar imported --> |
|
18 |
<div class="container"> |
|
19 |
<h1>Log In</h1> |
|
20 |
<form id="login-form"> |
|
21 |
<div class="form-group"> |
|
22 |
<label for="nameInput">Username</label> |
|
23 |
<input type="text" id="nameInput" class="form-control" placeholder="Enter username"> |
|
24 |
</div> |
|
25 |
<div class="form-group"><label for="passInput">Password</label> |
|
26 |
<input type="password" id="passInput" class="form-control" placeholder="Password"></div> |
|
27 |
<button type="submit" class="btn btn-primary">Submit</button> |
|
28 |
</form> |
|
29 |
|
|
30 |
</div> |
|
31 |
</body> |
|
32 |
</html> |
src/main/webapp/resources/css/style.css | ||
---|---|---|
130 | 130 |
|
131 | 131 |
#second { |
132 | 132 |
overflow: hidden; |
133 |
} |
|
134 |
|
|
135 |
/* ========================================================================== |
|
136 |
login.html |
|
137 |
========================================================================== */ |
|
138 |
|
|
139 |
#login-form{ |
|
140 |
width: 50%; |
|
141 |
margin: 0 auto; |
|
142 |
padding: 50px; |
|
133 | 143 |
} |
Také k dispozici: Unified diff
Login page added