Files
VisualSapfor/src/_VisualDVM/Passes/All/SendBugReport.java

21 lines
850 B
Java
Raw Normal View History

2024-10-14 12:14:01 +03:00
package _VisualDVM.Passes.All;
2024-10-11 00:00:30 +03:00
import Common.Utils.Utils_;
2025-02-18 16:21:20 +03:00
import _VisualDVM.ComponentsServer.BugReport.BugReport;
import _VisualDVM.ComponentsServer.BugReport.BugReportState;
import _VisualDVM.Global;
2025-02-04 16:36:33 +03:00
import _VisualDVM.Passes.Server.ComponentsServerPass;
2024-10-09 22:21:57 +03:00
import _VisualDVM.Repository.Server.ServerCode;
2025-02-04 16:36:33 +03:00
public class SendBugReport extends ComponentsServerPass<BugReport> {
2023-09-17 22:13:42 +03:00
@Override
protected boolean canStart(Object... args) throws Exception {
target = Global.componentsServer.db.bugReports.getUI().getCurrent();
if (!target.project_version.isEmpty())
target.packed_archive = Utils_.fileToBytes(target.getArchiveFile());
return SendRequest(ServerCode.PublishObject, "", target);
2023-09-17 22:13:42 +03:00
}
@Override
protected void performFail() throws Exception {
target.state = BugReportState.draft;
2023-09-17 22:13:42 +03:00
}
}