no message

This commit is contained in:
2023-12-11 02:00:28 +03:00
parent 99cdca1ebb
commit cb74d629b7
4 changed files with 120 additions and 2 deletions

5
.idea/workspace.xml generated
View File

@@ -7,7 +7,10 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackage.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" 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/TestingSystem/Common/TestsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestsDatabase.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -20,6 +20,7 @@ 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;
@@ -32,6 +33,8 @@ import java.util.LinkedHashMap;
public enum Current {
Undefined,
//--
DVMPackage,
//--
ServerSapfor,
SapforTasksPackage,
SapforEtalonVersion,//самый левый пакет
@@ -388,9 +391,19 @@ public enum Current {
public static Repository.SubscriberWorkspace.SubscriberWorkspace getSubscriberWorkspace() {
return (Repository.SubscriberWorkspace.SubscriberWorkspace) get(Current.SubscriberWorkspace);
}
//----->>
public static boolean HasDVMPackage() {
return get(Current.DVMPackage) != null;
}
public static TestingSystem.DVM.DVMPackage.DVMPackage getDVMPackage() {
return (TestingSystem.DVM.DVMPackage.DVMPackage) get(Current.DVMPackage);
}
//----->>
//--------------------------------------------
public String getDescription() {
switch (this) {
case DVMPackage:
return "Пакет тестирования DVM";
case Configuration:
return "Конфигурация тестирования";
case ServerSapfor:

View File

@@ -2,6 +2,7 @@ package TestingSystem.Common;
import Common.Constants;
import Common.Database.SQLITE.SQLiteDatabase;
import GlobalData.Settings.SettingName;
import TestingSystem.DVM.DVMPackage.DVMPackageDBTable;
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfigurationDBTable;
import TestingSystem.SAPFOR.SapforConfigurationCommand.SapforConfigurationCommandsDBTable;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforsDBTable;
@@ -14,10 +15,12 @@ import Visual_DVM_2021.Passes.PassCode_2021;
import java.nio.file.Paths;
public class TestsDatabase extends SQLiteDatabase {
public TSettingsDBTable settings; //todo может быть перенести в properties. пользователю ни к чему это скачивать.
///--
public ConfigurationDBTable configurations;
public TestDBTable tests;
public GroupsDBTable groups;
public TSettingsDBTable settings;
public DVMPackageDBTable dvm_packages;
//--
public SapforConfigurationDBTable sapforConfigurations;
public SapforConfigurationCommandsDBTable sapforConfigurationCommands;
@@ -31,6 +34,7 @@ public class TestsDatabase extends SQLiteDatabase {
addTable(configurations = new ConfigurationDBTable());
addTable(groups = new GroupsDBTable());
addTable(tests = new TestDBTable());
addTable(dvm_packages = new DVMPackageDBTable());
addTable(settings = new TSettingsDBTable());
//-
addTable(sapforConfigurations = new SapforConfigurationDBTable());

View File

@@ -0,0 +1,98 @@
package TestingSystem.DVM.DVMPackage;
import Common.Current;
import Common.Database.*;
import Common.UI.DataSetControlForm;
import Common.UI.UI;
import TestingSystem.DVM.Tasks.TestRunTask;
import TestingSystem.DVM.TasksPackage.TasksPackage;
import java.util.Date;
import java.util.LinkedHashMap;
import static Common.UI.Tables.TableRenderers.RendererDate;
import static Common.UI.Tables.TableRenderers.RendererStatusEnum;
public class DVMPackageDBTable extends DBTable<Long, DVMPackage> {
public DVMPackageDBTable() {
super(Long.class, DVMPackage.class);
}
@Override
public Current CurrentName() {
return Current.DVMPackage;
}
@Override
public String getSingleDescription() {
return "пакет задач DVM";
}
@Override
public String getPluralDescription() {
return "пакеты задач DVM";
}
@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(8).setRenderer(RendererDate);
columns.get(9).setRenderer(RendererDate);
columns.get(10).setRenderer(RendererStatusEnum);
}
@Override
public void ShowCurrentObject() throws Exception {
super.ShowCurrentObject();
// UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
}
@Override
public void ShowNoCurrentObject() throws Exception {
super.ShowNoCurrentObject();
// UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
}
};
}
@Override
public String[] getUIColumnNames() {
return new String[]{
"Автор",
"Машина",
"Пользователь",
"DVM",
"Задач",
"Ядер",
"Начало",
"Изменено",
"Статус"
};
}
@Override
public Object getFieldAt(DVMPackage object, int columnIndex) {
switch (columnIndex) {
case 2:
return object.sender_name;
case 3:
return object.machine_address + ":" + object.machine_port;
case 4:
return object.user_name;
case 5:
return object.version;
case 6:
return object.tasksCount;
case 7:
return object.kernels;
case 8:
return new Date(object.date);
case 9:
return new Date(object.change_date);
case 10:
return object.state;
default:
return null;
}
}
}