From ca969faacd89c6dd3c9445e2d306c63b8a1c9e7a Mon Sep 17 00:00:00 2001 From: 02090095 Date: Tue, 10 Oct 2023 20:14:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B2=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81?= =?UTF-8?q?=D1=81=D0=B5=20=D1=80=D0=B5=D0=B4=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD?= =?UTF-8?q?=D0=B0.=20=D0=BD=D0=B5=20=D0=BE=D1=87=D0=B5=D0=BD=D1=8C=20?= =?UTF-8?q?=D0=BD=D1=80=D0=B0=D0=B2=D0=B8=D1=82=D1=81=D1=8F=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BA=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B0=D1=81=D0=BF=D0=BE=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 25 ++-- .../UI/Menus_2023/MainMenuBar/MainWindow.java | 11 +- src/GlobalData/Compiler/CompilersDBTable.java | 4 +- src/GlobalData/Machine/MachinesDBTable.java | 6 +- src/GlobalData/User/UsersDBTable.java | 4 +- .../Passes/All/EditMachineKernels.java | 8 - .../Passes/All/SynchronizeTests.java | 7 - .../UI/Interface/CredentialsWindow.java | 7 + .../UI/Interface/TestingWindow.java | 6 - .../UI/Interface/TestsWindow.java | 4 + .../UI/Main/CredentialsForm.form | 112 ++++++++++++++ .../UI/Main/CredentialsForm.java | 74 +++++++++ src/Visual_DVM_2021/UI/Main/MainForm.java | 59 ++++++-- src/Visual_DVM_2021/UI/Main/TestingForm.form | 141 ------------------ src/Visual_DVM_2021/UI/Main/TestingForm.java | 103 ------------- src/Visual_DVM_2021/UI/Main/TestsForm.form | 13 ++ src/Visual_DVM_2021/UI/Main/TestsForm.java | 8 + 17 files changed, 296 insertions(+), 296 deletions(-) create mode 100644 src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java create mode 100644 src/Visual_DVM_2021/UI/Interface/TestsWindow.java create mode 100644 src/Visual_DVM_2021/UI/Main/CredentialsForm.form create mode 100644 src/Visual_DVM_2021/UI/Main/CredentialsForm.java create mode 100644 src/Visual_DVM_2021/UI/Main/TestsForm.form create mode 100644 src/Visual_DVM_2021/UI/Main/TestsForm.java diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f25ae58a..100920f0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,15 +7,22 @@ + + + + + + - - - - - - - - + + + + + + + + + @@ -38,8 +45,8 @@ diff --git a/src/Common/UI/Menus_2023/MainMenuBar/MainWindow.java b/src/Common/UI/Menus_2023/MainMenuBar/MainWindow.java index e16ccfb6..8ca40db8 100644 --- a/src/Common/UI/Menus_2023/MainMenuBar/MainWindow.java +++ b/src/Common/UI/Menus_2023/MainMenuBar/MainWindow.java @@ -1,19 +1,22 @@ package Common.UI.Menus_2023.MainMenuBar; -import Visual_DVM_2021.UI.Interface.CallbackWindow; -import Visual_DVM_2021.UI.Interface.ProjectWindow; -import Visual_DVM_2021.UI.Interface.TestingWindow; +import Visual_DVM_2021.UI.Interface.*; public interface MainWindow { void Show(); void ShowProject(); void ShowNoProject(); ProjectWindow getProjectWindow(); CallbackWindow getCallbackWindow(); + CredentialsWindow getCredentialsWindow(); + TestsWindow getTestsWindow(); + TestingWindow getTestingWindow(); //- void ShowUpdatesIcon(); void FocusProject(); void FocusCallback(); void FocusTesting(); - TestingWindow getTestingWindow(); + void ShowTestingTab(); void HideTestingTab(); + //- + void ShowCredentials(); } diff --git a/src/GlobalData/Compiler/CompilersDBTable.java b/src/GlobalData/Compiler/CompilersDBTable.java index 9a3ab08f..db2e70ea 100644 --- a/src/GlobalData/Compiler/CompilersDBTable.java +++ b/src/GlobalData/Compiler/CompilersDBTable.java @@ -119,12 +119,12 @@ public class CompilersDBTable extends iDBTable { @Override public void ShowCurrentObject() throws Exception { super.ShowCurrentObject(); - UI.getMainWindow().getTestingWindow().ShowCredentials(); + UI.getMainWindow().ShowCredentials(); } @Override public void ShowNoCurrentObject() throws Exception { super.ShowNoCurrentObject(); - UI.getMainWindow().getTestingWindow().ShowCredentials(); + UI.getMainWindow().ShowCredentials(); } }; } diff --git a/src/GlobalData/Machine/MachinesDBTable.java b/src/GlobalData/Machine/MachinesDBTable.java index 92a8cc31..fb649446 100644 --- a/src/GlobalData/Machine/MachinesDBTable.java +++ b/src/GlobalData/Machine/MachinesDBTable.java @@ -82,14 +82,12 @@ public class MachinesDBTable extends iDBTable { @Override public void ShowCurrentObject() throws Exception { super.ShowCurrentObject(); - UI.getMainWindow().getTestingWindow().ShowCurrentMachine(); - UI.getMainWindow().getTestingWindow().ShowCredentials(); + UI.getMainWindow().ShowCredentials(); } @Override public void ShowNoCurrentObject() throws Exception { super.ShowNoCurrentObject(); - UI.getMainWindow().getTestingWindow().ShowNoCurrentMachine(); - UI.getMainWindow().getTestingWindow().ShowCredentials(); + UI.getMainWindow().ShowCredentials(); } @Override protected void AdditionalInitColumns() { diff --git a/src/GlobalData/User/UsersDBTable.java b/src/GlobalData/User/UsersDBTable.java index f3b85987..2cdbb56c 100644 --- a/src/GlobalData/User/UsersDBTable.java +++ b/src/GlobalData/User/UsersDBTable.java @@ -76,12 +76,12 @@ public class UsersDBTable extends iDBTable { @Override public void ShowCurrentObject() throws Exception { super.ShowCurrentObject(); - UI.getMainWindow().getTestingWindow().ShowCredentials(); + UI.getMainWindow().ShowCredentials(); } @Override public void ShowNoCurrentObject() throws Exception { super.ShowNoCurrentObject(); - UI.getMainWindow().getTestingWindow().ShowCredentials(); + UI.getMainWindow().ShowCredentials(); } }; diff --git a/src/Visual_DVM_2021/Passes/All/EditMachineKernels.java b/src/Visual_DVM_2021/Passes/All/EditMachineKernels.java index 2c2b8684..120a354c 100644 --- a/src/Visual_DVM_2021/Passes/All/EditMachineKernels.java +++ b/src/Visual_DVM_2021/Passes/All/EditMachineKernels.java @@ -1,7 +1,6 @@ package Visual_DVM_2021.Passes.All; import Common.Current; import Common.Global; -import Common.UI.UI; import Common.UI.Windows.Dialog.SliderNumberForm; import GlobalData.Machine.Machine; import Repository.Server.ServerCode; @@ -40,11 +39,4 @@ public class EditMachineKernels extends TestingSystemPass { Command(new ServerExchangeUnit_2021(ServerCode.EditObject, "", target)); Global.testingServer.db.Update(target); } - @Override - protected void showDone() throws Exception { - if (Current.HasMachine()) - UI.getMainWindow().getTestingWindow().ShowCurrentMachine(); - else - UI.getMainWindow().getTestingWindow().ShowNoCurrentMachine(); - } } diff --git a/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java b/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java index e695cb7e..861ed904 100644 --- a/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java +++ b/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java @@ -52,15 +52,8 @@ public class SynchronizeTests extends TestingSystemPass { server.db.configurations.ShowUI(); server.db.groups.ShowUI(); server.db.sapforConfigurations.ShowUI(); - // server.db.sapforTasksPackages.ShowUI(); server.db.RestoreLastSelections(); UI.getMainWindow().getTestingWindow().ShowCheckedTestsCount(); - //для отображения числа ядер. - if (Current.HasMachine()) - UI.getMainWindow().getTestingWindow().ShowCurrentMachine(); - else - UI.getMainWindow().getTestingWindow().ShowNoCurrentMachine(); - } } } diff --git a/src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java b/src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java new file mode 100644 index 00000000..56a2a0ff --- /dev/null +++ b/src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java @@ -0,0 +1,7 @@ +package Visual_DVM_2021.UI.Interface; +import javax.swing.*; +public interface CredentialsWindow { + JPanel getContent(); + void ShowAll(); + void RestoreLastCredentials(); +} diff --git a/src/Visual_DVM_2021/UI/Interface/TestingWindow.java b/src/Visual_DVM_2021/UI/Interface/TestingWindow.java index d6a8e79c..d3dace98 100644 --- a/src/Visual_DVM_2021/UI/Interface/TestingWindow.java +++ b/src/Visual_DVM_2021/UI/Interface/TestingWindow.java @@ -1,7 +1,6 @@ package Visual_DVM_2021.UI.Interface; public interface TestingWindow extends VisualizerForm { void ShowAll(); - void RestoreLastCredentials(); void ShowProjectMaxCompilationTime(); void ShowProjectMaxRunTime(); //- @@ -16,7 +15,6 @@ public interface TestingWindow extends VisualizerForm { ShowProjectMaxCompilationTime(); ShowProjectMaxRunTime(); } - void FocusCredentials(); void ShowProject(); void ShowNoProject(); //- @@ -37,10 +35,6 @@ public interface TestingWindow extends VisualizerForm { void setDeveloperRights(); void FocusScenarios(); //---------------------------------------->>> - void ShowCurrentMachine(); - void ShowNoCurrentMachine(); - //---------------------------------------->>> - void ShowCredentials(); void FocusSapforTasksPackages(); void ShowCurrentSapforTasksPackage(); void ShowNoSapforTasksPackage(); diff --git a/src/Visual_DVM_2021/UI/Interface/TestsWindow.java b/src/Visual_DVM_2021/UI/Interface/TestsWindow.java new file mode 100644 index 00000000..5b301735 --- /dev/null +++ b/src/Visual_DVM_2021/UI/Interface/TestsWindow.java @@ -0,0 +1,4 @@ +package Visual_DVM_2021.UI.Interface; +public interface TestsWindow { + void ShowAll(); +} diff --git a/src/Visual_DVM_2021/UI/Main/CredentialsForm.form b/src/Visual_DVM_2021/UI/Main/CredentialsForm.form new file mode 100644 index 00000000..c231248e --- /dev/null +++ b/src/Visual_DVM_2021/UI/Main/CredentialsForm.form @@ -0,0 +1,112 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/Visual_DVM_2021/UI/Main/CredentialsForm.java b/src/Visual_DVM_2021/UI/Main/CredentialsForm.java new file mode 100644 index 00000000..ce734a3d --- /dev/null +++ b/src/Visual_DVM_2021/UI/Main/CredentialsForm.java @@ -0,0 +1,74 @@ +package Visual_DVM_2021.UI.Main; +import Common.Constants; +import Common.Current; +import Common.Global; +import GlobalData.Credentials.Credentials; +import Visual_DVM_2021.UI.Interface.CredentialsWindow; +import Visual_DVM_2021.UI.Interface.FormWithSplitters; + +import javax.swing.*; +public class CredentialsForm implements CredentialsWindow, FormWithSplitters { + public JSplitPane SC18; + public JSplitPane SC19; + private JPanel machinesPanel; + private JPanel usersPanel; + private JPanel compilersPanel; + private JPanel content; + public CredentialsForm(){ + LoadSplitters(); + Global.db.machines.mountUI(machinesPanel); + Global.db.users.mountUI(usersPanel); + Global.db.compilers.mountUI(compilersPanel); + } + @Override + public JPanel getContent() { + return content; + } + @Override + public void ShowAll() { + Global.db.machines.ShowUI(); + RestoreLastCredentials(); + } + public void RestoreLastCredentials() { + Credentials credentials = (Credentials) Current.get(Current.Credentials); + if (credentials.machine_id != Constants.Nan) { + if (Global.db.machines.containsKey(credentials.machine_id)) { + Global.db.machines.ShowUI(credentials.machine_id); + if (Global.db.users.containsKey(credentials.user_id)) { + Global.db.users.ShowUI(credentials.user_id); + } else { + credentials.user_id = Constants.Nan; + Global.db.UpdateCredentials(); + } + if (Global.db.compilers.containsKey(credentials.compiler_id)) { + Global.db.compilers.ShowUI(credentials.compiler_id); + } else { + credentials.compiler_id = Constants.Nan; + Global.db.UpdateCredentials(); + } + //- + if (Global.db.makefiles.containsKey(credentials.makefile_id)) { + Global.db.makefiles.ShowUI(credentials.makefile_id); + } else { + credentials.makefile_id = Constants.Nan; + Global.db.UpdateCredentials(); + } + //- + if (Global.db.runConfigurations.containsKey(credentials.runconfiguration_id)) { + Global.db.runConfigurations.ShowUI(credentials.runconfiguration_id); + } else { + credentials.runconfiguration_id = Constants.Nan; + Global.db.UpdateCredentials(); + } + } else { + credentials.machine_id = Constants.Nan; + credentials.user_id = Constants.Nan; + credentials.compiler_id = Constants.Nan; + credentials.remotesapfor_id = Constants.Nan; + credentials.makefile_id = Constants.Nan; + credentials.runconfiguration_id = Constants.Nan; + Global.db.UpdateCredentials(); + } + } + } +} diff --git a/src/Visual_DVM_2021/UI/Main/MainForm.java b/src/Visual_DVM_2021/UI/Main/MainForm.java index 8f743586..4475ca06 100644 --- a/src/Visual_DVM_2021/UI/Main/MainForm.java +++ b/src/Visual_DVM_2021/UI/Main/MainForm.java @@ -1,6 +1,7 @@ package Visual_DVM_2021.UI.Main; import Common.Current; import Common.Global; +import Common.UI.Menus_2023.MainMenuBar.MainWindow; import Common.UI.UI; import Common.UI.Windows.Form; import Common.UI.Windows.FormType; @@ -8,7 +9,7 @@ import Common.Utils.Utils; import Visual_DVM_2021.Passes.PassCode_2021; import Visual_DVM_2021.Passes.Pass_2021; import Visual_DVM_2021.UI.Interface.CallbackWindow; -import Common.UI.Menus_2023.MainMenuBar.MainWindow; +import Visual_DVM_2021.UI.Interface.CredentialsWindow; import Visual_DVM_2021.UI.Interface.ProjectWindow; import Visual_DVM_2021.UI.Interface.TestingWindow; @@ -20,6 +21,8 @@ public class MainForm extends Form implements MainWindow { //----------------- private ProjectForm projectForm; private CallbackForm callbackForm; + private CredentialsForm credentialsForm; + //--- private TestingForm testingForm; //----------------- private JPanel Content; @@ -28,6 +31,7 @@ public class MainForm extends Form implements MainWindow { public MainForm() { mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH); InstallWelcomePanel(); + InstallCredentialsPanel(); InstallCallbackPanel(); InstallTestingPanel(); ShowUpdatesIcon(); @@ -59,6 +63,7 @@ public class MainForm extends Form implements MainWindow { if (UI.getVersionsWindow() != null) ((VersionsForm) UI.getVersionsWindow()).SaveSplitters(); SaveCallbackPanel(); + SaveCredentialsPanel(); SaveTestingPanel(); Global.FinishApplication(); } @@ -66,17 +71,14 @@ public class MainForm extends Form implements MainWindow { globalTabs.insertTab("Начало работы", null, welcomeForm.content, - "Для начала работы откройте проект с помощью правой панели инструментов или перетащите его сюда", 0 + "Для начала работы откройте проект с помощью верхней панели инструментов, или перетащите его сюда", 0 ); } private void InstallProjectPanel() { - // globalTabs.insertTab("Проект: " + Current.getProject().name, - // Utils.getIcon("/icons/Common.png"), - // (projectForm = new ProjectForm()).content, Current.getProject().description, 0); globalTabs.insertTab("", null, (projectForm = new ProjectForm()).content, Current.getProject().description, 0); globalTabs.setTabComponentAt(0, - new TabToolBar("Проект: " + Current.getProject().name, PassCode_2021.CloseCurrentProject){ + new TabToolBar("Проект: " + Current.getProject().name, PassCode_2021.CloseCurrentProject) { @Override public void leftMouseAction() { globalTabs.setSelectedIndex(0); @@ -102,6 +104,18 @@ public class MainForm extends Form implements MainWindow { callbackForm = null; } } + private void InstallCredentialsPanel() { + globalTabs.insertTab("Учётные данные", + Utils.getIcon("/icons/Machine.png"), + (credentialsForm = new CredentialsForm()).getContent(), + "Машины, пользователи, компиляторы", 1); + } + private void SaveCredentialsPanel() { + if (credentialsForm != null) { + credentialsForm.SaveSplitters(); + credentialsForm = null; + } + } private void InstallTestingPanel() { testingForm = new TestingForm(); ShowTestingTab(); @@ -112,12 +126,32 @@ public class MainForm extends Form implements MainWindow { globalTabs.insertTab("Тестирование", Utils.getIcon("/icons/Session.png"), testingForm.getContent(), - "Система тестирования", 2); + "Система тестирования", 3); } @Override public void HideTestingTab() { - if (globalTabs.getTabCount() == 3) - globalTabs.removeTabAt(2); + if (globalTabs.getTabCount() == 4) + globalTabs.removeTabAt(3); + } + @Override + public void ShowCredentials() { + String res = ""; + if (Current.HasMachine()) { + res += "@" + Current.getMachine().getURL(); + if (Current.HasUser()) { + res = Current.getUser().login + res; + } else res = "?" + res; + /* + if (Current.HasCompiler() && Current.getCompiler().type.equals(CompilerType.dvm)) { + testingTabs.setTitleAt(3, "DVM система: " + Current.getCompiler().description); + } else { + testingTabs.setTitleAt(3, "DVM система: ?"); + } + */ + } else { + res += "?@?"; + } + globalTabs.setTitleAt(2, res); } private void SaveTestingPanel() { if (testingForm != null) { @@ -140,6 +174,10 @@ public class MainForm extends Form implements MainWindow { return callbackForm; } @Override + public CredentialsWindow getCredentialsWindow() { + return credentialsForm; + } + @Override public void ShowUpdatesIcon() { UI.mainMenuBar.ShowUpdatesIcon(); } @@ -153,7 +191,7 @@ public class MainForm extends Form implements MainWindow { } @Override public void FocusTesting() { - globalTabs.setSelectedIndex(2); + globalTabs.setSelectedIndex(3); } @Override public TestingWindow getTestingWindow() { @@ -164,6 +202,7 @@ public class MainForm extends Form implements MainWindow { //приходится идти на это только ПОСЛЕ создания главного окна. // иначе ссылка на главное окно в методах пустая. getCallbackWindow().ShowAll(); + getCredentialsWindow().ShowAll(); if (getTestingWindow() != null) getTestingWindow().ShowAll(); UI.windowsStack.push(this); diff --git a/src/Visual_DVM_2021/UI/Main/TestingForm.form b/src/Visual_DVM_2021/UI/Main/TestingForm.form index 5b432c95..d503e7e9 100644 --- a/src/Visual_DVM_2021/UI/Main/TestingForm.form +++ b/src/Visual_DVM_2021/UI/Main/TestingForm.form @@ -18,147 +18,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Visual_DVM_2021/UI/Main/TestingForm.java b/src/Visual_DVM_2021/UI/Main/TestingForm.java index d507f30a..016cad62 100644 --- a/src/Visual_DVM_2021/UI/Main/TestingForm.java +++ b/src/Visual_DVM_2021/UI/Main/TestingForm.java @@ -1,15 +1,10 @@ package Visual_DVM_2021.UI.Main; -import Common.Constants; -import Common.Current; import Common.Global; import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar; import Common.UI.TextField.StyledTextField; import Common.UI.UI; -import GlobalData.Compiler.CompilerType; -import GlobalData.Credentials.Credentials; import TestingSystem.Configuration.UI.ConfigurationDBTable; import TestingSystem.Group.Group; -import TestingSystem.MachineMaxKernels.MachineMaxKernels; import TestingSystem.TasksPackage.TasksPackageDBTable; import TestingSystem.Test.Test; import Visual_DVM_2021.UI.Interface.FormWithSplitters; @@ -23,7 +18,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { public JPanel getContent() { return content; } - public JSplitPane SC18; public JSplitPane SC20; public JSplitPane SC21; public JSplitPane SC35; @@ -41,8 +35,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { public JSplitPane SC53; public JSplitPane SC56; public JSplitPane SC57; - public JSplitPane SC58; - public JSplitPane SC19; public JSplitPane SC62; public JSplitPane SC63; public JSplitPane SC59; @@ -78,7 +70,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { private JPanel compilationTasksPanel; private JPanel sapforTestingPanel; private JPanel packageVersionsPanel; - private JPanel sapforsPanel; private JPanel sapforConfigurationsPanel; private JLabel sapforConfigurationsLabel; private JLabel sapforConfigurationsCommandsLabel; @@ -117,9 +108,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { singleRunTaskMaster = new RunTasksComparisonForm(singleRunTaskSlave = new RunTasksComparisonForm(null)); dvmTestingRunMaster = new TestRunTasksComparisonForm(dvmTestingRunSlave = new TestRunTasksComparisonForm(null)); //- - Global.db.machines.mountUI(machinesPanel); - Global.db.users.mountUI(usersPanel); - Global.db.compilers.mountUI(compilersPanel); Global.db.makefiles.mountUI(makefilesPanel); //----------------------------------------------- Global.db.modules.mountUI(modulesPanel); @@ -180,8 +168,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { //- @Override public void ShowAll() { - Global.db.machines.ShowUI(); - this.RestoreLastCredentials(); Global.testingServer.db.configurations.ShowUI(); Global.testingServer.db.groups.ShowUI(); Global.testingServer.db.serverSapfors.ShowUI(); @@ -219,10 +205,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { singleCompilationTaskSlave.RemoveObject(); } @Override - public void FocusCredentials() { - testingTabs.setSelectedIndex(0); - } - @Override public void ShowProject() { testingTabs.setEnabledAt(1, true); //- @@ -283,20 +265,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { @Override public void RefreshTabsNames() { } - @Override - public void ShowCurrentMachine() { - String url = Current.getMachine().getURL(); - int kernelsNum = 0; - if (Global.testingServer.db.machinesMaxKernels.containsKey(url)) { - MachineMaxKernels kernels = Global.testingServer.db.machinesMaxKernels.get(url); - kernelsNum = kernels.limit; - } else kernelsNum = 4; - // bChangeKernels.setText("Ядра: " + kernelsNum); - } - @Override - public void ShowNoCurrentMachine() { - //bChangeKernels.setText("Ядра: ?"); - } private void createUIComponents() { // TODO: place custom component creation code here filterName = new StyledTextField(); @@ -354,77 +322,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow { public void FocusScenarios() { testingTabs.setSelectedIndex(3); } - //- - @Override - public void RestoreLastCredentials() { - Credentials credentials = (Credentials) Current.get(Current.Credentials); - if (credentials.machine_id != Constants.Nan) { - if (Global.db.machines.containsKey(credentials.machine_id)) { - Global.db.machines.ShowUI(credentials.machine_id); - if (Global.db.users.containsKey(credentials.user_id)) { - Global.db.users.ShowUI(credentials.user_id); - } else { - credentials.user_id = Constants.Nan; - Global.db.UpdateCredentials(); - } - if (Global.db.compilers.containsKey(credentials.compiler_id)) { - Global.db.compilers.ShowUI(credentials.compiler_id); - } else { - credentials.compiler_id = Constants.Nan; - Global.db.UpdateCredentials(); - } - //- - if (Global.db.makefiles.containsKey(credentials.makefile_id)) { - Global.db.makefiles.ShowUI(credentials.makefile_id); - } else { - credentials.makefile_id = Constants.Nan; - Global.db.UpdateCredentials(); - } - //- - if (Global.db.runConfigurations.containsKey(credentials.runconfiguration_id)) { - Global.db.runConfigurations.ShowUI(credentials.runconfiguration_id); - } else { - credentials.runconfiguration_id = Constants.Nan; - Global.db.UpdateCredentials(); - } - /* - if (Global.db.remoteSapfors.containsKey(credentials.remotesapfor_id)) { - Global.db.remoteSapfors.ShowUI(credentials.remotesapfor_id); - } else { - credentials.remotesapfor_id = Constants.Nan; - Global.db.UpdateCredentials(); - } - */ - } else { - credentials.machine_id = Constants.Nan; - credentials.user_id = Constants.Nan; - credentials.compiler_id = Constants.Nan; - credentials.remotesapfor_id = Constants.Nan; - credentials.makefile_id = Constants.Nan; - credentials.runconfiguration_id = Constants.Nan; - Global.db.UpdateCredentials(); - } - } - } - // testingTabs.setTitleAt(4, "Cистема SAPFOR: " + Current.getRemoteSapfor().version); - @Override - public void ShowCredentials() { - String res = ""; - if (Current.HasMachine()) { - res += "@" + Current.getMachine().getURL(); - if (Current.HasUser()) { - res = Current.getUser().login + res; - } else res = "?" + res; - if (Current.HasCompiler() && Current.getCompiler().type.equals(CompilerType.dvm)) { - testingTabs.setTitleAt(3, "DVM система: " + Current.getCompiler().description); - } else { - testingTabs.setTitleAt(3, "DVM система: ?"); - } - } else { - res += "?@?"; - } - testingTabs.setTitleAt(0, res); - } @Override public void FocusSapforTasksPackages() { } diff --git a/src/Visual_DVM_2021/UI/Main/TestsForm.form b/src/Visual_DVM_2021/UI/Main/TestsForm.form new file mode 100644 index 00000000..13d4a01a --- /dev/null +++ b/src/Visual_DVM_2021/UI/Main/TestsForm.form @@ -0,0 +1,13 @@ + +
+ + + + + + + + + + +
diff --git a/src/Visual_DVM_2021/UI/Main/TestsForm.java b/src/Visual_DVM_2021/UI/Main/TestsForm.java new file mode 100644 index 00000000..dad5cbe0 --- /dev/null +++ b/src/Visual_DVM_2021/UI/Main/TestsForm.java @@ -0,0 +1,8 @@ +package Visual_DVM_2021.UI.Main; +import Visual_DVM_2021.UI.Interface.TestsWindow; +public class TestsForm implements TestsWindow { + @Override + public void ShowAll() { + + } +}