no message

This commit is contained in:
2023-10-30 22:37:03 +03:00
parent 9d491999a3
commit 2ec1303c88
13 changed files with 156 additions and 65 deletions

11
.idea/workspace.xml generated
View File

@@ -7,8 +7,19 @@
</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/Main/SapforVersionComparisonForm.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/Common/Current.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Current.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/Json/SapforVersion_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/Json/SapforVersion_json.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageFields.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.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" />

View File

@@ -34,8 +34,10 @@ public enum Current {
//-- //--
ServerSapfor, ServerSapfor,
SapforTasksPackage, SapforTasksPackage,
SapforEtalonTaskResult,//самый левый пакет SapforEtalonVersion,//самый левый пакет
SapforTaskResult, SapforVersion,
//--
//-- //--
ComponentServerBackup, ComponentServerBackup,
Subscriber, Subscriber,
@@ -391,10 +393,10 @@ public enum Current {
return "Профиль SAPFOR"; return "Профиль SAPFOR";
case SapforProfileSetting: case SapforProfileSetting:
return "Настройка профиля SAPFOR"; return "Настройка профиля SAPFOR";
case SapforEtalonTaskResult: case SapforEtalonVersion:
return "Задача SAPFOR(Эталон)"; return "Версия SAPFOR(Эталон)";
case SapforTaskResult: case SapforVersion:
return "Задача SAPFOR"; return "Версия SAPFOR";
case ComponentServerBackup: case ComponentServerBackup:
return "Версия компонента для восстановления с сервера"; return "Версия компонента для восстановления с сервера";
case Subscriber: case Subscriber:

View File

@@ -1,7 +1,11 @@
package SapforTestingSystem.Json; package SapforTestingSystem.Json;
import Common.Global;
import Common.Utils.Utils;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
import java.io.File;
import java.io.Serializable; import java.io.Serializable;
import java.nio.file.Paths;
public class SapforVersion_json implements Serializable { public class SapforVersion_json implements Serializable {
@Expose @Expose
public String version = ""; public String version = "";
@@ -15,4 +19,13 @@ public class SapforVersion_json implements Serializable {
version = version_in.substring(root_in.length() + 1); version = version_in.substring(root_in.length() + 1);
description = description_in; description = description_in;
} }
@Override
public String toString() {
return Home.getName()+ " : "+ Utils.Brackets(description);
}
public File Home = null;
public void initHome(File configurationRoot) {
String relativePath = Global.isWindows ? Utils.toW(version) : version;
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
}
} }

View File

@@ -52,13 +52,14 @@ public class SapforTasksPackageInterface {
res.add(flagsNode); res.add(flagsNode);
return res; return res;
} }
public static DefaultMutableTreeNode getTaskVersionsTree(SapforTask task) { public static DefaultMutableTreeNode getTaskVersionsTree(File configurationRoot, SapforTask task) {
DefaultMutableTreeNode root = null; DefaultMutableTreeNode root = null;
DefaultMutableTreeNode child = null; DefaultMutableTreeNode child = null;
DefaultMutableTreeNode parent = null; DefaultMutableTreeNode parent = null;
//-- //--
for (SapforVersion_json version_json : task.versions) { for (SapforVersion_json version_json : task.versions) {
child = new DefaultMutableTreeNode(version_json.description); version_json.initHome(configurationRoot);
child = new DefaultMutableTreeNode(version_json);
if (parent == null) { if (parent == null) {
root = child; root = child;
parent = child; parent = child;
@@ -69,13 +70,15 @@ public class SapforTasksPackageInterface {
} }
if (parent != null) { if (parent != null) {
for (SapforVersion_json version_json : task.variants) { for (SapforVersion_json version_json : task.variants) {
parent.add(new DefaultMutableTreeNode(version_json.description)); version_json.initHome(configurationRoot);
parent.add(new DefaultMutableTreeNode(version_json));
} }
} }
//-- //--
return root; return root;
} }
public static DefaultMutableTreeNode getTreeRoot(SapforTasksPackage package_in) { public static DefaultMutableTreeNode getTreeRoot(SapforTasksPackage package_in) {
SapforTasksResults_json results_json = getLocalResults(package_in); SapforTasksResults_json results_json = getLocalResults(package_in);
//-- флаги группы //-- флаги группы
LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>> tasksByConfigurations = results_json.sortTasksByConfigurationsAndGroups(); LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>> tasksByConfigurations = results_json.sortTasksByConfigurationsAndGroups();
@@ -97,7 +100,8 @@ public class SapforTasksPackageInterface {
*/ */
DefaultMutableTreeNode taskNode = new DefaultMutableTreeNode(task.test_description); DefaultMutableTreeNode taskNode = new DefaultMutableTreeNode(task.test_description);
//-- //--
taskNode.add(getTaskVersionsTree(task)); taskNode.add(getTaskVersionsTree(
new File(getLocalWorkspace(package_in), configuration_id), task));
//-- //--
groupNode.add(taskNode); groupNode.add(taskNode);
} }

View File

@@ -1,23 +1,47 @@
package SapforTestingSystem.SapforTasksPackage; package SapforTestingSystem.SapforTasksPackage;
import Common.Current;
import Common.UI.Trees.DataTree; import Common.UI.Trees.DataTree;
import Common.UI.UI;
import ProjectData.Files.DBProjectFile;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import java.io.File;
public class SapforTasksPackageTree extends DataTree { public class SapforTasksPackageTree extends DataTree {
public SapforTasksPackageTree(DefaultMutableTreeNode root_in) { Current current;
public SapforTasksPackageTree(DefaultMutableTreeNode root_in, Current current_in) {
super(root_in); super(root_in);
current = current_in;
// setRootVisible(false); // setRootVisible(false);
// CollapseAll(); // CollapseAll();
} }
@Override @Override
protected int getStartLine() { protected int getStartLine() {
return 1; return 1;
} }
@Override @Override
public void SelectionAction(TreePath path) {}
@Override
public void LeftMouseAction2() { public void LeftMouseAction2() {
}
@Override
public Current getCurrent() {
return current;
}
@Override
public void SelectionAction(TreePath e) {
System.out.println("Select");
DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.getLastPathComponent();
Current.set(Current.ProjectNode, node);
Object o = node.getUserObject();
if (o instanceof File) {
Current.set(Current.SelectedDirectory, o);
Current.set(Current.SelectedFile, null);
UI.getMainWindow().getProjectWindow().ShowNoSelectedFile();
} else if (o instanceof DBProjectFile) {
Current.set(Current.SelectedFile, o);
File file = ((DBProjectFile) o).file;
Current.set(Current.SelectedDirectory, file.getParentFile());
UI.getMainWindow().getProjectWindow().ShowSelectedFile();
}
UI.getMainWindow().getProjectWindow().ShowSelectedDirectory();
} }
} }

View File

@@ -18,7 +18,7 @@ import org.fife.ui.rtextarea.RTextScrollPane;
import javax.swing.*; import javax.swing.*;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Vector; import java.util.Vector;
public abstract class ComparisonForm<T extends DBObject> { public abstract class ComparisonForm<T> {
public Class<T> t; //класс объектов. public Class<T> t; //класс объектов.
//-->> //-->>
private JPanel content; private JPanel content;
@@ -289,8 +289,11 @@ public abstract class ComparisonForm<T extends DBObject> {
lObjectName.setToolTipText("Объект не назначен."); lObjectName.setToolTipText("Объект не назначен.");
} }
protected void showObject() { protected void showObject() {
lObjectName.setText(object.getPK().toString()); if (object instanceof DBObject) {
lObjectName.setToolTipText(object.getPK().toString()); DBObject dbObject = (DBObject) object;
lObjectName.setText(dbObject.toString());
lObjectName.setToolTipText(dbObject.toString());
}
} }
protected void removeObject() { protected void removeObject() {
} }

View File

@@ -1,8 +1,6 @@
package Visual_DVM_2021.UI.Main; package Visual_DVM_2021.UI.Main;
import Common.UI.Windows.Dialog.DialogFields; import Common.UI.Windows.Dialog.DialogFields;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage; import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageTree;
import Visual_DVM_2021.UI.Interface.FormWithSplitters; import Visual_DVM_2021.UI.Interface.FormWithSplitters;
import javax.swing.*; import javax.swing.*;
@@ -29,8 +27,11 @@ public class SapforPackageFields implements DialogFields, FormWithSplitters {
object = object_in; object = object_in;
//-- //--
lObjectName.setText(object.id); lObjectName.setText(object.id);
/*
treePanel.add( treePanel.add(
new JScrollPane( new JScrollPane(
new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object)))); new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object))));
*/
} }
} }

View File

@@ -4,10 +4,6 @@ import Common.UI.Windows.Dialog.Dialog;
import Common.UI.Windows.FormType; import Common.UI.Windows.FormType;
import GlobalData.FormsParams.DBForm; import GlobalData.FormsParams.DBForm;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage; import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageTree;
import javax.swing.*;
public class SapforPackageForm extends Dialog<SapforTasksPackage, SapforPackageFields> { public class SapforPackageForm extends Dialog<SapforTasksPackage, SapforPackageFields> {
SapforTasksPackage sapforTasksPackage = null; SapforTasksPackage sapforTasksPackage = null;
private DBForm info = null; private DBForm info = null;
@@ -25,9 +21,12 @@ public class SapforPackageForm extends Dialog<SapforTasksPackage, SapforPackageF
public void Init(Object... params) { public void Init(Object... params) {
sapforTasksPackage = (SapforTasksPackage) params[0]; sapforTasksPackage = (SapforTasksPackage) params[0];
fields.lObjectName.setText(sapforTasksPackage.id); fields.lObjectName.setText(sapforTasksPackage.id);
/*
fields.getTreePanel().add( fields.getTreePanel().add(
new JScrollPane( new JScrollPane(
new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(sapforTasksPackage)))); new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(sapforTasksPackage))));
*/
/* /*
if (Global.db.sapforProfiles.size() > 0) { if (Global.db.sapforProfiles.size() > 0) {
for (Object key : Global.db.sapforProfiles.Data.keySet()) { for (Object key : Global.db.sapforProfiles.Data.keySet()) {

View File

@@ -98,31 +98,7 @@
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<splitpane id="3287b" binding="SCZ"> <grid id="24e20" binding="treePanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="250"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="4163a" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="fd8a7" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="5b6cf" binding="treePanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/> <constraints border-constraint="Center"/>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
@@ -131,10 +107,6 @@
</children> </children>
</grid> </grid>
</children> </children>
</splitpane>
</children>
</grid>
</children>
</grid> </grid>
</children> </children>
</grid> </grid>

View File

@@ -24,7 +24,6 @@ public class SapforPackagesComparisonForm {
private JButton bNext; private JButton bNext;
private JButton bCompare; private JButton bCompare;
private JButton bClose; private JButton bClose;
private JSplitPane SCZ;
private JPanel treePanel; private JPanel treePanel;
//-->> //-->>
SapforPackagesComparisonForm this_ = null; //? SapforPackagesComparisonForm this_ = null; //?
@@ -82,7 +81,9 @@ public class SapforPackagesComparisonForm {
protected void showObject() { protected void showObject() {
lObjectName.setText(object.getPK().toString() + (isMaster() ? "(эталон)" : "")); lObjectName.setText(object.getPK().toString() + (isMaster() ? "(эталон)" : ""));
lObjectName.setToolTipText(object.getPK().toString()); lObjectName.setToolTipText(object.getPK().toString());
treePanel.add(new JScrollPane(new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object)))); treePanel.add(new JScrollPane(new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object),
isMaster()? Current.SapforEtalonVersion: Current.SapforVersion
)));
} }
protected String getText() { protected String getText() {
return ""; return "";

View File

@@ -0,0 +1,16 @@
package Visual_DVM_2021.UI.Main;
import Common.Current;
import SapforTestingSystem.Json.SapforVersion_json;
public class SapforVersionComparisonForm extends ComparisonForm<SapforVersion_json> {
public SapforVersionComparisonForm(SapforVersionComparisonForm slave_in) {
super(SapforVersion_json.class, slave_in);
}
@Override
protected Current getCurrentObjectName() {
return null;
}
@Override
protected String getText() {
return null;
}
}

View File

@@ -193,7 +193,7 @@
<splitpane id="760d4" binding="SC56"> <splitpane id="760d4" binding="SC56">
<constraints border-constraint="Center"/> <constraints border-constraint="Center"/>
<properties> <properties>
<dividerLocation value="250"/> <dividerLocation value="100"/>
<dividerSize value="3"/> <dividerSize value="3"/>
<orientation value="0"/> <orientation value="0"/>
</properties> </properties>
@@ -247,11 +247,54 @@
<splitpane id="c2b4" binding="SC64"> <splitpane id="c2b4" binding="SC64">
<constraints border-constraint="Center"/> <constraints border-constraint="Center"/>
<properties> <properties>
<dividerLocation value="350"/> <dividerLocation value="400"/>
<dividerSize value="3"/> <dividerSize value="3"/>
</properties> </properties>
<border type="none"/> <border type="none"/>
<children>
<splitpane id="8e1d0" binding="SC65">
<constraints>
<splitpane position="left"/>
</constraints>
<properties>
<dividerLocation value="300"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="10a70" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children/> <children/>
</grid>
</children>
</splitpane>
<splitpane id="e0ceb" binding="SC66">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<dividerLocation value="300"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="490c4" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</splitpane>
</children>
</splitpane> </splitpane>
</children> </children>
</grid> </grid>

View File

@@ -22,6 +22,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public JSplitPane SC63; public JSplitPane SC63;
public JSplitPane SC59; public JSplitPane SC59;
public JSplitPane SC64; public JSplitPane SC64;
public JSplitPane SC65;
public JSplitPane SC66;
//- //-
//--- //---
private JTabbedPane testingTabs; private JTabbedPane testingTabs;
@@ -66,8 +68,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
SC50.setLeftComponent(dvmTestingRunMaster.getContent()); SC50.setLeftComponent(dvmTestingRunMaster.getContent());
SC50.setRightComponent(dvmTestingRunSlave.getContent()); SC50.setRightComponent(dvmTestingRunSlave.getContent());
//- //-
SC64.setLeftComponent(sapforTestingMaster.getContent()); SC65.setLeftComponent(sapforTestingMaster.getContent());
SC64.setRightComponent(sapforTestingSlave.getContent()); SC66.setLeftComponent(sapforTestingSlave.getContent());
//- //-
Global.testingServer.db.configurations.mountUI(configurationsPanel); Global.testingServer.db.configurations.mountUI(configurationsPanel);
Global.testingServer.account_db.packages.mountUI(packagesPanel); Global.testingServer.account_db.packages.mountUI(packagesPanel);