Revize c7eb5d0f
Přidáno uživatelem stepanekp před asi 3 roky(ů)
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/spring/AppConfig.java | ||
---|---|---|
48 | 48 |
viewResolver.setTemplateEngine(templateEngine()); |
49 | 49 |
return viewResolver; |
50 | 50 |
} |
51 |
|
|
52 |
@Override |
|
53 |
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|
54 |
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); |
|
55 |
} |
|
51 | 56 |
} |
src/main/webapp/WEB-INF/templates/about.html | ||
---|---|---|
4 | 4 |
<title>Anti Pattern Detector - About</title> |
5 | 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
6 | 6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
7 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
7 | 8 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> |
8 | 9 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
9 | 10 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> |
src/main/webapp/WEB-INF/templates/anti-pattern.html | ||
---|---|---|
5 | 5 |
<title>Anti Pattern Detector - Anti Pattern details</title> |
6 | 6 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
7 | 7 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
8 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
8 | 9 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> |
9 | 10 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
10 | 11 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> |
11 | 12 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
12 |
|
|
13 |
<style> |
|
14 |
.card { |
|
15 |
margin-top: 40px; |
|
16 |
margin-left: 5%; |
|
17 |
margin-right: 5%; |
|
18 |
} |
|
19 |
|
|
20 |
.container { |
|
21 |
margin-top: 20px; |
|
22 |
} |
|
23 |
</style> |
|
24 | 13 |
</head> |
25 | 14 |
<body> |
26 | 15 |
<!-- Navigation bar imported --> |
... | ... | |
103 | 92 |
class="form-text text-danger"></small> |
104 | 93 |
|
105 | 94 |
</div> |
106 |
<div class="analyze-button-container">
|
|
107 |
<button type="submit" class="btn btn-primary btn-lg btn-block">Save configuration</button>
|
|
95 |
<div class="save-configuration-button-container">
|
|
96 |
<button type="submit" class="btn btn-primary custom-button">Save configuration</button>
|
|
108 | 97 |
</div> |
109 | 98 |
<!-- ./Anti pattern configuration form --> |
110 | 99 |
</form> |
src/main/webapp/WEB-INF/templates/configuration.html | ||
---|---|---|
4 | 4 |
<title>Anti Pattern Detector - Configuration</title> |
5 | 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
6 | 6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
7 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
7 | 8 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> |
8 | 9 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
9 | 10 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> |
10 | 11 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> |
11 |
|
|
12 |
<style> |
|
13 |
.analyze-button-container { |
|
14 |
margin: 20px 40% 40px; |
|
15 |
} |
|
16 |
|
|
17 |
.container { |
|
18 |
margin-top: 20px; |
|
19 |
} |
|
20 |
|
|
21 |
#wrapper { |
|
22 |
width: 800px; |
|
23 |
overflow: hidden; |
|
24 |
} |
|
25 |
|
|
26 |
#first { |
|
27 |
width: 500px; |
|
28 |
float: left; |
|
29 |
} |
|
30 |
|
|
31 |
#second { |
|
32 |
overflow: hidden; |
|
33 |
} |
|
34 |
</style> |
|
35 |
|
|
36 | 12 |
</head> |
37 | 13 |
<body> |
38 | 14 |
<!-- Navigation bar imported --> |
... | ... | |
119 | 95 |
|
120 | 96 |
|
121 | 97 |
<!-- Scripts --> |
122 |
<script> |
|
123 |
// script to popover |
|
124 |
$(document).ready(function () { |
|
125 |
$('[data-toggle="popover"]').popover(); |
|
126 |
}); |
|
127 |
|
|
128 |
</script> |
|
98 |
<script th:src="@{/resources/js/core.js}"></script> |
|
129 | 99 |
<!-- ./Scripts --> |
130 | 100 |
|
131 | 101 |
</body> |
src/main/webapp/WEB-INF/templates/index.html | ||
---|---|---|
4 | 4 |
<title>Anti Pattern Detector</title> |
5 | 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
6 | 6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
7 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
7 | 8 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> |
8 | 9 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
9 | 10 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> |
10 | 11 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
11 |
|
|
12 |
<style> |
|
13 |
tbody tr:hover { |
|
14 |
background-color: #F8F9FA; |
|
15 |
} |
|
16 |
|
|
17 |
.analyze-button-container { |
|
18 |
margin: 20px 40% 40px; |
|
19 |
} |
|
20 |
</style> |
|
21 |
|
|
22 |
<script> |
|
23 |
function checkAllProjects(checkBox) { |
|
24 |
var projects = document.querySelectorAll('*[id^="project_"]'); |
|
25 |
var i; |
|
26 |
for (i = 0; i < projects.length; i++) { |
|
27 |
projects[i].checked = !!checkBox.checked; |
|
28 |
} |
|
29 |
} |
|
30 |
|
|
31 |
function checkAllAntiPatterns(checkBox) { |
|
32 |
var antiPatterns = document.querySelectorAll('*[id^="anti-pattern"]'); |
|
33 |
var i; |
|
34 |
for (i = 0; i < antiPatterns.length; i++) { |
|
35 |
antiPatterns[i].checked = !!checkBox.checked; |
|
36 |
} |
|
37 |
} |
|
38 |
|
|
39 |
function showProgressBar() { |
|
40 |
$('#progressBar').css('display', ''); |
|
41 |
var analyzeButton = $('#analyzeButton'); |
|
42 |
analyzeButton.addClass('disabled'); |
|
43 |
analyzeButton.text('Analyzing...'); |
|
44 |
} |
|
45 |
</script> |
|
12 |
<script th:src="@{/resources/js/core.js}"></script> |
|
46 | 13 |
</head> |
47 | 14 |
<body> |
48 | 15 |
<!-- Navigation bar imported --> |
src/main/webapp/WEB-INF/templates/project.html | ||
---|---|---|
5 | 5 |
<title>Anti Pattern Detector - Project details</title> |
6 | 6 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
7 | 7 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
8 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
8 | 9 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> |
9 | 10 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
10 | 11 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> |
11 | 12 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
12 |
|
|
13 |
<style> |
|
14 |
.card { |
|
15 |
margin-top: 40px; |
|
16 |
margin-left: 5%; |
|
17 |
margin-right: 5%; |
|
18 |
|
|
19 |
} |
|
20 |
</style> |
|
21 | 13 |
</head> |
22 | 14 |
<body> |
23 | 15 |
<!-- Navigation bar imported --> |
src/main/webapp/WEB-INF/templates/result.html | ||
---|---|---|
4 | 4 |
<title>Anti Pattern Detector - Results</title> |
5 | 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
6 | 6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
7 |
<link rel="stylesheet" th:href="@{/resources/css/style.css}"> |
|
7 | 8 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> |
8 | 9 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
9 | 10 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> |
10 | 11 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> |
11 |
|
|
12 |
<style> |
|
13 |
.not-found-bg { |
|
14 |
background-color: #D4EDDA; |
|
15 |
} |
|
16 |
|
|
17 |
.found-bg { |
|
18 |
background-color: #F8D7DA; |
|
19 |
} |
|
20 |
|
|
21 |
.icon-style { |
|
22 |
border-radius: 30px; |
|
23 |
} |
|
24 |
|
|
25 |
input, button, submit { |
|
26 |
border: none; |
|
27 |
} |
|
28 |
|
|
29 |
.container { |
|
30 |
margin-top: 20px; |
|
31 |
} |
|
32 |
</style> |
|
33 |
|
|
34 | 12 |
</head> |
35 | 13 |
<body> |
36 | 14 |
<!-- Navigation bar imported --> |
... | ... | |
138 | 116 |
<!-- ./Result table container --> |
139 | 117 |
|
140 | 118 |
<!-- Scripts --> |
141 |
<script> |
|
142 |
// script to popover |
|
143 |
$(document).ready(function () { |
|
144 |
$('[data-toggle="popover"]').popover(); |
|
145 |
}); |
|
146 |
|
|
147 |
// this code handling back browser button to result page |
|
148 |
window.onload = function () { |
|
149 |
if (typeof history.pushState === "function") { |
|
150 |
history.pushState("jibberish", null, null); |
|
151 |
window.onpopstate = function () { |
|
152 |
history.pushState('newjibberish', null, null); |
|
153 |
}; |
|
154 |
} else { |
|
155 |
var ignoreHashChange = true; |
|
156 |
window.onhashchange = function () { |
|
157 |
if (!ignoreHashChange) { |
|
158 |
ignoreHashChange = true; |
|
159 |
window.location.hash = Math.random(); |
|
160 |
} else { |
|
161 |
ignoreHashChange = false; |
|
162 |
} |
|
163 |
}; |
|
164 |
} |
|
165 |
} |
|
166 |
</script> |
|
119 |
<script th:src="@{/resources/js/core.js}"></script> |
|
120 |
<script th:src="@{/resources/js/result.js}"></script> |
|
167 | 121 |
<!-- ./Scripts --> |
168 | 122 |
|
169 | 123 |
</body> |
src/main/webapp/resources/css/style.css | ||
---|---|---|
1 |
|
|
2 |
.container { |
|
3 |
margin-top: 20px; |
|
4 |
} |
|
5 |
|
|
6 |
/* ========================================================================== |
|
7 |
index.html |
|
8 |
========================================================================== */ |
|
9 |
|
|
10 |
tbody tr:hover { |
|
11 |
background-color: #F8F9FA; |
|
12 |
} |
|
13 |
|
|
14 |
.analyze-button-container { |
|
15 |
margin: 20px 40% 40px; |
|
16 |
} |
|
17 |
|
|
18 |
/* ========================================================================== |
|
19 |
project.html & anti-pattern.html |
|
20 |
========================================================================== */ |
|
21 |
|
|
22 |
.card { |
|
23 |
margin-top: 40px; |
|
24 |
margin-left: 5%; |
|
25 |
margin-right: 5%; |
|
26 |
} |
|
27 |
|
|
28 |
/* ========================================================================== |
|
29 |
anti-pattern.html |
|
30 |
========================================================================== */ |
|
31 |
|
|
32 |
.custom-button{ |
|
33 |
width: 160px !important; |
|
34 |
} |
|
35 |
|
|
36 |
/* ========================================================================== |
|
37 |
result.html |
|
38 |
========================================================================== */ |
|
39 |
|
|
40 |
.not-found-bg { |
|
41 |
background-color: #D4EDDA; |
|
42 |
} |
|
43 |
|
|
44 |
.found-bg { |
|
45 |
background-color: #F8D7DA; |
|
46 |
} |
|
47 |
|
|
48 |
.icon-style { |
|
49 |
border-radius: 30px; |
|
50 |
} |
|
51 |
|
|
52 |
input, button, submit { |
|
53 |
border: none; |
|
54 |
} |
|
55 |
|
|
56 |
/* ========================================================================== |
|
57 |
configuration.html |
|
58 |
========================================================================== */ |
|
59 |
|
|
60 |
#wrapper { |
|
61 |
width: 800px; |
|
62 |
overflow: hidden; |
|
63 |
} |
|
64 |
|
|
65 |
#first { |
|
66 |
width: 500px; |
|
67 |
float: left; |
|
68 |
} |
|
69 |
|
|
70 |
#second { |
|
71 |
overflow: hidden; |
|
72 |
} |
src/main/webapp/resources/js/core.js | ||
---|---|---|
1 |
// script to popover |
|
2 |
$(document).ready(function () { |
|
3 |
$('[data-toggle="popover"]').popover(); |
|
4 |
}); |
|
5 |
|
|
6 |
// functions used in index page |
|
7 |
function checkAllProjects(checkBox) { |
|
8 |
var projects = document.querySelectorAll('*[id^="project_"]'); |
|
9 |
var i; |
|
10 |
for (i = 0; i < projects.length; i++) { |
|
11 |
projects[i].checked = !!checkBox.checked; |
|
12 |
} |
|
13 |
} |
|
14 |
|
|
15 |
function checkAllAntiPatterns(checkBox) { |
|
16 |
var antiPatterns = document.querySelectorAll('*[id^="anti-pattern"]'); |
|
17 |
var i; |
|
18 |
for (i = 0; i < antiPatterns.length; i++) { |
|
19 |
antiPatterns[i].checked = !!checkBox.checked; |
|
20 |
} |
|
21 |
} |
|
22 |
|
|
23 |
function showProgressBar() { |
|
24 |
$('#progressBar').css('display', ''); |
|
25 |
var analyzeButton = $('#analyzeButton'); |
|
26 |
analyzeButton.addClass('disabled'); |
|
27 |
analyzeButton.text('Analyzing...'); |
|
28 |
} |
src/main/webapp/resources/js/result.js | ||
---|---|---|
1 |
// this code handling back browser button to result page |
|
2 |
window.onload = function () { |
|
3 |
if (typeof history.pushState === "function") { |
|
4 |
history.pushState("jibberish", null, null); |
|
5 |
window.onpopstate = function () { |
|
6 |
history.pushState('newjibberish', null, null); |
|
7 |
}; |
|
8 |
} else { |
|
9 |
var ignoreHashChange = true; |
|
10 |
window.onhashchange = function () { |
|
11 |
if (!ignoreHashChange) { |
|
12 |
ignoreHashChange = true; |
|
13 |
window.location.hash = Math.random(); |
|
14 |
} else { |
|
15 |
ignoreHashChange = false; |
|
16 |
} |
|
17 |
}; |
|
18 |
} |
|
19 |
} |
Také k dispozici: Unified diff
CSS and JS moved to separate files