восстановил возможность оповещения о ходе тестирования по почте ( в ходе редизайна пропадала)

This commit is contained in:
2023-10-17 22:25:10 +03:00
parent cbaa99345b
commit 07d35c876d
10 changed files with 47 additions and 44 deletions

View File

@@ -3,7 +3,12 @@ import Common.Current;
import Common.UI.UI;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Pass_2021;
public class CheckAccount extends Pass_2021 {
public class CheckAccount extends Pass_2021<Boolean> {
@Override
protected boolean canStart(Object... args) throws Exception {
target = false;
return true;
}
@Override
public String getIconPath() {
return "/icons/Registry.png";
@@ -14,11 +19,14 @@ public class CheckAccount extends Pass_2021 {
}
@Override
protected void body() throws Exception {
if (Current.getAccount().email.equals("?")) {
if (Pass_2021.passes.get(PassCode_2021.EditAccount).Do())
Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do();
} else
Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do();
target = Current.getAccount().email.equals("?") ?
(Pass_2021.passes.get(PassCode_2021.EditAccount).Do() &&
Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do()) :
(Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do());
}
@Override
protected boolean validate() {
return target;
}
@Override
protected void showDone() throws Exception {

View File

@@ -7,7 +7,6 @@ import GlobalData.User.UserState;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import TestingSystem.Configuration.ConfigurationInterface;
import TestingSystem.Configuration.UI.ConfigurationDBTable;
import TestingSystem.Group.Group;
import TestingSystem.Group.GroupInterface;
import TestingSystem.Tasks.TestCompilationTask;
@@ -201,7 +200,7 @@ public class StartTests extends TestingSystemPass<TasksPackage> {
"Задач на компиляцию: " + target.compilationTasksCount + "\n" +
"Задач на запуск: " + target.runTasksCount + "\n" +
String.join("\n", summary_lines);
target.needsEmail = ConfigurationDBTable.email ? 1 : 0;
target.needsEmail = TestingServer.email ? 1 : 0;
return !tasks.isEmpty();
}
@Override