no message

This commit is contained in:
2023-10-10 23:33:23 +03:00
parent ca969faacd
commit 7a1d5211ae
7 changed files with 124 additions and 107 deletions

17
.idea/workspace.xml generated
View File

@@ -7,24 +7,13 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment=""> <list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestsWindow.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CredentialsForm.form" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CredentialsForm.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestsForm.form" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestsWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestsWindow.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainWindow.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Compiler/CompilersDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Compiler/CompilersDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Machine/MachinesDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Machine/MachinesDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/User/UsersDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/User/UsersDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/EditMachineKernels.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/EditMachineKernels.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestingWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestingWindow.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/MainForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/MainForm.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/MainForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/MainForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestsForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestsForm.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestsForm.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -1,4 +1,6 @@
package Visual_DVM_2021.UI.Interface; package Visual_DVM_2021.UI.Interface;
import javax.swing.*;
public interface TestsWindow { public interface TestsWindow {
void ShowAll(); void ShowAll();
JPanel getContent();
} }

View File

@@ -8,10 +8,7 @@ import Common.UI.Windows.FormType;
import Common.Utils.Utils; import Common.Utils.Utils;
import Visual_DVM_2021.Passes.PassCode_2021; import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Pass_2021; import Visual_DVM_2021.Passes.Pass_2021;
import Visual_DVM_2021.UI.Interface.CallbackWindow; import Visual_DVM_2021.UI.Interface.*;
import Visual_DVM_2021.UI.Interface.CredentialsWindow;
import Visual_DVM_2021.UI.Interface.ProjectWindow;
import Visual_DVM_2021.UI.Interface.TestingWindow;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@@ -22,21 +19,14 @@ public class MainForm extends Form implements MainWindow {
private ProjectForm projectForm; private ProjectForm projectForm;
private CallbackForm callbackForm; private CallbackForm callbackForm;
private CredentialsForm credentialsForm; private CredentialsForm credentialsForm;
private TestsForm testsForm;
//--- //---
private TestingForm testingForm; private TestingForm testingForm;
//----------------- //-----------------
private JPanel Content; private JPanel Content;
private JTabbedPane globalTabs; private JTabbedPane globalTabs;
private JPanel mainPanel; private JPanel mainPanel;
public MainForm() {
mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH);
InstallWelcomePanel();
InstallCredentialsPanel();
InstallCallbackPanel();
InstallTestingPanel();
ShowUpdatesIcon();
//----------------------
}
@Override @Override
protected JPanel getMainPanel() { protected JPanel getMainPanel() {
return Content; return Content;
@@ -64,9 +54,20 @@ public class MainForm extends Form implements MainWindow {
((VersionsForm) UI.getVersionsWindow()).SaveSplitters(); ((VersionsForm) UI.getVersionsWindow()).SaveSplitters();
SaveCallbackPanel(); SaveCallbackPanel();
SaveCredentialsPanel(); SaveCredentialsPanel();
SaveTestsPanel();
SaveTestingPanel(); SaveTestingPanel();
Global.FinishApplication(); Global.FinishApplication();
} }
public MainForm() {
mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH);
InstallWelcomePanel();
InstallCallbackPanel();
InstallCredentialsPanel();
InstallTestsPanel();
InstallTestingPanel();
ShowUpdatesIcon();
//----------------------
}
private void InstallWelcomePanel() { private void InstallWelcomePanel() {
globalTabs.insertTab("Начало работы", globalTabs.insertTab("Начало работы",
null, null,
@@ -105,10 +106,10 @@ public class MainForm extends Form implements MainWindow {
} }
} }
private void InstallCredentialsPanel() { private void InstallCredentialsPanel() {
globalTabs.insertTab("Учётные данные", globalTabs.insertTab("Машины",
Utils.getIcon("/icons/Machine.png"), Utils.getIcon("/icons/Machine.png"),
(credentialsForm = new CredentialsForm()).getContent(), (credentialsForm = new CredentialsForm()).getContent(),
"Машины, пользователи, компиляторы", 1); "Машины, пользователи, компиляторы", 2);
} }
private void SaveCredentialsPanel() { private void SaveCredentialsPanel() {
if (credentialsForm != null) { if (credentialsForm != null) {
@@ -116,25 +117,38 @@ public class MainForm extends Form implements MainWindow {
credentialsForm = null; credentialsForm = null;
} }
} }
private void InstallTestsPanel() {
globalTabs.insertTab("Тесты",
Utils.getIcon("/icons/Library.PNG"),
(testsForm = new TestsForm()).getContent(),
"Библиотека тестов на сервере", 3);
}
private void SaveTestsPanel() {
if (testsForm != null) {
testsForm.SaveSplitters();
testsForm = null;
}
}
private void InstallTestingPanel() { private void InstallTestingPanel() {
testingForm = new TestingForm(); testingForm = new TestingForm();
ShowTestingTab(); ShowTestingTab();
} }
@Override @Override
public void ShowTestingTab() { public void ShowTestingTab() {
if (globalTabs.getTabCount() < 4) if (globalTabs.getTabCount() < 5)
globalTabs.insertTab("Тестирование", globalTabs.insertTab("Тестирование",
Utils.getIcon("/icons/Session.png"), Utils.getIcon("/icons/Session.png"),
testingForm.getContent(), testingForm.getContent(),
"Система тестирования", 3); "Система тестирования", 4);
} }
@Override @Override
public void HideTestingTab() { public void HideTestingTab() {
if (globalTabs.getTabCount() == 4) if (globalTabs.getTabCount() == 5)
globalTabs.removeTabAt(3); globalTabs.removeTabAt(4);
} }
@Override @Override
public void ShowCredentials() { public void ShowCredentials() {
/*
String res = ""; String res = "";
if (Current.HasMachine()) { if (Current.HasMachine()) {
res += "@" + Current.getMachine().getURL(); res += "@" + Current.getMachine().getURL();
@@ -148,10 +162,12 @@ public class MainForm extends Form implements MainWindow {
testingTabs.setTitleAt(3, "DVM система: ?"); testingTabs.setTitleAt(3, "DVM система: ?");
} }
*/ */
/*д
} else { } else {
res += "?@?"; res += "?@?";
} }
globalTabs.setTitleAt(2, res); globalTabs.setTitleAt(2, res);
*/
} }
private void SaveTestingPanel() { private void SaveTestingPanel() {
if (testingForm != null) { if (testingForm != null) {
@@ -178,6 +194,10 @@ public class MainForm extends Form implements MainWindow {
return credentialsForm; return credentialsForm;
} }
@Override @Override
public TestsWindow getTestsWindow() {
return testsForm;
}
@Override
public void ShowUpdatesIcon() { public void ShowUpdatesIcon() {
UI.mainMenuBar.ShowUpdatesIcon(); UI.mainMenuBar.ShowUpdatesIcon();
} }
@@ -203,6 +223,7 @@ public class MainForm extends Form implements MainWindow {
// иначе ссылка на главное окно в методах пустая. // иначе ссылка на главное окно в методах пустая.
getCallbackWindow().ShowAll(); getCallbackWindow().ShowAll();
getCredentialsWindow().ShowAll(); getCredentialsWindow().ShowAll();
getTestsWindow().ShowAll();
if (getTestingWindow() != null) if (getTestingWindow() != null)
getTestingWindow().ShowAll(); getTestingWindow().ShowAll();
UI.windowsStack.push(this); UI.windowsStack.push(this);

View File

@@ -415,61 +415,6 @@
</tabbedpane> </tabbedpane>
</children> </children>
</grid> </grid>
<grid id="79bb4" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="Тесты (0)" icon="icons/Library.PNG">
<tooltip value="Тесты"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="66a49" binding="SC45">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="700"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="e708e" binding="groupsBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="400" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="acd67" binding="groupsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="56f09" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<minimumSize width="250" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="f518d" binding="testsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
<grid id="e6dae" binding="dvmTestingPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="e6dae" binding="dvmTestingPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/> <margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>

View File

@@ -25,7 +25,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public JSplitPane SC41; public JSplitPane SC41;
public JSplitPane SC42; public JSplitPane SC42;
public JSplitPane SC43; public JSplitPane SC43;
public JSplitPane SC45;
public JSplitPane SC50; public JSplitPane SC50;
public JSplitPane SC51; public JSplitPane SC51;
public JSplitPane SC52; public JSplitPane SC52;
@@ -76,7 +75,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JPanel sapforConfigurationCommandsPanel; private JPanel sapforConfigurationCommandsPanel;
private JLabel sapforTasksPackagesLabel; private JLabel sapforTasksPackagesLabel;
private JLabel sapforTasksLabel; private JLabel sapforTasksLabel;
private JPanel groupsBackground;
private JPanel sapforScenariosPanel; private JPanel sapforScenariosPanel;
private JPanel serverSapforsPanel; private JPanel serverSapforsPanel;
private JPanel sapforTasksPackagesPanel; private JPanel sapforTasksPackagesPanel;
@@ -130,17 +128,12 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
ShowNoProject(); ShowNoProject();
//- //-
Global.testingServer.db.configurations.mountUI(configurationsPanel); Global.testingServer.db.configurations.mountUI(configurationsPanel);
Global.testingServer.db.groups.mountUI(groupsPanel);
Global.testingServer.db.tests.mountUI(testsPanel);
Global.testingServer.account_db.packages.mountUI(packagesPanel); Global.testingServer.account_db.packages.mountUI(packagesPanel);
Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel); Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
//-- //--
Global.testingServer.db.sapforConfigurations.mountUI(sapforConfigurationsPanel); Global.testingServer.db.sapforConfigurations.mountUI(sapforConfigurationsPanel);
Global.testingServer.db.sapforConfigurationCommands.mountUI(sapforConfigurationCommandsPanel); Global.testingServer.db.sapforConfigurationCommands.mountUI(sapforConfigurationCommandsPanel);
Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel); Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel);
// Global.testingServer.db.sapforTasksPackages.mountUI(sapforScenariosPanel);
// Global.testingServer.db.sapforTasksPackages.mountUI(sapforPackagesPanel);
//Global.db.sapforTasks.mountUI(sapforTasksPanel);
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel); Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel);
// Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel); // Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel);
//--------------------------------------------------------------------->>>> //--------------------------------------------------------------------->>>>
@@ -169,7 +162,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
@Override @Override
public void ShowAll() { public void ShowAll() {
Global.testingServer.db.configurations.ShowUI(); Global.testingServer.db.configurations.ShowUI();
Global.testingServer.db.groups.ShowUI();
Global.testingServer.db.serverSapfors.ShowUI(); Global.testingServer.db.serverSapfors.ShowUI();
Global.testingServer.db.sapforConfigurations.ShowUI(); Global.testingServer.db.sapforConfigurations.ShowUI();
//---- //----
@@ -206,7 +198,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
} }
@Override @Override
public void ShowProject() { public void ShowProject() {
testingTabs.setEnabledAt(1, true); testingTabs.setEnabledAt(0, true);
//- //-
ShowSession(); ShowSession();
//- //-
@@ -218,9 +210,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
Global.db.compilationTasks.ClearUI(); Global.db.compilationTasks.ClearUI();
Global.db.runTasks.ClearUI(); Global.db.runTasks.ClearUI();
//- //-
if (testingTabs.getSelectedIndex() == 1) if (testingTabs.getSelectedIndex() == 0)
testingTabs.setSelectedIndex(0); testingTabs.setSelectedIndex(1);
testingTabs.setEnabledAt(1, false); testingTabs.setEnabledAt(0, false);
} }
@Override @Override
public void SaveSplitters() { public void SaveSplitters() {

View File

@@ -1,13 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Visual_DVM_2021.UI.Main.TestsForm"> <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Visual_DVM_2021.UI.Main.TestsForm">
<grid id="27dc6" row-count="1" column-count="1" layout-manager="BorderLayout"> <grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="400"/> <xy x="20" y="20" width="653" height="400"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children/> <children>
<grid id="35527" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<splitpane id="c3576" binding="SC45">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="700"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="f7d57" binding="groupsBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="400" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="94f2" binding="groupsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="2cfd" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<minimumSize width="250" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="c642d" binding="testsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</grid> </grid>
</form> </form>

View File

@@ -1,8 +1,26 @@
package Visual_DVM_2021.UI.Main; package Visual_DVM_2021.UI.Main;
import Common.Global;
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
import Visual_DVM_2021.UI.Interface.TestsWindow; import Visual_DVM_2021.UI.Interface.TestsWindow;
public class TestsForm implements TestsWindow {
import javax.swing.*;
public class TestsForm implements TestsWindow, FormWithSplitters {
private JPanel content;
public JSplitPane SC45;
private JPanel groupsBackground;
private JPanel groupsPanel;
private JPanel testsPanel;
@Override
public JPanel getContent() {
return content;
}
@Override @Override
public void ShowAll() { public void ShowAll() {
Global.testingServer.db.groups.ShowUI();
}
public TestsForm(){
LoadSplitters();
Global.testingServer.db.groups.mountUI(groupsPanel);
Global.testingServer.db.tests.mountUI(testsPanel);
} }
} }