powerdns-admin/app/templates/dashboard.html

206 lines
6.5 KiB
HTML
Raw Normal View History

2015-12-13 09:34:12 +00:00
{% extends "base.html" %}
{% block title %}<title>DNS Control Panel - HOME</title>{% endblock %}
{% block dashboard_stat %}
2016-04-22 00:37:33 +00:00
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Dashboard
<small>Info</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ url_for('dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Dashboard</li>
</ol>
</section>
2015-12-13 09:34:12 +00:00
{% endblock %}
{% block content %}
2016-04-22 00:37:33 +00:00
<!-- Main content -->
<section class="content">
{% if current_user.role.name == 'Administrator' %}
<div class="row">
<div class="col-xs-3">
<div class="box">
<div class="box-header">
<h3 class="box-title">Statistics</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-lg-6 col-xs-12">
<!-- small box -->
<div class="small-box bg-aqua">
<div class="inner">
2016-04-27 23:19:25 +00:00
<h3>{{ domains|length }}</h3>
<p>{% if domains|length > 1 %}Domains{% else %}Domain{% endif %}</p>
2016-04-22 00:37:33 +00:00
</div>
<div class="icon">
<i class="fa fa-book"></i>
2016-04-22 00:37:33 +00:00
</div>
</div>
</div>
<div class="col-lg-6 col-xs-12">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
2016-04-27 23:19:25 +00:00
<h3>{{ users|length }}</h3>
<p>{% if users|length > 1 %}Users{% else %}User{% endif %}</p>
2016-04-22 00:37:33 +00:00
</div>
<div class="icon">
<i class="fa fa-users"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
2016-04-27 23:19:25 +00:00
<h3>{{ history_number }}</h3>
<p>{% if history_number > 1 %}Histories{% else %}History{% endif %}</p>
2016-04-22 00:37:33 +00:00
</div>
<div class="icon">
<i class="fa fa-calendar"></i>
</div>
</div>
</div>
<div class="col-lg-6 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
2016-04-27 23:19:25 +00:00
<h3><span style="font-size: 18px">{{ uptime|display_second_to_time }}</span></h3>
2016-04-22 00:37:33 +00:00
<p>Uptime</p>
</div>
<div class="icon">
<i class="fa fa-clock-o"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-9">
<div class="box">
<div class="box-header">
<h3 class="box-title">Recent Logs</h3>
</div>
<div class="box-body">
<table id="tbl_domain_list" class="table table-bordered table-striped">
<thead>
<tr>
<th>Changed By</th>
<th>Content</th>
<th>Time</th>
<th>Detail</th>
</tr>
</thead>
<tbody>
<tr>
<td>
ivan
</td>
<td>
log log log
</td>
<td>
5:52pm 21/4/2016
</td>
<td>
Detail button
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">Hosted Domains</h3>
</div>
<!-- /.box-header -->
<!--
{% if current_user.role.name == 'Administrator' %}
<div class="box-body">
<button type="button" class="btn btn-flat btn-primary" onclick="window.location.href='{{ url_for('domain_add') }}'">
New Domain&nbsp;<i class="fa fa-plus"></i>
</button>
</div>
{% endif %}
-->
<div class="box-body">
<table id="tbl_domain_list" class="table table-bordered table-striped">
<thead>
<tr>
<th>Name</th>
<th>DNSSEC</th>
<th>Type</th>
<th>Serial</th>
<th>Master</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for domain in domains %}
<tr>
<td>
<a href="{{ url_for('domain', domain_name=domain.name) }}"><strong>{{ domain.name }}</strong></a>
</td>
<td>
{% if domain.dnssec %}
<button type="button" class="btn btn-flat dnssec">
<i class="fa fa-lock"></i>&nbsp;Enabled
</button>
{% else %}
<button type="button" class="btn btn-flat dnssec">
<i class="fa fa-unlock-alt"></i>&nbsp;Disabled
</button>
{% endif %}
</td>
<td>
{{ domain.type }}
</td>
<td>
{{ domain.serial }}
</td>
<td>
{% if domain.master == '[]'%}N/A {% else %}{{ domain.master|display_master_name }}{% endif %}
</td>
{% if current_user.role.name !='Administrator' %}
<td width="6%">
<button type="button" class="btn btn-flat btn-success" onclick="window.location.href='{{ url_for('domain', domain_name=domain.name) }}'">
Manage&nbsp;<i class="fa fa-cog"></i>
</button>
</td>
{% else %}
<td width="18%">
<button type="button" class="btn btn-flat btn-success" onclick="window.location.href='{{ url_for('domain', domain_name=domain.name) }}'">
Manage&nbsp;<i class="fa fa-cog"></i>
</button>
<button type="button" class="btn btn-flat btn-danger" onclick="window.location.href='{{ url_for('domain_management', domain_name=domain.name) }}'">
Admin&nbsp;<i class="fa fa-cog"></i>
</button>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
2015-12-13 09:34:12 +00:00
{% endblock %}