This commit is contained in:
2025-02-12 23:02:46 +03:00
parent 74fcc2150d
commit 57baa6c9c1
6 changed files with 16 additions and 14 deletions

View File

@@ -23,7 +23,7 @@ public class Global {
public static MainModule mainModule = null;
//Режим
public static Mode mode = Mode.Undefined;
//--------------------------------------------------
//setAdminRights-------------
public static VisualDVMProperties properties= null;
public static NormalProperties normalProperties = null;
public static ComponentsServerProperties componentsServerProperties = null;

View File

@@ -35,7 +35,8 @@ public class MainModule extends MainModule_<GlobalDatabase, MainUI> {
PassCode.ShutdownTestingServer,
PassCode.StartTestingServer,
PassCode.PublishTestingServer,
PassCode.CreateTestsGroupFromSelectedVersions
PassCode.CreateTestsGroupFromSelectedVersions,
PassCode.RefreshDVMPackageResults
);
public MainModule() throws Exception {
super(GlobalDatabase.class, MainUI.class);

View File

@@ -25,6 +25,10 @@ public class RefreshDVMPackageResults extends TestingServerPass<DVMPackage> {
return "/icons/Menu/Undo.png";
}
@Override
protected boolean needsAnimation() {
return true;
}
@Override
protected boolean canStart(Object... args) throws Exception {
if (!Global.testingServer.db.dvmPackages.getUI().CheckCurrent(Log))
return false;
@@ -47,8 +51,10 @@ public class RefreshDVMPackageResults extends TestingServerPass<DVMPackage> {
int rt_count = 0;
int good = 0;
//--
int i = 0;
for (DVMCompilationTask compilationTask : target.package_json.compilationTasks)
for (DVMRunTask runTask : compilationTask.runTasks) {
ShowProgress(runTasks.size(), i, true);
rt_count++;
if (compilationTask.state != TaskState.Done) {
runTask.state = TaskState.Canceled;
@@ -100,12 +106,9 @@ public class RefreshDVMPackageResults extends TestingServerPass<DVMPackage> {
target.description = "Выполнено на " + ((int) percent) + "%\n" +
"Всего задач: " + target.tasksCount + ", из них с ошибками " + (target.tasksCount - good);
//--
//Global.testingServer.db.Update(target);
// RemoteFile remoteJson = new RemoteFile(target.get)
/*
SendRequest(ServerCode.EditObject, "", target);
SendRequest(ServerCode.SendFile)
*/
}
@Override
protected void performDone() throws Exception {
SendRequest(ServerCode.ReplaceDVMPackageResults,"",
new Pair<>(
target,

View File

@@ -62,7 +62,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override
public void GetVersionInfo() {
version = 1159;
version = 1160;
String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime());

View File

@@ -141,7 +141,7 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
addPasses(PassCode.PauseDVMPackage,PassCode.ResumeDVMPackage,PassCode.AbortDVMPackage);
addSeparator();
addPasses(PassCode.DownloadDVMPackage,
// PassCode.RefreshDVMPackageResults,
PassCode.RefreshDVMPackageResults,
PassCode.ExportDVMPackageToExcel,
PassCode.DeleteDVMPackage);
}