chg: [correlation] UI chats filters + correation user-account/username

dev
terrtia 2023-12-13 11:51:53 +01:00
parent 9221e532c4
commit 70bb6757f8
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
3 changed files with 51 additions and 8 deletions

View File

@ -59,8 +59,8 @@ CORRELATION_TYPES_BY_OBJ = {
"pgp": ["domain", "item", "message"], "pgp": ["domain", "item", "message"],
"screenshot": ["domain", "item"], "screenshot": ["domain", "item"],
"title": ["domain", "item"], "title": ["domain", "item"],
"user-account": ["chat", "chat-subchannel", "chat-thread", "image", "message"], "user-account": ["chat", "chat-subchannel", "chat-thread", "image", "message", "username"],
"username": ["domain", "item", "message"], # TODO chat-user/account "username": ["domain", "item", "message", "user-account"],
} }
def get_obj_correl_types(obj_type): def get_obj_correl_types(obj_type):

View File

@ -121,9 +121,24 @@ def show_correlation():
correl_option = request.form.get('ItemCheck') correl_option = request.form.get('ItemCheck')
if correl_option: if correl_option:
filter_types.append('item') filter_types.append('item')
correl_option = request.form.get('TitleCheck') correl_option = request.form.get('chatCheck')
if correl_option: if correl_option:
filter_types.append('title') filter_types.append('chat')
correl_option = request.form.get('subchannelCheck')
if correl_option:
filter_types.append('chat-subchannel')
correl_option = request.form.get('threadCheck')
if correl_option:
filter_types.append('chat-thread')
correl_option = request.form.get('messageCheck')
if correl_option:
filter_types.append('message')
correl_option = request.form.get('imageCheck')
if correl_option:
filter_types.append('image')
correl_option = request.form.get('user_accountCheck')
if correl_option:
filter_types.append('user-account')
# list as params # list as params
filter_types = ",".join(filter_types) filter_types = ",".join(filter_types)

View File

@ -248,10 +248,6 @@
<input class="form-check-input" type="checkbox" value="True" id="PgpCheck" name="PgpCheck" {%if "pgp" in dict_object["filter"]%}checked{%endif%}> <input class="form-check-input" type="checkbox" value="True" id="PgpCheck" name="PgpCheck" {%if "pgp" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="PgpCheck">PGP</label> <label class="form-check-label" for="PgpCheck">PGP</label>
</div> </div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="UsernameCheck" name="UsernameCheck" {%if "username" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="UsernameCheck">Username</label>
</div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="DomainCheck" name="DomainCheck" {%if "domain" in dict_object["filter"]%}checked{%endif%}> <input class="form-check-input" type="checkbox" value="True" id="DomainCheck" name="DomainCheck" {%if "domain" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="DomainCheck">Domain</label> <label class="form-check-label" for="DomainCheck">Domain</label>
@ -261,6 +257,38 @@
<label class="form-check-label" for="ItemCheck">Item</label> <label class="form-check-label" for="ItemCheck">Item</label>
</div> </div>
<hr>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="chatCheck" name="chatCheck" {%if "chat" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="chatCheck">Chat</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="subchannelCheck" name="subchannelCheck" {%if "chat-subchannel" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="subchannelCheck">Chat-Subchannel</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="threadCheck" name="threadCheck" {%if "chat-thread" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="threadCheck">Chat-Thread</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="messageCheck" name="messageCheck" {%if "message" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="messageCheck">Message</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="imageCheck" name="imageCheck" {%if "image" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="imageCheck">Image</label>
</div>
<hr>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="user_accountCheck" name="user_accountCheck" {%if "user-account" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="user_accountCheck">User-Account</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="True" id="UsernameCheck" name="UsernameCheck" {%if "username" in dict_object["filter"]%}checked{%endif%}>
<label class="form-check-label" for="UsernameCheck">Username</label>
</div>
</li> </li>
{# <li class="list-group-item text-left">#} {# <li class="list-group-item text-left">#}
{# <div class="d-flex mt-1">#} {# <div class="d-flex mt-1">#}