в процессе редизайна. не очень нравится как вкладки расположены.

This commit is contained in:
2023-10-10 20:14:48 +03:00
parent c05eb12737
commit ca969faacd
17 changed files with 296 additions and 296 deletions

25
.idea/workspace.xml generated
View File

@@ -7,15 +7,22 @@
</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/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$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/InstallServerSapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/InstallServerSapfor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTestsTasks.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTestsTasks.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/Passes/SSH/ConnectionPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/ConnectionPass.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/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/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" />
</list>
@@ -38,8 +45,8 @@
<option name="RECENT_TEMPLATES">
<list>
<option value="FxmlFile" />
<option value="Interface" />
<option value="Enum" />
<option value="Interface" />
<option value="Class" />
</list>
</option>

View File

@@ -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();
}

View File

@@ -119,12 +119,12 @@ public class CompilersDBTable extends iDBTable<Compiler> {
@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();
}
};
}

View File

@@ -82,14 +82,12 @@ public class MachinesDBTable extends iDBTable<Machine> {
@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() {

View File

@@ -76,12 +76,12 @@ public class UsersDBTable extends iDBTable<User> {
@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();
}
};

View File

@@ -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<MachineMaxKernels> {
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();
}
}

View File

@@ -52,15 +52,8 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
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();
}
}
}

View File

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

View File

@@ -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();

View File

@@ -0,0 +1,4 @@
package Visual_DVM_2021.UI.Interface;
public interface TestsWindow {
void ShowAll();
}

View File

@@ -0,0 +1,112 @@
<?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

@@ -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();
}
}
}
}

View File

@@ -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,13 +71,10 @@ 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,
@@ -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);

View File

@@ -18,147 +18,6 @@
<properties/>
<border type="none"/>
<children>
<grid id="c1ee7" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="Учётные данные" icon="icons/Machine.png">
<tooltip value="Учётные данные"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="67dc2" binding="SC18">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="400"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="4bdeb" 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>
<splitpane id="6afcf" binding="SC58">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="300"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="694be" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<minimumSize width="250" height="200"/>
</properties>
<border type="none"/>
<children>
<grid id="fbc16" binding="compilersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="9edad" 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="46ef8" binding="sapforsPanel" 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="c209a" 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="43e0e" 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="ef1ac" 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="4976c" binding="machinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
<grid id="77bde" 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="61db6" 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="b96d9" binding="projectDebugPanel" 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>

View File

@@ -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() {
}

View File

@@ -0,0 +1,13 @@
<?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">
<grid id="27dc6" row-count="1" column-count="1" layout-manager="BorderLayout">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" 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>
<properties/>
<border type="none"/>
<children/>
</grid>
</form>

View File

@@ -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() {
}
}