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

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

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