diff --git a/.gitignore b/.gitignore index fb2f033f..a7927ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ BackUps/* *.ilk Bugs/* Archives/* +Downloads/* Temp/* Projects/* CompilationTasks/* diff --git a/properties b/properties index b4d237af..0f0da0da 100644 --- a/properties +++ b/properties @@ -1,6 +1,6 @@ { "Workspace": "E:\\Tests", - "ProjectsSearchDirectory": "C:\\Users\\misha\\Documents\\visual_sapfor_2023\\Downloads", + "ProjectsSearchDirectory": "C:\\Users\\misha\\Documents\\visual_sapfor_2023\\Downloads\\JAC_1737641430\\JAC\\v1\\v1\\v1", "VisualiserPath": "C:\\Users\\misha\\Downloads", "Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F", "Visualizer_2Path": "C:\\Users\\misha\\Documents", @@ -23,7 +23,7 @@ "LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe", "CheckTestingIntervalSeconds": 10, "AutoCheckTesting": true, - "EmailOnTestingProgress": false, + "EmailOnTestingProgress": true, "lastMachineId": 13, "lastUserId": 34, "lastCompilerId": 52, @@ -40,13 +40,7 @@ "FastAccessPassesCount": 10, "LastOpenedProjectsCount": 10, "Mode": "Normal", - "ServerAddress": "alex-freenas.ddns.net", - "ServerUserName": "testuser", - "ServerUserSHHPort": 2000, "ComponentsServerPort": 7995, "TestingServerPort": 7998, - "SocketTimeout": 5000, - "SMTPHost": "smtp.mail.ru", - "SMTPPort": 465, - "MailSocketPort": 465 + "SocketTimeout": 5000 } \ No newline at end of file diff --git a/src/_VisualDVM/Constants.java b/src/_VisualDVM/Constants.java index 8d4a0368..a183dafa 100644 --- a/src/_VisualDVM/Constants.java +++ b/src/_VisualDVM/Constants.java @@ -1,5 +1,6 @@ package _VisualDVM; import Common.Utils.Vector_; +import com.google.gson.annotations.Expose; import java.util.Vector; public class Constants { @@ -39,6 +40,13 @@ public class Constants { public static final String MailAddress = "sapfor.tracker@internet.ru"; // public static final String MailPassword = "3s4w9e5fs3c1a89AA"; основной пароль. public static final String MailPassword = "knKn2PpfrC348ZxHtMnT"; //пароль для сапфора как внешнего приложения. + public static final String SMTPHost = "smtp.mail.ru"; + public static final int SMTPPort = 465; + public static final int MailSocketPort = 465; + //- + public static final String ServerAddress = "alex-freenas.ddns.net"; + public static final String ServerUserName = "testuser"; + public static final int ServerUserSHHPort = 23; //-- public static final String package_json = "package_json"; public static final String results_json = "results_json"; diff --git a/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java b/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java index 0e9167de..bea27b35 100644 --- a/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java +++ b/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java @@ -28,8 +28,8 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass { userHome = null; serverHome = null; //-- - machine = new Machine("alex", Global.normalProperties.ServerAddress, Global.normalProperties.ServerUserSHHPort, MachineType.Server); - user = new User(Global.normalProperties.ServerUserName, "mprit_2011"); + machine = new Machine("alex", Constants.ServerAddress, Constants.ServerUserSHHPort, MachineType.Server); + user = new User(Constants.ServerUserName, "mprit_2011"); super.Connect(); //-- userHome = new RemoteFile(user.connection.sftpChannel.getHome(), true); diff --git a/src/_VisualDVM/Passes/Server/RepositoryPass.java b/src/_VisualDVM/Passes/Server/RepositoryPass.java index 14138aa8..a4f75b88 100644 --- a/src/_VisualDVM/Passes/Server/RepositoryPass.java +++ b/src/_VisualDVM/Passes/Server/RepositoryPass.java @@ -4,6 +4,7 @@ import Common.Database.RepositoryRefuseException; import Common.Passes.Pass; import Common.Passes.PassException; import Common.Utils.Utils_; +import _VisualDVM.Constants; import _VisualDVM.Global; import _VisualDVM.Repository.RepositoryServer; import _VisualDVM.Repository.Server.ServerCode; @@ -37,7 +38,7 @@ public abstract class RepositoryPass extends Pass } //- protected void connect() throws Exception { - clientSocket = Utils.createClientSocket(InetAddress.getByName(Global.properties.ServerAddress), + clientSocket = Utils.createClientSocket(InetAddress.getByName(Constants.ServerAddress), server.getPort(), getTimeout() ); diff --git a/src/_VisualDVM/Repository/Component/Visualiser.java b/src/_VisualDVM/Repository/Component/Visualiser.java index fd897ca5..b9ff74bc 100644 --- a/src/_VisualDVM/Repository/Component/Visualiser.java +++ b/src/_VisualDVM/Repository/Component/Visualiser.java @@ -54,7 +54,7 @@ public class Visualiser extends Component { public ComponentType getComponentType() { return ComponentType.Visualiser; } - // + // //репозиторий не найден // // //http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html diff --git a/src/_VisualDVM/Repository/RepositoryServer.java b/src/_VisualDVM/Repository/RepositoryServer.java index fef0c6ac..1f45dc41 100644 --- a/src/_VisualDVM/Repository/RepositoryServer.java +++ b/src/_VisualDVM/Repository/RepositoryServer.java @@ -87,14 +87,14 @@ public abstract class RepositoryServer { Thread thread = new Thread(() -> { try { Properties props = new Properties(); - props.put("mail.smtp.host", Global.normalProperties.SMTPHost); + props.put("mail.smtp.host", Constants.SMTPHost); props.put("mail.smtp.auth", "true"); - props.put("mail.smtp.port", String.valueOf(Global.normalProperties.SMTPPort)); - props.put("mail.smtp.socketFactory.port", String.valueOf(Global.normalProperties.MailSocketPort)); + props.put("mail.smtp.port", String.valueOf(Constants.SMTPPort)); + props.put("mail.smtp.socketFactory.port", String.valueOf(Constants.MailSocketPort)); props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); - props.put("mail.smtp.connectiontimeout", String.valueOf(Global.normalProperties.SocketTimeout)); - props.put("mail.smtp.timeout", String.valueOf(Global.normalProperties.SocketTimeout)); - props.put("mail.smtp.writetimeout", String.valueOf(Global.normalProperties.SocketTimeout)); + props.put("mail.smtp.connectiontimeout", String.valueOf(Global.properties.SocketTimeout)); + props.put("mail.smtp.timeout", String.valueOf(Global.properties.SocketTimeout)); + props.put("mail.smtp.writetimeout", String.valueOf(Global.properties.SocketTimeout)); //------------------------------ LinkedHashMap innerFiles = new LinkedHashMap<>(); for (String aName : message_in.files.keySet()) { diff --git a/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java b/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java index 2d563ce4..1861543e 100644 --- a/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java +++ b/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java @@ -79,7 +79,7 @@ public class MachineProcess extends DBObject { boolean local = false; try { InetAddress address = InetAddress.getByName(machineAddress); - InetAddress localAddress = InetAddress.getByName(Global.normalProperties.ServerAddress); + InetAddress localAddress = InetAddress.getByName(Constants.ServerAddress); local = localAddress.getHostAddress().equals(address.getHostAddress()); } catch (Exception ex) { Utils_.MainLog.PrintException(ex); diff --git a/src/_VisualDVM/VisualDVMProperties.java b/src/_VisualDVM/VisualDVMProperties.java index 0e73b962..541c3522 100644 --- a/src/_VisualDVM/VisualDVMProperties.java +++ b/src/_VisualDVM/VisualDVMProperties.java @@ -8,25 +8,12 @@ public class VisualDVMProperties extends Properties { public _VisualDVM.Mode Mode = _VisualDVM.Mode.Normal; //--- @Expose - public String ServerAddress = "alex-freenas.ddns.net"; - @Expose - public String ServerUserName = "testuser"; - @Expose - public int ServerUserSHHPort = 23; - @Expose public int ComponentsServerPort = 7995; @Expose public int TestingServerPort = 7998; @Expose public int SocketTimeout = 5000; - //--email - @Expose - public String SMTPHost = "smtp.mail.ru"; - @Expose - public int SMTPPort = 465; - @Expose - public int MailSocketPort = 465; - //--- + //-- public VisualDVMProperties() { } public VisualDVMProperties(_VisualDVM.Mode mode_in, File file_in) { @@ -36,14 +23,8 @@ public class VisualDVMProperties extends Properties { //--- public VisualDVMProperties(VisualDVMProperties src) { Mode = src.Mode; - ServerAddress = src.ServerAddress; - ServerUserName = src.ServerUserName; - ServerUserSHHPort = src.ServerUserSHHPort; ComponentsServerPort = src.ComponentsServerPort; TestingServerPort = src.TestingServerPort; SocketTimeout = src.SocketTimeout; - SMTPHost = src.SMTPHost; - SMTPPort = src.SMTPPort; - MailSocketPort = src.MailSocketPort; } }