промежуточный. перенос вкладок

This commit is contained in:
2024-03-13 19:19:32 +03:00
parent f52a062e86
commit 0238cc1b3e
20 changed files with 268 additions and 435 deletions

25
.idea/workspace.xml generated
View File

@@ -7,13 +7,26 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateDVMPackageFromCurrentProject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforPackage/SapforPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforPackage/SapforPackageDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackagesBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" 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/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/TestingSystem/Common/TestingBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTasks/DVMCompilationTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTasks/DVMCompilationTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadDVMPackage.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/Passes/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java" beforeDir="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/CredentialsForm.form" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CredentialsForm.java" beforeDir="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.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/buffer_.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -4,7 +4,7 @@
"ServerUserName": "testuser",
"ServerUserSHHPort": 23,
"ComponentsServerPort": 7995,
"TestingServerPort": 7998,
"TestingServerPort": 7996,
"SocketTimeout": 5000,
"OldServer": false,
"SMTPHost": "smtp.mail.ru",
@@ -31,7 +31,7 @@
"PerformanceAnalyzerPath": "",
"ComponentsBackUpsCount": 10,
"TestingKernels": 28,
"AutoCheckTesting": true,
"AutoCheckTesting": false,
"CheckTestingIntervalSeconds": 10,
"EmailOnTestingProgress": false
}

View File

