промежуточный. выкинул старые объекты и функционал. Осталось восстановить эксель, и отображение пакетов Сапфор

This commit is contained in:
2023-12-16 16:52:17 +03:00
parent 94ff786ed6
commit 0c513cec5e
57 changed files with 276 additions and 3460 deletions

View File

@@ -9,7 +9,6 @@ public interface TestingWindow extends VisualizerForm {
void ShowNoTestRunTask();
//-
void RefreshTabsNames();
void RemountTestTable();
//-
void FocusTestingTasks();
void ShowCurrentSapforPackageVersionEtalon();

View File

@@ -0,0 +1,29 @@
package Visual_DVM_2021.UI.Main;
import Common.Current;
import TestingSystem.DVM.DVMTasks.DVMRunTask;
public class DVMRunTasksComparisonForm extends TasksComparisonForm<DVMRunTask> {
public DVMRunTasksComparisonForm(ComparisonForm<DVMRunTask> slave_in) {
super(DVMRunTask.class, slave_in);
}
@Override
protected Current getCurrentObjectName() {
return Current.DVMRunTask;
}
@Override
protected String getTextByTab() {
switch (status) {
case CompilationOutput:
return object.getCompilationOutput();
case CompilationErrors:
return object.getCompilationErrors();
case RunOutput:
return object.getOutput();
case RunErrors:
return object.getErrors();
case Sts:
return object.getStatistic();
default:
return "";
}
}
}

View File

@@ -4,8 +4,8 @@ import Common.UI.Label.ShortLabel;
import Common.UI.Menus_2023.VisualiserMenuBar;
import Common.UI.UI;
import Common.Utils.TextLog;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import TestingSystem.SAPFOR.SapforTask.SapforTask;
import TestingSystem.SAPFOR.SapforTasksPackage.SapforTasksPackage;
import TestingSystem.SAPFOR.SapforTasksPackage.UI.SapforTasksPackageTree;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Pass_2021;
@@ -31,7 +31,7 @@ public class SapforPackagesComparisonForm {
SapforPackagesComparisonForm slave = null;
SapforPackagesComparisonForm master = null;
//-->>
protected SapforTasksPackage object = null;
protected SapforPackage object = null;
//-->>
// protected DataSet<String, SapforTaskResult> packageTasks;
protected SapforTasksPackageTree Body;
@@ -63,17 +63,19 @@ public class SapforPackagesComparisonForm {
}
}
public void ApplyObject() {
/*
//---
RemoveObject();
//---
TextLog log = new TextLog();
if (Current.Check(log, Current.SapforTasksPackage)) {
object = Current.getSapforTasksPackage();
if (object.isLoaded() || (Pass_2021.passes.get(PassCode_2021.DownloadSapforTasksPackage).Do(object))) {
if (Current.Check(log, Current.SapforPackage)) {
object = Current.getSapforPackage();
if (object.isLoaded() || (Pass_2021.passes.get(PassCode_2021.DownloadSapforPackage).Do(object))) {
showObject();
}
} else
UI.Info(log.toString());
*/
}
public void Show() throws Exception {
}
@@ -89,6 +91,7 @@ public class SapforPackagesComparisonForm {
}
//---
public void showCommonTree() {
/*
//---
treePanel.add(treeScroll = new JScrollPane(
Body = new SapforTasksPackageTree(object.results.root,
@@ -96,20 +99,25 @@ public class SapforPackagesComparisonForm {
)));
treePanel.repaint();
treePanel.revalidate();
*/
}
public void showComparisonTree() {
/*
treePanel.add(treeScroll = new JScrollPane(
Body = new SapforTasksPackageTree(object.results.comparison_root,
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
)));
treePanel.repaint();
treePanel.revalidate();
*/
}
//---
public void showNoTree() {
UI.Clear(treePanel);
}
public void showObject() {
/*
lObjectName.setText(object.getPK().toString() + (isMaster() ? "(эталон)" : ""));
lObjectName.setToolTipText(object.getPK().toString());
//--
@@ -117,6 +125,7 @@ public class SapforPackagesComparisonForm {
object.readResults();
//--
showCommonTree();
*/
}
protected String getText() {
return "";
@@ -164,8 +173,8 @@ public class SapforPackagesComparisonForm {
}
public void DoComparePass() {
Pass_2021 pass = new Pass_2021() {
SapforTasksPackage package1;
SapforTasksPackage package2;
SapforPackage package1;
SapforPackage package2;
@Override
public String getDescription() {
return "Сравнение";
@@ -193,11 +202,13 @@ public class SapforPackagesComparisonForm {
Log.Writeln_("Наборы конфигураций не совпадают!");
return false;
}
/*
for (String key1 : package1.results.allTasks.keySet()) {
if (!package2.results.allTasks.containsKey(key1)) {
Log.Writeln_("Задача эталона " + key1 + "не найдена в сравниваемом пакете!");
}
}
*/
return Log.isEmpty();
}
return false;
@@ -210,8 +221,8 @@ public class SapforPackagesComparisonForm {
treeScroll = null;
slave.treeScroll = null;
//--
package1.results.DropComparison();
package2.results.DropComparison();
// package1.results.DropComparison();
// package2.results.DropComparison();
}
@Override
protected void showPreparation() throws Exception {
@@ -223,6 +234,7 @@ public class SapforPackagesComparisonForm {
}
@Override
protected void body() throws Exception {
/*
System.out.println(package1.results.allTasks.size());
System.out.println(package2.results.allTasks.size());
//теперь сравниваем задачи
@@ -242,6 +254,7 @@ public class SapforPackagesComparisonForm {
//-
package1.results.buildComparisonTree(package1);
package2.results.buildComparisonTree(package2);
*/
}
@Override
protected boolean validate() {

View File

@@ -1,29 +0,0 @@
package Visual_DVM_2021.UI.Main;
import Common.Current;
import TestingSystem.DVM.Tasks.TestRunTask;
public class TestRunTasksComparisonForm extends TasksComparisonForm<TestRunTask> {
public TestRunTasksComparisonForm(ComparisonForm<TestRunTask> slave_in) {
super(TestRunTask.class, slave_in);
}
@Override
protected Current getCurrentObjectName() {
return Current.TestRunTask;
}
@Override
protected String getTextByTab() {
switch (status) {
case CompilationOutput:
return object.compilation_output;
case CompilationErrors:
return object.compilation_errors;
case RunOutput:
return object.output;
case RunErrors:
return object.errors;
case Sts:
return object.statistic;
default:
return "";
}
}
}

View File

@@ -281,25 +281,6 @@
</grid>
</children>
</grid>
<grid id="68338" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/MassFiles.png">
<tooltip value="Список задач"/>
</tabbedpane>
</constraints>
<properties>
<enabled value="true"/>
</properties>
<border type="none"/>
<children>
<grid id="1beb4" binding="sapforTasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</tabbedpane>
</children>

View File

@@ -48,14 +48,13 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JPanel serverSapforsPanel;
private JPanel sapforPackagesPanel;
private JTabbedPane sapforPackageTabs;
private JPanel sapforTasksPanel;
private JPanel testsRunTasksBackground;
private JCheckBox filterFinished;
private JButton bTest;
private JButton bDownloadTestProject;
//-
private final TestRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
private final TestRunTasksComparisonForm dvmTestingRunSlave;
private final DVMRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
private final DVMRunTasksComparisonForm dvmTestingRunSlave;
//-
private final SapforPackagesComparisonForm sapforPackageTreeMaster; //сравнение деревьев пакетов SAPFOR.
private final SapforPackagesComparisonForm sapforPackageTreeSlave;
@@ -67,7 +66,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
content.add(UI.testingBar, BorderLayout.NORTH);
LoadSplitters();
//-
dvmTestingRunMaster = new TestRunTasksComparisonForm(dvmTestingRunSlave = new TestRunTasksComparisonForm(null));
dvmTestingRunMaster = new DVMRunTasksComparisonForm(dvmTestingRunSlave = new DVMRunTasksComparisonForm(null));
sapforPackageTreeMaster = new SapforPackagesComparisonForm(sapforPackageTreeSlave = new SapforPackagesComparisonForm(null));
sapforVersionMaster = new SapforVersionsComparisonForm(
sapforVersionSlave = new SapforVersionsComparisonForm(null, Current.SapforVersion),
@@ -162,19 +161,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
sapforVersionSlave.RemoveObject();
}
@Override
public void RemountTestTable() {
UI.Clear(dvmPackagesPanel);
UI.Clear(dvmRunTasksPanel);
UI.Clear(sapforPackagesPanel);
UI.Clear(sapforTasksPanel);
DropSapforComparison();
//-->>
Global.testingServer.account_db.packages.mountUI(dvmPackagesPanel);
Global.testingServer.account_db.testRunTasks.mountUI(dvmRunTasksPanel);
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforPackagesPanel);
Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel);
}
@Override
public void FocusSapforTesting() {
testingTabs.setSelectedIndex(1);
}