no message
This commit is contained in:
@@ -20,7 +20,6 @@ import Repository.BugReport.BugReport;
|
||||
import Repository.Subscribes.Subscriber;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.DVM.Configuration.Configuration;
|
||||
import TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import TestingSystem.DVM.Tasks.TestCompilationTask;
|
||||
import TestingSystem.DVM.Tasks.TestRunTask;
|
||||
import TestingSystem.DVM.TasksPackage.TasksPackage;
|
||||
@@ -34,6 +33,7 @@ public enum Current {
|
||||
Undefined,
|
||||
//--
|
||||
DVMPackage,
|
||||
SapforPackage,
|
||||
//--
|
||||
ServerSapfor,
|
||||
SapforTasksPackage,
|
||||
@@ -398,10 +398,17 @@ public enum Current {
|
||||
public static TestingSystem.DVM.DVMPackage.DVMPackage getDVMPackage() {
|
||||
return (TestingSystem.DVM.DVMPackage.DVMPackage) get(Current.DVMPackage);
|
||||
}
|
||||
//----->>
|
||||
public static boolean HasSapforPackage() {
|
||||
return get(Current.SapforPackage) != null;
|
||||
}
|
||||
public static TestingSystem.SAPFOR.SapforPackage.SapforPackage getSapforPackage() {
|
||||
return (TestingSystem.SAPFOR.SapforPackage.SapforPackage) get(Current.SapforPackage);
|
||||
}
|
||||
//--------------------------------------------
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
case SapforPackage:
|
||||
return "Пакет тестирования SAPFOR";
|
||||
case DVMPackage:
|
||||
return "Пакет тестирования DVM";
|
||||
case Configuration:
|
||||
|
||||
@@ -45,13 +45,13 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
public TestingPackage() {
|
||||
}
|
||||
public File getLocalWorkspace() {
|
||||
return new File(Global.PackagesDirectory, String.valueOf(id));
|
||||
return new File(getHomeDirectory(), String.valueOf(id));
|
||||
}
|
||||
//------------------------
|
||||
@Description("IGNORED")
|
||||
public J package_json=null;
|
||||
public abstract Class getJsonClass();
|
||||
|
||||
public abstract File getHomeDirectory();
|
||||
public File getJsonFile() {
|
||||
return new File(getLocalWorkspace(), "package_json");
|
||||
}
|
||||
|
||||
@@ -13,17 +13,19 @@ import TestingSystem.DVM.DVMPackage.DVMPackageDBTable;
|
||||
import TestingSystem.DVM.TasksPackage.TasksPackageState;
|
||||
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfigurationDBTable;
|
||||
import TestingSystem.SAPFOR.SapforConfigurationCommand.SapforConfigurationCommandsDBTable;
|
||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackageDBTable;
|
||||
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforsDBTable;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
public class TestsDatabase extends SQLiteDatabase {
|
||||
public TSettingsDBTable settings; //todo может быть перенести в properties. пользователю ни к чему это скачивать.
|
||||
public TSettingsDBTable settings; //todo ВЫВЕСТИ
|
||||
///--
|
||||
public ConfigurationDBTable configurations;
|
||||
public TestDBTable tests;
|
||||
public GroupsDBTable groups;
|
||||
public DVMPackageDBTable dvmPackages;
|
||||
public SapforPackageDBTable sapforPackages;
|
||||
//--
|
||||
public TestingPackagesToKillDBTable testingPackagesToKill;
|
||||
//--
|
||||
@@ -40,6 +42,7 @@ public class TestsDatabase extends SQLiteDatabase {
|
||||
addTable(groups = new GroupsDBTable());
|
||||
addTable(tests = new TestDBTable());
|
||||
addTable(dvmPackages = new DVMPackageDBTable());
|
||||
addTable(sapforPackages = new SapforPackageDBTable());
|
||||
addTable(settings = new TSettingsDBTable());
|
||||
addTable(testingPackagesToKill = new TestingPackagesToKillDBTable());
|
||||
//-
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package TestingSystem.DVM.DVMPackage;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Global;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.User.User;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
|
||||
import java.io.File;
|
||||
public class DVMPackage extends TestingPackage<DVMPackage_json> {
|
||||
//---
|
||||
public String machine_name = "";
|
||||
@@ -20,6 +23,10 @@ public class DVMPackage extends TestingPackage<DVMPackage_json> {
|
||||
public Class getJsonClass() {
|
||||
return DVMPackage_json.class;
|
||||
}
|
||||
@Override
|
||||
public File getHomeDirectory() {
|
||||
return Global.PackagesDirectory;
|
||||
}
|
||||
public DVMPackage(DVMPackage p) {
|
||||
super(p);
|
||||
this.SynchronizeFields(p);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package TestingSystem.SAPFOR.SAPFORPackage;
|
||||
package TestingSystem.SAPFOR.SapforPackage;
|
||||
import Common.Constants;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import TestingSystem.DVM.TasksPackage.TasksPackageState;
|
||||
import TestingSystem.SAPFOR.Json.SapforTasksResults_json;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.io.File;
|
||||
public class SapforPackage extends TestingPackage {
|
||||
@Description("DEFAULT ''")
|
||||
public String testsNames = "";//имена тестов через ; для отображения
|
||||
@@ -17,4 +19,8 @@ public class SapforPackage extends TestingPackage {
|
||||
public Class getJsonClass() {
|
||||
return SapforTasksResults_json.class;
|
||||
}
|
||||
@Override
|
||||
public File getHomeDirectory() {
|
||||
return Global.SapforPackagesDirectory;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package TestingSystem.SAPFOR.SapforPackage;
|
||||
import Common.Current;
|
||||
import Common.Database.iDBTable;
|
||||
import Common.UI.DataSetControlForm;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static Common.UI.Tables.TableRenderers.*;
|
||||
public class SapforPackageDBTable extends iDBTable<SapforPackage> {
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforPackage;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пакет задач SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пакеты задач SAPFOR";
|
||||
}
|
||||
public SapforPackageDBTable() {
|
||||
super(SapforPackage.class);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this) {
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
// columns.get(0).setVisible(false);
|
||||
columns.get(4).setMaxWidth(200);
|
||||
columns.get(7).setRenderer(RendererProgress);
|
||||
columns.get(8).setRenderer(RendererDate);
|
||||
columns.get(9).setRenderer(RendererDate);
|
||||
columns.get(10).setRenderer(RendererStatusEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Автор",
|
||||
"SAPFOR",
|
||||
"Тесты",
|
||||
"Задач",
|
||||
"Ядер",
|
||||
"Прогресс",
|
||||
"Начало",
|
||||
"Изменено",
|
||||
"Статус"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforPackage object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.sender_name;
|
||||
case 3:
|
||||
return object.version;
|
||||
case 4:
|
||||
return object.testsNames;
|
||||
case 5:
|
||||
return object.tasksCount;
|
||||
case 6:
|
||||
return object.kernels;
|
||||
case 7:
|
||||
return object.progress;
|
||||
case 8:
|
||||
return new Date(object.StartDate);
|
||||
case 9:
|
||||
return new Date(object.ChangeDate);
|
||||
case 10:
|
||||
return object.state;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
|
||||
server.db.sapforConfigurations.ClearUI();
|
||||
server.db.serverSapfors.ClearUI();
|
||||
server.db.dvmPackages.ClearUI();
|
||||
server.db.sapforPackages.ClearUI();
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
@@ -45,7 +46,6 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
|
||||
server.db.Connect();
|
||||
server.db.prepareTablesStatements();
|
||||
server.db.Synchronize();
|
||||
//убрать пересоздание таблиц. ибо сносится связь с интерфейсом окна.
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
@@ -55,6 +55,7 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
|
||||
server.db.sapforConfigurations.ShowUI();
|
||||
server.db.serverSapfors.ShowUI();
|
||||
server.db.dvmPackages.ShowUI();
|
||||
server.db.sapforPackages.ShowUI();
|
||||
server.db.RestoreLastSelections();
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="a8a6" binding="sapforTasksPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="a8a6" binding="sapforPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<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>
|
||||
|
||||
@@ -46,7 +46,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
private JPanel sapforConfigurationCommandsPanel;
|
||||
private JPanel sapforScenariosPanel;
|
||||
private JPanel serverSapforsPanel;
|
||||
private JPanel sapforTasksPackagesPanel;
|
||||
private JPanel sapforPackagesPanel;
|
||||
private JTabbedPane sapforPackageTabs;
|
||||
private JPanel sapforTasksPanel;
|
||||
private JPanel testsRunTasksBackground;
|
||||
@@ -88,26 +88,20 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
Global.testingServer.db.configurations.mountUI(configurationsPanel);
|
||||
Global.testingServer.db.dvmPackages.mountUI(dvmPackagesPanel);
|
||||
|
||||
// Global.testingServer.account_db.packages.mountUI(packagesPanel);
|
||||
// Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
|
||||
//--
|
||||
Global.testingServer.db.sapforConfigurations.mountUI(sapforConfigurationsPanel);
|
||||
Global.testingServer.db.sapforConfigurationCommands.mountUI(sapforConfigurationCommandsPanel);
|
||||
Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel);
|
||||
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel);
|
||||
//---
|
||||
Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel);
|
||||
Global.testingServer.db.sapforPackages.mountUI(sapforPackagesPanel);
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
Global.testingServer.db.configurations.ShowUI();
|
||||
// Global.testingServer.account_db.packages.ShowUI();
|
||||
Global.testingServer.db.dvmPackages.ShowUI();
|
||||
Global.testingServer.db.sapforPackages.ShowUI();
|
||||
//--
|
||||
Global.testingServer.db.serverSapfors.ShowUI();
|
||||
Global.testingServer.db.sapforConfigurations.ShowUI();
|
||||
Global.testingServer.account_db.sapforTasksPackages.ShowUI();
|
||||
//---
|
||||
if (Global.properties.AutoCheckTesting)
|
||||
TestingServer.TimerOn();
|
||||
@@ -169,13 +163,13 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
public void RemountTestTable() {
|
||||
UI.Clear(dvmPackagesPanel);
|
||||
UI.Clear(testsRunTasksPanel);
|
||||
UI.Clear(sapforTasksPackagesPanel);
|
||||
UI.Clear(sapforPackagesPanel);
|
||||
UI.Clear(sapforTasksPanel);
|
||||
DropSapforComparison();
|
||||
//-->>
|
||||
Global.testingServer.account_db.packages.mountUI(dvmPackagesPanel);
|
||||
Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
|
||||
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel);
|
||||
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforPackagesPanel);
|
||||
Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel);
|
||||
}
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user