сворачивание машин v++

This commit is contained in:
2024-03-15 12:32:49 +03:00
parent 431d23f427
commit 1b91cff318
15 changed files with 159 additions and 28 deletions

28
.idea/workspace.xml generated
View File

@@ -7,17 +7,21 @@
</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/TestingSystem/DVM/DVMPackage/UI/AddDVMPackageMenu.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/CredentialsBar/CredentialsBar.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/UI/EditDVMPackageMenu.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/src/icons/CollapseUp.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/AddSapforPackageMenu.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/src/icons/ExpandDown.png" 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/Common/UI/Menus_2023/VisualiserMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/VisualiserMenu.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Group/UI/AddGroupMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Group/UI/AddGroupMenu.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Common/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/GlobalProperties.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Group/UI/EditGroupMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Group/UI/EditGroupMenu.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainMenuBar.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/Common/UI/UI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/UI.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$/src/GlobalData/Compiler/CompilersMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Compiler/CompilersMenuBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddDVMPackage.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/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.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/Repository/Component/Visualiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Visualiser.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/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> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -95,7 +99,7 @@
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.SHOW" value="true" /> <property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.SHOW" value="true" />
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="509" /> <property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="509" />
<property name="extract.method.default.visibility" value="public" /> <property name="extract.method.default.visibility" value="public" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons/versions" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons" />
<property name="project.structure.last.edited" value="Modules" /> <property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" /> <property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" /> <property name="project.structure.side.proportion" value="0.2" />
@@ -108,10 +112,10 @@
<recent name="controls.Trees" /> <recent name="controls.Trees" />
</key> </key>
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons" />
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" /> <recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" />
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" /> <recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" />
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\files" /> <recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\files" />
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons" />
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\libs" /> <recent name="C:\Users\misha\Documents\visual_sapfor_2023\libs" />
</key> </key>
<key name="MoveMembersDialog.RECENTS_KEY"> <key name="MoveMembersDialog.RECENTS_KEY">

View File

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

View File

@@ -94,6 +94,8 @@ public class GlobalProperties extends Properties {
public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования
@Expose @Expose
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования. public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
@Expose
public boolean collapseCredentials=false;
//- //-
@Override @Override
public File getFile() { public File getFile() {

View File

@@ -0,0 +1,66 @@
package Common.UI.Menus_2023.CredentialsBar;
import Common.Current;
import Common.UI.Menus_2023.MenuBarButton;
import Common.UI.Menus_2023.VisualiserMenuBar;
import Common.UI.Themes.VisualiserFonts;
import Common.UI.UI;
import javax.swing.*;
public class CredentialsBar extends VisualiserMenuBar {
public MenuBarButton MachineButton;
public MenuBarButton UserButton;
public MenuBarButton ExpandButton;
public CredentialsBar(){
add(MachineButton = new MenuBarButton() {
{
setIcon("/icons/Machine.png");
setFont(VisualiserFonts.TreeBold);
setToolTipText("Текущая машина");
/*
addActionListener(e -> {
UI.getMainWindow().FocusCredentials();
});
*/
}
});
//--
add(UserButton = new MenuBarButton() {
{
setIcon("/icons/User.png");
setFont(VisualiserFonts.TreeBold);
setToolTipText("Текущий пользователь");
/*
addActionListener(e -> {
UI.getMainWindow().FocusCredentials();
});
*/
}
});
add(new JSeparator());
//--
add(ExpandButton = new MenuBarButton() {
{
setIcon("/icons/ExpandDown.png");
setFont(VisualiserFonts.TreeBold);
setToolTipText("Развернуть");
addActionListener(e -> {
UI.getMainWindow().getTestingWindow().SwitchCredentials(true);
});
}
});
}
public void ShowMachine(){
MachineButton.setText(Current.getMachine().getURL());
}
public void ShowUser(){
UserButton.setText(Current.getUser().login);
}
public void ShowNoMachine(){
MachineButton.setText("?");
}
public void ShowNoUser(){
UserButton.setText("?");
}
}

View File

@@ -58,7 +58,8 @@ public class MainMenuBar extends VisualiserMenuBar {
setIcon("/icons/Apply.png"); setIcon("/icons/Apply.png");
setToolTipText("Test"); setToolTipText("Test");
addActionListener(e -> { addActionListener(e -> {
Pass_2021.passes.get(PassCode_2021.TestPass).Do(); // Pass_2021.passes.get(PassCode_2021.TestPass).Do();
UI.getMainWindow().getTestingWindow().SwitchCredentials(false);
}); });
} }
}); });

