#4 -- Add and remove consequent
All checks were successful
CI fuzzy controller / container-test-job (push) Successful in 58s

This commit is contained in:
Anton Romanov 2025-02-28 22:01:44 +04:00
parent ea87504e7b
commit 0e6db5187d
4 changed files with 10 additions and 5 deletions

View File

@ -9,7 +9,6 @@ logging.level.javax.management.remote.rmi=off
logging.level.java.rmi.server=off
logging.level.org.apache.tomcat=INFO
logging.level.org.apache.tomcat.util.net=WARN
extractor.custom-projects-dir=
server.error.include-stacktrace=always
server.error.include-exception=true
server.error.include-message=always

View File

@ -73,7 +73,9 @@ function errorHandler(response, callBack, errorCallBack) {
function getFromRest(url, callBack) {
$.ajax({
url: url,
cache: false,
method: 'get',
cache: true,
dataType: 'json',
success: function (response) {
errorHandler(response, callBack);
}

View File

@ -40,7 +40,7 @@
</div>
</div>
</div>
<a th:href="@{'/variable/edit/' + ${projectId}+'/0'}" class="btn btn-outline-dark">Добавить преременную</a>
<a th:href="@{'/variable/edit/' + ${projectId}+'/0'}" class="btn btn-outline-dark">Добавить переменную</a>
</div>
<div class="col col-md-6">
<h4> Список правил</h4>
@ -58,7 +58,7 @@
</div>
</div>
<script type="text/javascript" src="/js/fuzzyRule.js"></script>
<script>
<script type="text/javascript">
function addRule(index, el, rule) {
let ruleHtml = "<div class='col col-md-12'><span class='badge badge-light'>" + (index + 1) + ". Если</span></div>"
let antecedentComponents = getAntecedentComponents(getAntecedent(rule));

View File

@ -34,6 +34,10 @@
</div>
<label class="col col-md-1 m-2">То</label>
<div id="rulesConsequent"></div>
<div>
<a href="#" class="btn btn-outline-dark"
th:onclick="addConsequent($('#rulesConsequent'), $('#projectId').val());">+</a>
</div>
</div>
<div class="form-group">
<button name="save" type="submit" class="btn btn-outline-dark">Сохранить</button>
@ -46,7 +50,7 @@
<a th:href="@{'/project/edit/' + ${projectId}}" class="btn btn-outline-dark">Отмена</a>
</div>
<script type="text/javascript" src="/js/fuzzyRule.js"></script>
<script>
<script type="text/javascript">
let ruleContentEl = $('#ruleContent');
let projectIdEl = $('#projectId');
if ($(ruleContentEl).val()) {