mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
516bc52c2f
This reverts commit e2ad3e2001
.
202 lines
6.0 KiB
HTML
202 lines
6.0 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% set active_page = "admin_global_search" %}
|
|
|
|
{% block title %}
|
|
<title>
|
|
Global Search - {{ SITE_NAME }}
|
|
</title>
|
|
{% endblock %}
|
|
|
|
{% block dashboard_stat %}
|
|
<div class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
<h1 class="m-0 text-dark">
|
|
Global Search
|
|
<small>Search for domains, records and comments directly from PDNS API</small>
|
|
</h1>
|
|
</div>
|
|
<div class="col-sm-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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Global Search</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<form action="" method="get">
|
|
<div class="input-group">
|
|
<input type="text" name="q" class="form-control" placeholder="Your keyword...">
|
|
<div class="input-group-btn">
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-search"></i></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div>
|
|
<p><b>Hints:</b> 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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Domains ({{ domains|length }})</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<table id="tbl_domain" class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Domain</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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Records ({{ records|length }})</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<table id="tbl_record" class="table table-bordered table-striped">
|
|
<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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Comments ({{ comments|length }})</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<table id="tbl_comment" class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Comment</th>
|
|
<th>Record</th>
|
|
<th>Domain</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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|
|
|
|
{% block extrascripts %}
|
|
<script>
|
|
// set up domain result data table
|
|
$("#tbl_domain").DataTable({
|
|
"paging": false,
|
|
"lengthChange": false,
|
|
"searching": false,
|
|
"ordering": true,
|
|
"info": false,
|
|
"autoWidth": false,
|
|
"order": [
|
|
[0, "asc"]
|
|
]
|
|
});
|
|
|
|
// set up domain result data table
|
|
$("#tbl_record").DataTable({
|
|
"paging": false,
|
|
"lengthChange": false,
|
|
"searching": false,
|
|
"ordering": true,
|
|
"info": false,
|
|
"autoWidth": false,
|
|
"order": [
|
|
[0, "asc"]
|
|
]
|
|
});
|
|
|
|
// set up domain result data table
|
|
$("#tbl_comment").DataTable({
|
|
"paging": false,
|
|
"lengthChange": false,
|
|
"searching": false,
|
|
"ordering": true,
|
|
"info": false,
|
|
"autoWidth": false,
|
|
"order": [
|
|
[0, "asc"]
|
|
]
|
|
});
|
|
</script>
|
|
{% endblock %}
|