Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions api_app/serializers/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ class Meta:
"investigation_name",
"permissions",
"data_model",
"analyzers_data_model",
"file_name",
"file_mimetype",
"is_sample",
Expand Down Expand Up @@ -620,7 +619,6 @@ class Meta:
)
permissions = rfs.SerializerMethodField()
data_model = rfs.SerializerMethodField()
analyzers_data_model = rfs.SerializerMethodField(read_only=True)
is_sample = rfs.BooleanField(read_only=True)

def get_pivots_to_execute(self, obj: Job): # skipcq: PYL-R0201
Expand Down Expand Up @@ -675,11 +673,6 @@ def get_fields(self):
)
return super().get_fields()

def get_analyzers_data_model(self, instance: Job):
if instance.analyzable.classification == Classification.GENERIC:
return []
return instance.get_analyzers_data_models().serialize()

def get_data_model(self, instance: Job):
if instance.data_model:
return instance.data_model.serialize()
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/components/jobs/result/pluginReportTables.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ export function PluginsReportTable({
}) {
console.debug("PluginsReportTable rendered");
const reports = pluginReports;
const analyzersDataModel = job?.analyzers_data_model || [];

reports.forEach((report, index) => {
// description
Expand All @@ -185,17 +184,6 @@ export function PluginsReportTable({
reports[index].description = plugin.description;
}
});
// data model
reports[index].data_model = {};
if (report.type === PluginsTypes.ANALYZER) {
analyzersDataModel.forEach((dataModel) => {
dataModel?.analyzers_report?.forEach((analyzerReportId) => {
if (report.id === analyzerReportId) {
reports[index].data_model = dataModel;
}
});
});
}
});

return (
Expand Down
16 changes: 0 additions & 16 deletions frontend/tests/components/jobs/result/pluginReportTable.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,6 @@ describe("test plugins report table", () => {
type: "analyzer",
},
],
analyzers_data_model: [
{
id: 1,
ietf_report: [],
analyzers_report: [174],
evaluation: null,
external_references: [],
related_threats: [],
tags: null,
malware_family: null,
additional_info: {},
date: "2024-12-19T11:20:04.549652Z",
rank: null,
resolutions: [],
},
],
connector_reports: [],
visualizer_reports: [],
comments: [],
Expand Down
19 changes: 0 additions & 19 deletions tests/api_app/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,6 @@ def test_validate(self):
self.assertIn("analyzer_reports", js.data)
self.assertIn("connector_reports", js.data)
self.assertIn("visualizer_reports", js.data)
self.assertIn("analyzers_data_model", js.data)
job.delete()
an.delete()

def test_get_analyzers_data_model_generic(self):
an = Analyzable.objects.create(
name="[email protected]",
classification=Classification.GENERIC,
)

job = Job.objects.create(
user=self.user,
status=Job.STATUSES.REPORTED_WITHOUT_FAILS.value,
analyzable=an,
received_request_time=now(),
)

js = RestJobSerializer(job).data
self.assertEqual(js["analyzers_data_model"], [])
job.delete()
an.delete()

Expand Down
Loading