2023-11-19 02:12:44 +03:00
|
|
|
package Visual_DVM_2021.Passes.All;
|
2024-10-07 00:58:29 +03:00
|
|
|
import Common_old.Current;
|
|
|
|
|
import Common_old.Utils.Utils;
|
2023-11-19 02:12:44 +03:00
|
|
|
import Repository.BugReport.BugReportInterface;
|
|
|
|
|
import Repository.BugReport.BugReportState;
|
|
|
|
|
import Repository.Server.ServerCode;
|
|
|
|
|
import Repository.Server.ServerExchangeUnit_2021;
|
|
|
|
|
import Visual_DVM_2021.Passes.Server.ComponentsRepositoryPass;
|
2023-09-17 22:13:42 +03:00
|
|
|
public class SendBugReport extends ComponentsRepositoryPass {
|
|
|
|
|
@Override
|
|
|
|
|
protected void ServerAction() throws Exception {
|
|
|
|
|
if (!Current.getBugReport().project_version.isEmpty()) {
|
|
|
|
|
//отправить архив.
|
|
|
|
|
Command(new ServerExchangeUnit_2021(ServerCode.SendBugReport,
|
|
|
|
|
Current.getBugReport().id,
|
|
|
|
|
Utils.packFile(BugReportInterface.getArchiveFile(Current.getBugReport()))
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
// синхрон бд
|
|
|
|
|
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, "", Current.getBugReport()));
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void performFail() throws Exception {
|
|
|
|
|
Current.getBugReport().state = BugReportState.draft;
|
|
|
|
|
}
|
|
|
|
|
}
|