View File

@@ -2,6 +2,7 @@ package Common.UI;
import Common.Current; import Common.Current;
import Common.Database.DataSet; import Common.Database.DataSet;
import Common.Global; import Common.Global;
import Common.UI.Menus_2023.CredentialsBar.CredentialsBar;
import Repository.BugReport.BugReportsMenuBar; import Repository.BugReport.BugReportsMenuBar;
import GlobalData.Compiler.CompilersMenuBar; import GlobalData.Compiler.CompilersMenuBar;
import TestingSystem.DVM.Configuration.ConfigurationsMenuBar; import TestingSystem.DVM.Configuration.ConfigurationsMenuBar;
@@ -106,6 +107,7 @@ public class UI {
public static MenuElement[] last_menu_path; public static MenuElement[] last_menu_path;
public static MainMenuBar mainMenuBar = null; public static MainMenuBar mainMenuBar = null;
public static TestingBar testingBar = null; public static TestingBar testingBar = null;
public static CredentialsBar credentialsBar = null;
public static VersionsMenuBar versionsMenuBar = null; public static VersionsMenuBar versionsMenuBar = null;
public static FastAccessMenuBar fastAccessMenuBar = null; public static FastAccessMenuBar fastAccessMenuBar = null;
//------------ //------------
@@ -209,6 +211,7 @@ public class UI {
public static void CreateMenus() { public static void CreateMenus() {
mainMenuBar = new MainMenuBar(); mainMenuBar = new MainMenuBar();
testingBar = new TestingBar(); testingBar = new TestingBar();
credentialsBar = new CredentialsBar();
versionsMenuBar = new VersionsMenuBar(); versionsMenuBar = new VersionsMenuBar();
fastAccessMenuBar = new FastAccessMenuBar(); fastAccessMenuBar = new FastAccessMenuBar();
//---------------------------------------------------->> //---------------------------------------------------->>

View File

@@ -1,7 +1,13 @@
package GlobalData.Compiler; package GlobalData.Compiler;
import Common.UI.Menus_2023.DataMenuBar; import Common.UI.Menus_2023.DataMenuBar;
import Common.UI.Menus_2023.MenuBarButton;
import Common.UI.Themes.VisualiserFonts;
import Common.UI.UI;
import Visual_DVM_2021.Passes.PassCode_2021; import Visual_DVM_2021.Passes.PassCode_2021;
import javax.swing.*;
public class CompilersMenuBar extends DataMenuBar { public class CompilersMenuBar extends DataMenuBar {
public MenuBarButton CollapseButton;
public CompilersMenuBar() { public CompilersMenuBar() {
super("компиляторы", super("компиляторы",
PassCode_2021.AddCompiler, PassCode_2021.AddCompiler,
@@ -9,5 +15,16 @@ public class CompilersMenuBar extends DataMenuBar {
PassCode_2021.DeleteCompiler, PassCode_2021.DeleteCompiler,
PassCode_2021.ShowCompilerVersion, PassCode_2021.ShowCompilerVersion,
PassCode_2021.ShowCompilerHelp); PassCode_2021.ShowCompilerHelp);
add(new JSeparator());
add(CollapseButton = new MenuBarButton() {
{
setIcon("/icons/CollapseUp.png");
setFont(VisualiserFonts.TreeBold);
setToolTipText("ернуть");
addActionListener(e -> {
UI.getMainWindow().getTestingWindow().SwitchCredentials(false);
});
}
});
} }
} }

View File

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

View File

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

View File

@@ -62,7 +62,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html //http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override @Override
public void GetVersionInfo() { public void GetVersionInfo() {
version = 1077; version = 1079;
String pattern = "MMM dd yyyy HH:mm:ss"; String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH); DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime()); date_text = df.format(getClassBuildTime());

View File

@@ -32,4 +32,7 @@ public interface TestingWindow extends VisualizerForm {
void CompareSapforPackages(SapforPackage master, SapforPackage slave); void CompareSapforPackages(SapforPackage master, SapforPackage slave);
//- //-
void ShowDVMPackage(DVMPackage master); void ShowDVMPackage(DVMPackage master);
void CollapseCredentials();
void ExpandCredentials();
void SwitchCredentials(boolean flag);
} }

View File

@@ -38,7 +38,7 @@
</properties> </properties>
<border type="none"/> <border type="none"/>
<children> <children>
<grid id="f073a" layout-manager="BorderLayout" hgap="0" vgap="0"> <grid id="f073a" binding="credentialsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints> <constraints>
<splitpane position="left"/> <splitpane position="left"/>
</constraints> </constraints>

View File

@@ -1,9 +1,11 @@
package Visual_DVM_2021.UI.Main; package Visual_DVM_2021.UI.Main;
import Common.Constants;
import Common.Current; import Common.Current;
import Common.Global; import Common.Global;
import Common.UI.TextField.StyledTextField; import Common.UI.TextField.StyledTextField;
import Common.UI.UI; import Common.UI.UI;
import GlobalData.Compiler.CompilerType; import GlobalData.Compiler.CompilerType;
import GlobalData.Credentials.Credentials;
import TestingSystem.Common.TestingServer; import TestingSystem.Common.TestingServer;
import TestingSystem.DVM.DVMPackage.DVMPackage; import TestingSystem.DVM.DVMPackage.DVMPackage;
import TestingSystem.DVM.DVMTasks.DVMRunTask; import TestingSystem.DVM.DVMTasks.DVMRunTask;
@@ -55,6 +57,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JPanel compilersPanel; private JPanel compilersPanel;
private JPanel machinesPanel; private JPanel machinesPanel;
private JPanel usersPanel; private JPanel usersPanel;
private JPanel credentialsPanel;
private JPanel testsRunTasksBackground; private JPanel testsRunTasksBackground;
private JCheckBox filterFinished; private JCheckBox filterFinished;
private JButton bTest; private JButton bTest;
@@ -81,6 +84,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
); );
//--->>> //--->>>
RefreshTabsNames(); RefreshTabsNames();
if (Global.properties.collapseCredentials) {
CollapseCredentials();
}
//- //-
SC50.setLeftComponent(dvmTestingRunMaster.getContent()); SC50.setLeftComponent(dvmTestingRunMaster.getContent());
SC50.setRightComponent(dvmTestingRunSlave.getContent()); SC50.setRightComponent(dvmTestingRunSlave.getContent());
@@ -115,6 +121,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
Global.testingServer.db.sapforConfigurations.ShowUI(); Global.testingServer.db.sapforConfigurations.ShowUI();
Global.testingServer.db.dvmRunTasks.ShowUI(); Global.testingServer.db.dvmRunTasks.ShowUI();
//--- //---
RestoreLastCredentials();
//---
if (Global.properties.AutoCheckTesting) if (Global.properties.AutoCheckTesting)
TestingServer.TimerOn(); TestingServer.TimerOn();
} }
@@ -222,10 +230,38 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
sapforPackageTreeMaster.DoComparePass(); sapforPackageTreeMaster.DoComparePass();
testingTabs.setSelectedIndex(3); testingTabs.setSelectedIndex(3);
} }
@Override
public void CollapseCredentials() {
UI.Clear(credentialsPanel);
credentialsPanel.add(UI.credentialsBar);
SC71.setDividerLocation(30);
SC71.setDividerSize(0);
//SC71.setEnabled(false);
credentialsPanel.revalidate();
credentialsPanel.repaint();
}
@Override
public void ExpandCredentials() {
UI.Clear(credentialsPanel);
credentialsPanel.add(SC18);
SC71.setDividerLocation(200);
//SC71.setEnabled(true);
SC71.setDividerSize(3);
credentialsPanel.revalidate();
credentialsPanel.repaint();
}
@Override
public void SwitchCredentials(boolean flag) {
if (flag) {
ExpandCredentials();
} else {
CollapseCredentials();
}
Global.properties.collapseCredentials = !flag;
Global.properties.Update();
}
/*
public void RestoreLastCredentials() { public void RestoreLastCredentials() {
Credentials credentials = (Credentials) Current.get(Current.Credentials); Credentials credentials = (Credentials) Current.get(Current.Credentials);
if (credentials.machine_id != Constants.Nan) { if (credentials.machine_id != Constants.Nan) {
if (Global.db.machines.containsKey(credentials.machine_id)) { if (Global.db.machines.containsKey(credentials.machine_id)) {
@@ -267,5 +303,4 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
} }
} }
} }
*/
} }

BIN
src/icons/CollapseUp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/icons/ExpandDown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB