diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 84b1f6b8..a4ce48d2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,12 +7,13 @@ - + - - - - + + + + + diff --git a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapfor.java b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapfor.java index b406bb50..25b06776 100644 --- a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapfor.java +++ b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapfor.java @@ -17,6 +17,8 @@ public class ServerSapfor extends riDBObject { public String call_command = ""; //полная команда вызова. public String version = "?"; public long buildDate = 0; + @Description("DEFAULT 'Done'") + public ServerSapforState state = ServerSapforState.Done; public Date getBuildDate() { return new Date(buildDate); } diff --git a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforState.java b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforState.java index 3a3ae4be..40057a43 100644 --- a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforState.java +++ b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforState.java @@ -1,7 +1,26 @@ package TestingSystem.SAPFOR.ServerSapfor; -public enum ServerSapforState { +import Common.UI.StatusEnum; +public enum ServerSapforState implements StatusEnum { Queued, + RepositorySynchronization, Compilation, Done, - DoneWithErrors + DoneWithErrors; + @Override + public String getDescription() { + switch (this) { + case Queued: + return "в очереди"; + case RepositorySynchronization: + return "синхронизация репозитория"; + case Compilation: + return "сборка"; + case Done: + return "сборка успешно"; + case DoneWithErrors: + return "сборка с ошибками"; + default: + return StatusEnum.super.getDescription(); + } + } } diff --git a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsBar.java b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsBar.java index 2e7b4a29..f80aff89 100644 --- a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsBar.java +++ b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsBar.java @@ -3,6 +3,9 @@ import Common.UI.Menus_2023.DataMenuBar; import Visual_DVM_2021.Passes.PassCode_2021; public class ServerSapforsBar extends DataMenuBar { public ServerSapforsBar() { - super("версии SAPFOR", PassCode_2021.InstallServerSapfor, PassCode_2021.DeleteServerSapfor); + super("версии SAPFOR", + PassCode_2021.CompileServerSapfor + // PassCode_2021.InstallServerSapfor, PassCode_2021.DeleteServerSapfor + ); } } diff --git a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsDBTable.java b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsDBTable.java index a6f45238..c3304497 100644 --- a/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsDBTable.java +++ b/src/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsDBTable.java @@ -22,7 +22,7 @@ public class ServerSapforsDBTable extends iDBTable { } @Override public String[] getUIColumnNames() { - return new String[]{"версия", "дата сборки"}; + return new String[]{"версия", "дата сборки", "статус"}; } @Override public Object getFieldAt(ServerSapfor object, int columnIndex) { @@ -31,6 +31,8 @@ public class ServerSapforsDBTable extends iDBTable { return object.version; case 2: return object.getBuildDate(); + case 3: + return object.state; } return null; } @@ -41,6 +43,7 @@ public class ServerSapforsDBTable extends iDBTable { protected void AdditionalInitColumns() { // columns.get(0).setVisible(false); columns.get(2).setRenderer(TableRenderers.RendererDate); + columns.get(3).setRenderer(TableRenderers.RendererStatusEnum); } @Override public void ShowCurrentObject() throws Exception { diff --git a/src/Visual_DVM_2021/Passes/All/CompileServerSapfor.java b/src/Visual_DVM_2021/Passes/All/CompileServerSapfor.java new file mode 100644 index 00000000..2d46606f --- /dev/null +++ b/src/Visual_DVM_2021/Passes/All/CompileServerSapfor.java @@ -0,0 +1,23 @@ +package Visual_DVM_2021.Passes.All; +import Common.Global; +import ProjectData.LanguageName; +import Repository.Server.ServerCode; +import Repository.Server.ServerExchangeUnit_2021; +import TestingSystem.Common.Group.Group; +import TestingSystem.Common.TestingServer; +import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor; +import TestingSystem.SAPFOR.ServerSapfor.ServerSapforState; +import Visual_DVM_2021.Passes.Server.PublishServerObject; +import Visual_DVM_2021.Passes.Server.TestingSystemPass; + +import java.util.Date; +public class CompileServerSapfor extends PublishServerObject { + public CompileServerSapfor() { + super(Global.testingServer, ServerSapfor.class); + } + @Override + public boolean fillObjectFields() throws Exception { + target.state= ServerSapforState.Queued; + return true; + } +} diff --git a/src/Visual_DVM_2021/Passes/PassCode_2021.java b/src/Visual_DVM_2021/Passes/PassCode_2021.java index dae21512..6dba081c 100644 --- a/src/Visual_DVM_2021/Passes/PassCode_2021.java +++ b/src/Visual_DVM_2021/Passes/PassCode_2021.java @@ -334,12 +334,15 @@ public enum PassCode_2021 { PublishComponentsServer, //--- SPF_InsertImplicitNone, + CompileServerSapfor, ; public String getDescription() { switch (this) { case Undefined: return "?"; //-- + case CompileServerSapfor: + return "Собрать версию Sapfor"; case PublishComponentsServer: return "Опубликовать сервер компонент и отчётов об ошибках"; case PingComponentsServer: