Projekt

Obecné

Profil

« Předchozí | Další » 

Revize fb07040f

Přidáno uživatelem stepanekp před téměř 3 roky(ů)

#28 extendable configurations added

Zobrazit rozdíly:

src/main/webapp/WEB-INF/templates/configuration.html
35 35
    <hr>
36 36
        <!-- Form for configuration values -->
37 37
        <form action="#" th:action="@{/configuration}" th:object="${antiPatterns}" method="post" id="configuration-form">
38
            <div th:each="antiPattern : ${antiPatterns}">
39
                <h3 th:text="${antiPattern.printName}"></h3>
40
                <div th:each="threshold : ${antiPattern.thresholds}">
41
                    <div class="form-group row">
42
                        <label th:text="${threshold.value.printName} + ':'" th:for="${threshold.value.name}"
43
                               class="col-sm-5 col-form-label"></label>
44
                        <div class="col-sm-5">
45
                            <small th:text="${threshold.value.description}" th:value="${threshold.value.name}"
46
                                   class="form-text text-muted"></small>
47
                            <div id="wrapper">
48
                                <div id="first">
49
                                    <input th:if="${threshold.value.isErrorMessageShown}" th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
50
                                           class="form-control is-invalid" th:id="${threshold.value.name}"
51
                                           name="thresholdValues">
52
                                    <input th:unless="${threshold.value.isErrorMessageShown}"
53
                                           th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
54
                                           class="form-control" th:id="${threshold.value.name}"
55
                                           name="thresholdValues">
56
                                    <input th:value="${threshold.value.name}" style="display: none" class="form-control"
57
                                           name="thresholdNames">
58
                                    <input th:value="${antiPattern.name}" style="display: none" class="form-control"
59
                                           name="antiPatternNames">
60
                                </div>
61
                                <div th:if="${#strings.contains(threshold.value.name,'Substrings')}" id="second"
62
                                     style="margin: 10px; padding-left: 10px">
63
                                    <svg style="display: inline-block"
64
                                         xmlns="http://www.w3.org/2000/svg"
65
                                         width="20" height="20"
66
                                         fill="currentColor"
67
                                         class="bi bi-info-circle"
68
                                         viewBox="0 0 16 16"
69
                                         data-container="body"
70
                                         data-toggle="popover"
71
                                         data-placement="right"
72
                                         data-content="Insert search substrings separated by characters ||, you can enter substrings in sql regex syntax and maximum number of search substrings is ten.">
73
                                        <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"/>
74
                                        <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"/>
75
                                    </svg>
76
                                </div>
77
                            </div>
78 38

  
79
                            <small th:if="${threshold.value.isErrorMessageShown}" th:text="${threshold.value.errorMessage}"
80
                                   th:value="${threshold.value.errorMessage}"
81
                                   class="form-text text-danger"></small>
39
            <div class="panel-group" id="accordion">
40
                <div th:each="antiPattern : ${antiPatterns}">
41
                    <div class="panel panel-default">
42
                            <h3 class="panel-title ap-configuration-header">
43
                                <a class="ap-configuration-header" data-toggle="collapse" data-parent="#accordion" th:href="${'#'+ antiPattern.name}" th:text="${antiPattern.printName}"></a>
44
                            </h3>
45
                        <div th:id="${antiPattern.name}" class="panel-collapse collapse in">
46
                            <div th:each="threshold : ${antiPattern.thresholds}">
47
                                <div class="form-group row">
48
                                    <label th:text="${threshold.value.printName} + ':'" th:for="${threshold.value.name}"
49
                                           class="col-sm-5 col-form-label"></label>
50
                                    <div class="col-sm-5">
51
                                        <small th:text="${threshold.value.description}" th:value="${threshold.value.name}"
52
                                               class="form-text text-muted"></small>
53
                                        <div id="wrapper">
54
                                            <div id="first">
55
                                                <input th:if="${threshold.value.isErrorMessageShown}" th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
56
                                                       class="form-control is-invalid" th:id="${threshold.value.name}"
57
                                                       name="thresholdValues">
58
                                                <input th:unless="${threshold.value.isErrorMessageShown}"
59
                                                       th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
60
                                                       class="form-control" th:id="${threshold.value.name}"
61
                                                       name="thresholdValues">
62
                                                <input th:value="${threshold.value.name}" style="display: none" class="form-control"
63
                                                       name="thresholdNames">
64
                                                <input th:value="${antiPattern.name}" style="display: none" class="form-control"
65
                                                       name="antiPatternNames">
66
                                            </div>
67
                                            <div th:if="${#strings.contains(threshold.value.name,'Substrings')}" id="second"
68
                                                 style="margin: 10px; padding-left: 10px">
69
                                                <svg style="display: inline-block"
70
                                                     xmlns="http://www.w3.org/2000/svg"
71
                                                     width="20" height="20"
72
                                                     fill="currentColor"
73
                                                     class="bi bi-info-circle"
74
                                                     viewBox="0 0 16 16"
75
                                                     data-container="body"
76
                                                     data-toggle="popover"
77
                                                     data-placement="right"
78
                                                     data-content="Insert search substrings separated by characters ||, you can enter substrings in sql regex syntax and maximum number of search substrings is ten.">
79
                                                    <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"/>
80
                                                    <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"/>
81
                                                </svg>
82
                                            </div>
83
                                        </div>
84

  
85
                                        <small th:if="${threshold.value.isErrorMessageShown}" th:text="${threshold.value.errorMessage}"
86
                                               th:value="${threshold.value.errorMessage}"
87
                                               class="form-text text-danger"></small>
82 88

  
89
                                    </div>
90
                                </div>
91

  
92
                            </div>
83 93
                        </div>
84 94
                    </div>
85

  
95
                    <hr>
86 96
                </div>
87
                <hr>
88 97
            </div>
89 98

  
90 99
            <!-- Submit button to save configuration -->
src/main/webapp/resources/css/style.css
145 145
    margin: 40px auto;
146 146
}
147 147

  
148
.ap-configuration-header{
149
    color: black !important;
150
}
151

  
148 152
/* ==========================================================================
149 153
   login.html
150 154
   ========================================================================== */

Také k dispozici: Unified diff