mirror of https://github.com/CIRCL/AIL-framework
chg: [UI Tags] start b4 migration + add date range selector
parent
d3b3942ad7
commit
9e4813ca4b
|
@ -1,109 +1,168 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Tags - AIL</title>
|
<title>Tags - AIL</title>
|
||||||
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
||||||
|
|
||||||
<!-- Core CSS -->
|
<!-- Core CSS -->
|
||||||
<link href="{{ url_for('static', filename='css/bootstrap4.min.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/bootstrap4.min.css') }}" rel="stylesheet">
|
||||||
<link href="{{ url_for('static', filename='css/font-awesome.min.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/font-awesome.min.css') }}" rel="stylesheet">
|
||||||
<link href="{{ url_for('static', filename='css/daterangepicker.min.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/daterangepicker.min.css') }}" rel="stylesheet">
|
||||||
<link href="{{ url_for('static', filename='css/tags.css') }}" rel="stylesheet" type="text/css" />
|
<link href="{{ url_for('static', filename='css/tags.css') }}" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
<!-- JS -->
|
<!-- JS -->
|
||||||
<script src="{{ url_for('static', filename='js/jquery.js')}}"></script>
|
<script src="{{ url_for('static', filename='js/jquery.js')}}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/popper.min.js')}}"></script>
|
<script src="{{ url_for('static', filename='js/popper.min.js')}}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/bootstrap4.min.js')}}"></script>
|
<script src="{{ url_for('static', filename='js/bootstrap4.min.js')}}"></script>
|
||||||
<script language="javascript" src="{{ url_for('static', filename='js/moment.min.js') }}"></script>
|
<script language="javascript" src="{{ url_for('static', filename='js/moment.min.js') }}"></script>
|
||||||
<script language="javascript" src="{{ url_for('static', filename='js/jquery.daterangepicker.min.js') }}"></script>
|
<script language="javascript" src="{{ url_for('static', filename='js/jquery.daterangepicker.min.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/tags.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/tags.js') }}"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
{% include 'nav_bar.html' %}
|
{% include 'nav_bar.html' %}
|
||||||
|
|
||||||
<div id="page-wrapper">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
|
||||||
<h1 class="page-header" data-page="page-tags" >Tags</h1>
|
|
||||||
</div>
|
|
||||||
<!-- /.col-lg-12 -->
|
|
||||||
</div>
|
|
||||||
<!-- /.row -->
|
|
||||||
<div class="form-group input-group" >
|
|
||||||
<input id="ltags" style="width:100%;" type="text" name="ltags" autocomplete="off">
|
|
||||||
|
|
||||||
<div class="input-group-btn">
|
{% include 'tags/menu_sidebar.html' %}
|
||||||
<button type="button" class="btn btn-search btn-primary btn-tags" onclick="searchTags()"<button class="btn btn-primary" onclick="emptyTags()">
|
|
||||||
<span class="glyphicon glyphicon-search "></span>
|
<div class="col-12 col-lg-10" id="core_content">
|
||||||
<span class="label-icon">Search Tags</span>
|
|
||||||
</button>
|
<div class="card mb-3 mt-1">
|
||||||
|
<div class="card-header text-white bg-dark">
|
||||||
|
<h5 class="card-title">Search Tags by date range :</h5>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<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" value="{{ date_from }}" name="date_from" autocomplete="off">
|
||||||
|
</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" value="{{ date_to }}" name="date_to" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<button class="btn btn-outline-danger" type="button" id="button-clear-tags" style="z-index: 1;" onclick="emptyTags()">
|
||||||
|
<i class="fas fa-eraser"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<input id="ltags" name="ltags" type="text" class="form-control" aria-describedby="button-clear-tags" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="btn btn-primary" type="button" id="button-search-tags" onclick="searchTags()">
|
||||||
|
<i class="fas fa-search"></i> Search Tags
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary" onclick="emptyTags()" style="margin-bottom: 30px;">
|
<div>
|
||||||
<span class="glyphicon glyphicon-remove"></span>
|
<br></br>
|
||||||
<span class="label-icon">Clear Tags</span>
|
<a class="btn btn-light text-secondary" href="{{ url_for('Tags.taxonomies') }}" target="_blank">
|
||||||
</button>
|
<i class="fas fa-wrench fa-2x"></i>
|
||||||
|
<br></br>
|
||||||
|
<span class="label-icon">Edit Taxonomies List </span>
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-light text-secondary" href="{{ url_for('Tags.galaxies') }}" target="_blank">
|
||||||
|
<i class="fas fa-rocket fa-2x"></i>
|
||||||
|
<br></br>
|
||||||
|
<span class="label-icon">Edit Galaxies List</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<br></br>
|
<br></br>
|
||||||
<a class="btn btn-tags" href="{{ url_for('Tags.taxonomies') }}" target="_blank">
|
<a class="btn btn-light text-secondary" href="{{ url_for('PasteSubmit.edit_tag_export') }}" target="_blank">
|
||||||
<i class="fa fa-wrench fa-2x"></i>
|
<i class="fas fa-cogs fa-2x"></i>
|
||||||
<br></br>
|
<br></br>
|
||||||
<span class="label-icon">Edit Taxonomies List </span>
|
<span class="label-icon">MISP and Hive, auto push</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-tags" href="{{ url_for('Tags.galaxies') }}" target="_blank">
|
</div>
|
||||||
<i class="fa fa-rocket fa-2x"></i>
|
|
||||||
<br></br>
|
|
||||||
<span class="label-icon">Edit Galaxies List</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
</div>
|
||||||
<br></br>
|
</div>
|
||||||
<a class="btn btn-tags" href="{{ url_for('PasteSubmit.edit_tag_export') }}" target="_blank">
|
</div>
|
||||||
<i class="fa fa-cogs fa-2x"></i>
|
|
||||||
<br></br>
|
|
||||||
<span class="label-icon">MISP and Hive, auto push</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</body>
|
||||||
|
|
||||||
<!-- /#page-wrapper -->
|
<script>
|
||||||
|
var ltags
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#page-Browse-Items").addClass("active");
|
||||||
|
|
||||||
<script>
|
$.getJSON("{{ url_for('Tags.get_all_tags') }}",
|
||||||
var ltags
|
function(data) {
|
||||||
$(document).ready(function(){
|
ltags = $('#ltags').tagSuggest({
|
||||||
activePage = "page-Tags"
|
data: data,
|
||||||
$("#"+activePage).addClass("active");
|
sortOrder: 'name',
|
||||||
|
maxDropHeight: 200,
|
||||||
|
name: 'ltags'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$.getJSON("{{ url_for('Tags.get_all_tags') }}",
|
$('#date-range-from').dateRangePicker({
|
||||||
function(data) {
|
separator : ' to ',
|
||||||
|
getValue: function(){
|
||||||
|
if ($('#date-range-from-input').val() && $('#date-range-to-input').val() )
|
||||||
|
return $('#date-range-from-input').val() + ' to ' + $('#date-range-to-input').val();
|
||||||
|
else
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
setValue: function(s,s1,s2){
|
||||||
|
$('#date-range-from-input').val(s1);
|
||||||
|
$('#date-range-to-input').val(s2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#date-range-to').dateRangePicker({
|
||||||
|
separator : ' to ',
|
||||||
|
getValue: function(){
|
||||||
|
if ($('#date-range-from-input').val() && $('#date-range-to-input').val() )
|
||||||
|
return $('#date-range-from-input').val() + ' to ' + $('#date-range-to-input').val();
|
||||||
|
else
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
setValue: function(s,s1,s2){
|
||||||
|
$('#date-range-from-input').val(s1);
|
||||||
|
$('#date-range-to-input').val(s2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
ltags = $('#ltags').tagSuggest({
|
<script>
|
||||||
data: data,
|
function searchTags() {
|
||||||
sortOrder: 'name',
|
var data = ltags.getValue();
|
||||||
maxDropHeight: 200,
|
window.location.replace("{{ url_for('Tags.get_tagged_paste') }}?ltags=" + data);
|
||||||
name: 'ltags'
|
}
|
||||||
});
|
function emptyTags() {
|
||||||
});
|
ltags.clear();
|
||||||
});
|
}
|
||||||
</script>
|
|
||||||
<script>
|
function toggle_sidebar(){
|
||||||
function searchTags() {
|
if($('#nav_menu').is(':visible')){
|
||||||
var data = ltags.getValue();
|
$('#nav_menu').hide();
|
||||||
window.location.replace("{{ url_for('Tags.get_tagged_paste') }}?ltags=" + data);
|
$('#side_menu').removeClass('border-right')
|
||||||
}
|
$('#side_menu').removeClass('col-lg-2')
|
||||||
function emptyTags() {
|
$('#core_content').removeClass('col-lg-10')
|
||||||
ltags.clear();
|
}else{
|
||||||
}
|
$('#nav_menu').show();
|
||||||
</script>
|
$('#side_menu').addClass('border-right')
|
||||||
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|
$('#side_menu').addClass('col-lg-2')
|
||||||
</body>
|
$('#core_content').addClass('col-lg-10')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -592,7 +592,7 @@ def show_domain():
|
||||||
|
|
||||||
h = HiddenServices(domain, type)
|
h = HiddenServices(domain, type)
|
||||||
last_crawled_time = h.get_last_crawled()
|
last_crawled_time = h.get_last_crawled()
|
||||||
if epoch in last_crawled_time:
|
if 'epoch' in last_crawled_time:
|
||||||
last_check = '{} - {}'.format(last_check, time.strftime('%H:%M.%S', time.gmtime(last_crawled_time['epoch'])))
|
last_check = '{} - {}'.format(last_check, time.strftime('%H:%M.%S', time.gmtime(last_crawled_time['epoch'])))
|
||||||
l_pastes = h.get_last_crawled_pastes(epoch=epoch)
|
l_pastes = h.get_last_crawled_pastes(epoch=epoch)
|
||||||
dict_links = h.get_all_links(l_pastes)
|
dict_links = h.get_all_links(l_pastes)
|
||||||
|
|
|
@ -104,11 +104,11 @@
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="input-group" id="date-range-from">
|
<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>
|
<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" value="{{ date_from }}" name="date_from">
|
<input class="form-control" id="date-range-from-input" placeholder="yyyy-mm-dd" value="{{ date_from }}" name="date_from" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group" id="date-range-to">
|
<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>
|
<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" value="{{ date_to }}" name="date_to">
|
<input class="form-control" id="date-range-to-input" placeholder="yyyy-mm-dd" value="{{ date_to }}" name="date_to" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
.tag-ctn{
|
.tag-ctn{
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 30px;
|
height: 38px;
|
||||||
|
min-height: 38px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -63,6 +64,7 @@
|
||||||
}
|
}
|
||||||
.tag-ctn .tag-empty-text{
|
.tag-ctn .tag-empty-text{
|
||||||
color: #DDD;
|
color: #DDD;
|
||||||
|
width: 0;
|
||||||
}
|
}
|
||||||
.tag-ctn input:focus{
|
.tag-ctn input:focus{
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<a class="nav-link" href="#" aria-disabled="true"><i class="fas fa-external-link-alt"></i> Submit</a>
|
<a class="nav-link" href="#" aria-disabled="true"><i class="fas fa-external-link-alt"></i> Submit</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item mr-3">
|
<li class="nav-item mr-3">
|
||||||
<a class="nav-link" href="#" aria-disabled="true"><i class="fas fa-tag"></i> Browse Items</a>
|
<a class="nav-link" id="page-Browse-Items" href="{{ url_for('Tags.Tags_page') }}" aria-disabled="true"><i class="fas fa-tag"></i> Browse Items</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item mr-3">
|
<li class="nav-item mr-3">
|
||||||
<a class="nav-link" href="#" aria-disabled="true"><i class="fas fa-crosshairs"></i> Leaks Hunter</a>
|
<a class="nav-link" href="#" aria-disabled="true"><i class="fas fa-crosshairs"></i> Leaks Hunter</a>
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<div class="col-12 col-lg-2 p-0 bg-light border-right" id="side_menu">
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-outline-secondary mt-1 ml-3" onclick="toggle_sidebar()">
|
||||||
|
<i class="fas fa-align-left"></i>
|
||||||
|
<span>Toggle Sidebar</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand navbar-light bg-light flex-md-column flex-row align-items-start py-2" id="nav_menu">
|
||||||
|
<h5 class="d-flex text-muted w-100">
|
||||||
|
<span>Tags Management </span>
|
||||||
|
</h5>
|
||||||
|
<ul class="nav flex-md-column flex-row navbar-nav justify-content-between w-100">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ url_for('Tags.taxonomies') }}" id="nav_taxonomies">
|
||||||
|
<i class="fas fa-wrench"></i>
|
||||||
|
Edit Taxonomies List
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ url_for('Tags.galaxies') }}" id="nav_onion_galaxies">
|
||||||
|
<i class="fas fa-rocket"></i>
|
||||||
|
Edit Galaxies List
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h5 class="d-flex text-muted w-100">
|
||||||
|
<span>Tags Export </span>
|
||||||
|
</h5>
|
||||||
|
<ul class="nav flex-md-column flex-row navbar-nav justify-content-between w-100">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{url_for('PasteSubmit.edit_tag_export')}}" id="nav_regular_edit_tag_export">
|
||||||
|
<i class="fas fa-cogs"></i>
|
||||||
|
MISP and Hive, auto push
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
Loading…
Reference in New Issue