Skip to content

Commit

Permalink
Merge pull request #313 from CybercentreCanada/feature/auto_collapse
Browse files Browse the repository at this point in the history
Added auto-collapse bool to result section
  • Loading branch information
cccs-sgaron authored Aug 3, 2021
2 parents 2908791 + 42f1cd0 commit 136fbc3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions assemblyline/odm/models/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ class Heuristic(odm.Model):

@odm.model(index=True, store=False)
class Section(odm.Model):
body = odm.Optional(odm.Text(copyto="__text__")) # Text body of the result section
classification = odm.Classification() # Classification of the section
body_format = odm.Enum(values=BODY_FORMAT, index=False) # Type of body in this section
depth = odm.Integer(index=False) # Depth of the section
heuristic = odm.Optional(odm.Compound(Heuristic)) # Heuristic used to score result section
tags = odm.Compound(Tagging, default={}) # List of tags associated to this section
safelisted_tags = odm.FlattenedListObject(store=False, default={}) # List of safelisted tags
title_text = odm.Text(copyto="__text__") # Title of the section
auto_collapse = odm.Boolean(default=False) # Should the section be collapsed when displayed
body = odm.Optional(odm.Text(copyto="__text__")) # Text body of the result section
classification = odm.Classification() # Classification of the section
body_format = odm.Enum(values=BODY_FORMAT, index=False) # Type of body in this section
depth = odm.Integer(index=False) # Depth of the section
heuristic = odm.Optional(odm.Compound(Heuristic)) # Heuristic used to score result section
tags = odm.Compound(Tagging, default={}) # List of tags associated to this section
safelisted_tags = odm.FlattenedListObject(store=False, default={}) # List of safelisted tags
title_text = odm.Text(copyto="__text__") # Title of the section


@odm.model(index=True, store=True)
Expand Down

0 comments on commit 136fbc3

Please sign in to comment.