mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 22:47:15 +00:00
267 lines
9.9 KiB
HTML
267 lines
9.9 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>AIL-Framework</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">
|
|
|
|
<!-- JS -->
|
|
<script src="{{ url_for('static', filename='js/jquery.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">
|
|
|
|
{% include 'crawler/crawler_disabled.html' %}
|
|
|
|
<div class="row">
|
|
<div class="col-xl-6">
|
|
|
|
<div class="card mt-1 mb-1">
|
|
<div class="card-header text-white bg-dark">
|
|
<h5><a class="text-info" href="{{ url_for('hiddenServices.Crawler_Splash_last_by_type')}}?type=onion"><i class="fas fa-user-secret"></i> Onions Crawlers</a></h5>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<a href="{{ url_for('hiddenServices.show_domains_by_daterange') }}?service_type=onion&domains_up=True&date_from={{date}}&date_to={{date}}" class="badge badge-success" id="stat_onion_domain_up">{{ statDomains_onion['domains_up'] }}</a> UP
|
|
<a href="{{ url_for('hiddenServices.show_domains_by_daterange') }}?service_type=onion&domains_down=True&date_from={{date}}&date_to={{date}}" class="badge badge-danger ml-md-3" id="stat_onion_domain_down">{{ statDomains_onion['domains_down'] }}</a> DOWN
|
|
</div>
|
|
<div class="col-6">
|
|
<a href="{{ url_for('hiddenServices.show_domains_by_daterange') }}?service_type=onion&domains_up=True&domains_down=True&date_from={{date}}&date_to={{date}}" class="badge badge-success" id="stat_onion_total">{{ statDomains_onion['total'] }}</a> Crawled
|
|
<span class="badge badge-warning ml-md-3" id="stat_onion_queue">{{ statDomains_onion['domains_queue'] }}</span> Queue
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body px-0 py-0 ">
|
|
<table class="table">
|
|
<tbody id="tbody_crawler_onion_info">
|
|
{% for crawler in crawler_metadata_onion %}
|
|
<tr>
|
|
<td>
|
|
<i class="fas fa-{%if crawler['status']%}check{%else%}times{%endif%}-circle" style="color:{%if crawler['status']%}Green{%else%}Red{%endif%};"></i> {{crawler['crawler_info']}}
|
|
</td>
|
|
<td>
|
|
{{crawler['crawling_domain']}}
|
|
</td>
|
|
<td style="color:{%if crawler['status']%}Green{%else%}Red{%endif%};">
|
|
{{crawler['status_info']}}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-xl-6">
|
|
<div class="card mt-1 mb-1">
|
|
<div class="card-header text-white bg-dark">
|
|
<h5><a class="text-info" href="{{ url_for('hiddenServices.Crawler_Splash_last_by_type')}}?type=regular"><i class="fab fa-html5"></i> Regular Crawlers</a></h5>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<a href="{{ url_for('hiddenServices.show_domains_by_daterange') }}?service_type=regular&domains_up=True&date_from={{date}}&date_to={{date}}" class="badge badge-success" id="stat_regular_domain_up">{{ statDomains_regular['domains_up'] }}</a> UP
|
|
<a href="{{ url_for('hiddenServices.show_domains_by_daterange') }}?service_type=regular&domains_down=True&date_from={{date}}&date_to={{date}}" class="badge badge-danger ml-md-3" id="stat_regular_domain_down">{{ statDomains_regular['domains_down'] }}</a> DOWN
|
|
</div>
|
|
<div class="col-6">
|
|
<a href="{{ url_for('hiddenServices.show_domains_by_daterange') }}?service_type=regular&domains_up=True&domains_down=True&date_from={{date}}&date_to={{date}}" class="badge badge-success" id="stat_regular_total">{{ statDomains_regular['total'] }}</a> Crawled
|
|
<span class="badge badge-warning ml-md-3" id="stat_regular_queue">{{ statDomains_regular['domains_queue'] }}</span> Queue
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body px-0 py-0 ">
|
|
<table class="table">
|
|
<tbody id="tbody_crawler_regular_info">
|
|
{% for crawler in crawler_metadata_regular %}
|
|
<tr>
|
|
<td>
|
|
<i class="fas fa-{%if crawler['status']%}check{%else%}times{%endif%}-circle" style="color:{%if crawler['status']%}Green{%else%}Red{%endif%};"></i> {{crawler['crawler_info']}}
|
|
</td>
|
|
<td>
|
|
{{crawler['crawling_domain']}}
|
|
</td>
|
|
<td style="color:{%if crawler['status']%}Green{%else%}Red{%endif%};">
|
|
{{crawler['status_info']}}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-center my-4">
|
|
<div class="card border-secondary" style="max-width: 40rem;">
|
|
<div class="card-body text-dark">
|
|
<h5 class="card-title">Show Domain:</h5>
|
|
<form class="" action="{{url_for('crawler_splash.showDomain')}}" method="post">
|
|
<div class="input-group mb-3">
|
|
<input type="text" class="form-control" style="min-width: 30rem;" placeholder="Domain name" aria-label="Domain name" aria-describedby="btn_show_domain" id="in_show_domain" , name="in_show_domain">
|
|
<div class="input-group-append">
|
|
<button class="btn btn-info" type="submit" id="btn_show_domain">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<hr>
|
|
<div class="row mb-3">
|
|
<div class="col-xl-6">
|
|
<div class="text-center">
|
|
<a class="btn btn-secondary" href="{{url_for('crawler_splash.domains_explorer_onion')}}" role="button">
|
|
<i class="fas fa-user-secret"></i> Onion Domain Explorer
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-xl-6">
|
|
<div class="text-center">
|
|
<a class="btn btn-secondary" href="{{url_for('crawler_splash.domains_explorer_web')}}" role="button">
|
|
<i class="fab fa-html5"></i> Web Domain Explorer
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{% with object_type='domain' %}
|
|
{% include 'tags/block_obj_tags_search.html' %}
|
|
{% endwith %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
<script>
|
|
var to_refresh = false
|
|
$(document).ready(function(){
|
|
$("#page-Crawler").addClass("active");
|
|
$("#nav_dashboard").addClass("active");
|
|
$( window ).on("focus", function() {
|
|
to_refresh = true
|
|
refresh_crawler_status();
|
|
});
|
|
$( window ).on("blur", function() {
|
|
to_refresh = false
|
|
});
|
|
|
|
to_refresh = true
|
|
refresh_crawler_status();
|
|
});
|
|
|
|
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')
|
|
}
|
|
}
|
|
|
|
function refresh_crawler_status(){
|
|
|
|
$.getJSON("{{ url_for('hiddenServices.crawler_dashboard_json') }}",
|
|
function(data) {
|
|
|
|
$('#stat_onion_domain_up').text(data.statDomains_onion['domains_up']);
|
|
$('#stat_onion_domain_down').text(data.statDomains_onion['domains_down']);
|
|
$('#stat_onion_total').text(data.statDomains_onion['total']);
|
|
$('#stat_onion_queue').text(data.statDomains_onion['domains_queue']);
|
|
|
|
$('#stat_regular_domain_up').text(data.statDomains_regular['domains_up']);
|
|
$('#stat_regular_domain_down').text(data.statDomains_regular['domains_down']);
|
|
$('#stat_regular_total').text(data.statDomains_regular['total']);
|
|
$('#stat_regular_queue').text(data.statDomains_regular['domains_queue']);
|
|
|
|
if(data.crawler_metadata_onion.length!=0){
|
|
$("#tbody_crawler_onion_info").empty();
|
|
var tableRef = document.getElementById('tbody_crawler_onion_info');
|
|
for (var i = 0; i < data.crawler_metadata_onion.length; i++) {
|
|
var crawler = data.crawler_metadata_onion[i];
|
|
var newRow = tableRef.insertRow(tableRef.rows.length);
|
|
var text_color;
|
|
var icon;
|
|
if(crawler['status']){
|
|
text_color = 'Green';
|
|
icon = 'check';
|
|
} else {
|
|
text_color = 'Red';
|
|
icon = 'times';
|
|
}
|
|
|
|
var newCell = newRow.insertCell(0);
|
|
newCell.innerHTML = "<td><i class=\"fas fa-"+icon+"-circle\" style=\"color:"+text_color+";\"></i> "+crawler['crawler_info']+"</td>";
|
|
|
|
newCell = newRow.insertCell(1);
|
|
newCell.innerHTML = "<td>"+crawler['crawling_domain']+"</td>";
|
|
|
|
newCell = newRow.insertCell(2);
|
|
newCell.innerHTML = "<td><div style=\"color:"+text_color+";\">"+crawler['status_info']+"</div></td>";
|
|
|
|
//$("#panel_crawler").show();
|
|
}
|
|
}
|
|
if(data.crawler_metadata_regular.length!=0){
|
|
$("#tbody_crawler_regular_info").empty();
|
|
var tableRef = document.getElementById('tbody_crawler_regular_info');
|
|
for (var i = 0; i < data.crawler_metadata_regular.length; i++) {
|
|
var crawler = data.crawler_metadata_regular[i];
|
|
var newRow = tableRef.insertRow(tableRef.rows.length);
|
|
var text_color;
|
|
var icon;
|
|
if(crawler['status']){
|
|
text_color = 'Green';
|
|
icon = 'check';
|
|
} else {
|
|
text_color = 'Red';
|
|
icon = 'times';
|
|
}
|
|
|
|
var newCell = newRow.insertCell(0);
|
|
newCell.innerHTML = "<td><i class=\"fas fa-"+icon+"-circle\" style=\"color:"+text_color+";\"></i> "+crawler['crawler_info']+"</td>";
|
|
|
|
newCell = newRow.insertCell(1);
|
|
newCell.innerHTML = "<td>"+crawler['crawling_domain']+"</td>";
|
|
|
|
newCell = newRow.insertCell(2);
|
|
newCell.innerHTML = "<td><div style=\"color:"+text_color+";\">"+crawler['status_info']+"</div></td>";
|
|
|
|
//$("#panel_crawler").show();
|
|
}
|
|
}
|
|
}
|
|
);
|
|
|
|
if (to_refresh) {
|
|
setTimeout("refresh_crawler_status()", 10000);
|
|
}
|
|
}
|
|
</script>
|