Fixed UI Datatable in showTracker Page

Removed "Advanced Search" text from menu misleading button
pull/586/head
TonyJabbour 2021-10-01 10:02:29 +02:00
parent 912956c73c
commit e1d5e8f202
2 changed files with 352 additions and 317 deletions

View File

@ -29,9 +29,11 @@
.btn-link {
color: #17a2b8
}
.btn-link:hover {
color: blue;
}
.mouse_pointer {
cursor: pointer;
}
@ -55,7 +57,8 @@
{% if tracker_metadata['description'] %}
{{ tracker_metadata['description'] }}
{% endif %}
<span class="btn-interaction btn-link h6 mouse_pointer" title="Edit Tracker description" onclick="edit_description();"><i class="fas fa-pencil-alt"></i></span>
<span class="btn-interaction btn-link h6 mouse_pointer" title="Edit Tracker description"
onclick="edit_description();"><i class="fas fa-pencil-alt"></i></span>
</h4>
<div class="text-info">
{{ tracker_metadata['uuid'] }}
@ -70,13 +73,19 @@
<th>Type</th>
<th>Tracker</th>
<th>Date added</th>
<th>Level</th>
<th>Access Level</th>
<th>Created by</th>
<th>First seen</th>
<th>Last seen</th>
<th>Webhook URL</th>
<th>Tags <span class="btn-link btn-interaction mouse_pointer" title="Edit Tags List" onclick="edit_tags();"><i class="fas fa-pencil-alt" style="color:Red;"></i></span></th>
<th>Email <span class="btn-link btn-interaction mouse_pointer" title="Edit Email List" onclick="edit_mails();"><i class="fas fa-pencil-alt" style="color:Red;"></i></span></th>
{% if tracker_metadata['webhook'] %}
<th>Webhook</th>
{% endif %}
<th>Tags <span class="btn-link btn-interaction mouse_pointer"
title="Edit Tags List" onclick="edit_tags();"><i
class="fas fa-pencil-alt" style="color:Red;"></i></span></th>
<th>Email <span class="btn-link btn-interaction mouse_pointer"
title="Edit Email List" onclick="edit_mails();"><i
class="fas fa-pencil-alt" style="color:Red;"></i></span></th>
</tr>
</thead>
<tbody>
@ -84,23 +93,33 @@
<td>{{ tracker_metadata['type'] }}</td>
<td>{{ tracker_metadata['tracker'] }}</td>
<td>{{ tracker_metadata['date'][0:4] }}/{{ tracker_metadata['date'][4:6] }}/{{ tracker_metadata['date'][6:8] }}</td>
<td>{{ tracker_metadata['level'] }}</td>
<td>
{% if tracker_metadata['level'] == "0" %}
Private
{% else %}
Global
{% endif %}
</td>
<td>{{ tracker_metadata['user_id'] }}</td>
<td>
{% if tracker_metadata['first_seen'] %}
{{ tracker_metadata['first_seen'][0:4] }}/{{ tracker_metadata['first_seen'][4:6] }}/{{ tracker_metadata['first_seen'][6:8] }}
{{ tracker_metadata['first_seen'][0:4] }}/
{{ tracker_metadata['first_seen'][4:6] }}/
{{ tracker_metadata['first_seen'][6:8] }}
{% endif %}
</td>
<td>
{% if tracker_metadata['last_seen'] %}
{{ tracker_metadata['last_seen'][0:4] }}/{{ tracker_metadata['last_seen'][4:6] }}/{{ tracker_metadata['last_seen'][6:8] }}
{{ tracker_metadata['last_seen'][0:4] }}/
{{ tracker_metadata['last_seen'][4:6] }}/
{{ tracker_metadata['last_seen'][6:8] }}
{% endif %}
</td>
<td>
{% if tracker_metadata['webhook'] %}
{{ tracker_metadata['webhook'] }}
{% endif %}
<td>
Turned ON
</td>
{% endif %}
<td>
{% for tag in tracker_metadata['tags'] %}
<a href="{{ url_for('tags_ui.get_obj_by_tags') }}?object_type=item&ltags={{ tag }}">
@ -141,8 +160,10 @@
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-pencil-alt"></i></div>
</div>
<input id="description" name="description" class="form-control" placeholder="Tracker Description" type="text"
value="{%if tracker_metadata['description']%}{{tracker_metadata['description']}}{%endif%}">
<input id="description" name="description" class="form-control"
placeholder="Tracker Description" type="text"
value="
{% if tracker_metadata['description'] %}{{ tracker_metadata['description'] }}{% endif %}">
</div>
<button class="btn btn-info">
@ -160,7 +181,8 @@
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-tag"></i></div>
</div>
<input id="tags" name="tags" class="form-control" placeholder="Tags (optional, space separated)" type="text"
<input id="tags" name="tags" class="form-control"
placeholder="Tags (optional, space separated)" type="text"
value="{% for tag in tracker_metadata['tags'] %}{{ tag }} {% endfor %}">
</div>
@ -179,7 +201,8 @@
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-at"></i></div>
</div>
<input id="mails" name="mails" class="form-control" placeholder="E-Mails Notification (optional, space separated)" type="text"
<input id="mails" name="mails" class="form-control"
placeholder="E-Mails Notification (optional, space separated)" type="text"
value="{% for mail in tracker_metadata['mails'] %}{{ mail }} {% endfor %}">
</div>
@ -191,16 +214,19 @@
</div>
<div class="d-flex flex-row-reverse">
<a href="{{ url_for('hunter.delete_tracker') }}?uuid={{tracker_metadata['uuid']}}" style="font-size: 15px">
<a href="{{ url_for('hunter.delete_tracker') }}?uuid={{ tracker_metadata['uuid'] }}"
style="font-size: 15px">
<button class='btn btn-danger'><i class="fas fa-trash-alt"></i></button>
</a>
<a href="{{ url_for('hunter.edit_tracked_menu') }}?uuid={{tracker_metadata['uuid']}}" class="mx-2" style="font-size: 15px">
<a href="{{ url_for('hunter.edit_tracked_menu') }}?uuid={{ tracker_metadata['uuid'] }}"
class="mx-2" style="font-size: 15px">
<button class='btn btn-info'>Edit Tracker <i class="fas fa-pencil-alt"></i></button>
</a>
</div>
{% if yara_rule_content %}
<p class="my-0"></br></br><pre class="border bg-light">{{ yara_rule_content }}</pre></p>
<p class="my-0"></br></br>
<pre class="border bg-light">{{ yara_rule_content }}</pre></p>
{% endif %}
</div>
@ -214,16 +240,22 @@
<div class="row mb-3">
<div class="col-md-6">
<div class="input-group" id="date-range-from">
<div class="input-group-prepend"><span class="input-group-text"><i class="far fa-calendar-alt" aria-hidden="true"></i></span></div>
<input class="form-control" id="date-range-from-input" placeholder="yyyy-mm-dd" name="date_from" autocomplete="off"
{%if tracker_metadata['date_from']%}value="{{ tracker_metadata['date_from'] }}"{%else%}value="{{tracker_metadata['first_seen']}}"{%endif%}>
<div class="input-group-prepend"><span class="input-group-text"><i
class="far fa-calendar-alt" aria-hidden="true"></i></span></div>
<input class="form-control" id="date-range-from-input" placeholder="yyyy-mm-dd"
name="date_from" autocomplete="off"
{% if tracker_metadata['date_from'] %}value="{{ tracker_metadata['date_from'] }}"
{% else %}value="{{ tracker_metadata['first_seen'] }}"{% endif %}>
</div>
</div>
<div class="col-md-6">
<div class="input-group" id="date-range-to">
<div class="input-group-prepend"><span class="input-group-text"><i class="far fa-calendar-alt" aria-hidden="true"></i></span></div>
<input class="form-control" id="date-range-to-input" placeholder="yyyy-mm-dd" name="date_to" autocomplete="off"
{%if tracker_metadata['date_to']%}value="{{ tracker_metadata['date_to'] }}"{%else%}value="{{tracker_metadata['last_seen']}}"{%endif%}>
<div class="input-group-prepend"><span class="input-group-text"><i
class="far fa-calendar-alt" aria-hidden="true"></i></span></div>
<input class="form-control" id="date-range-to-input" placeholder="yyyy-mm-dd"
name="date_to" autocomplete="off"
{% if tracker_metadata['date_to'] %}value="{{ tracker_metadata['date_to'] }}"
{% else %}value="{{ tracker_metadata['last_seen'] }}"{% endif %}>
</div>
</div>
</div>
@ -252,7 +284,8 @@
{{ item['date'][0:4] }}/{{ item['date'][4:6] }}/{{ item['date'][6:8] }}
</td>
<td>
<a class="text-secondary" target="_blank" href="{{ url_for('objects_item.showItem') }}?id={{item['id']}}">
<a class="text-secondary" target="_blank"
href="{{ url_for('objects_item.showItem') }}?id={{ item['id'] }}">
<div style="line-height:0.9;">{{ item['id'] }}</div>
</a>
<div class="mb-2">
@ -318,7 +351,9 @@ $(document).ready(function(){
sparkline("sparkline", {{ tracker_metadata['sparkline'] }}, {});
let div_width = $("#graphline").width();
$.getJSON("{{ url_for('hunter.get_json_tracker_stats') }}?uuid={{ tracker_metadata['uuid'] }}{%if tracker_metadata['date_from']%}&date_from={{ tracker_metadata['date_from'] }}{%endif%}{%if tracker_metadata['date_to']%}&date_to={{ tracker_metadata['date_to'] }}{%endif%}",
function( data ) {multilines_group("graphline", data, {"width": div_width});}
function (data) {
multilines_group("graphline", data, {"width": div_width});
}
);
});

View File

@ -45,7 +45,7 @@
<input type="hidden" name="index_name" class="form-control" value="0" placeholder="Index Name">
<button class="btn btn-outline-info my-2 my-sm-0" type="submit"><i class="fas fa-search"></i></button>
</div>
<small id="advanced_search" class="form-text"><a class="nav text-muted" href="#" aria-disabled="true">Advanced Search</a></small>
{#<small id="advanced_search" class="form-text"><a class="nav text-muted" href="#" aria-disabled="true">Advanced Search</a></small>#}
</div>
</form>
</div>