mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Split the server statistics and configuration feature into separate pages.
This commit is contained in:
parent
55e4f5f829
commit
65bfc53acb
File diff suppressed because it is too large
Load Diff
@ -1,127 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% set active_page = "admin_console" %}
|
||||
|
||||
{% block title %}
|
||||
<title>
|
||||
Admin Console - {{ 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">
|
||||
PowerDNS
|
||||
<small>Server Statistics & Configuration</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">PowerDNS Server Statistics & Configuration</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 shadow">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">PowerDNS Server Statistics</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="tbl_statistics" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%">Statistic</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for statistic in statistics %}
|
||||
<tr class="odd gradeX">
|
||||
<td>
|
||||
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ statistic['name'] }}"
|
||||
target="_blank" class="btn btn-primary">
|
||||
<i class="fa fa-search"></i> {{ statistic['name'] }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ statistic['value'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card shadow">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">PowerDNS Server Configuration</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="tbl_configuration" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%">Configuration</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for config in configs %}
|
||||
<tr class="odd gradeX">
|
||||
<td>
|
||||
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ config['name'] }}"
|
||||
target="_blank" class="btn btn-primary">
|
||||
<i class="fa-solid fa-search"></i> {{ config['name'] }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ config['value'] }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrascripts %}
|
||||
<script>
|
||||
// set up statistics data table
|
||||
$("#tbl_statistics").DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
|
||||
// set up configuration data table
|
||||
$("#tbl_configuration").DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
84
powerdnsadmin/templates/admin_server_configuration.html
Normal file
84
powerdnsadmin/templates/admin_server_configuration.html
Normal file
@ -0,0 +1,84 @@
|
||||
{% extends "base.html" %}
|
||||
{% set active_page = "server_configuration" %}
|
||||
{% block title %}<title>Server Configuration - {{ 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">
|
||||
Server Configuration
|
||||
</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">Server Configuration</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 shadow">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Server Configuration</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body table-responsive">
|
||||
<table id="tbl_configuration" class="table table-bordered table-striped table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Configuration</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for config in configs %}
|
||||
<tr class="odd gradeX">
|
||||
<td>
|
||||
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ config['name'] }}"
|
||||
target="_blank" class="btn btn-primary">
|
||||
<i class="fa-solid fa-search"></i> {{ config['name'] }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ config['value'] }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrascripts %}
|
||||
<script>
|
||||
// Initialize DataTables
|
||||
$("#tbl_configuration").DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
82
powerdnsadmin/templates/admin_server_statistics.html
Normal file
82
powerdnsadmin/templates/admin_server_statistics.html
Normal file
@ -0,0 +1,82 @@
|
||||
{% extends "base.html" %}
|
||||
{% set active_page = "server_statistics" %}
|
||||
{% block title %}<title>Server Statistics - {{ 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">
|
||||
Server Statistics
|
||||
</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">Server Statistics</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 shadow">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Server Statistics</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body table-responsive">
|
||||
<table id="tbl_statistics" class="table table-bordered table-striped table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%">Statistic</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for statistic in statistics %}
|
||||
<tr class="odd gradeX">
|
||||
<td>
|
||||
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ statistic['name'] }}"
|
||||
target="_blank" class="btn btn-primary">
|
||||
<i class="fa fa-search"></i> {{ statistic['name'] }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ statistic['value'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrascripts %}
|
||||
<script>
|
||||
// Initialize DataTables
|
||||
$("#tbl_statistics").DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -115,10 +115,16 @@
|
||||
{% endif %}
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||
<li class="nav-header">Administration</li>
|
||||
<li class="{{ 'nav-item active' if active_page == 'admin_console' else 'nav-item' }}">
|
||||
<a href="{{ url_for('admin.pdns_stats') }}" class="nav-link">
|
||||
<i class="nav-icon fa-solid fa-info-circle"></i>
|
||||
<p>PowerDNS Info</p>
|
||||
<li class="{{ 'nav-item active' if active_page == 'server_statistics' else 'nav-item' }}">
|
||||
<a href="{{ url_for('admin.server_statistics') }}" class="nav-link">
|
||||
<i class="nav-icon fa-solid fa-chart-simple"></i>
|
||||
<p>Server Statistics</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ 'nav-item active' if active_page == 'server_configuration' else 'nav-item' }}">
|
||||
<a href="{{ url_for('admin.server_configuration') }}" class="nav-link">
|
||||
<i class="nav-icon fa-solid fa-cog"></i>
|
||||
<p>Server Configuration</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ 'nav-item active' if active_page == 'admin_global_search' else 'nav-item' }}">
|
||||
|
Loading…
Reference in New Issue
Block a user