восстановил возможность оповещения о ходе тестирования по почте ( в ходе редизайна пропадала)
This commit is contained in:
12
.idea/workspace.xml
generated
12
.idea/workspace.xml
generated
@@ -8,14 +8,14 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/ConfigurationsMenuBar/ConfigurationsMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/ConfigurationsMenuBar/ConfigurationsMenuBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/TestingBar/TestingBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/TestingBar/TestingBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/Messages/Message.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Messages/Message.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PackageModeSupervisor/PackageModeSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PackageModeSupervisor/PackageModeSupervisor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Configuration/UI/ConfigurationDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Configuration/UI/ConfigurationDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CheckAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CheckAccount.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Precompilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Precompilation.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartTests.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CallbackForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@@ -115,11 +115,11 @@
|
||||
<recent name="C:\Users\misha\Documents\visual_dvm_2020\src\files\Planner" />
|
||||
</key>
|
||||
<key name="MoveMembersDialog.RECENTS_KEY">
|
||||
<recent name="TestingSystem.TestingServer" />
|
||||
<recent name="Common.Constants" />
|
||||
<recent name="Common.Constants.Constants" />
|
||||
<recent name="Constants" />
|
||||
<recent name="Common.Utils.InterruptThread" />
|
||||
<recent name="Common.Utils.Utils" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\misha\Documents\visual_dvm_2020\src\Visual_DVM_2021\Passes\UI" />
|
||||
|
||||
@@ -4,24 +4,6 @@ import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
public class ConfigurationsMenuBar extends DataMenuBar {
|
||||
public ConfigurationsMenuBar() {
|
||||
super("конфигурации");
|
||||
|
||||
/*
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setText("Оповещение по email");
|
||||
setToolTipText("Оповещение о прогрессе выполнения пакета тестов");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
email = !email;
|
||||
Mark();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils.getIcon(email ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
|
||||
});
|
||||
*/
|
||||
addPasses(
|
||||
PassCode_2021.StartTests,
|
||||
PassCode_2021.PublishConfiguration,
|
||||
|
||||
@@ -30,6 +30,22 @@ public class TestingBar extends VisualiserMenuBar {
|
||||
TestingServer.kernels = (int) sKernels.getValue();
|
||||
});
|
||||
//--
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setText("Оповещение по email");
|
||||
setToolTipText("Оповещение о прогрессе выполнения пакета тестов");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
TestingServer.email = !TestingServer.email;
|
||||
Mark();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils.getIcon(TestingServer.email ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
|
||||
});
|
||||
//--
|
||||
add(autorefreshButton = new MenuBarButton() {
|
||||
{
|
||||
setText("проверка раз в");
|
||||
|
||||
@@ -427,7 +427,7 @@ public class Message extends FileObject {
|
||||
group_s += "parser";
|
||||
break;
|
||||
case Constants.compiler_group:
|
||||
group_s = "compiler";
|
||||
group_s += "compiler";
|
||||
break;
|
||||
default:
|
||||
group_s += group;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1021;
|
||||
version = 1022;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -10,7 +10,6 @@ import Common.Utils.Utils;
|
||||
import TestingSystem.Configuration.Configuration;
|
||||
import TestingSystem.Configuration.ConfigurationInterface;
|
||||
public class ConfigurationDBTable extends DBTable<String, Configuration> {
|
||||
public static boolean email = false;
|
||||
public ConfigurationDBTable() {
|
||||
super(String.class, Configuration.class);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,10 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static TestingSystem.TasksDatabase.tests_db_name;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
public static boolean email = false;
|
||||
public static boolean checkTasks = false;
|
||||
public static int checkIntervalSecond = 10;
|
||||
public static int kernels = 4;
|
||||
LinkedHashMap<String, TasksDatabase> accountsBases = new LinkedHashMap<>();
|
||||
//--------------------------------->>>
|
||||
public TestingServer() {
|
||||
@@ -215,23 +219,17 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
protected TestingPlanner testingPlanner = new TestingPlanner();
|
||||
protected Thread testingThread = new Thread(() -> testingPlanner.Perform());
|
||||
//------>>>
|
||||
public static boolean checkTasks = false;
|
||||
//--
|
||||
public static void switchTimer(boolean on) {
|
||||
if (on)
|
||||
TimerOn();
|
||||
else
|
||||
TimerOff();
|
||||
}
|
||||
//----
|
||||
public static int checkIntervalSecond = 10;
|
||||
public static int kernels = 4;
|
||||
//----
|
||||
public static Timer checkTimer = null;
|
||||
public static void TimerOn() {
|
||||
checkTasks = true;
|
||||
checkTimer = new Timer(checkIntervalSecond * 1000, e -> {
|
||||
// Pass_2021.passes.get(PassCode_2021.ActualizePackages).Do();
|
||||
// Pass_2021.passes.get(PassCode_2021.ActualizePackages).Do();
|
||||
Pass_2021.passes.get(PassCode_2021.SynchronizeTestsTasks).Do();
|
||||
});
|
||||
checkTimer.start();
|
||||
@@ -308,7 +306,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
groups.sort(Comparator.comparing(o -> o.description));
|
||||
return groups;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void Session() throws Exception {
|
||||
DBObject dbObject = null;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -164,8 +164,10 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
Global.componentsServer.db.subscribers.mountUI(subscribersPanel);
|
||||
settingsTools.add(Pass_2021.passes.get(PassCode_2021.ApplyBugReportSettings).createButton());
|
||||
//-
|
||||
if (!Pass_2021.passes.get(PassCode_2021.CheckAccount).isDone())
|
||||
if (!Pass_2021.passes.get(PassCode_2021.CheckAccount).isDone()) {
|
||||
accountTools.add(Pass_2021.passes.get(PassCode_2021.CheckAccount).createButton());
|
||||
UI.Info("+");
|
||||
}
|
||||
//--
|
||||
BugReportsKeyFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user