no message
This commit is contained in:
@@ -2,11 +2,8 @@ package _VisualDVM.TestingSystem.Common.MachineProcess;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalProperties;
|
||||
import _VisualDVM.Mode;
|
||||
import _VisualDVM.*;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import _VisualDVM.Utils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
@@ -82,7 +79,7 @@ public class MachineProcess extends DBObject {
|
||||
boolean local = false;
|
||||
try {
|
||||
InetAddress address = InetAddress.getByName(machineAddress);
|
||||
InetAddress localAddress = InetAddress.getByName(Global.properties.ServerAddress);
|
||||
InetAddress localAddress = InetAddress.getByName(Global.normalProperties.ServerAddress);
|
||||
local = localAddress.getHostAddress().equals(address.getHostAddress());
|
||||
} catch (Exception ex) {
|
||||
Utils_.MainLog.PrintException(ex);
|
||||
@@ -99,7 +96,7 @@ public class MachineProcess extends DBObject {
|
||||
File supervisor = new File(workspace, "VisualSapfor.jar");
|
||||
FileUtils.copyFile(src, supervisor);
|
||||
//создание настроек
|
||||
GlobalProperties properties = new GlobalProperties(Global.properties);
|
||||
VisualDVMProperties properties = new VisualDVMProperties();
|
||||
properties.Mode = Mode.MachineQueue;
|
||||
Utils_.jsonToFile(properties, new File(workspace, "properties"));
|
||||
Vector<String> args = new Vector<>();
|
||||
|
||||
@@ -46,7 +46,7 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils_.getIcon(Global.properties.EmailOnTestingProgress ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
setIcon(Utils_.getIcon(Global.normalProperties.EmailOnTestingProgress ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
//--
|
||||
@@ -57,7 +57,7 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("AutoCheckTesting");
|
||||
if (Global.properties.AutoCheckTesting)
|
||||
if (Global.normalProperties.AutoCheckTesting)
|
||||
TestingServer.TimerOn();
|
||||
else
|
||||
TestingServer.TimerOff();
|
||||
@@ -66,18 +66,18 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils_.getIcon(Global.properties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
setIcon(Utils_.getIcon(Global.normalProperties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
//--
|
||||
add(sCheckTime = new JSpinner());
|
||||
sCheckTime.setPreferredSize(new Dimension(60, 26));
|
||||
sCheckTime.setMaximumSize(new Dimension(60, 26));
|
||||
sCheckTime.setModel(new SpinnerNumberModel(Global.properties.CheckTestingIntervalSeconds, 10, 3600, 1));
|
||||
sCheckTime.setValue(Global.properties.CheckTestingIntervalSeconds);
|
||||
sCheckTime.setModel(new SpinnerNumberModel(Global.normalProperties.CheckTestingIntervalSeconds, 10, 3600, 1));
|
||||
sCheckTime.setValue(Global.normalProperties.CheckTestingIntervalSeconds);
|
||||
UI.MakeSpinnerRapid(sCheckTime, e -> {
|
||||
Global.properties.updateField("CheckTestingIntervalSeconds", sCheckTime.getValue());
|
||||
if (Global.properties.AutoCheckTesting) TestingServer.ResetTimer();
|
||||
Global.normalProperties.updateField("CheckTestingIntervalSeconds", sCheckTime.getValue());
|
||||
if (Global.normalProperties.AutoCheckTesting) TestingServer.ResetTimer();
|
||||
});
|
||||
add(new JLabel(" сек ") {
|
||||
{
|
||||
@@ -89,7 +89,7 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
||||
addPasses(PassCode.StartTestingServer, PassCode.ShutdownTestingServer, PassCode.PublishTestingServer);
|
||||
}
|
||||
public void ShowAutoCheckTesting() {
|
||||
autorefreshButton.setIcon(Utils_.getIcon(Global.properties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
autorefreshButton.setIcon(Utils_.getIcon(Global.normalProperties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
public void showServerAdminLabel(boolean flag) {
|
||||
serverAdminLabel.setVisible(flag);
|
||||
|
||||
@@ -233,7 +233,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
return String.join("/", user.workspace, "modules", "planner");
|
||||
}
|
||||
/*
|
||||
void CheckLocal() {
|
||||
void CheckLocal() { загрузка результатов
|
||||
local = false;
|
||||
try {
|
||||
InetAddress address = InetAddress.getByName(machine.address);
|
||||
|
||||
@@ -67,7 +67,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
System.out.println("ServerName=" + Utils_.Brackets(name));
|
||||
}
|
||||
public static void TimerOn() {
|
||||
checkTimer = new Timer(Global.properties.CheckTestingIntervalSeconds * 1000, e -> {
|
||||
checkTimer = new Timer(Global.normalProperties.CheckTestingIntervalSeconds * 1000, e -> {
|
||||
Global.mainModule.getPass(PassCode.ActualizePackages).Do();
|
||||
});
|
||||
checkTimer.start();
|
||||
@@ -242,9 +242,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//основа
|
||||
@Override
|
||||
public int getPort() {
|
||||
return Global.properties.TestingServerPort;
|
||||
return Global.properties.TestingServerPort;
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
protected void startAdditionalThreads() {
|
||||
testingThread.start();
|
||||
|
||||
Reference in New Issue
Block a user