2019-12-11 03:26:17 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% set active_page = "admin_global_search" %}
|
2023-02-19 20:54:11 +00:00
|
|
|
{% block title %}<title>Global Search - {{ SITE_NAME }}</title>{% endblock %}
|
2023-02-18 16:04:14 +00:00
|
|
|
|
|
|
|
{% block dashboard_stat %}
|
2023-02-19 20:54:11 +00:00
|
|
|
<div class="content-header">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="col-6">
|
|
|
|
<h1 class="m-0 text-dark">Global Search</h1>
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
<div class="col-6">
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
|
|
|
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
|
|
<li class="breadcrumb-item active">Global Search</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
2023-02-18 16:04:14 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.container-fluid -->
|
2023-02-18 14:04:37 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.content-header -->
|
2023-02-18 16:04:14 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2023-02-19 20:54:11 +00:00
|
|
|
<section class="content">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<form action="" method="get">
|
|
|
|
<div class="card card-outline card-primary shadow">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Global Search</h3>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-header -->
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="callout callout-info">
|
|
|
|
<p>This tool can be used to search for domains, records, and comments via the PDNS
|
|
|
|
API.</p>
|
|
|
|
</div>
|
|
|
|
<!-- /.callout -->
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" name="q" class="form-control" value="{{ query }}"
|
|
|
|
placeholder="Enter search query...">
|
|
|
|
<button type="submit" class="btn btn-flat btn-success" title="Execute Query">
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.form-group -->
|
|
|
|
<div class="callout callout-warning">
|
|
|
|
<p>The * character can be used in your keyword as a wildcard character and the ?
|
|
|
|
character can be used as a wildcard for a single character.</p>
|
|
|
|
</div>
|
|
|
|
<!-- /.callout -->
|
|
|
|
</div>
|
|
|
|
<!-- /.card-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.card -->
|
|
|
|
</form>
|
2023-02-18 14:04:37 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.col -->
|
2019-12-11 03:26:17 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.row -->
|
2019-12-11 03:26:17 +00:00
|
|
|
|
2023-02-19 20:54:11 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="card card-outline card-secondary shadow">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Zones ({{ domains|length }})</h3>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-header -->
|
|
|
|
<div class="card-body table-responsive">
|
|
|
|
<table id="tbl_domain" class="table table-bordered table-striped table-hover table-sm">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Zone Name</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for domain in domains %}
|
|
|
|
<tr class="odd gradeX">
|
|
|
|
<td>
|
|
|
|
<a href="{{ url_for('domain.domain', domain_name=domain['name']) }}">{{ domain['name'] }}</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.card -->
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
2019-12-11 03:26:17 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.row -->
|
2019-12-11 03:26:17 +00:00
|
|
|
|
2023-02-19 20:54:11 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="card card-outline card-secondary shadow">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Zone Records ({{ records|length }})</h3>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-header -->
|
|
|
|
<div class="card-body table-responsive">
|
|
|
|
<table id="tbl_record" class="table table-bordered table-striped table-hover table-sm">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Status</th>
|
|
|
|
<th>TTL</th>
|
|
|
|
<th>Data</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for record in records %}
|
|
|
|
<tr class="odd gradeX">
|
|
|
|
<td>
|
|
|
|
<a href="{{ url_for('domain.domain', domain_name=record['zone_id']) }}">{{ record['name'] }}</a>
|
|
|
|
</td>
|
|
|
|
<td>{{ record['type'] }}</td>
|
|
|
|
<td>{{ 'Disabled' if record['disabled'] else 'Active' }}</td>
|
|
|
|
<td>{{ record['ttl'] }}</td>
|
|
|
|
<td>{{ record['content'] }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.card -->
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
2023-02-18 16:04:14 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.row -->
|
2023-02-18 16:04:14 +00:00
|
|
|
|
2023-02-19 20:54:11 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="card card-outline card-secondary shadow">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Comments ({{ comments|length }})</h3>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-header -->
|
|
|
|
<div class="card-body table-responsive">
|
|
|
|
<table id="tbl_comment" class="table table-bordered table-striped table-hover table-sm">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Comment</th>
|
|
|
|
<th>Record</th>
|
|
|
|
<th>Zone</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for comment in comments %}
|
|
|
|
<tr class="odd gradeX">
|
|
|
|
<td>{{ comment['content'] }}</td>
|
|
|
|
<td>{{ comment['name'] }}</td>
|
|
|
|
<td>
|
|
|
|
<a href="{{ url_for('domain.domain', domain_name=comment['zone_id']) }}">{{ comment['zone_id'] }}</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<!-- /.card-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.card -->
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
2023-02-18 16:04:14 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.row -->
|
2019-12-11 03:26:17 +00:00
|
|
|
</div>
|
2023-02-19 20:54:11 +00:00
|
|
|
<!-- /.container-fluid -->
|
|
|
|
</section>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block head_styles %}
|
|
|
|
<style>
|
|
|
|
table#tbl_record { table-layout: fixed; }
|
|
|
|
table#tbl_record thead th:nth-child(0n+1) { width: 20%;}
|
|
|
|
table#tbl_record thead th:nth-child(0n+2),
|
|
|
|
table#tbl_record thead th:nth-child(0n+3),
|
|
|
|
table#tbl_record thead th:nth-child(0n+4) { width: 5%; }
|
|
|
|
table#tbl_record thead th:nth-child(0n+2),
|
|
|
|
table#tbl_record thead th:nth-child(0n+3),
|
|
|
|
table#tbl_record thead th:nth-child(0n+4),
|
|
|
|
table#tbl_record tbody td:nth-child(0n+2),
|
|
|
|
table#tbl_record tbody td:nth-child(0n+3),
|
|
|
|
table#tbl_record tbody td:nth-child(0n+4) { text-align: center; }
|
|
|
|
table#tbl_record tbody td:first-of-type,
|
|
|
|
table#tbl_record tbody td:last-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
@media only screen and (max-device-width: 480px) {
|
|
|
|
table#tbl_record thead th:nth-child(0n+1) { width: 10%;}
|
|
|
|
table#tbl_record thead th:nth-child(0n+2),
|
|
|
|
table#tbl_record thead th:nth-child(0n+3),
|
|
|
|
table#tbl_record thead th:nth-child(0n+4) { width: 15%; }
|
|
|
|
}
|
|
|
|
@media only screen and (max-device-width: 992px) {
|
|
|
|
table#tbl_record { table-layout: auto; }
|
|
|
|
}
|
|
|
|
@media only screen and (min-device-width: 481px) and (max-device-width: 992px) {
|
|
|
|
table#tbl_record thead th:nth-child(0n+2),
|
|
|
|
table#tbl_record thead th:nth-child(0n+3),
|
|
|
|
table#tbl_record thead th:nth-child(0n+4) { width: 10%; }
|
|
|
|
}
|
|
|
|
</style>
|
2019-12-11 03:26:17 +00:00
|
|
|
{% endblock %}
|
2023-02-18 16:04:14 +00:00
|
|
|
|
2019-12-11 03:26:17 +00:00
|
|
|
{% block extrascripts %}
|
2023-02-19 20:54:11 +00:00
|
|
|
<script>
|
|
|
|
// Initialize DataTables for zones
|
|
|
|
$("#tbl_domain").DataTable({
|
|
|
|
"paging": true,
|
|
|
|
"lengthChange": true,
|
|
|
|
"searching": true,
|
|
|
|
"ordering": true,
|
|
|
|
"info": false,
|
|
|
|
"autoWidth": false,
|
|
|
|
"order": [
|
|
|
|
[0, "asc"]
|
|
|
|
]
|
|
|
|
});
|
2019-12-11 03:26:17 +00:00
|
|
|
|
2023-02-19 20:54:11 +00:00
|
|
|
// Initialize DataTables for zone records
|
|
|
|
$("#tbl_record").DataTable({
|
|
|
|
"paging": true,
|
|
|
|
"lengthChange": true,
|
|
|
|
"searching": true,
|
|
|
|
"ordering": true,
|
|
|
|
"info": false,
|
|
|
|
"autoWidth": false,
|
|
|
|
"order": [
|
|
|
|
[0, "asc"]
|
|
|
|
]
|
|
|
|
});
|
2019-12-11 03:26:17 +00:00
|
|
|
|
2023-02-19 20:54:11 +00:00
|
|
|
// Initialize DataTables for comments
|
|
|
|
$("#tbl_comment").DataTable({
|
|
|
|
"paging": true,
|
|
|
|
"lengthChange": true,
|
|
|
|
"searching": true,
|
|
|
|
"ordering": true,
|
|
|
|
"info": false,
|
|
|
|
"autoWidth": false,
|
|
|
|
"order": [
|
|
|
|
[0, "asc"]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
</script>
|
2019-12-11 03:26:17 +00:00
|
|
|
{% endblock %}
|