mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-29 17:27:17 +00:00
fix: [tracker] fix message trackers
This commit is contained in:
parent
152e7bb51e
commit
93d1b6fc1f
3 changed files with 8 additions and 4 deletions
|
@ -929,7 +929,7 @@ def api_add_tracker(dict_input, user_id):
|
||||||
# Filters # TODO MOVE ME
|
# Filters # TODO MOVE ME
|
||||||
filters = dict_input.get('filters', {})
|
filters = dict_input.get('filters', {})
|
||||||
if filters:
|
if filters:
|
||||||
if filters.keys() == {'decoded', 'item', 'pgp', 'title'} and set(filters['pgp'].get('subtypes', [])) == {'mail', 'name'}:
|
if filters.keys() == set(get_objects_tracked()) and set(filters['pgp'].get('subtypes', [])) == {'mail', 'name'}:
|
||||||
filters = {}
|
filters = {}
|
||||||
for obj_type in filters:
|
for obj_type in filters:
|
||||||
if obj_type not in get_objects_tracked():
|
if obj_type not in get_objects_tracked():
|
||||||
|
@ -1004,7 +1004,7 @@ def api_edit_tracker(dict_input, user_id):
|
||||||
# Filters # TODO MOVE ME
|
# Filters # TODO MOVE ME
|
||||||
filters = dict_input.get('filters', {})
|
filters = dict_input.get('filters', {})
|
||||||
if filters:
|
if filters:
|
||||||
if filters.keys() == {'decoded', 'item', 'pgp', 'title'} and set(filters['pgp'].get('subtypes', [])) == {'mail', 'name'}:
|
if filters.keys() == set(get_objects_tracked()) and set(filters['pgp'].get('subtypes', [])) == {'mail', 'name'}:
|
||||||
if not filters['decoded'] and not filters['item']:
|
if not filters['decoded'] and not filters['item']:
|
||||||
filters = {}
|
filters = {}
|
||||||
for obj_type in filters:
|
for obj_type in filters:
|
||||||
|
|
|
@ -61,10 +61,10 @@ def get_obj_queued():
|
||||||
return ['item', 'image']
|
return ['item', 'image']
|
||||||
|
|
||||||
def get_objects_tracked():
|
def get_objects_tracked():
|
||||||
return ['decoded', 'item', 'pgp', 'title']
|
return ['decoded', 'item', 'pgp', 'message', 'title']
|
||||||
|
|
||||||
def get_objects_retro_hunted():
|
def get_objects_retro_hunted():
|
||||||
return ['decoded', 'item']
|
return ['decoded', 'item', 'message']
|
||||||
|
|
||||||
def get_all_objects_with_subtypes_tuple():
|
def get_all_objects_with_subtypes_tuple():
|
||||||
str_objs = []
|
str_objs = []
|
||||||
|
|
|
@ -136,6 +136,10 @@
|
||||||
<input class="custom-control-input" type="checkbox" name="title_obj" id="title_obj" checked="">
|
<input class="custom-control-input" type="checkbox" name="title_obj" id="title_obj" checked="">
|
||||||
<label class="custom-control-label" for="title_obj"><i class="fas fa-heading"></i> Decoded <i class="fas fa-info-circle text-info" data-toggle="tooltip" data-placement="right" title="Title that has been extracted from a HTML page"></i></label>
|
<label class="custom-control-label" for="title_obj"><i class="fas fa-heading"></i> Decoded <i class="fas fa-info-circle text-info" data-toggle="tooltip" data-placement="right" title="Title that has been extracted from a HTML page"></i></label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="custom-control custom-switch mt-1">
|
||||||
|
<input class="custom-control-input" type="checkbox" name="message_obj" id="message_obj" checked="">
|
||||||
|
<label class="custom-control-label" for="message_obj"><i class="fas fa-comment-dots"></i> Message <i class="fas fa-info-circle text-info" data-toggle="tooltip" data-placement="right" title="Messages from Chats"></i></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
{# <div class="custom-control custom-switch mt-1">#}
|
{# <div class="custom-control custom-switch mt-1">#}
|
||||||
{# <input class="custom-control-input" type="checkbox" name="level" id="screenshot_obj" checked="">#}
|
{# <input class="custom-control-input" type="checkbox" name="level" id="screenshot_obj" checked="">#}
|
||||||
|
|
Loading…
Reference in a new issue