в процессе редизайна. не очень нравится как вкладки расположены.
This commit is contained in:
25
.idea/workspace.xml
generated
25
.idea/workspace.xml
generated
@@ -7,15 +7,22 @@
|
|||||||
</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$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" 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/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/TestingSystem/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestingServer.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/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/GlobalData/Machine/MachinesDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Machine/MachinesDBTable.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/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/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/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/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/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/SSH/ConnectionPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/ConnectionPass.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.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" />
|
||||||
</list>
|
</list>
|
||||||
@@ -38,8 +45,8 @@
|
|||||||
<option name="RECENT_TEMPLATES">
|
<option name="RECENT_TEMPLATES">
|
||||||
<list>
|
<list>
|
||||||
<option value="FxmlFile" />
|
<option value="FxmlFile" />
|
||||||
<option value="Interface" />
|
|
||||||
<option value="Enum" />
|
<option value="Enum" />
|
||||||
|
<option value="Interface" />
|
||||||
<option value="Class" />
|
<option value="Class" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
package Common.UI.Menus_2023.MainMenuBar;
|
package Common.UI.Menus_2023.MainMenuBar;
|
||||||
import Visual_DVM_2021.UI.Interface.CallbackWindow;
|
import Visual_DVM_2021.UI.Interface.*;
|
||||||
import Visual_DVM_2021.UI.Interface.ProjectWindow;
|
|
||||||
import Visual_DVM_2021.UI.Interface.TestingWindow;
|
|
||||||
public interface MainWindow {
|
public interface MainWindow {
|
||||||
void Show();
|
void Show();
|
||||||
void ShowProject();
|
void ShowProject();
|
||||||
void ShowNoProject();
|
void ShowNoProject();
|
||||||
ProjectWindow getProjectWindow();
|
ProjectWindow getProjectWindow();
|
||||||
CallbackWindow getCallbackWindow();
|
CallbackWindow getCallbackWindow();
|
||||||
|
CredentialsWindow getCredentialsWindow();
|
||||||
|
TestsWindow getTestsWindow();
|
||||||
|
TestingWindow getTestingWindow();
|
||||||
//-
|
//-
|
||||||
void ShowUpdatesIcon();
|
void ShowUpdatesIcon();
|
||||||
void FocusProject();
|
void FocusProject();
|
||||||
void FocusCallback();
|
void FocusCallback();
|
||||||
void FocusTesting();
|
void FocusTesting();
|
||||||
TestingWindow getTestingWindow();
|
|
||||||
void ShowTestingTab();
|
void ShowTestingTab();
|
||||||
void HideTestingTab();
|
void HideTestingTab();
|
||||||
|
//-
|
||||||
|
void ShowCredentials();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,12 +119,12 @@ public class CompilersDBTable extends iDBTable<Compiler> {
|
|||||||
@Override
|
@Override
|
||||||
public void ShowCurrentObject() throws Exception {
|
public void ShowCurrentObject() throws Exception {
|
||||||
super.ShowCurrentObject();
|
super.ShowCurrentObject();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCredentials();
|
UI.getMainWindow().ShowCredentials();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowNoCurrentObject() throws Exception {
|
public void ShowNoCurrentObject() throws Exception {
|
||||||
super.ShowNoCurrentObject();
|
super.ShowNoCurrentObject();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCredentials();
|
UI.getMainWindow().ShowCredentials();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,14 +82,12 @@ public class MachinesDBTable extends iDBTable<Machine> {
|
|||||||
@Override
|
@Override
|
||||||
public void ShowCurrentObject() throws Exception {
|
public void ShowCurrentObject() throws Exception {
|
||||||
super.ShowCurrentObject();
|
super.ShowCurrentObject();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCurrentMachine();
|
UI.getMainWindow().ShowCredentials();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCredentials();
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowNoCurrentObject() throws Exception {
|
public void ShowNoCurrentObject() throws Exception {
|
||||||
super.ShowNoCurrentObject();
|
super.ShowNoCurrentObject();
|
||||||
UI.getMainWindow().getTestingWindow().ShowNoCurrentMachine();
|
UI.getMainWindow().ShowCredentials();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCredentials();
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void AdditionalInitColumns() {
|
protected void AdditionalInitColumns() {
|
||||||
|
|||||||
@@ -76,12 +76,12 @@ public class UsersDBTable extends iDBTable<User> {
|
|||||||
@Override
|
@Override
|
||||||
public void ShowCurrentObject() throws Exception {
|
public void ShowCurrentObject() throws Exception {
|
||||||
super.ShowCurrentObject();
|
super.ShowCurrentObject();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCredentials();
|
UI.getMainWindow().ShowCredentials();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowNoCurrentObject() throws Exception {
|
public void ShowNoCurrentObject() throws Exception {
|
||||||
super.ShowNoCurrentObject();
|
super.ShowNoCurrentObject();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCredentials();
|
UI.getMainWindow().ShowCredentials();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package Visual_DVM_2021.Passes.All;
|
package Visual_DVM_2021.Passes.All;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.Global;
|
import Common.Global;
|
||||||
import Common.UI.UI;
|
|
||||||
import Common.UI.Windows.Dialog.SliderNumberForm;
|
import Common.UI.Windows.Dialog.SliderNumberForm;
|
||||||
import GlobalData.Machine.Machine;
|
import GlobalData.Machine.Machine;
|
||||||
import Repository.Server.ServerCode;
|
import Repository.Server.ServerCode;
|
||||||
@@ -40,11 +39,4 @@ public class EditMachineKernels extends TestingSystemPass<MachineMaxKernels> {
|
|||||||
Command(new ServerExchangeUnit_2021(ServerCode.EditObject, "", target));
|
Command(new ServerExchangeUnit_2021(ServerCode.EditObject, "", target));
|
||||||
Global.testingServer.db.Update(target);
|
Global.testingServer.db.Update(target);
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
protected void showDone() throws Exception {
|
|
||||||
if (Current.HasMachine())
|
|
||||||
UI.getMainWindow().getTestingWindow().ShowCurrentMachine();
|
|
||||||
else
|
|
||||||
UI.getMainWindow().getTestingWindow().ShowNoCurrentMachine();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,15 +52,8 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
|
|||||||
server.db.configurations.ShowUI();
|
server.db.configurations.ShowUI();
|
||||||
server.db.groups.ShowUI();
|
server.db.groups.ShowUI();
|
||||||
server.db.sapforConfigurations.ShowUI();
|
server.db.sapforConfigurations.ShowUI();
|
||||||
// server.db.sapforTasksPackages.ShowUI();
|
|
||||||
server.db.RestoreLastSelections();
|
server.db.RestoreLastSelections();
|
||||||
UI.getMainWindow().getTestingWindow().ShowCheckedTestsCount();
|
UI.getMainWindow().getTestingWindow().ShowCheckedTestsCount();
|
||||||
//для отображения числа ядер.
|
|
||||||
if (Current.HasMachine())
|
|
||||||
UI.getMainWindow().getTestingWindow().ShowCurrentMachine();
|
|
||||||
else
|
|
||||||
UI.getMainWindow().getTestingWindow().ShowNoCurrentMachine();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java
Normal file
7
src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
package Visual_DVM_2021.UI.Interface;
|
||||||
|
import javax.swing.*;
|
||||||
|
public interface CredentialsWindow {
|
||||||
|
JPanel getContent();
|
||||||
|
void ShowAll();
|
||||||
|
void RestoreLastCredentials();
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package Visual_DVM_2021.UI.Interface;
|
package Visual_DVM_2021.UI.Interface;
|
||||||
public interface TestingWindow extends VisualizerForm {
|
public interface TestingWindow extends VisualizerForm {
|
||||||
void ShowAll();
|
void ShowAll();
|
||||||
void RestoreLastCredentials();
|
|
||||||
void ShowProjectMaxCompilationTime();
|
void ShowProjectMaxCompilationTime();
|
||||||
void ShowProjectMaxRunTime();
|
void ShowProjectMaxRunTime();
|
||||||
//-
|
//-
|
||||||
@@ -16,7 +15,6 @@ public interface TestingWindow extends VisualizerForm {
|
|||||||
ShowProjectMaxCompilationTime();
|
ShowProjectMaxCompilationTime();
|
||||||
ShowProjectMaxRunTime();
|
ShowProjectMaxRunTime();
|
||||||
}
|
}
|
||||||
void FocusCredentials();
|
|
||||||
void ShowProject();
|
void ShowProject();
|
||||||
void ShowNoProject();
|
void ShowNoProject();
|
||||||
//-
|
//-
|
||||||
@@ -37,10 +35,6 @@ public interface TestingWindow extends VisualizerForm {
|
|||||||
void setDeveloperRights();
|
void setDeveloperRights();
|
||||||
void FocusScenarios();
|
void FocusScenarios();
|
||||||
//---------------------------------------->>>
|
//---------------------------------------->>>
|
||||||
void ShowCurrentMachine();
|
|
||||||
void ShowNoCurrentMachine();
|
|
||||||
//---------------------------------------->>>
|
|
||||||
void ShowCredentials();
|
|
||||||
void FocusSapforTasksPackages();
|
void FocusSapforTasksPackages();
|
||||||
void ShowCurrentSapforTasksPackage();
|
void ShowCurrentSapforTasksPackage();
|
||||||
void ShowNoSapforTasksPackage();
|
void ShowNoSapforTasksPackage();
|
||||||
|
|||||||
4
src/Visual_DVM_2021/UI/Interface/TestsWindow.java
Normal file
4
src/Visual_DVM_2021/UI/Interface/TestsWindow.java
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package Visual_DVM_2021.UI.Interface;
|
||||||
|
public interface TestsWindow {
|
||||||
|
void ShowAll();
|
||||||
|
}
|
||||||
112
src/Visual_DVM_2021/UI/Main/CredentialsForm.form
Normal file
112
src/Visual_DVM_2021/UI/Main/CredentialsForm.form
Normal 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>
|
||||||
74
src/Visual_DVM_2021/UI/Main/CredentialsForm.java
Normal file
74
src/Visual_DVM_2021/UI/Main/CredentialsForm.java
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package Visual_DVM_2021.UI.Main;
|
package Visual_DVM_2021.UI.Main;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.Global;
|
import Common.Global;
|
||||||
|
import Common.UI.Menus_2023.MainMenuBar.MainWindow;
|
||||||
import Common.UI.UI;
|
import Common.UI.UI;
|
||||||
import Common.UI.Windows.Form;
|
import Common.UI.Windows.Form;
|
||||||
import Common.UI.Windows.FormType;
|
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.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.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.ProjectWindow;
|
||||||
import Visual_DVM_2021.UI.Interface.TestingWindow;
|
import Visual_DVM_2021.UI.Interface.TestingWindow;
|
||||||
|
|
||||||
@@ -20,6 +21,8 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
//-----------------
|
//-----------------
|
||||||
private ProjectForm projectForm;
|
private ProjectForm projectForm;
|
||||||
private CallbackForm callbackForm;
|
private CallbackForm callbackForm;
|
||||||
|
private CredentialsForm credentialsForm;
|
||||||
|
//---
|
||||||
private TestingForm testingForm;
|
private TestingForm testingForm;
|
||||||
//-----------------
|
//-----------------
|
||||||
private JPanel Content;
|
private JPanel Content;
|
||||||
@@ -28,6 +31,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
public MainForm() {
|
public MainForm() {
|
||||||
mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH);
|
mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH);
|
||||||
InstallWelcomePanel();
|
InstallWelcomePanel();
|
||||||
|
InstallCredentialsPanel();
|
||||||
InstallCallbackPanel();
|
InstallCallbackPanel();
|
||||||
InstallTestingPanel();
|
InstallTestingPanel();
|
||||||
ShowUpdatesIcon();
|
ShowUpdatesIcon();
|
||||||
@@ -59,6 +63,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
if (UI.getVersionsWindow() != null)
|
if (UI.getVersionsWindow() != null)
|
||||||
((VersionsForm) UI.getVersionsWindow()).SaveSplitters();
|
((VersionsForm) UI.getVersionsWindow()).SaveSplitters();
|
||||||
SaveCallbackPanel();
|
SaveCallbackPanel();
|
||||||
|
SaveCredentialsPanel();
|
||||||
SaveTestingPanel();
|
SaveTestingPanel();
|
||||||
Global.FinishApplication();
|
Global.FinishApplication();
|
||||||
}
|
}
|
||||||
@@ -66,17 +71,14 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
globalTabs.insertTab("Начало работы",
|
globalTabs.insertTab("Начало работы",
|
||||||
null,
|
null,
|
||||||
welcomeForm.content,
|
welcomeForm.content,
|
||||||
"Для начала работы откройте проект с помощью правой панели инструментов или перетащите его сюда", 0
|
"Для начала работы откройте проект с помощью верхней панели инструментов, или перетащите его сюда", 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
private void InstallProjectPanel() {
|
private void InstallProjectPanel() {
|
||||||
// globalTabs.insertTab("Проект: " + Current.getProject().name,
|
|
||||||
// Utils.getIcon("/icons/Common.png"),
|
|
||||||
// (projectForm = new ProjectForm()).content, Current.getProject().description, 0);
|
|
||||||
globalTabs.insertTab("", null,
|
globalTabs.insertTab("", null,
|
||||||
(projectForm = new ProjectForm()).content, Current.getProject().description, 0);
|
(projectForm = new ProjectForm()).content, Current.getProject().description, 0);
|
||||||
globalTabs.setTabComponentAt(0,
|
globalTabs.setTabComponentAt(0,
|
||||||
new TabToolBar("Проект: " + Current.getProject().name, PassCode_2021.CloseCurrentProject){
|
new TabToolBar("Проект: " + Current.getProject().name, PassCode_2021.CloseCurrentProject) {
|
||||||
@Override
|
@Override
|
||||||
public void leftMouseAction() {
|
public void leftMouseAction() {
|
||||||
globalTabs.setSelectedIndex(0);
|
globalTabs.setSelectedIndex(0);
|
||||||
@@ -102,6 +104,18 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
callbackForm = null;
|
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() {
|
private void InstallTestingPanel() {
|
||||||
testingForm = new TestingForm();
|
testingForm = new TestingForm();
|
||||||
ShowTestingTab();
|
ShowTestingTab();
|
||||||
@@ -112,12 +126,32 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
globalTabs.insertTab("Тестирование",
|
globalTabs.insertTab("Тестирование",
|
||||||
Utils.getIcon("/icons/Session.png"),
|
Utils.getIcon("/icons/Session.png"),
|
||||||
testingForm.getContent(),
|
testingForm.getContent(),
|
||||||
"Система тестирования", 2);
|
"Система тестирования", 3);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void HideTestingTab() {
|
public void HideTestingTab() {
|
||||||
if (globalTabs.getTabCount() == 3)
|
if (globalTabs.getTabCount() == 4)
|
||||||
globalTabs.removeTabAt(2);
|
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() {
|
private void SaveTestingPanel() {
|
||||||
if (testingForm != null) {
|
if (testingForm != null) {
|
||||||
@@ -140,6 +174,10 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
return callbackForm;
|
return callbackForm;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public CredentialsWindow getCredentialsWindow() {
|
||||||
|
return credentialsForm;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public void ShowUpdatesIcon() {
|
public void ShowUpdatesIcon() {
|
||||||
UI.mainMenuBar.ShowUpdatesIcon();
|
UI.mainMenuBar.ShowUpdatesIcon();
|
||||||
}
|
}
|
||||||
@@ -153,7 +191,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void FocusTesting() {
|
public void FocusTesting() {
|
||||||
globalTabs.setSelectedIndex(2);
|
globalTabs.setSelectedIndex(3);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public TestingWindow getTestingWindow() {
|
public TestingWindow getTestingWindow() {
|
||||||
@@ -164,6 +202,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
//приходится идти на это только ПОСЛЕ создания главного окна.
|
//приходится идти на это только ПОСЛЕ создания главного окна.
|
||||||
// иначе ссылка на главное окно в методах пустая.
|
// иначе ссылка на главное окно в методах пустая.
|
||||||
getCallbackWindow().ShowAll();
|
getCallbackWindow().ShowAll();
|
||||||
|
getCredentialsWindow().ShowAll();
|
||||||
if (getTestingWindow() != null)
|
if (getTestingWindow() != null)
|
||||||
getTestingWindow().ShowAll();
|
getTestingWindow().ShowAll();
|
||||||
UI.windowsStack.push(this);
|
UI.windowsStack.push(this);
|
||||||
|
|||||||
@@ -18,147 +18,6 @@
|
|||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<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">
|
<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"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
package Visual_DVM_2021.UI.Main;
|
package Visual_DVM_2021.UI.Main;
|
||||||
import Common.Constants;
|
|
||||||
import Common.Current;
|
|
||||||
import Common.Global;
|
import Common.Global;
|
||||||
import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar;
|
import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar;
|
||||||
import Common.UI.TextField.StyledTextField;
|
import Common.UI.TextField.StyledTextField;
|
||||||
import Common.UI.UI;
|
import Common.UI.UI;
|
||||||
import GlobalData.Compiler.CompilerType;
|
|
||||||
import GlobalData.Credentials.Credentials;
|
|
||||||
import TestingSystem.Configuration.UI.ConfigurationDBTable;
|
import TestingSystem.Configuration.UI.ConfigurationDBTable;
|
||||||
import TestingSystem.Group.Group;
|
import TestingSystem.Group.Group;
|
||||||
import TestingSystem.MachineMaxKernels.MachineMaxKernels;
|
|
||||||
import TestingSystem.TasksPackage.TasksPackageDBTable;
|
import TestingSystem.TasksPackage.TasksPackageDBTable;
|
||||||
import TestingSystem.Test.Test;
|
import TestingSystem.Test.Test;
|
||||||
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
|
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
|
||||||
@@ -23,7 +18,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
public JPanel getContent() {
|
public JPanel getContent() {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
public JSplitPane SC18;
|
|
||||||
public JSplitPane SC20;
|
public JSplitPane SC20;
|
||||||
public JSplitPane SC21;
|
public JSplitPane SC21;
|
||||||
public JSplitPane SC35;
|
public JSplitPane SC35;
|
||||||
@@ -41,8 +35,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
public JSplitPane SC53;
|
public JSplitPane SC53;
|
||||||
public JSplitPane SC56;
|
public JSplitPane SC56;
|
||||||
public JSplitPane SC57;
|
public JSplitPane SC57;
|
||||||
public JSplitPane SC58;
|
|
||||||
public JSplitPane SC19;
|
|
||||||
public JSplitPane SC62;
|
public JSplitPane SC62;
|
||||||
public JSplitPane SC63;
|
public JSplitPane SC63;
|
||||||
public JSplitPane SC59;
|
public JSplitPane SC59;
|
||||||
@@ -78,7 +70,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
private JPanel compilationTasksPanel;
|
private JPanel compilationTasksPanel;
|
||||||
private JPanel sapforTestingPanel;
|
private JPanel sapforTestingPanel;
|
||||||
private JPanel packageVersionsPanel;
|
private JPanel packageVersionsPanel;
|
||||||
private JPanel sapforsPanel;
|
|
||||||
private JPanel sapforConfigurationsPanel;
|
private JPanel sapforConfigurationsPanel;
|
||||||
private JLabel sapforConfigurationsLabel;
|
private JLabel sapforConfigurationsLabel;
|
||||||
private JLabel sapforConfigurationsCommandsLabel;
|
private JLabel sapforConfigurationsCommandsLabel;
|
||||||
@@ -117,9 +108,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
singleRunTaskMaster = new RunTasksComparisonForm(singleRunTaskSlave = new RunTasksComparisonForm(null));
|
singleRunTaskMaster = new RunTasksComparisonForm(singleRunTaskSlave = new RunTasksComparisonForm(null));
|
||||||
dvmTestingRunMaster = new TestRunTasksComparisonForm(dvmTestingRunSlave = new TestRunTasksComparisonForm(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.makefiles.mountUI(makefilesPanel);
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
Global.db.modules.mountUI(modulesPanel);
|
Global.db.modules.mountUI(modulesPanel);
|
||||||
@@ -180,8 +168,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
//-
|
//-
|
||||||
@Override
|
@Override
|
||||||
public void ShowAll() {
|
public void ShowAll() {
|
||||||
Global.db.machines.ShowUI();
|
|
||||||
this.RestoreLastCredentials();
|
|
||||||
Global.testingServer.db.configurations.ShowUI();
|
Global.testingServer.db.configurations.ShowUI();
|
||||||
Global.testingServer.db.groups.ShowUI();
|
Global.testingServer.db.groups.ShowUI();
|
||||||
Global.testingServer.db.serverSapfors.ShowUI();
|
Global.testingServer.db.serverSapfors.ShowUI();
|
||||||
@@ -219,10 +205,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
singleCompilationTaskSlave.RemoveObject();
|
singleCompilationTaskSlave.RemoveObject();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void FocusCredentials() {
|
|
||||||
testingTabs.setSelectedIndex(0);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void ShowProject() {
|
public void ShowProject() {
|
||||||
testingTabs.setEnabledAt(1, true);
|
testingTabs.setEnabledAt(1, true);
|
||||||
//-
|
//-
|
||||||
@@ -283,20 +265,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
@Override
|
@Override
|
||||||
public void RefreshTabsNames() {
|
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() {
|
private void createUIComponents() {
|
||||||
// TODO: place custom component creation code here
|
// TODO: place custom component creation code here
|
||||||
filterName = new StyledTextField();
|
filterName = new StyledTextField();
|
||||||
@@ -354,77 +322,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
public void FocusScenarios() {
|
public void FocusScenarios() {
|
||||||
testingTabs.setSelectedIndex(3);
|
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
|
@Override
|
||||||
public void FocusSapforTasksPackages() {
|
public void FocusSapforTasksPackages() {
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/Visual_DVM_2021/UI/Main/TestsForm.form
Normal file
13
src/Visual_DVM_2021/UI/Main/TestsForm.form
Normal 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>
|
||||||
8
src/Visual_DVM_2021/UI/Main/TestsForm.java
Normal file
8
src/Visual_DVM_2021/UI/Main/TestsForm.java
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user