no message
This commit is contained in:
@@ -2,6 +2,7 @@ package SapforTestingSystem.SapforTasksPackage;
|
||||
import Common.Constants;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.nDBObject;
|
||||
import SapforTestingSystem.Json.SapforTasksResults_json;
|
||||
import TestingSystem.TasksPackage.TasksPackageState;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
@@ -33,14 +34,6 @@ public class SapforTasksPackage extends nDBObject {
|
||||
public String configurationsIds = "";
|
||||
@Description("DEFAULT ''")
|
||||
public String summary = "";
|
||||
// допустимые состояния
|
||||
//Queued
|
||||
//PackageStart
|
||||
//RunningExecution
|
||||
//Done
|
||||
//Aborted
|
||||
@Description("IGNORE")
|
||||
public DefaultMutableTreeNode root = null;
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
@@ -58,4 +51,13 @@ public class SapforTasksPackage extends nDBObject {
|
||||
state = p.state;
|
||||
needsEmail = p.needsEmail;
|
||||
}
|
||||
//---
|
||||
@Description("IGNORE")
|
||||
public DefaultMutableTreeNode root = null;
|
||||
@Description("IGNORE")
|
||||
public DefaultMutableTreeNode comparison_root = null;
|
||||
//---
|
||||
@Description("IGNORE")
|
||||
public SapforTasksResults_json results = null;
|
||||
//---
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
import SapforTestingSystem.Json.SapforTasksResults_json;
|
||||
import SapforTestingSystem.SapforTask.MatchState;
|
||||
import SapforTestingSystem.SapforTask.SapforTask;
|
||||
import SapforTestingSystem.SapforTasksPackage.UI.*;
|
||||
import SapforTestingSystem.SapforTasksPackage.UI.ConfigurationSummary;
|
||||
import SapforTestingSystem.SapforTasksPackage.UI.GroupSummary;
|
||||
import SapforTestingSystem.SapforTasksPackage.UI.PackageSummary;
|
||||
import SapforTestingSystem.SapforTasksPackage.UI.StateSummary;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import java.io.File;
|
||||
@@ -38,11 +40,12 @@ public class SapforTasksPackageInterface {
|
||||
return getLoadedSign(package_in).exists();
|
||||
}
|
||||
//--
|
||||
public static DefaultMutableTreeNode buildTree(SapforTasksPackage package_in) {
|
||||
public static DefaultMutableTreeNode buildTree_old(SapforTasksPackage package_in) {
|
||||
PackageSummary root = new PackageSummary();
|
||||
/*
|
||||
SapforTasksResults_json results_json = getLocalResults(package_in);
|
||||
LinkedHashMap<MatchState, LinkedHashMap<TaskState, LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>>>> sortedTasks =
|
||||
results_json.sortTasksForTree();
|
||||
results_json.sortTasksForComparisonTree();
|
||||
//--
|
||||
for (MatchState match_state : sortedTasks.keySet()) {
|
||||
//--
|
||||
@@ -90,12 +93,54 @@ public class SapforTasksPackageInterface {
|
||||
root.add(matchesSummary);
|
||||
}
|
||||
}
|
||||
*/
|
||||
return root;
|
||||
}
|
||||
//--
|
||||
public static DefaultMutableTreeNode getTree(SapforTasksPackage package_in) {
|
||||
if (package_in.root == null)
|
||||
package_in.root = buildTree(package_in);
|
||||
return package_in.root;
|
||||
public static DefaultMutableTreeNode buildTree(SapforTasksPackage package_in) {
|
||||
//--
|
||||
if (package_in.results == null) {
|
||||
package_in.results = getLocalResults(package_in);
|
||||
}
|
||||
//--
|
||||
PackageSummary root = new PackageSummary();
|
||||
LinkedHashMap<TaskState, LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>>> task_states =
|
||||
package_in.results.sortTasksForTree();
|
||||
//---
|
||||
for (TaskState state : task_states.keySet()) {
|
||||
//--
|
||||
StateSummary stateSummary = new StateSummary(state);
|
||||
//--
|
||||
LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>> tasksByConfigurations = task_states.get(state);
|
||||
for (String configuration_id : tasksByConfigurations.keySet()) {
|
||||
//--
|
||||
DefaultMutableTreeNode configurationNode = null;
|
||||
//--
|
||||
LinkedHashMap<String, Vector<SapforTask>> groups_tasks = tasksByConfigurations.get(configuration_id);
|
||||
for (String group : groups_tasks.keySet()) {
|
||||
//--
|
||||
GroupSummary groupSummary = new GroupSummary(group);
|
||||
//--
|
||||
for (SapforTask task : groups_tasks.get(group)) {
|
||||
//--
|
||||
stateSummary.count++;
|
||||
root.count++;
|
||||
//--
|
||||
if (configurationNode == null) {
|
||||
configurationNode = new ConfigurationSummary(configuration_id, task);
|
||||
}
|
||||
//--
|
||||
groupSummary.add(task.getVersionsTree(new File(getLocalWorkspace(package_in), configuration_id)));
|
||||
}
|
||||
if (configurationNode != null)
|
||||
configurationNode.add(groupSummary);
|
||||
}
|
||||
stateSummary.add(configurationNode);
|
||||
}
|
||||
if (stateSummary.count > 0) {
|
||||
root.add(stateSummary);
|
||||
}
|
||||
}
|
||||
return root;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user