no message
This commit is contained in:
@@ -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 = 1099;
|
||||
version = 1100;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -7,11 +7,8 @@ import Common.Utils.Utils;
|
||||
import ProjectData.LanguageName;
|
||||
import Repository.Component.Sapfor.Sapfor;
|
||||
import Repository.EmailMessage;
|
||||
import Repository.RepositoryRefuseException;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
import TestingSystem.Common.TasksPackageState;
|
||||
import TestingSystem.Common.TestingPackageToKill.TestingPackageToKill;
|
||||
import TestingSystem.Common.TestingPlanner;
|
||||
import TestingSystem.SAPFOR.Json.SapforConfiguration_json;
|
||||
import TestingSystem.SAPFOR.Json.SapforTest_json;
|
||||
@@ -27,7 +24,6 @@ import java.nio.charset.Charset;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
File workspace;
|
||||
@@ -188,13 +184,16 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
}
|
||||
}
|
||||
void SyncronizeRepository() throws Exception {
|
||||
|
||||
System.out.println("Синхронизация репозитория...");
|
||||
UpdateSapforState(ServerSapforState.DVMRepositorySynchronization);
|
||||
System.out.println("Синхронизация ветви DVM...");
|
||||
Utils.startScript(repo, repo, "dvm_checkout",
|
||||
"svn checkout " +
|
||||
Constants.REPOSITORY_AUTHENTICATION +
|
||||
" " + Constants.DVM_REPOSITORY + " 1>dvm_out.txt 2>dvm_err.txt\n").waitFor();
|
||||
System.out.println("Синхронизация ветви SAPFOR...");
|
||||
UpdateSapforState(ServerSapforState.SAPFORRepositorySynchronization);
|
||||
Utils.startScript(repo, repo, "spf_checkout",
|
||||
"svn checkout " +
|
||||
Constants.REPOSITORY_AUTHENTICATION +
|
||||
@@ -202,6 +201,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
}
|
||||
void CompileSapfor() throws Exception {
|
||||
System.out.println("Сборка SAPFOR...");
|
||||
UpdateSapforState(ServerSapforState.Compilation);
|
||||
//-
|
||||
if (repo_bin.exists())
|
||||
FileUtils.forceDelete(repo_bin);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Constants;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.riDBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import ProjectData.LanguageName;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Current;
|
||||
import Common.UI.StatusEnum;
|
||||
import Common.UI.Themes.VisualiserFonts;
|
||||
|
||||
import java.awt.*;
|
||||
public enum ServerSapforState implements StatusEnum {
|
||||
Queued,
|
||||
RepositorySynchronization,
|
||||
DVMRepositorySynchronization,
|
||||
SAPFORRepositorySynchronization,
|
||||
Compilation,
|
||||
Done,
|
||||
DoneWithErrors;
|
||||
@@ -20,7 +18,8 @@ public enum ServerSapforState implements StatusEnum {
|
||||
case DoneWithErrors:
|
||||
return VisualiserFonts.BadState;
|
||||
case Compilation:
|
||||
case RepositorySynchronization:
|
||||
case DVMRepositorySynchronization:
|
||||
case SAPFORRepositorySynchronization:
|
||||
return VisualiserFonts.ProgressState;
|
||||
default:
|
||||
return VisualiserFonts.UnknownState;
|
||||
@@ -31,8 +30,10 @@ public enum ServerSapforState implements StatusEnum {
|
||||
switch (this) {
|
||||
case Queued:
|
||||
return "в очереди";
|
||||
case RepositorySynchronization:
|
||||
return "синхронизация";
|
||||
case DVMRepositorySynchronization:
|
||||
return "синхронизация репозитория DVM";
|
||||
case SAPFORRepositorySynchronization:
|
||||
return "синхронизация репозитория SAPFOR";
|
||||
case Compilation:
|
||||
return "сборка";
|
||||
case Done:
|
||||
|
||||
@@ -5,7 +5,8 @@ public class ServerSapforsBar extends DataMenuBar {
|
||||
public ServerSapforsBar() {
|
||||
super("версии SAPFOR",
|
||||
PassCode_2021.CompileServerSapfor,
|
||||
// PassCode_2021.InstallServerSapfor,
|
||||
PassCode_2021.ShowSapforCompilationOut,
|
||||
PassCode_2021.ShowSapforCompilationErr,
|
||||
PassCode_2021.DeleteServerSapfor
|
||||
);
|
||||
}
|
||||
|
||||
25
src/Visual_DVM_2021/Passes/All/ShowSapforCompilationErr.java
Normal file
25
src/Visual_DVM_2021/Passes/All/ShowSapforCompilationErr.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
public class ShowSapforCompilationErr extends ShowTestingServerFile{
|
||||
@Override
|
||||
protected int getTimeout() {
|
||||
return super.getTimeout();
|
||||
}
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/CompilationErrors.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Current.Check(Log,Current.ServerSapfor)){
|
||||
return false;
|
||||
}
|
||||
return super.canStart("Поток ошибок", new RemoteFile(Current.getServerSapfor().home_path, Constants.err_file));
|
||||
}
|
||||
}
|
||||
25
src/Visual_DVM_2021/Passes/All/ShowSapforCompilationOut.java
Normal file
25
src/Visual_DVM_2021/Passes/All/ShowSapforCompilationOut.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
public class ShowSapforCompilationOut extends ShowTestingServerFile{
|
||||
@Override
|
||||
protected int getTimeout() {
|
||||
return super.getTimeout();
|
||||
}
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/CompilationOutput.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Current.Check(Log,Current.ServerSapfor)){
|
||||
return false;
|
||||
}
|
||||
return super.canStart("Поток вывода", new RemoteFile(Current.getServerSapfor().home_path, Constants.out_file));
|
||||
}
|
||||
}
|
||||
46
src/Visual_DVM_2021/Passes/All/ShowTestingServerFile.java
Normal file
46
src/Visual_DVM_2021/Passes/All/ShowTestingServerFile.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.UI.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
import Visual_DVM_2021.Passes.PassException;
|
||||
import Visual_DVM_2021.Passes.Server.TestingSystemPass;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class ShowTestingServerFile extends TestingSystemPass<RemoteFile> {
|
||||
String title;
|
||||
File localFile;
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
title = (String) args[0];
|
||||
target = (RemoteFile) args[1];
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.ReceiveFile, target.full_name));
|
||||
localFile = Utils.getTempFileName(target.name);
|
||||
if (response.object != null)
|
||||
response.Unpack(localFile);
|
||||
else throw new PassException("Файл не найден");
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
return localFile.exists();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
ReadOnlyMultilineTextForm ff = new ReadOnlyMultilineTextForm();
|
||||
List<String> lines = FileUtils.readLines(localFile);
|
||||
Vector<String> res = new Vector<>();
|
||||
for (int i = lines.size() - 1; i >= 0; i--)
|
||||
res.add(lines.get(i));
|
||||
ff.ShowDialog(title,
|
||||
String.join("\n", res)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -336,12 +336,21 @@ public enum PassCode_2021 {
|
||||
SPF_InsertImplicitNone,
|
||||
CompileServerSapfor,
|
||||
ActualizeServerSapfors,
|
||||
;
|
||||
ShowTestingServerFile,
|
||||
//--
|
||||
ShowSapforCompilationOut,
|
||||
ShowSapforCompilationErr;
|
||||
//--
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
case Undefined:
|
||||
return "?";
|
||||
//--
|
||||
case ShowSapforCompilationOut:
|
||||
return "Отобразить поток вывода сборки SAPFOR";
|
||||
case ShowSapforCompilationErr:
|
||||
return "Отобразить поток ошибок сборки SAPFOR";
|
||||
case ShowTestingServerFile:
|
||||
return "Отобразить файл сервера тестирования";
|
||||
case ActualizeServerSapfors:
|
||||
return "Проверить собираемые версии SAPFOR";
|
||||
case CompileServerSapfor:
|
||||
|
||||
Reference in New Issue
Block a user