промежуточный. Добавлен объект файла баг-репорта.
This commit is contained in:
8
.idea/workspace.xml
generated
8
.idea/workspace.xml
generated
@@ -7,10 +7,14 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportFile/BugReportFile.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportFile/BugReportFilesDBTable.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportFile/UI/BugReportFilesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReportsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReportsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportFile/BugReportFilesDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportFile/BugReportFilesDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.form" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -6,6 +6,7 @@ import Common.Database.Tables.FKDataBehaviour;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.ComponentsServer.BugReport.UI.BugReportsForm;
|
||||
import _VisualDVM.ComponentsServer.BugReportFile.BugReportFile;
|
||||
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipient;
|
||||
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSetting;
|
||||
|
||||
@@ -37,6 +38,7 @@ public class BugReportsDBTable extends iDBTable<BugReport> {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
res.put(BugReportSetting.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.PASSIVE));
|
||||
res.put(BugReportRecipient.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.PASSIVE));
|
||||
res.put(BugReportFile.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
||||
return res;
|
||||
}
|
||||
//-
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package _VisualDVM.ComponentsServer.BugReportFile;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.ComponentsServer.BugReportFile.UI.BugReportFilesForm;
|
||||
|
||||
import javax.swing.*;
|
||||
public class BugReportFilesDBTable extends iDBTable<BugReportFile> {
|
||||
public BugReportFilesDBTable() {
|
||||
super(BugReportFile.class);
|
||||
@@ -12,4 +16,8 @@ public class BugReportFilesDBTable extends iDBTable<BugReportFile> {
|
||||
public String getPluralDescription() {
|
||||
return "файлы";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new BugReportFilesForm(this, mountPanel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package _VisualDVM.ComponentsServer.BugReportFile.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.ColumnInfo;
|
||||
import _VisualDVM.ComponentsServer.BugReport.BugReport;
|
||||
import _VisualDVM.ComponentsServer.BugReportFile.BugReportFile;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
import javax.swing.*;
|
||||
public class BugReportFilesForm extends DataSetControlForm<BugReportFile> {
|
||||
public BugReportFilesForm(DataSet<?, BugReportFile> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected void createColumns() {
|
||||
AddColumns(
|
||||
new ColumnInfo<BugReportFile>("имя") {
|
||||
@Override
|
||||
public Object getFieldAt(BugReportFile object) {
|
||||
return object.name;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(BugReportFile object) {
|
||||
return super.isObjectVisible(object)&&Global.componentsServer.db.getTable(BugReport.class).getUI().matchCurrentID(object.bugreport_id);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,21 @@
|
||||
package _VisualDVM.ComponentsServer;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.ComponentsServer.BugReport.BugReport;
|
||||
import _VisualDVM.ComponentsServer.BugReport.BugReportsDBTable;
|
||||
import _VisualDVM.ComponentsServer.BugReportFile.BugReportFilesDBTable;
|
||||
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipient;
|
||||
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipientsDBTable;
|
||||
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSetting;
|
||||
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSettingsDBTable;
|
||||
import _VisualDVM.ComponentsServer.Recipient.RecipientsDataSet;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Utils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Comparator;
|
||||
import java.util.Vector;
|
||||
public class BugReportsDatabase extends SQLiteDatabase {
|
||||
public BugReportsDBTable bugReports;
|
||||
public BugReportSettingsDBTable bugReportSettings;
|
||||
public BugReportRecipientsDBTable bugReportRecipients;
|
||||
public BugReportFilesDBTable bugReportsFiles;
|
||||
public RecipientsDataSet recipients = new RecipientsDataSet();
|
||||
public BugReportsDatabase() {
|
||||
super(Paths.get(System.getProperty("user.dir"), "Data", "bug_reports.sqlite").toFile());
|
||||
@@ -30,6 +25,7 @@ public class BugReportsDatabase extends SQLiteDatabase {
|
||||
addTable(bugReports = new BugReportsDBTable());
|
||||
addTable(bugReportSettings = new BugReportSettingsDBTable());
|
||||
addTable(bugReportRecipients = new BugReportRecipientsDBTable());
|
||||
addTable(bugReportsFiles = new BugReportFilesDBTable());
|
||||
}
|
||||
@Override
|
||||
public void Init() throws Exception {
|
||||
|
||||
@@ -426,6 +426,41 @@
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="58b74" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Вложения"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="4276b" binding="SC91">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="300"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="a0a40" binding="bugRepotsFilesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="13d" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
|
||||
@@ -32,6 +32,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
public DescriptionInterface descriptionInterface;
|
||||
public CommentInterface commentInterface;
|
||||
public JSplitPane SC6;
|
||||
public JSplitPane SC91;
|
||||
DocumentListener descriptionAdditionListener = new DocumentListener() {
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
@@ -123,6 +124,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
private JTextField BugReportsCommentFilter;
|
||||
private JPanel workspacesPanel;
|
||||
private JLabel adminLabel;
|
||||
private JPanel bugRepotsFilesPanel;
|
||||
private Viewer BugReportSettings;
|
||||
public CallbackForm() {
|
||||
LoadSplitters();
|
||||
@@ -153,6 +155,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
SwitchScreen(Global.normalProperties.SmallScreen);
|
||||
//-
|
||||
Global.componentsServer.db.bugReports.mountUI(bugReportsPanel);
|
||||
Global.componentsServer.db.bugReportsFiles.mountUI(bugRepotsFilesPanel);
|
||||
Global.componentsServer.db.recipients.mountUI(recipientsPanel);
|
||||
//-
|
||||
if (!Global.mainModule.getPass(PassCode.CheckAccount).isDone()) {
|
||||
|
||||
Reference in New Issue
Block a user