@@ -6,7 +6,6 @@ public interface MainWindow {
void ShowNoProject();
ProjectWindow getProjectWindow();
CallbackWindow getCallbackWindow();
CredentialsWindow getCredentialsWindow();
TestsWindow getTestsWindow();
TestingWindow getTestingWindow();
//-
@@ -18,5 +17,4 @@ public interface MainWindow {
void SwitchTestingTabs(boolean flag);
//-
void ShowCheckedTestsCount();
void FocusCredentials();
}

View File

@@ -84,13 +84,13 @@ public class MachinesDBTable extends iDBTable<Machine> {
public void ShowCurrentObject() throws Exception {
super.ShowCurrentObject();
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
UI.testingBar.ShowMachine();
//UI.testingBar.ShowMachine();
}
@Override
public void ShowNoCurrentObject() throws Exception {
super.ShowNoCurrentObject();
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
UI.testingBar.ShowNoMachine();
//UI.testingBar.ShowNoMachine();
}
@Override
protected void AdditionalInitColumns() {

View File

@@ -77,13 +77,13 @@ public class UsersDBTable extends iDBTable<User> {
public void ShowCurrentObject() throws Exception {
super.ShowCurrentObject();
// UI.getMainWindow().ShowCurrentCompiler();
UI.testingBar.ShowUser();
// UI.testingBar.ShowUser();
}
@Override
public void ShowNoCurrentObject() throws Exception {
super.ShowNoCurrentObject();
// UI.getMainWindow().ShowCurrentCompiler();
UI.testingBar.ShowNoUser();
// UI.testingBar.ShowNoUser();
}
};

View File

@@ -12,14 +12,15 @@ import Visual_DVM_2021.Passes.PassCode_2021;
import javax.swing.*;
import java.awt.*;
public class TestingBar extends VisualiserMenuBar {
public MenuBarButton MachineButton;
public MenuBarButton UserButton;
// public MenuBarButton MachineButton;
// public MenuBarButton UserButton;
public JLabel KernelsLabel;
public JButton autorefreshButton;
JSpinner sCheckTime;
JSpinner sKernels;
public TestingBar() {
/*
add(MachineButton = new MenuBarButton() {
{
setIcon("/icons/Machine.png");
@@ -41,6 +42,7 @@ public class TestingBar extends VisualiserMenuBar {
});
}
});
*/
//-
KernelsLabel = addLabel("", "/icons/Kernels.png");
KernelsLabel.setHorizontalTextPosition(JLabel.LEFT);
@@ -114,6 +116,7 @@ public class TestingBar extends VisualiserMenuBar {
public void ShowAutoCheckTesting() {
autorefreshButton.setIcon(Utils.getIcon(Global.properties.AutoCheckTesting ? "/icons/Pick.png" : "/icons/NotPick.png"));
}
/*
public void ShowMachine(){
MachineButton.setText(Current.getMachine().getURL());
}
@@ -126,4 +129,5 @@ public class TestingBar extends VisualiserMenuBar {
public void ShowNoUser(){
UserButton.setText("?");
}
*/
}

View File

@@ -31,7 +31,6 @@ public class DVMCompilationTask extends DVMTask {
res.add(String.valueOf(maxtime)); //2
res.add(String.valueOf(test_id)); //3
res.add(arg.toString().replace("\n", "|")); //4
//игнор аргумента. ядро всегда одно.
return res;
}
}

View File

@@ -0,0 +1,4 @@
package Visual_DVM_2021.Passes.All;
import Visual_DVM_2021.Passes.Pass_2021;
public class CreateDVMPackageFromCurrentProject extends Pass_2021 {
}

View File

@@ -2,12 +2,17 @@ package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.UI;
import TestingSystem.Common.TasksPackageState;
import TestingSystem.DVM.DVMPackage.DVMPackage;
import java.io.File;
import java.util.Vector;
public class DownloadDVMPackage extends DownloadDVMPackages {
@Override
public String getIconPath() {
return "/icons/Comparsion.png";
}
DVMPackage dvmPackage;
protected boolean canStart(Object... args) throws Exception {
if (Current.Check(Log, Current.DVMPackage)) {
@@ -19,6 +24,7 @@ public class DownloadDVMPackage extends DownloadDVMPackages {
return false;
}
if (new File(dvmPackage.getLocalWorkspace(), Constants.LOADED).exists()) {
UI.getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage);
return false;
}
@@ -30,6 +36,7 @@ public class DownloadDVMPackage extends DownloadDVMPackages {
}
@Override
protected void showDone() throws Exception {
UI.getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage);
}
}

View File

@@ -31,6 +31,9 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
@Override
protected void showPreparation() throws Exception {
server.db.SaveLastSelections();
//--
// server.db.machines _testing_system
//--
server.db.configurations.ClearUI();
server.db.groups.ClearUI();
server.db.sapforConfigurations.ClearUI();
@@ -56,13 +59,14 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
@Override
protected void showDone() throws Exception {
if (UI.HasMainWindow()) {
//server.db.machines
server.db.configurations.ShowUI();
server.db.groups.ShowUI();
server.db.sapforConfigurations.ShowUI();
server.db.serverSapfors.ShowUI();
server.db.dvmPackages.ShowUI();
server.db.sapforPackages.ShowUI();
server.db.RestoreLastSelections();
server.db.RestoreLastSelections(); //---- ? объединить с RestoreCredentials
UI.getMainWindow().ShowCheckedTestsCount();
}
}

View File

@@ -321,11 +321,14 @@ public enum PassCode_2021 {
ReplaceTestsFromFiles,
CompareDVMRunTasks,
CompareSapforPackages,
CreateDVMPackageFromCurrentProject,
;
public String getDescription() {
switch (this) {
case Undefined:
return "?";
case CreateDVMPackageFromCurrentProject:
return "Тестировать текущий проект";
case CompareSapforPackages:
return "Сравнить пакеты задач SAPFOR";
case CompareDVMRunTasks:

View File

@@ -1,7 +0,0 @@
package Visual_DVM_2021.UI.Interface;
import javax.swing.*;
public interface CredentialsWindow {
JPanel getContent();
void ShowAll();
void RestoreLastCredentials();
}

View File

@@ -1,4 +1,5 @@
package Visual_DVM_2021.UI.Interface;
import TestingSystem.DVM.DVMPackage.DVMPackage;
import TestingSystem.DVM.DVMTasks.DVMRunTask;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
public interface TestingWindow extends VisualizerForm {
@@ -29,4 +30,6 @@ public interface TestingWindow extends VisualizerForm {
//-
void CompareDVMRunTasks(DVMRunTask master, DVMRunTask slave);
void CompareSapforPackages(SapforPackage master, SapforPackage slave);
//-
void ShowDVMPackage(DVMPackage master);
}

View File

@@ -1,112 +0,0 @@
<?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.CredentialsForm">
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<xy x="20" y="20" width="903" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="57b4" binding="SC18">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="400"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="c68de" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="450" height="-1"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="b988" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties>
<minimumSize width="250" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="91c8b" binding="compilersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</grid>
<grid id="5cfd" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="450" height="100"/>
</properties>
<border type="none"/>
<children>
<splitpane id="4bf28" binding="SC19">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="197"/>
<dividerSize value="3"/>
<maximumSize width="-1" height="-1"/>
<minimumSize width="300" height="100"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="31e6f" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="200" height="0"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="c7226" binding="machinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="cdfc5" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="250" height="-1"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="5f744" binding="usersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</form>

View File

@@ -1,74 +0,0 @@
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();
}
}
}
}

View File

@@ -22,7 +22,6 @@ public class MainForm extends Form implements MainWindow {
//-----------------
private ProjectForm projectForm;
private CallbackForm callbackForm;
private CredentialsForm credentialsForm;
private TestsForm testsForm;
//---
private TestingForm testingForm;
@@ -56,7 +55,6 @@ public class MainForm extends Form implements MainWindow {
if (UI.getVersionsWindow() != null)
((VersionsForm) UI.getVersionsWindow()).SaveSplitters();
SaveCallbackPanel();
SaveCredentialsPanel();
SaveTestsPanel();
SaveTestingPanel();
//--
@@ -71,7 +69,6 @@ public class MainForm extends Form implements MainWindow {
mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH);
InstallWelcomePanel();
InstallCallbackPanel();
InstallCredentialsPanel();
InstallTestsPanel();
InstallTestingPanel();
ShowUpdatesIcon();
@@ -114,23 +111,11 @@ public class MainForm extends Form implements MainWindow {
callbackForm = null;
}
}
private void InstallCredentialsPanel() {
globalTabs.insertTab("Машины",
Utils.getIcon("/icons/Machine.png"),
(credentialsForm = new CredentialsForm()).getContent(),
"Машины, пользователи, компиляторы", 2);
}
private void SaveCredentialsPanel() {
if (credentialsForm != null) {
credentialsForm.SaveSplitters();
credentialsForm = null;
}
}
private void InstallTestsPanel() {
globalTabs.insertTab("Тесты",
Utils.getIcon("/icons/Library.PNG"),
(testsForm = new TestsForm()).getContent(),
"Библиотека тестов на сервере", 3);
"Библиотека тестов на сервере", 2);
}
private void SaveTestsPanel() {
if (testsForm != null) {
@@ -143,7 +128,7 @@ public class MainForm extends Form implements MainWindow {
globalTabs.insertTab("Тестирование",
Utils.getIcon("/icons/Session.png"),
testingForm.getContent(),
"Система тестирования", 4);
"Система тестирования", 3);
}
/*
public void ShowCurrentCompiler() {
@@ -209,10 +194,6 @@ public class MainForm extends Form implements MainWindow {
return callbackForm;
}
@Override
public CredentialsWindow getCredentialsWindow() {
return credentialsForm;
}
@Override
public TestsWindow getTestsWindow() {
return testsForm;
}
@@ -229,22 +210,18 @@ public class MainForm extends Form implements MainWindow {
globalTabs.setSelectedIndex(1);
}
@Override
public void FocusCredentials() {
public void FocusTests() {
globalTabs.setSelectedIndex(2);
}
@Override
public void FocusTests() {
globalTabs.setSelectedIndex(3);
}
@Override
public void FocusTesting() {
globalTabs.setSelectedIndex(4);
globalTabs.setSelectedIndex(3);
}
@Override
public void SwitchTestingTabs(boolean flag) {
globalTabs.setEnabledAt(2, flag);
globalTabs.setEnabledAt(3, flag);
globalTabs.setEnabledAt(4, flag);
// globalTabs.setEnabledAt(4, flag);
}
@Override
public TestingWindow getTestingWindow() {
@@ -255,7 +232,6 @@ public class MainForm extends Form implements MainWindow {
//приходится идти на это только ПОСЛЕ создания главного окна.
// иначе ссылка на главное окно в методах пустая.
getCallbackWindow().ShowAll();
getCredentialsWindow().ShowAll();
getTestsWindow().ShowAll();
if (getTestingWindow() != null)
getTestingWindow().ShowAll();

View File

@@ -38,14 +38,115 @@
</properties>
<border type="none"/>
<children>
<grid id="f073a" binding="configurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<grid id="f073a" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="a68b8" binding="SC18">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="400"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="5800e" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="450" height="-1"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="2e68e" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties>
<minimumSize width="250" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="7b7a8" binding="compilersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</grid>
<grid id="db8ae" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="450" height="100"/>
</properties>
<border type="none"/>
<children>
<splitpane id="4a378" binding="SC19">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="197"/>
<dividerSize value="3"/>
<maximumSize width="-1" height="-1"/>
<minimumSize width="300" height="100"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="20373" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="200" height="0"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="d8430" binding="machinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="eeb47" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="250" height="-1"/>
<preferredSize width="-1" height="-1"/>
</properties>
<border type="none"/>
<children>
<grid id="15f9a" binding="usersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
<grid id="34404" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
@@ -69,7 +170,7 @@
<properties/>
<border type="none"/>
<children>
<grid id="49418" binding="dvmPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<grid id="7eb69" binding="configurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
@@ -84,11 +185,9 @@
<properties/>
<border type="none"/>
<children>
<grid id="7fb08" binding="dvmRunTasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<grid id="8a87c" binding="dvmPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties>
<minimumSize width="0" height="150"/>
</properties>
<properties/>
<border type="none"/>
<children/>
</grid>
@@ -118,7 +217,40 @@
<properties/>
<border type="none"/>
<children>
<splitpane id="79feb" binding="SC50">
<splitpane id="dc0b0" binding="SC74">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="300"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="41805" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="5a561" binding="dvmRunTasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties>
<minimumSize width="0" height="150"/>
</properties>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="fe5cb" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="ba9b7" binding="SC50">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="500"/>
@@ -130,6 +262,10 @@
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</grid>
<grid id="abe81" binding="sapforPackagesTab" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>

View File

@@ -5,6 +5,7 @@ import Common.UI.TextField.StyledTextField;
import Common.UI.UI;
import GlobalData.Compiler.CompilerType;
import TestingSystem.Common.TestingServer;
import TestingSystem.DVM.DVMPackage.DVMPackage;
import TestingSystem.DVM.DVMTasks.DVMRunTask;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
@@ -27,6 +28,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public JSplitPane SC59;
public JSplitPane SC71;
public JSplitPane SC72;
public JSplitPane SC74;
public JSplitPane SC18;
public JSplitPane SC19;
//---
private JTabbedPane testingTabs;
private JPanel dvmPackagesTab;
@@ -48,6 +52,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JPanel sapforScenariosPanel;
private JPanel serverSapforsPanel;
private JPanel sapforPackagesPanel;
private JPanel compilersPanel;
private JPanel machinesPanel;
private JPanel usersPanel;
private JPanel testsRunTasksBackground;
private JCheckBox filterFinished;
private JButton bTest;
@@ -84,6 +91,10 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
SC65.setRightComponent(sapforVersionMaster.getContent());
SC66.setRightComponent(sapforVersionSlave.getContent());
//-
Global.db.machines.mountUI(machinesPanel);
Global.db.users.mountUI(usersPanel);
Global.db.compilers.mountUI(compilersPanel);
//-
Global.testingServer.db.configurations.mountUI(configurationsPanel);
Global.testingServer.db.dvmPackages.mountUI(dvmPackagesPanel);
Global.testingServer.db.dvmRunTasks.mountUI(dvmRunTasksPanel);
@@ -95,6 +106,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
//-
@Override
public void ShowAll() {
Global.db.machines.ShowUI();
Global.testingServer.db.configurations.ShowUI();
Global.testingServer.db.dvmPackages.ShowUI();
Global.testingServer.db.sapforPackages.ShowUI();
@@ -193,12 +205,15 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
sapforPackageTreeMaster.ApplyObject(master);
testingTabs.setSelectedIndex(3);
}
public void ShowDVMPackage(DVMPackage master) {
testingTabs.setSelectedIndex(1);
}
@Override
public void CompareDVMRunTasks(DVMRunTask master, DVMRunTask slave) {
dvmTestingRunMaster.ApplyObject(master);
dvmTestingRunSlave.ApplyObject(slave);
dvmTestingRunMaster.DoComparePass(true);
testingTabs.setSelectedIndex(1);
// testingTabs.setSelectedIndex(1);
}
@Override
public void CompareSapforPackages(SapforPackage master, SapforPackage slave) {
@@ -207,4 +222,50 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
sapforPackageTreeMaster.DoComparePass();
testingTabs.setSelectedIndex(3);
}
/*
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();
}
}
}
*/
}

View File

@@ -6,182 +6,6 @@
</constraints>
<properties/>
<border type="none"/>
<children>
<tabbedpane id="6396f" binding="testingTabs">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<grid id="8538d" 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"/>
<constraints>
<tabbedpane title="DVM система" icon="icons/DVM.png">
<tooltip value="DVM система"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="15235" binding="SC48">
<constraints>
<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">
<preferred-size width="200" height="200"/>
</grid>
</constraints>
<properties>
<dividerLocation value="150"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="3bbb" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="0" height="150"/>
</properties>
<border type="none"/>
<children/>
</grid>
<grid id="d5ab3" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="c0a85" binding="SC49">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="100"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="6b243" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="0" height="150"/>
</properties>
<border type="none"/>
<children/>
</grid>
<grid id="d7c2c" 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"/>
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="646aa" binding="SC46">
<constraints>
<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">
<preferred-size width="200" height="200"/>
</grid>
</constraints>
<properties>
<dividerLocation value="131"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="17509" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="44a83" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<minimumSize width="240" height="150"/>
</properties>
<border type="none"/>
<children/>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
<grid id="51d53" binding="sapforTestingPanel" 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"/>
<constraints>
<tabbedpane title="SAPFOR" icon="icons/Arrays/SpfPrivate.png">
<tooltip value="SAPFOR"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="33896" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<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>
<properties/>
<border type="none"/>
<children>
<tabbedpane id="d1545" binding="sapforTestingTabs">
<constraints border-constraint="Center"/>
<properties>
<tabLayoutPolicy value="0"/>
<tabPlacement value="1"/>
</properties>
<border type="none"/>
<children>
<grid id="95fea" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/Testing.png">
<tooltip value="Пакеты"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="a2493" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/Comparsion.png">
<tooltip value="Сравнение пакетов"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="e24e6" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</tabbedpane>
</children>
</grid>
</children>
</grid>
</children>
</tabbedpane>
</children>
</grid>
</form>

View File

@@ -1,11 +1,5 @@
package Visual_DVM_2021.UI.Main;
import javax.swing.*;
public class buffer_ {
private JTabbedPane testingTabs;
private JPanel dvmTestingPanel;
private JSplitPane SC48;
private JSplitPane SC49;
private JSplitPane SC46;
private JPanel sapforTestingPanel;
private JTabbedPane sapforTestingTabs;
//Скачать пакет задач
}