2020-03-23 17:00:09 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
2020-03-24 16:15:43 +00:00
|
|
|
<title>AIL - Add Cookies</title>
|
2020-03-23 17:00:09 +00:00
|
|
|
<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/daterangepicker.min.css') }}" rel="stylesheet">
|
|
|
|
|
|
|
|
<!-- JS -->
|
|
|
|
<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/bootstrap4.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">
|
2020-04-01 07:58:47 +00:00
|
|
|
<div class="card-header text-white bg-dark">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8">
|
|
|
|
<h5 class="card-title"><i class="fas fa-cookie-bite"></i> Edit Cookiejar</h5>
|
2020-03-23 17:00:09 +00:00
|
|
|
</div>
|
2020-04-01 07:58:47 +00:00
|
|
|
<div class="col-4">
|
|
|
|
<a class="btn btn-danger float-right" href="{{ url_for('crawler_splash.crawler_cookiejar_delete') }}?cookiejar_uuid={{cookiejar_uuid}}">
|
|
|
|
<i class="fas fa-trash-alt"></i>
|
|
|
|
</a>
|
2020-03-23 17:00:09 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-01 07:58:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
{% with all_cookiejar=[cookiejar_metadata], table_id='table_cookiejar'%}
|
|
|
|
{% include 'crawler/crawler_splash/table_cookiejar.html' %}
|
|
|
|
{% endwith %}
|
|
|
|
|
|
|
|
<button class="btn btn-info" onclick="show_edit_description();">
|
|
|
|
Edit Description <i class="fas fa-pencil-alt"></i>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<a href="{{ url_for('crawler_splash.crawler_cookiejar_cookie_add')}}?cookiejar_uuid={{cookiejar_uuid}}">
|
|
|
|
<button class="btn btn-primary">
|
|
|
|
Add Cookies <i class="fas fa-cookie"></i>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<span class="mt-1" id="description-edit-block">
|
|
|
|
<div class="input-group">
|
|
|
|
<input class="form-control" type="text" id="input-description" value="{{cookiejar_metadata['description']}}"></input>
|
|
|
|
<div class="input-group-append">
|
|
|
|
<button class="btn btn-info" onclick="edit_description();">
|
|
|
|
<i class="fas fa-pencil-alt"></i> Edit
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</span>
|
2020-03-23 17:00:09 +00:00
|
|
|
|
2020-04-01 07:58:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-23 17:00:09 +00:00
|
|
|
|
2020-04-01 07:58:47 +00:00
|
|
|
{% with l_elem=l_cookies, l_cookie_uuid=l_cookie_uuid, cookiejar_uuid=cookiejar_uuid %}
|
|
|
|
{% include 'crawler/crawler_splash/cookies_card_block.html' %}
|
|
|
|
{% endwith %}
|
2020-03-23 17:00:09 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var chart = {};
|
|
|
|
$(document).ready(function(){
|
2020-04-01 07:58:47 +00:00
|
|
|
$('#description-edit-block').hide();
|
2020-03-23 17:00:09 +00:00
|
|
|
$("#page-crawler").addClass("active");
|
2020-03-27 16:06:26 +00:00
|
|
|
$("#nav_title_cookiejar").removeClass("text-muted");
|
2020-03-23 17:00:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
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')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-01 07:58:47 +00:00
|
|
|
function show_edit_description(){
|
|
|
|
console.log('edit');
|
|
|
|
$('#description-edit-block').show();
|
|
|
|
}
|
|
|
|
|
|
|
|
function edit_description(){
|
|
|
|
var new_description = $('#input-description').val()
|
|
|
|
var data_to_send = { cookiejar_uuid: "{{cookiejar_uuid}}", "description": new_description}
|
|
|
|
|
|
|
|
$.get("{{ url_for('crawler_splash.crawler_cookiejar_edit') }}", data_to_send, function(data, status){
|
|
|
|
if(status == "success") {
|
|
|
|
$('#description-text').text(new_description)
|
|
|
|
$('#description-edit-block').hide();
|
|
|
|
}
|
|
|
|
});
|
2020-03-23 17:00:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|