mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
chg: [correlation] UI chats filters + correation user-account/username
This commit is contained in:
parent
9221e532c4
commit
70bb6757f8
3 changed files with 51 additions and 8 deletions
|
@ -59,8 +59,8 @@ CORRELATION_TYPES_BY_OBJ = {
|
|||
"pgp": ["domain", "item", "message"],
|
||||
"screenshot": ["domain", "item"],
|
||||
"title": ["domain", "item"],
|
||||
"user-account": ["chat", "chat-subchannel", "chat-thread", "image", "message"],
|
||||
"username": ["domain", "item", "message"], # TODO chat-user/account
|
||||
"user-account": ["chat", "chat-subchannel", "chat-thread", "image", "message", "username"],
|
||||
"username": ["domain", "item", "message", "user-account"],
|
||||
}
|
||||
|
||||
def get_obj_correl_types(obj_type):
|
||||
|
|
|
@ -121,9 +121,24 @@ def show_correlation():
|
|||
correl_option = request.form.get('ItemCheck')
|
||||
if correl_option:
|
||||
filter_types.append('item')
|
||||
correl_option = request.form.get('TitleCheck')
|
||||
correl_option = request.form.get('chatCheck')
|
||||
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
|
||||
filter_types = ",".join(filter_types)
|
||||
|
|
|
@ -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%}>
|
||||
<label class="form-check-label" for="PgpCheck">PGP</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>
|
||||
<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%}>
|
||||
<label class="form-check-label" for="DomainCheck">Domain</label>
|
||||
|
@ -261,6 +257,38 @@
|
|||
<label class="form-check-label" for="ItemCheck">Item</label>
|
||||
</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 class="list-group-item text-left">#}
|
||||
{# <div class="d-flex mt-1">#}
|
||||
|
|
Loading…
Reference in a new issue