mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 22:47:15 +00:00
149 lines
5.1 KiB
HTML
149 lines
5.1 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
||
|
<title>AIL - Edit Cookies</title>
|
||
|
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
||
|
|
||
|
<!-- Core CSS -->
|
||
|
<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/dataTables.bootstrap.min.css') }}" rel="stylesheet">
|
||
|
|
||
|
<script src="{{ url_for('static', filename='js/jquery.js')}}"></script>
|
||
|
<script src="{{ url_for('static', filename='js/bootstrap4.min.js')}}"></script>
|
||
|
<script src="{{ url_for('static', filename='js/jquery.dataTables.min.js')}}"></script>
|
||
|
<script src="{{ url_for('static', filename='js/dataTables.bootstrap.min.js')}}"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
{% include 'nav_bar.html' %}
|
||
|
|
||
|
<div class="container-fluid">
|
||
|
<div class="row">
|
||
|
|
||
|
{% include 'crawler/menu_sidebar.html' %}
|
||
|
|
||
|
<div class="col-12 col-lg-10" id="core_content">
|
||
|
|
||
|
<div class="card mb-3 mt-1">
|
||
|
<div class="card-header text-white bg-dark">
|
||
|
<h5 class="card-title"><i class="fas fa-cookie-bite"></i> Edit Cookies</h5>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
{% with all_cookies=[cookie_metadata], table_id='table_metadata'%}
|
||
|
{% include 'crawler/crawler_splash/table_cookies.html' %}
|
||
|
{% endwith %}
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="card mb-3 mt-1">
|
||
|
<div class="card-header text-white bg-dark">
|
||
|
<h5 class="card-title"><i class="fas fa-cookie-bite"></i> JSON Cookies</h5>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<p>
|
||
|
<pre class="border">{{cookies_json}}</pre>
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="card mb-3 mt-1">
|
||
|
<div class="card-header text-white bg-dark">
|
||
|
<h5 class="card-title"><i class="fas fa-cookie-bite"></i> Manual Cookies</h5>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-5" for="obj_input_cookie_name"><b>Cookie Name</b></div>
|
||
|
<div class="col-6" for="obj_input_cookie_value"><b>Cookie Value</b></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-horizontal">
|
||
|
<div class="form-body">
|
||
|
<div class="form-group">
|
||
|
<div class="fields">
|
||
|
<div class="input-group mb-1">
|
||
|
<input type="text" class="form-control col-5" name="first_cookie" id="obj_input_cookie_name">
|
||
|
<input type="text" class="form-control col-6" name="first_cookie" id="obj_input_cookie_value">
|
||
|
<span class="btn btn-info input-group-addon add-field col-1"><i class="fas fa-plus"></i></span>
|
||
|
</div>
|
||
|
|
||
|
{%for manual_cookie in manual_cookies%}
|
||
|
<div class="input-group mb-1">
|
||
|
<input type="text" class="form-control col-5" name="{{manual_cookie}}" value="{{manual_cookie[0]}}">
|
||
|
<input type="text" class="form-control col-6" name="{{manual_cookie}}" value="{{manual_cookie[1]}}">
|
||
|
<span class="btn btn-danger input-group-addon delete-field col-1"><i class="fas fa-trash-alt"></i></span>
|
||
|
</div>
|
||
|
{%endfor%}
|
||
|
<span class="help-block" hidden>Manual Cookies></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
$(document).ready(function(){
|
||
|
$("#page-crawler").addClass("active");
|
||
|
$("#nav_title_cookies").removeClass("text-muted");
|
||
|
|
||
|
$('#table_user').DataTable({
|
||
|
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],
|
||
|
"iDisplayLength": 10,
|
||
|
"order": [[ 0, "desc" ]]
|
||
|
});
|
||
|
|
||
|
});
|
||
|
|
||
|
function toggle_sidebar(){
|
||
|
if($('#nav_menu').is(':visible')){
|
||
|
$('#nav_menu').hide();
|
||
|
$('#side_menu').removeClass('border-right')
|
||
|
$('#side_menu').removeClass('col-lg-2')
|
||
|
$('#core_content').removeClass('col-lg-10')
|
||
|
}else{
|
||
|
$('#nav_menu').show();
|
||
|
$('#side_menu').addClass('border-right')
|
||
|
$('#side_menu').addClass('col-lg-2')
|
||
|
$('#core_content').addClass('col-lg-10')
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var input_1 = '<div class="input-group mb-1"><input type="text" class="form-control col-5" name="'
|
||
|
var input_2 = '"><input type="text" class="form-control col-6" name="'
|
||
|
var input_3 = '">';
|
||
|
var minusButton = '<span class="btn btn-danger input-group-addon delete-field col-1"><i class="fas fa-trash-alt"></i></span></div>';
|
||
|
|
||
|
$('.add-field').click(function() {
|
||
|
var new_uuid = uuidv4();
|
||
|
var template = input_1 + new_uuid + input_2 + new_uuid + input_3;
|
||
|
var temp = $(template).insertBefore('.help-block');
|
||
|
temp.append(minusButton);
|
||
|
});
|
||
|
|
||
|
$('.fields').on('click', '.delete-field', function(){
|
||
|
$(this).parent().remove();
|
||
|
});
|
||
|
|
||
|
function uuidv4() {
|
||
|
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
|
||
|
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
|
||
|
);
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|