commit fb07040f0358d6f7b76230339ec3bf4773bb49ed
Author: stepanekp <1stepanekpetr@gmail.com>
Date:   Sun May 22 09:39:22 2022 +0200

    #28 extendable configurations added

diff --git a/src/main/webapp/WEB-INF/templates/configuration.html b/src/main/webapp/WEB-INF/templates/configuration.html
index 8df3dec..b7507c7 100644
--- a/src/main/webapp/WEB-INF/templates/configuration.html
+++ b/src/main/webapp/WEB-INF/templates/configuration.html
@@ -35,56 +35,65 @@
     <hr>
         <!-- Form for configuration values -->
         <form action="#" th:action="@{/configuration}" th:object="${antiPatterns}" method="post" id="configuration-form">
-            <div th:each="antiPattern : ${antiPatterns}">
-                <h3 th:text="${antiPattern.printName}"></h3>
-                <div th:each="threshold : ${antiPattern.thresholds}">
-                    <div class="form-group row">
-                        <label th:text="${threshold.value.printName} + ':'" th:for="${threshold.value.name}"
-                               class="col-sm-5 col-form-label"></label>
-                        <div class="col-sm-5">
-                            <small th:text="${threshold.value.description}" th:value="${threshold.value.name}"
-                                   class="form-text text-muted"></small>
-                            <div id="wrapper">
-                                <div id="first">
-                                    <input th:if="${threshold.value.isErrorMessageShown}" th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
-                                           class="form-control is-invalid" th:id="${threshold.value.name}"
-                                           name="thresholdValues">
-                                    <input th:unless="${threshold.value.isErrorMessageShown}"
-                                           th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
-                                           class="form-control" th:id="${threshold.value.name}"
-                                           name="thresholdValues">
-                                    <input th:value="${threshold.value.name}" style="display: none" class="form-control"
-                                           name="thresholdNames">
-                                    <input th:value="${antiPattern.name}" style="display: none" class="form-control"
-                                           name="antiPatternNames">
-                                </div>
-                                <div th:if="${#strings.contains(threshold.value.name,'Substrings')}" id="second"
-                                     style="margin: 10px; padding-left: 10px">
-                                    <svg style="display: inline-block"
-                                         xmlns="http://www.w3.org/2000/svg"
-                                         width="20" height="20"
-                                         fill="currentColor"
-                                         class="bi bi-info-circle"
-                                         viewBox="0 0 16 16"
-                                         data-container="body"
-                                         data-toggle="popover"
-                                         data-placement="right"
-                                         data-content="Insert search substrings separated by characters ||, you can enter substrings in sql regex syntax and maximum number of search substrings is ten.">
-                                        <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
-                                        <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
-                                    </svg>
-                                </div>
-                            </div>
 
-                            <small th:if="${threshold.value.isErrorMessageShown}" th:text="${threshold.value.errorMessage}"
-                                   th:value="${threshold.value.errorMessage}"
-                                   class="form-text text-danger"></small>
+            <div class="panel-group" id="accordion">
+                <div th:each="antiPattern : ${antiPatterns}">
+                    <div class="panel panel-default">
+                            <h3 class="panel-title ap-configuration-header">
+                                <a class="ap-configuration-header" data-toggle="collapse" data-parent="#accordion" th:href="${'#'+ antiPattern.name}" th:text="${antiPattern.printName}"></a>
+                            </h3>
+                        <div th:id="${antiPattern.name}" class="panel-collapse collapse in">
+                            <div th:each="threshold : ${antiPattern.thresholds}">
+                                <div class="form-group row">
+                                    <label th:text="${threshold.value.printName} + ':'" th:for="${threshold.value.name}"
+                                           class="col-sm-5 col-form-label"></label>
+                                    <div class="col-sm-5">
+                                        <small th:text="${threshold.value.description}" th:value="${threshold.value.name}"
+                                               class="form-text text-muted"></small>
+                                        <div id="wrapper">
+                                            <div id="first">
+                                                <input th:if="${threshold.value.isErrorMessageShown}" th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
+                                                       class="form-control is-invalid" th:id="${threshold.value.name}"
+                                                       name="thresholdValues">
+                                                <input th:unless="${threshold.value.isErrorMessageShown}"
+                                                       th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
+                                                       class="form-control" th:id="${threshold.value.name}"
+                                                       name="thresholdValues">
+                                                <input th:value="${threshold.value.name}" style="display: none" class="form-control"
+                                                       name="thresholdNames">
+                                                <input th:value="${antiPattern.name}" style="display: none" class="form-control"
+                                                       name="antiPatternNames">
+                                            </div>
+                                            <div th:if="${#strings.contains(threshold.value.name,'Substrings')}" id="second"
+                                                 style="margin: 10px; padding-left: 10px">
+                                                <svg style="display: inline-block"
+                                                     xmlns="http://www.w3.org/2000/svg"
+                                                     width="20" height="20"
+                                                     fill="currentColor"
+                                                     class="bi bi-info-circle"
+                                                     viewBox="0 0 16 16"
+                                                     data-container="body"
+                                                     data-toggle="popover"
+                                                     data-placement="right"
+                                                     data-content="Insert search substrings separated by characters ||, you can enter substrings in sql regex syntax and maximum number of search substrings is ten.">
+                                                    <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
+                                                    <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
+                                                </svg>
+                                            </div>
+                                        </div>
+
+                                        <small th:if="${threshold.value.isErrorMessageShown}" th:text="${threshold.value.errorMessage}"
+                                               th:value="${threshold.value.errorMessage}"
+                                               class="form-text text-danger"></small>
 
+                                    </div>
+                                </div>
+
+                            </div>
                         </div>
                     </div>
-
+                    <hr>
                 </div>
-                <hr>
             </div>
 
             <!-- Submit button to save configuration -->
diff --git a/src/main/webapp/resources/css/style.css b/src/main/webapp/resources/css/style.css
index 6434476..3488f02 100644
--- a/src/main/webapp/resources/css/style.css
+++ b/src/main/webapp/resources/css/style.css
@@ -145,6 +145,10 @@ input, button, submit {
     margin: 40px auto;
 }
 
+.ap-configuration-header{
+    color: black !important;
+}
+
 /* ==========================================================================
    login.html
    ========================================================================== */
