mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-12 16:40:26 +00:00
Revert "Merge pull request #1371 from AgentTNT/AdminLTE-Upgrade"
This reverts commit929cb6302d
, reversing changes made to0418edddd9
.
This commit is contained in:
parent
35493fc218
commit
e2ad3e2001
@ -15,17 +15,6 @@ SQLA_DB_HOST = '127.0.0.1'
|
|||||||
SQLA_DB_NAME = 'pda'
|
SQLA_DB_NAME = 'pda'
|
||||||
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
||||||
|
|
||||||
#CAPTCHA Config
|
|
||||||
CAPTCHA_ENABLE = True
|
|
||||||
CAPTCHA_LENGTH = 6
|
|
||||||
CAPTCHA_WIDTH = 160
|
|
||||||
CAPTCHA_HEIGHT = 60
|
|
||||||
CAPTCHA_SESSION_KEY = 'captcha_image'
|
|
||||||
|
|
||||||
#Server side sessions tracking
|
|
||||||
#Set to TRUE for CAPTCHA, or enable another stateful session tracking system
|
|
||||||
FILESYSTEM_SESSIONS_ENABLED = True
|
|
||||||
|
|
||||||
### DATABASE - MySQL
|
### DATABASE - MySQL
|
||||||
#SQLALCHEMY_DATABASE_URI = 'mysql://{}:{}@{}/{}'.format(
|
#SQLALCHEMY_DATABASE_URI = 'mysql://{}:{}@{}/{}'.format(
|
||||||
# urllib.parse.quote_plus(SQLA_DB_USER),
|
# urllib.parse.quote_plus(SQLA_DB_USER),
|
||||||
|
14
package.json
14
package.json
@ -1,17 +1,15 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "6.3.0",
|
"admin-lte": "2.4.9",
|
||||||
"admin-lte": "3.2.0",
|
"bootstrap": "^3.4.1",
|
||||||
"bootstrap": "4.6.2",
|
"bootstrap-datepicker": "^1.8.0",
|
||||||
"bootstrap-datepicker": "^1.9.0",
|
|
||||||
"bootstrap-validator": "^0.11.9",
|
"bootstrap-validator": "^0.11.9",
|
||||||
"datatables.net-plugins": "^1.13.1",
|
"datatables.net-plugins": "^1.10.19",
|
||||||
"icheck": "^1.0.2",
|
"icheck": "^1.0.2",
|
||||||
"jquery-slimscroll": "^1.3.8",
|
"jquery-slimscroll": "^1.3.8",
|
||||||
"jquery-sparkline": "^2.4.0",
|
"jquery-ui-dist": "^1.12.1",
|
||||||
"jquery-ui-dist": "^1.13.2",
|
|
||||||
"jquery.quicksearch": "^2.4.0",
|
"jquery.quicksearch": "^2.4.0",
|
||||||
"jtimeout": "^3.2.0",
|
"jtimeout": "^3.1.0",
|
||||||
"multiselect": "^0.9.12"
|
"multiselect": "^0.9.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,42 +11,44 @@ class ConcatFilter(Filter):
|
|||||||
def concat(self, out, hunks, **kw):
|
def concat(self, out, hunks, **kw):
|
||||||
out.write(';'.join([h.data() for h, info in hunks]))
|
out.write(';'.join([h.data() for h, info in hunks]))
|
||||||
|
|
||||||
css_login = Bundle(
|
|
||||||
'node_modules/@fortawesome/fontawesome-free/css/all.min.css',
|
css_login = Bundle('node_modules/bootstrap/dist/css/bootstrap.css',
|
||||||
|
'node_modules/font-awesome/css/font-awesome.css',
|
||||||
|
'node_modules/ionicons/dist/css/ionicons.css',
|
||||||
'node_modules/icheck/skins/square/blue.css',
|
'node_modules/icheck/skins/square/blue.css',
|
||||||
'node_modules/admin-lte/dist/css/adminlte.css',
|
'node_modules/admin-lte/dist/css/AdminLTE.css',
|
||||||
filters=('cssmin', 'cssrewrite'),
|
filters=('cssmin', 'cssrewrite'),
|
||||||
output='generated/login.css')
|
output='generated/login.css')
|
||||||
|
|
||||||
js_login = Bundle(
|
js_login = Bundle('node_modules/jquery/dist/jquery.js',
|
||||||
'node_modules/jquery/dist/jquery.js',
|
|
||||||
'node_modules/bootstrap/dist/js/bootstrap.js',
|
'node_modules/bootstrap/dist/js/bootstrap.js',
|
||||||
'node_modules/icheck/icheck.js',
|
'node_modules/icheck/icheck.js',
|
||||||
'custom/js/custom.js',
|
'custom/js/custom.js',
|
||||||
filters=(ConcatFilter, 'rjsmin'),
|
filters=(ConcatFilter, 'rjsmin'),
|
||||||
output='generated/login.js')
|
output='generated/login.js')
|
||||||
|
|
||||||
js_validation = Bundle(
|
js_validation = Bundle('node_modules/bootstrap-validator/dist/validator.js',
|
||||||
'node_modules/bootstrap-validator/dist/validator.js',
|
|
||||||
output='generated/validation.js')
|
output='generated/validation.js')
|
||||||
|
|
||||||
css_main = Bundle(
|
css_main = Bundle(
|
||||||
'node_modules/@fortawesome/fontawesome-free/css/all.min.css',
|
'node_modules/bootstrap/dist/css/bootstrap.css',
|
||||||
'node_modules/datatables.net-bs4/css/dataTables.bootstrap4.min.css',
|
'node_modules/font-awesome/css/font-awesome.css',
|
||||||
|
'node_modules/ionicons/dist/css/ionicons.css',
|
||||||
|
'node_modules/datatables.net-bs/css/dataTables.bootstrap.css',
|
||||||
'node_modules/icheck/skins/square/blue.css',
|
'node_modules/icheck/skins/square/blue.css',
|
||||||
'node_modules/multiselect/css/multi-select.css',
|
'node_modules/multiselect/css/multi-select.css',
|
||||||
'node_modules/admin-lte/dist/css/adminlte.css',
|
'node_modules/admin-lte/dist/css/AdminLTE.css',
|
||||||
|
'node_modules/admin-lte/dist/css/skins/_all-skins.css',
|
||||||
'custom/css/custom.css',
|
'custom/css/custom.css',
|
||||||
'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css',
|
'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css',
|
||||||
filters=('cssmin', 'cssrewrite'),
|
filters=('cssmin', 'cssrewrite'),
|
||||||
output='generated/main.css')
|
output='generated/main.css')
|
||||||
|
|
||||||
js_main = Bundle(
|
js_main = Bundle('node_modules/jquery/dist/jquery.js',
|
||||||
'node_modules/jquery/dist/jquery.js',
|
|
||||||
'node_modules/jquery-ui-dist/jquery-ui.js',
|
'node_modules/jquery-ui-dist/jquery-ui.js',
|
||||||
'node_modules/bootstrap/dist/js/bootstrap.bundle.js',
|
'node_modules/bootstrap/dist/js/bootstrap.js',
|
||||||
'node_modules/datatables.net/js/jquery.dataTables.js',
|
'node_modules/datatables.net/js/jquery.dataTables.js',
|
||||||
'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js',
|
'node_modules/datatables.net-bs/js/dataTables.bootstrap.js',
|
||||||
'node_modules/jquery-sparkline/jquery.sparkline.js',
|
'node_modules/jquery-sparkline/jquery.sparkline.js',
|
||||||
'node_modules/jquery-slimscroll/jquery.slimscroll.js',
|
'node_modules/jquery-slimscroll/jquery.slimscroll.js',
|
||||||
'node_modules/icheck/icheck.js',
|
'node_modules/icheck/icheck.js',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from .base import (
|
from .base import (
|
||||||
captcha, csrf, login_manager, handle_bad_request, handle_unauthorized_access,
|
csrf, login_manager, handle_bad_request, handle_unauthorized_access,
|
||||||
handle_access_forbidden, handle_page_not_found, handle_internal_server_error
|
handle_access_forbidden, handle_page_not_found, handle_internal_server_error
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,7 +14,6 @@ from .api import api_bp, apilist_bp
|
|||||||
def init_app(app):
|
def init_app(app):
|
||||||
login_manager.init_app(app)
|
login_manager.init_app(app)
|
||||||
csrf.init_app(app)
|
csrf.init_app(app)
|
||||||
captcha.init_app(app)
|
|
||||||
|
|
||||||
app.register_blueprint(index_bp)
|
app.register_blueprint(index_bp)
|
||||||
app.register_blueprint(user_bp)
|
app.register_blueprint(user_bp)
|
||||||
|
@ -795,7 +795,7 @@ class DetailedHistory():
|
|||||||
if 'domain_type' in detail_dict and 'account_id' in detail_dict: # this is a domain creation
|
if 'domain_type' in detail_dict and 'account_id' in detail_dict: # this is a domain creation
|
||||||
self.detailed_msg = render_template_string("""
|
self.detailed_msg = render_template_string("""
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<tr><td>Domain Type:</td><td>{{ domaintype }}</td></tr>
|
<tr><td>Domain type:</td><td>{{ domaintype }}</td></tr>
|
||||||
<tr><td>Account:</td><td>{{ account }}</td></tr>
|
<tr><td>Account:</td><td>{{ account }}</td></tr>
|
||||||
</table>
|
</table>
|
||||||
""",
|
""",
|
||||||
@ -804,23 +804,22 @@ class DetailedHistory():
|
|||||||
|
|
||||||
elif 'authenticator' in detail_dict: # this is a user authentication
|
elif 'authenticator' in detail_dict: # this is a user authentication
|
||||||
self.detailed_msg = render_template_string("""
|
self.detailed_msg = render_template_string("""
|
||||||
<table class="table table-bordered table-striped"">
|
<table class="table table-bordered table-striped" style="width:565px;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="3" style="background: rgba({{ background_rgba }});">
|
||||||
|
<p style="color:white;">User {{ username }} authentication {{ auth_result }}</p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<td>Username:</td>
|
|
||||||
<td>{{ username }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Authentication Result:</td>
|
|
||||||
<td>{{ auth_result }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Authenticator Type:</td>
|
<td>Authenticator Type:</td>
|
||||||
<td>{{ authenticator }}</td>
|
<td colspan="2">{{ authenticator }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>IP Address:</td>
|
<td>IP Address</td>
|
||||||
<td>{{ ip_address }}</td>
|
<td colspan="2">{{ ip_address }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -3,12 +3,10 @@ import base64
|
|||||||
from flask import render_template, url_for, redirect, session, request, current_app
|
from flask import render_template, url_for, redirect, session, request, current_app
|
||||||
from flask_login import LoginManager
|
from flask_login import LoginManager
|
||||||
from flask_seasurf import SeaSurf
|
from flask_seasurf import SeaSurf
|
||||||
from flask_session_captcha import FlaskSessionCaptcha
|
|
||||||
|
|
||||||
from ..models.user import User
|
from ..models.user import User
|
||||||
|
|
||||||
|
|
||||||
captcha = FlaskSessionCaptcha()
|
|
||||||
csrf = SeaSurf()
|
csrf = SeaSurf()
|
||||||
login_manager = LoginManager()
|
login_manager = LoginManager()
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from yaml import Loader, load
|
|||||||
from flask import Blueprint, render_template, make_response, url_for, current_app, g, session, request, redirect, abort
|
from flask import Blueprint, render_template, make_response, url_for, current_app, g, session, request, redirect, abort
|
||||||
from flask_login import login_user, logout_user, login_required, current_user
|
from flask_login import login_user, logout_user, login_required, current_user
|
||||||
|
|
||||||
from .base import captcha, csrf, login_manager
|
from .base import csrf, login_manager
|
||||||
from ..lib import utils
|
from ..lib import utils
|
||||||
from ..decorators import dyndns_login_required
|
from ..decorators import dyndns_login_required
|
||||||
from ..models.base import db
|
from ..models.base import db
|
||||||
@ -651,12 +651,9 @@ def logout():
|
|||||||
|
|
||||||
@index_bp.route('/register', methods=['GET', 'POST'])
|
@index_bp.route('/register', methods=['GET', 'POST'])
|
||||||
def register():
|
def register():
|
||||||
CAPTCHA_ENABLE = current_app.config.get('CAPTCHA_ENABLE')
|
|
||||||
if Setting().get('signup_enabled'):
|
if Setting().get('signup_enabled'):
|
||||||
if current_user.is_authenticated:
|
|
||||||
return redirect(url_for('index.index'))
|
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
return render_template('register.html', captcha_enable=CAPTCHA_ENABLE)
|
return render_template('register.html')
|
||||||
elif request.method == 'POST':
|
elif request.method == 'POST':
|
||||||
username = request.form.get('username', '').strip()
|
username = request.form.get('username', '').strip()
|
||||||
password = request.form.get('password', '')
|
password = request.form.get('password', '')
|
||||||
@ -665,40 +662,20 @@ def register():
|
|||||||
email = request.form.get('email', '').strip()
|
email = request.form.get('email', '').strip()
|
||||||
rpassword = request.form.get('rpassword', '')
|
rpassword = request.form.get('rpassword', '')
|
||||||
|
|
||||||
is_valid_email = re.compile(r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$')
|
if not username or not password or not email:
|
||||||
|
|
||||||
error_messages = {}
|
|
||||||
if not firstname:
|
|
||||||
error_messages['firstname'] = 'First Name is required'
|
|
||||||
if not lastname:
|
|
||||||
error_messages['lastname'] = 'Last Name is required'
|
|
||||||
if not username:
|
|
||||||
error_messages['username'] = 'Username is required'
|
|
||||||
if not password:
|
|
||||||
error_messages['password'] = 'Password is required'
|
|
||||||
if not rpassword:
|
|
||||||
error_messages['rpassword'] = 'Password confirmation is required'
|
|
||||||
if not email:
|
|
||||||
error_messages['email'] = 'Email is required'
|
|
||||||
if not is_valid_email.match(email):
|
|
||||||
error_messages['email'] = 'Invalid email address'
|
|
||||||
if password != rpassword:
|
|
||||||
error_messages['password'] = 'Password confirmation does not match'
|
|
||||||
error_messages['rpassword'] = 'Password confirmation does not match'
|
|
||||||
|
|
||||||
if not captcha.validate():
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'register.html', error='Invalid CAPTCHA answer', error_messages=error_messages, captcha_enable=CAPTCHA_ENABLE)
|
'register.html', error='Please input required information')
|
||||||
|
|
||||||
if error_messages:
|
if password != rpassword:
|
||||||
return render_template('register.html', error_messages=error_messages, captcha_enable=CAPTCHA_ENABLE)
|
return render_template(
|
||||||
|
'register.html',
|
||||||
|
error="Password confirmation does not match")
|
||||||
|
|
||||||
user = User(username=username,
|
user = User(username=username,
|
||||||
plain_text_password=password,
|
plain_text_password=password,
|
||||||
firstname=firstname,
|
firstname=firstname,
|
||||||
lastname=lastname,
|
lastname=lastname,
|
||||||
email=email
|
email=email)
|
||||||
)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = user.create_local_user()
|
result = user.create_local_user()
|
||||||
@ -713,9 +690,9 @@ def register():
|
|||||||
return redirect(url_for('index.login'))
|
return redirect(url_for('index.login'))
|
||||||
else:
|
else:
|
||||||
return render_template('register.html',
|
return render_template('register.html',
|
||||||
error=result['msg'], captcha_enable=CAPTCHA_ENABLE)
|
error=result['msg'])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return render_template('register.html', error=e, captcha_enable=CAPTCHA_ENABLE)
|
return render_template('register.html', error=e)
|
||||||
else:
|
else:
|
||||||
return render_template('errors/404.html'), 404
|
return render_template('errors/404.html'), 404
|
||||||
|
|
||||||
|
@ -288,17 +288,3 @@ function copy_otp_secret_to_clipboard() {
|
|||||||
$("#copy_tooltip").css("visibility", "visible");
|
$("#copy_tooltip").css("visibility", "visible");
|
||||||
setTimeout(function(){ $("#copy_tooltip").css("visibility", "collapse"); }, 2000);
|
setTimeout(function(){ $("#copy_tooltip").css("visibility", "collapse"); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Side menu nav bar active selection
|
|
||||||
/** add active class and stay opened when selected */
|
|
||||||
var url = window.location;
|
|
||||||
|
|
||||||
// for sidebar menu entirely but not cover treeview
|
|
||||||
$('ul.nav-sidebar a').filter(function() {
|
|
||||||
return this.href == url;
|
|
||||||
}).addClass('active');
|
|
||||||
|
|
||||||
// for treeview
|
|
||||||
$('ul.nav-treeview a').filter(function() {
|
|
||||||
return this.href == url;
|
|
||||||
}).parentsUntil(".nav-sidebar > .nav-treeview").addClass('menu-open').prev('a').addClass('active');
|
|
||||||
|
@ -1,152 +1,134 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_accounts" %}
|
{% set active_page = "admin_accounts" %}
|
||||||
|
{% block title %}<title>Edit Account - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Edit Account - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
Account
|
||||||
<h1 class="m-0 text-dark">
|
<small>{% if create %}New account{% else %}{{ account.name }}{% endif %}</small>
|
||||||
{% if create %}Add Account{% else %}Edit Account{% endif %}
|
|
||||||
<small>{% if create %}Account{% else %}{{ account.name }}{% endif %}</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="{{ url_for('admin.manage_account') }}">Accounts</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
<li class="active">{% if create %}Add{% else %}Edit{% endif %} account</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('admin.manage_account') }}">Accounts</a></li>
|
|
||||||
<li class="breadcrumb-item active">{% if create %}Add Account{% else %}Edit Account: {{ account.name }}{% endif %}</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} Account</h3>
|
<h3 class="box-title">{% if create %}Add{% else %}Edit{% endif %} account</h3>
|
||||||
</div>
|
</div>
|
||||||
<form role="form" method="post" action="{% if create %}{{ url_for('admin.edit_account') }}{% else %}{{ url_for('admin.edit_account', account_name=account.name) }}{% endif %}">
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
|
<form role="form" method="post"
|
||||||
|
action="{% if create %}{{ url_for('admin.edit_account') }}{% else %}{{ url_for('admin.edit_account', account_name=account.name) }}{% endif %}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" name="create" value="{{ create }}">
|
<input type="hidden" name="create" value="{{ create }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4><i class="fa-solid fa-ban"></i> Error!</h4>
|
<h4><i class="icon fa fa-ban"></i> Error!</h4>
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block">{{ error }}</span>
|
<span class="help-block">{{ error }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="form-group has-feedback {% if invalid_accountname or duplicate_accountname %}has-error{% endif %}">
|
<div
|
||||||
|
class="form-group has-feedback {% if invalid_accountname or duplicate_accountname %}has-error{% endif %}">
|
||||||
<label class="control-label" for="accountname">Name</label>
|
<label class="control-label" for="accountname">Name</label>
|
||||||
<input type="text" class="form-control" placeholder="Account Name (required)"
|
<input type="text" class="form-control" placeholder="Account Name (required)"
|
||||||
name="accountname" {% if account %}value="{{ account.name }}" {% endif %}
|
name="accountname" {% if account %}value="{{ account.name }}" {% endif %}
|
||||||
{% if not create %}disabled{% endif %} required>
|
{% if not create %}disabled{% endif %}>
|
||||||
<span class="form-control-feedback"></span>
|
<span class="fa fa-cog form-control-feedback"></span>
|
||||||
{% if invalid_accountname %}
|
{% if invalid_accountname %}
|
||||||
<span class="help-block text-danger">Cannot be blank and must only contain alphanumeric
|
<span class="help-block">Cannot be blank and must only contain alphanumeric
|
||||||
characters{% if SETTING.get('account_name_extra_chars') %}, dots, hyphens or underscores{% endif %}.
|
characters{% if SETTING.get('account_name_extra_chars') %}, dots, hyphens or underscores{% endif %}.</span>
|
||||||
</span>
|
|
||||||
{% elif duplicate_accountname %}
|
{% elif duplicate_accountname %}
|
||||||
<span class="help-block text-danger">Account name already in use.</span>
|
<span class="help-block">Account name already in use.</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="accountdescription">Description</label>
|
<label class="control-label" for="accountdescription">Description</label>
|
||||||
<input type="text" class="form-control" placeholder="Account Description (optional)"
|
<input type="text" class="form-control" placeholder="Account Description (optional)"
|
||||||
name="accountdescription" {% if account %}value="{{ account.description }}" {% endif %}>
|
name="accountdescription" {% if account %}value="{{ account.description }}" {% endif %}>
|
||||||
<span class="orm-control-feedback"></span>
|
<span class="fa fa-industry form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="accountcontact">Contact Person</label>
|
<label class="control-label" for="accountcontact">Contact Person</label>
|
||||||
<input type="text" class="form-control" placeholder="Contact Person (optional)"
|
<input type="text" class="form-control" placeholder="Contact Person (optional)"
|
||||||
name="accountcontact" {% if account %}value="{{ account.contact }}" {% endif %}>
|
name="accountcontact" {% if account %}value="{{ account.contact }}" {% endif %}>
|
||||||
<span class="form-control-feedback"></span>
|
<span class="fa fa-user form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="accountmail">Mail Address</label>
|
<label class="control-label" for="accountmail">Mail Address</label>
|
||||||
<input type="email" class="form-control" placeholder="Mail Address (optional)"
|
<input type="email" class="form-control" placeholder="Mail Address (optional)"
|
||||||
name="accountmail" {% if account %}value="{{ account.mail }}" {% endif %}>
|
name="accountmail" {% if account %}value="{{ account.mail }}" {% endif %}>
|
||||||
<span class="form-control-feedback"></span>
|
<span class="fa fa-envelope form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Access Control</h3>
|
<h3 class="box-title">Access Control</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>Users on the right have access to manage records in all domains
|
<p>Users on the right have access to manage records in all domains
|
||||||
associated with the account.
|
associated with the account.</p>
|
||||||
</p>
|
|
||||||
<p>Click on users to move between columns.</p>
|
<p>Click on users to move between columns.</p>
|
||||||
<div class="form-group col-2">
|
<div class="form-group col-xs-2">
|
||||||
<select multiple="multiple" class="form-control" id="account_multi_user"
|
<select multiple="multiple" class="form-control" id="account_multi_user"
|
||||||
name="account_multi_user">
|
name="account_multi_user">
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
<option {% if user.id in account_user_ids|default([]) %}selected{% endif %}
|
<option {% if user.id in account_user_ids|default([]) %}selected{% endif %}
|
||||||
value="{{ user.username }}">{{ user.username }}
|
value="{{ user.username }}">{{ user.username }}</option>
|
||||||
</option>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>Domains on the right are associated with the account. Red marked domain names are already associated with other accounts.
|
<p>Domains on the right are associated with the account. Red marked domain names are already associated with other accounts.
|
||||||
Moving already associated domains to this account will overwrite the previous associated account.
|
Moving already associated domains to this account will overwrite the previous associated account.
|
||||||
</p>
|
</p>
|
||||||
<p>Hover over the red domain names to show the associated account. Click on domains to move between columns.</p>
|
<p>Hover over the red domain names to show the associated account. Click on domains to move between columns.</p>
|
||||||
<div class="form-group col-2">
|
<div class="form-group col-xs-2">
|
||||||
<select multiple="multiple" class="form-control" id="account_domains" name="account_domains">
|
<select multiple="multiple" class="form-control" id="account_domains"
|
||||||
|
name="account_domains">
|
||||||
{% for domain in domains %}
|
{% for domain in domains %}
|
||||||
{% if account != None and domain.account_id != None and account.id != domain.account_id %}
|
{% if account != None and domain.account_id != None and account.id != domain.account_id %}
|
||||||
{% with account_id=domain.account_id %}
|
{% with account_id=domain.account_id %}
|
||||||
<option style="color: red" data-toggle="tooltip" title="Associated with: {{ accounts[account_id].name }}" value="{{ domain.name }}">
|
<option style="color: red" data-toggle="tooltip" title="Associated with: {{ accounts[account_id].name }}"
|
||||||
{{ domain.name }}
|
value="{{ domain.name }}">{{ domain.name }}</option>
|
||||||
</option>
|
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<option {% if account.id == domain.account_id %}selected{% endif %} value="{{ domain.name }}">
|
<option {% if account.id == domain.account_id %}selected{% endif %}
|
||||||
{{ domain.name }}
|
value="{{ domain.name }}">{{ domain.name }}</option>
|
||||||
</option>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_account') }}'">
|
<button type="submit"
|
||||||
Cancel
|
class="btn btn-flat btn-primary">{% if create %}Create{% else %}Update{% endif %}
|
||||||
</button>
|
Account</button>
|
||||||
<button type="submit" class="btn btn-primary float-right">
|
|
||||||
{% if create %}Create{% else %}Update{% endif %} Account
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help with creating a new account</h3>
|
<h3 class="box-title">Help with creating a new account</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>
|
<p>
|
||||||
An account allows grouping of domains belonging to a particular entity, such as a customer or
|
An account allows grouping of domains belonging to a particular entity, such as a customer or
|
||||||
department.
|
department.<br />
|
||||||
<br />
|
|
||||||
A domain can be assigned to an account upon domain creation or through the domain administration
|
A domain can be assigned to an account upon domain creation or through the domain administration
|
||||||
page.
|
page.
|
||||||
</p>
|
</p>
|
||||||
@ -163,7 +145,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
|
@ -1,92 +1,80 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_keys" %}
|
{% set active_page = "admin_keys" %}
|
||||||
|
|
||||||
{% if (key is not none and key.role.name != "User") %}{% set hide_opts = True %}{%else %}{% set hide_opts = False %}{% endif %}
|
{% if (key is not none and key.role.name != "User") %}{% set hide_opts = True %}{%else %}{% set hide_opts = False %}{% endif %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>Edit Key - {{ SITE_NAME }}</title>
|
||||||
Edit Key - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
Key
|
||||||
<h1 class="m-0 text-dark">
|
<small>{% if create %}New key{% else %}{{ key.id }}{% endif %}</small>
|
||||||
API Keys
|
|
||||||
<small>{% if create %}Add API Key{% else %}Edit API Key - {{ key.id }}{% endif %}</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="{{ url_for('admin.manage_keys') }}">Key</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">{% if create %}Add{% else %}Edit{% endif %} key</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('admin.manage_keys') }}">API Keys</a></li>
|
|
||||||
<li class="breadcrumb-item active">{% if create %}Add API Key{% else %}Edit API Key - {% endif %}{{ key.id }}</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card ">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} Key</h3>
|
<h3 class="box-title">{% if create %}Add{% else %}Edit{% endif %} key</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post"
|
<form role="form" method="post"
|
||||||
action="{% if create %}{{ url_for('admin.edit_key') }}{% else %}{{ url_for('admin.edit_key', key_id=key.id) }}{% endif %}">
|
action="{% if create %}{{ url_for('admin.edit_key') }}{% else %}{{ url_for('admin.edit_key', key_id=key.id) }}{% endif %}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" name="create" value="{{ create }}">
|
<input type="hidden" name="create" value="{{ create }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="role">Role</label>
|
<label class="control-label" for="role">Role</label>
|
||||||
<select class="key_role form-control" id="key_role" name="key_role">
|
<select class="key_role form-control" id="key_role" name="key_role">
|
||||||
{% for role in roles %}
|
{% for role in roles %}
|
||||||
<option value="{{ role.name }}"
|
<option value="{{ role.name }}"
|
||||||
{% if (key is not none) and (role.id==key.role.id) %}selected{% endif %}
|
{% if (key is not none) and (role.id==key.role.id) %}selected{% endif %}
|
||||||
{% if (key is none) and (role.name=="User") %}selected{% endif %}>
|
{% if (key is none) and (role.name=="User") %}selected{% endif %}
|
||||||
{{ role.name }}
|
>{{ role.name }}</option>
|
||||||
</option>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="description">Description</label>
|
<label class="control-label" for="description">Description</label>
|
||||||
<input type="text" class="form-control" placeholder="Description" name="description"
|
<input type="text" class="form-control" placeholder="Description" name="description"
|
||||||
{% if key is not none %} value="{{ key.description }}" {% endif %}>
|
{% if key is not none %} value="{{ key.description }}" {% endif %}> <span
|
||||||
<span class="glyphicon glyphicon-pencil form-control-feedback"></span>
|
class="glyphicon glyphicon-pencil form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-header key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
<div class="box-header with-border key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
||||||
<h3 class="card-title">Accounts Access Control</h3>
|
<h3 class="box-title">Accounts Access Control</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
<div class="box-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
||||||
<p>This key will be linked to the accounts on the right,</p>
|
<p>This key will be linked to the accounts on the right,</p>
|
||||||
<p>thus granting access to domains owned by the selected accounts.</p>
|
<p>thus granting access to domains owned by the selected accounts.</p>
|
||||||
<p>Click on accounts to move between the columns.</p>
|
<p>Click on accounts to move between the columns.</p>
|
||||||
<div class="form-group col-2">
|
<div class="form-group col-xs-2">
|
||||||
<select multiple="multiple" class="form-control" id="key_multi_account" name="key_multi_account">
|
<select multiple="multiple" class="form-control" id="key_multi_account"
|
||||||
|
name="key_multi_account">
|
||||||
{% for account in accounts %}
|
{% for account in accounts %}
|
||||||
<option {% if key and account in key.accounts %}selected{% endif %} value="{{ account.name }}">{{ account.name }}</option>
|
<option {% if key and account in key.accounts %}selected{% endif %} value="{{ account.name }}">{{ account.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-header key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
<div class="box-header with-border key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
||||||
<h3 class="card-title">Domain Access Control</h3>
|
<h3 class="box-title">Domain Access Control</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
<div class="box-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
|
||||||
<p>This key will have acess to the domains on the right.</p>
|
<p>This key will have acess to the domains on the right.</p>
|
||||||
<p>Click on domains to move between the columns.</p>
|
<p>Click on domains to move between the columns.</p>
|
||||||
<div class="form-group col-2">
|
<div class="form-group col-xs-2">
|
||||||
<select multiple="multiple" class="form-control" id="key_multi_domain"
|
<select multiple="multiple" class="form-control" id="key_multi_domain"
|
||||||
name="key_multi_domain">
|
name="key_multi_domain">
|
||||||
{% for domain in domains %}
|
{% for domain in domains %}
|
||||||
@ -95,24 +83,21 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_keys') }}'">
|
<button type="submit"
|
||||||
<i class="fa-solid fa-window-close"></i> Cancel
|
class="btn btn-flat btn-primary" id="key_submit">{% if create %}Create{% else %}Update{% endif %}
|
||||||
</button>
|
Key</button>
|
||||||
<button type="submit" class="btn btn-primary float-right" id="key_submit">
|
|
||||||
<i class="fa-solid fa-save"></i> {% if create %}Create{% else %}Update{% endif %} Key
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help with {% if create %}creating a new{% else%}updating a{% endif %} key
|
<h3 class="box-title">Help with {% if create %}creating a new{% else%}updating a{% endif %} key
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>Fill in all the fields in the form to the left.</p>
|
<p>Fill in all the fields in the form to the left.</p>
|
||||||
<p><strong>Role</strong> The role of the key.</p>
|
<p><strong>Role</strong> The role of the key.</p>
|
||||||
<p><strong>Description</strong> The key description.</p>
|
<p><strong>Description</strong> The key description.</p>
|
||||||
@ -121,10 +106,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
$('form').submit(function (e) {
|
$('form').submit(function (e) {
|
||||||
@ -242,7 +225,7 @@
|
|||||||
{% if plain_key %}
|
{% if plain_key %}
|
||||||
$(document.body).ready(function () {
|
$(document.body).ready(function () {
|
||||||
var modal = $("#modal_show_key");
|
var modal = $("#modal_show_key");
|
||||||
var info = "Please copy this key to a secure location. You will be unable to view it again once you close this window: {{ plain_key }}";
|
var info = "{{ plain_key }}";
|
||||||
modal.find('.modal-body p').text(info);
|
modal.find('.modal-body p').text(info);
|
||||||
modal.find('#button_key_confirm').click(redirect_modal);
|
modal.find('#button_key_confirm').click(redirect_modal);
|
||||||
modal.find('#button_close_modal').click(redirect_modal);
|
modal.find('#button_close_modal').click(redirect_modal);
|
||||||
@ -259,45 +242,44 @@
|
|||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade" id="modal_show_key">
|
<div class="modal fade" id="modal_show_key">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content modal-sm">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title">New API Key</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_modal">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_modal">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Your API key</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" id="button_key_confirm">
|
<button type="button" class="btn btn-flat btn-primary center-block" id="button_key_confirm">
|
||||||
Confirm
|
Confirm</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="modal_warning">
|
<div class="modal fade" id="modal_warning">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content modal-sm">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title">WARNING</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">WARNING</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary close" data-dismiss="modal" id="button_close_modal">
|
<button type="button" class="btn btn-flat btn-primary center-block" id="button_key_confirm_warn">
|
||||||
Close
|
OK</button>
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-primary" id="button_key_confirm_warn">
|
|
||||||
OK
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,53 +1,41 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_users" %}
|
{% set active_page = "admin_users" %}
|
||||||
|
{% block title %}<title>Edit User - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
{% if create %}Add user{% else %}Edit user "{{ user.username }}"{% endif %} - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
User
|
||||||
<h1 class="m-0 text-dark">
|
<small>{% if create %}New user{% else %}{{ user.username }}{% endif %}</small>
|
||||||
Users
|
|
||||||
<small>{% if create %}New user{% else %}Edit user {{ user.username }}{% endif %}</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="{{ url_for('admin.manage_user') }}">User</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">{% if create %}Add{% else %}Edit{% endif %} user</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('admin.manage_user') }}">Users</a></li>
|
|
||||||
<li class="breadcrumb-item active">{% if create %}Add user{% else %}Edit user "{{ user.username }}"{% endif %}</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card card-secondary">
|
<div class="box box-primary">
|
||||||
<div class="card-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} user</h3>
|
<h3 class="box-title">{% if create %}Add{% else %}Edit{% endif %} user</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post"
|
<form role="form" method="post"
|
||||||
action="{% if create %}{{ url_for('admin.edit_user') }}{% else %}{{ url_for('admin.edit_user', user_username=user.username) }}{% endif %}">
|
action="{% if create %}{{ url_for('admin.edit_user') }}{% else %}{{ url_for('admin.edit_user', user_username=user.username) }}{% endif %}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" name="create" value="{{ create }}">
|
<input type="hidden" name="create" value="{{ create }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4><i class="fa-solid fa-ban"></i> Error!</h4>
|
<h4><i class="icon fa fa-ban"></i> Error!</h4>
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block">{{ error }}</span>
|
<span class="help-block">{{ error }}</span>
|
||||||
@ -55,94 +43,85 @@
|
|||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="firstname">First Name</label>
|
<label class="control-label" for="firstname">First Name</label>
|
||||||
<input type="text" class="form-control" placeholder="First Name" name="firstname"
|
<input type="text" class="form-control" placeholder="First Name" name="firstname"
|
||||||
{% if user %}value="{{ user.firstname }}" {% endif %}>
|
{% if user %}value="{{ user.firstname }}" {% endif %}> <span
|
||||||
<span class="form-control-feedback"></span>
|
class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="lastname">Last Name</label>
|
<label class="control-label" for="lastname">Last Name</label>
|
||||||
<input type="text" class="form-control" placeholder="Last name" name="lastname"
|
<input type="text" class="form-control" placeholder="Last name" name="lastname"
|
||||||
{% if user %}value="{{ user.lastname }}" {% endif %}>
|
{% if user %}value="{{ user.lastname }}" {% endif %}> <span
|
||||||
<span class="form-control-feedback"></span>
|
class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="email">E-mail address</label>
|
<label class="control-label" for="email">E-mail address</label>
|
||||||
<input type="email" class="form-control" placeholder="Email" name="email" id="email"
|
<input type="email" class="form-control" placeholder="Email" name="email" id="email"
|
||||||
{% if user %}value="{{ user.email }}" {% endif %}>
|
{% if user %}value="{{ user.email }}" {% endif %}> <span
|
||||||
<span class="form-control-feedback"></span>
|
class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<p class="login-box-msg">Enter the account details below</p>
|
<p class="login-box-msg">Enter the account details below</p>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="username">Username</label>
|
<label class="control-label" for="username">Username</label>
|
||||||
<input type="text" class="form-control" placeholder="Username" name="username"
|
<input type="text" class="form-control" placeholder="Username" name="username"
|
||||||
{% if user %}value="{{ user.username }}" {% endif %}
|
{% if user %}value="{{ user.username }}" {% endif %}
|
||||||
{% if not create %}disabled{% endif %}>
|
{% if not create %}disabled{% endif %}> <span
|
||||||
<span class="form-control-feedback"></span>
|
class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback {% if blank_password %}has-error{% endif %}">
|
<div class="form-group has-feedback {% if blank_password %}has-error{% endif %}">
|
||||||
<label class="control-label" for="username">Password</label>
|
<label class="control-label" for="username">Password</label>
|
||||||
<input type="password" class="form-control"
|
<input type="password" class="form-control"
|
||||||
placeholder="Password {% if create %}(Required){% else %}(Leave blank to keep unchanged){% endif %}"
|
placeholder="Password {% if create %}(Required){% else %}(Leave blank to keep unchanged){% endif %}"
|
||||||
name="password">
|
name="password"> <span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||||
<span class="form-control-feedback"></span>
|
|
||||||
{% if blank_password %}
|
{% if blank_password %}
|
||||||
<span class="help-block">The password cannot be blank.</span>
|
<span class="help-block">The password cannot be blank.</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit"
|
||||||
{% if create %}Create{% else %}Update{% endif %} User
|
class="btn btn-flat btn-primary">{% if create %}Create{% else %}Update{% endif %}
|
||||||
</button>
|
User</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% if not create %}
|
{% if not create %}
|
||||||
{% if user.otp_secret %}
|
<div class="box box-secondary">
|
||||||
<div class="card">
|
<div class="box-header with-border">
|
||||||
<div class="card-header">
|
<h3 class="box-title">Two Factor Authentication</h3>
|
||||||
<h3 class="card-title">Two Factor Authentication</h3>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>If two factor authentication is configured for this user and is causing problems due to a lost device or
|
<p>If two factor authentication was configured and is causing problems due to a lost device or
|
||||||
technical issue, it can be disabled here.
|
technical issue, it can be disabled here.</p>
|
||||||
</p>
|
|
||||||
<p>The user will need to reconfigure two factor authentication, to re-enable it.</p>
|
<p>The user will need to reconfigure two factor authentication, to re-enable it.</p>
|
||||||
<p><strong>Beware: This could compromise security!</strong></p>
|
<p><strong>Beware: This could compromise security!</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="button" class="btn btn-warning button_otp_disable" id="{{ user.username }}">
|
<button type="button" class="btn btn-flat btn-warning button_otp_disable" id="{{ user.username }}"
|
||||||
Disable Two Factor Authentication
|
{% if not user.otp_secret %}disabled{% endif %}>Disable Two Factor Authentication</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">
|
<h3 class="box-title">Help with {% if create %}creating a new{% else%}updating a{% endif %} user
|
||||||
Help with {% if create %}creating a new{% else%}editing a{% endif %} user
|
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>Fill in all the fields to the in the form to the left.</p>
|
<p>Fill in all the fields to the in the form to the left.</p>
|
||||||
{% if create %}
|
{% if create %}
|
||||||
<p><strong>Newly created users do not have access to any domains.</strong> You will need to grant
|
<p><strong>Newly created users do not have access to any domains.</strong> You will need to grant
|
||||||
access to the user once it is created via the domain management buttons on the dashboard.
|
access to the user once it is created via the domain management buttons on the dashboard.</p>
|
||||||
</p>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><strong>Username</strong> cannot be changed.</p>
|
|
||||||
<p><strong>Password</strong> can be left empty to keep the current password.</p>
|
<p><strong>Password</strong> can be left empty to keep the current password.</p>
|
||||||
|
<p><strong>Username</strong> cannot be changed.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// handle disabling two factor authentication
|
// handle disabling two factor authentication
|
||||||
@ -168,21 +147,18 @@
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
Close
|
<button type="button" class="btn btn-flat btn-danger" id="button_otp_disable_confirm">Disable Two Factor
|
||||||
</button>
|
Authentication</button>
|
||||||
<button type="button" class="btn btn-danger float-right" id="button_otp_disable_confirm">
|
|
||||||
Disable Two Factor Authentication
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,44 +1,24 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_global_search" %}
|
{% set active_page = "admin_global_search" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>Global Search - {{ SITE_NAME }}</title>
|
||||||
Global Search - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<!-- Content Header (Page header) -->
|
||||||
{% endblock %}
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
{% block dashboard_stat %}
|
Global Search <small>Search for domains, records and comments directly from PDNS API</small>
|
||||||
<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>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Global Search</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">Global Search</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
{% endblock %} {% block content %}
|
||||||
</div>
|
<section class="content">
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="content">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box-body">
|
||||||
<div class="card-header">
|
<!-- search form -->
|
||||||
<h3 class="card-title">Global Search</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<form action="" method="get">
|
<form action="" method="get">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" name="q" class="form-control" placeholder="Your keyword...">
|
<input type="text" name="q" class="form-control" placeholder="Your keyword...">
|
||||||
@ -50,21 +30,19 @@
|
|||||||
<div>
|
<div>
|
||||||
<p><b>Hints:</b> The * character can be used in your keyword as a wildcard character and the ? character can be used as
|
<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
|
a wildcard for a
|
||||||
single character.
|
single character.</p>
|
||||||
</p>
|
</div>
|
||||||
|
<!-- /.search form -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Domains ({{ domains|length }})</h3>
|
<h3 class="box-title">Domains ({{ domains|length }})</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_domain" class="table table-bordered table-striped">
|
<table id="tbl_domain" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -82,17 +60,20 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Records ({{ records|length }})</h3>
|
<h3 class="box-title">Records ({{ records|length }})</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_record" class="table table-bordered table-striped">
|
<table id="tbl_record" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -118,17 +99,20 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Comments ({{ comments|length }})</h3>
|
<h3 class="box-title">Comments ({{ comments|length }})</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_comment" class="table table-bordered table-striped">
|
<table id="tbl_comment" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -150,15 +134,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// set up domain result data table
|
// set up domain result data table
|
||||||
$("#tbl_domain").DataTable({
|
$("#tbl_domain").DataTable({
|
||||||
"paging": false,
|
"paging": false,
|
||||||
@ -171,7 +156,9 @@
|
|||||||
[0, "asc"]
|
[0, "asc"]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
// set up domain result data table
|
// set up domain result data table
|
||||||
$("#tbl_record").DataTable({
|
$("#tbl_record").DataTable({
|
||||||
"paging": false,
|
"paging": false,
|
||||||
@ -184,7 +171,9 @@
|
|||||||
[0, "asc"]
|
[0, "asc"]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
// set up domain result data table
|
// set up domain result data table
|
||||||
$("#tbl_comment").DataTable({
|
$("#tbl_comment").DataTable({
|
||||||
"paging": false,
|
"paging": false,
|
||||||
@ -197,5 +186,5 @@
|
|||||||
[0, "asc"]
|
[0, "asc"]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,108 +1,81 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_history" %}
|
{% set active_page = "admin_history" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>History - {{ SITE_NAME }}</title>
|
||||||
History - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<!-- Content Header (Page header) -->
|
||||||
{% endblock %}
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
{% block dashboard_stat %}
|
History <small>Recent events</small>
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
History
|
|
||||||
<small>Recent Events</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">History</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
|
||||||
<li class="breadcrumb-item active">History</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% import 'applied_change_macro.html' as applied_change_macro %}
|
{% import 'applied_change_macro.html' as applied_change_macro %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card card-outline card-secondary">
|
<div class="box">
|
||||||
<div class="card-header with-border">
|
<div class="box-header">
|
||||||
<h3 class="card-title">History Management</h3>
|
<h3 class="box-title">History Management</h3>
|
||||||
{% if current_user.role.name != 'User' %}
|
|
||||||
<button type="button" class="btn btn-danger float-right" data-toggle="modal" data-target="#modal_clear_history" {% if current_user.role.name != 'Administrator' %}disabled{% endif %}>
|
|
||||||
<i class="fa-solid fa-trash"></i>
|
|
||||||
Clear History
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body clearfix">
|
<div class="box-body clearfix">
|
||||||
|
<button type="button" class="btn btn-flat btn-danger pull-right" data-toggle="modal"
|
||||||
|
data-target="#modal_clear_history"
|
||||||
|
{% if current_user.role.name != 'Administrator' %}disabled{% endif %}>
|
||||||
|
Clear History <i class="fa fa-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box-body clearfix">
|
||||||
<form id="history-search-form" autocomplete="off">
|
<form id="history-search-form" autocomplete="off">
|
||||||
<ul class="nav nav-tabs" id="custom-content-below-tab" role="tablist">
|
<!-- Custom Tabs -->
|
||||||
<li class="nav-item">
|
<div class="nav-tabs-custom" id="tabs">
|
||||||
<a class="nav-link active" href="#tabs-act" data-toggle="pill" role="tab">
|
<ul class="nav nav-tabs" id="nav_nav_tabs" name="nav_nav_tabs">
|
||||||
Search for All Activity
|
<li id="activity_tab" class="active"><a href="#tabs-act" data-toggle="tab">Search for All Activity</a></li>
|
||||||
</a>
|
<li id="domain_tab"><a href="#tabs-domain" data-toggle="tab">Search By Domain</a></li>
|
||||||
</li>
|
<li id="account_tab"><a href="#tabs-account" data-toggle="tab">Search By Account</a></li>
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#tabs-domain" data-toggle="pill" role="tab">
|
|
||||||
Search By Domain
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link with-border" href="#tabs-account" data-toggle="pill" role="tab">
|
|
||||||
Search By Account
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% if current_user.role.name != 'User' %}
|
{% if current_user.role.name != 'User' %}
|
||||||
<li class="nav-item">
|
<li id="user_auth_tab"><a href="#tabs-auth" data-toggle="tab">Search for User Authentication</a></li>
|
||||||
<a class="nav-link" href="#tabs-auth" data-toggle="pill" role="tab">
|
|
||||||
Search for User Authentication
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane" id="tabs-act">
|
<div class="tab-pane" id="tabs-act">
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-domain">
|
<div class="tab-pane" id="tabs-domain">
|
||||||
<td>
|
<td><label>Domain Name</label></td>
|
||||||
<label>Domain Name</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<div class="autocomplete" style="width:250px;">
|
<div class="autocomplete" style="width:250px;">
|
||||||
<input type="text" class="form-control" id="domain_name_filter" name="domain_name_filter" placeholder="Enter * to search for any domain" value="">
|
<input type="text" class="form-control" id="domain_name_filter" name="domain_name_filter" placeholder="Enter * to search for any domain" value="">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div style="position: relative; top:10px;">
|
<div style="position: relative; top:10px;">
|
||||||
<td>Record Changelog only  </td>
|
<td>Record Changelog only  </td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" id="domain_changelog_only_checkbox" name="domain_changelog_only_checkbox"
|
<input type="checkbox" id="domain_changelog_only_checkbox" name="domain_changelog_only_checkbox"
|
||||||
class="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;">
|
class="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;">
|
||||||
</td>
|
</td>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-account">
|
<div class="tab-pane" id="tabs-account">
|
||||||
<td><label>Account Name</label></td>
|
<td><label>Account Name</label></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="autocomplete" style="width:250px;">
|
<div class="autocomplete" style="width:250px;">
|
||||||
<input type="text" class="form-control" id="account_name_filter" name="account_name_filter" placeholder="Enter * to search for any account" value="">
|
<input type="text" class="form-control" id="account_name_filter" name="account_name_filter" placeholder="Enter * to search for any account" value="">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-auth">
|
<div class="tab-pane" id="tabs-auth">
|
||||||
<td><label>Username</label></td>
|
<td><label>Username</label></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="autocomplete" style="width:250px;">
|
<div class="autocomplete" style="width:250px;">
|
||||||
<input type="text" class="form-control" id="auth_name_filter" name="auth_name_filter" placeholder="Enter * to search for any username" value="">
|
<input type="text" class="form-control" id="auth_name_filter" name="auth_name_filter" placeholder="Enter * to search for any username" value="">
|
||||||
@ -136,7 +109,9 @@ class="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;
|
|||||||
</td>
|
</td>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<!-- End Custom Tabs -->
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
<table id="Filters-Table">
|
<table id="Filters-Table">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Filters</th>
|
<th>Filters</th>
|
||||||
@ -170,18 +145,29 @@ class="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;
|
|||||||
<tr><td> </td></tr>
|
<tr><td> </td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button type="submit" id="search-submit" name="search-submit" class="btn btn-primary button-filter"><i class="fa fa-search"></i> Search</button>
|
<button type="submit" id="search-submit" name="search-submit" class="btn btn-flat btn-primary button-filter">Search <i class="fa fa-search"></i></button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button id="clear-filters" name="clear-filters" class="btn btn-warning button-clearf"><i class="fa fa-trash"></i> Clear Filters</button>
|
<!-- -->
|
||||||
|
<button id="clear-filters" name="clear-filters" class="btn btn-flat btn-warning button-clearf">Clear Filters <i class="fa fa-trash"></i></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="table_from_ajax"></div>
|
<div id="table_from_ajax"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
@ -485,45 +471,49 @@ class="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<!-- Clear History Confirmation Box -->
|
<!-- Clear History Confirmation Box -->
|
||||||
<div class="modal fade modal-warning" id="modal_clear_history">
|
<div class="modal fade modal-warning" id="modal_clear_history">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>Are you sure you want to remove all history?</p>
|
<p>Are you sure you want to remove all history?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-danger float-right" onclick="applyChanges({'_csrf_token': '{{ csrf_token() }}'}, $SCRIPT_ROOT + '/admin/history', false, true);">
|
<button type="button" class="btn btn-flat btn-danger"
|
||||||
Clear History
|
onclick="applyChanges({'_csrf_token': '{{ csrf_token() }}'}, $SCRIPT_ROOT + '/admin/history', false, true);">Clear
|
||||||
</button>
|
History</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.modal-dialog -->
|
||||||
<!-- History Details Box -->
|
</div>
|
||||||
<div class="modal fade" id="modal_history_info">
|
<div class="modal fade" id="modal_history_info">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">History Details</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">History Details</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="modal-info-content"></div>
|
<div id="modal-info-content"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default float-right" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-flat btn-default pull-right" data-dismiss="modal">Close</button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal -->
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
{% import 'applied_change_macro.html' as applied_change_macro %}
|
{% import 'applied_change_macro.html' as applied_change_macro %}
|
||||||
|
|
||||||
|
|
||||||
{% if len_histories >= lim %}
|
{% if len_histories >= lim %}
|
||||||
<p style="color: rgb(224, 3, 3);">
|
<p style="color: rgb(224, 3, 3);"><b>Limit of loaded history records has been reached! Only {{lim}} history records are shown. </b></p>
|
||||||
<b>Limit of loaded history records has been reached! Only {{lim}} history records are shown.</b>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="card-body"></div>
|
<div class="box-body"></div>
|
||||||
<table id="tbl_history" class="table table-bordered table-striped">
|
<table id="tbl_history" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -22,6 +22,7 @@
|
|||||||
<td>{{ history.history.created_by }}</td>
|
<td>{{ history.history.created_by }}</td>
|
||||||
<td>{{ history.history.msg }}</td>
|
<td>{{ history.history.msg }}</td>
|
||||||
<td>{{ history.history.created_on }}</td>
|
<td>{{ history.history.created_on }}</td>
|
||||||
|
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<div id="history-info-div-{{ loop.index0 }}" style="display: none;">
|
<div id="history-info-div-{{ loop.index0 }}" style="display: none;">
|
||||||
{{ history.detailed_msg | safe }}
|
{{ history.detailed_msg | safe }}
|
||||||
@ -33,12 +34,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-primary history-info-button"
|
<button type="button" class="btn btn-flat btn-primary history-info-button"
|
||||||
{% if history.detailed_msg == "" and history.change_set is none %}
|
{% if history.detailed_msg == "" and history.change_set is none %}
|
||||||
style="visibility: hidden;"
|
style="visibility: hidden;"
|
||||||
{% endif %} value="{{ loop.index0 }}">
|
{% endif %} value="{{ loop.index0 }}">Info <i class="fa fa-info"></i>
|
||||||
<i class="fa-solid fa-info"></i>
|
|
||||||
Info
|
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -48,8 +47,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var table;
|
var table;
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
table = $('#tbl_history').DataTable({
|
table = $('#tbl_history').DataTable({
|
||||||
"order": [
|
"order": [
|
||||||
[2, "desc"]
|
[2, "desc"]
|
||||||
@ -67,6 +67,7 @@
|
|||||||
orderCellsTop: true,
|
orderCellsTop: true,
|
||||||
fixedHeader: true
|
fixedHeader: true
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document.body).on('click', '.history-info-button', function () {
|
$(document.body).on('click', '.history-info-button', function () {
|
||||||
var modal = $("#modal_history_info");
|
var modal = $("#modal_history_info");
|
||||||
var history_id = $(this).val();
|
var history_id = $(this).val();
|
||||||
@ -74,6 +75,7 @@
|
|||||||
$('#modal-info-content').html(info);
|
$('#modal-info-content').html(info);
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document.body).on("click", ".button-filter", function (e) {
|
$(document.body).on("click", ".button-filter", function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var nextRow = $("#filter-table")
|
var nextRow = $("#filter-table")
|
||||||
@ -82,5 +84,7 @@
|
|||||||
else
|
else
|
||||||
nextRow.css("visibility", "visible")
|
nextRow.css("visibility", "visible")
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
@ -1,49 +1,33 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_accounts" %}
|
{% set active_page = "admin_accounts" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>Account Management - {{ SITE_NAME }}</title>
|
||||||
Account Management - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<section class="content-header">
|
||||||
{% endblock %}
|
<h1>
|
||||||
|
Accounts <small>Manage accounts</small>
|
||||||
{% 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">
|
|
||||||
Accounts
|
|
||||||
<small>Manage</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Accounts</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
|
||||||
<li class="breadcrumb-item active">Accounts</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
{% endblock %} {% block content %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Account Management</h3>
|
<h3 class="box-title">Account Management</h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
<a href="{{ url_for('admin.edit_account') }}">
|
<a href="{{ url_for('admin.edit_account') }}">
|
||||||
<button type="button" class="btn btn-primary float-right button_add_account">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_add_account">
|
||||||
<i class="fa-solid fa-plus"></i> Add Account
|
Add Account <i class="fa fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_accounts" class="table table-bordered table-striped">
|
<table id="tbl_accounts" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -66,32 +50,27 @@
|
|||||||
<td>{{ account.user_num }}</td>
|
<td>{{ account.user_num }}</td>
|
||||||
<td>{{ account.domains|length }}</td>
|
<td>{{ account.domains|length }}</td>
|
||||||
<td width="15%">
|
<td width="15%">
|
||||||
<div class="dropdown">
|
<button type="button" class="btn btn-flat btn-success"
|
||||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
onclick="window.location.href='{{ url_for('admin.edit_account', account_name=account.name) }}'">
|
||||||
<i class="fa-solid fa-bars"></i> Actions
|
Edit <i class="fa fa-cog"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
<button type="button" class="btn btn-flat btn-danger button_delete"
|
||||||
<button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_account', account_name=account.name) }}'">
|
id="{{ account.name }}">
|
||||||
<i class="fa-solid fa-edit"></i> Edit Account
|
Delete <i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ account.name }}">
|
|
||||||
<font color="red">
|
|
||||||
<i class="fa-solid fa-trash"></i> Delete Account
|
|
||||||
</font>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
@ -135,21 +114,21 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade" id="modal_delete">
|
<div class="modal fade modal-warning" id="modal_delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default float-left" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-danger" id="button_delete_confirm">Delete</button>
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.modal-content -->
|
<!-- /.modal-content -->
|
||||||
|
@ -1,47 +1,33 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_keys" %}
|
{% set active_page = "admin_keys" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>Key Management - {{ SITE_NAME }}</title>
|
||||||
Key Management - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<section class="content-header">
|
||||||
{% endblock %}
|
<h1>
|
||||||
|
Key <small>Manage API keys</small>
|
||||||
{% 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">
|
|
||||||
API Keys
|
|
||||||
<small>Management</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Key</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">API Keys</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
{% endblock %} {% block content %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="row">
|
||||||
<div class="card">
|
<div class="col-xs-12">
|
||||||
<div class="card-header with-border">
|
<div class="box">
|
||||||
<h3 class="card-title">Key Management</h3>
|
<div class="box-header">
|
||||||
|
<h3 class="box-title">Key Management</h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
<a href="{{ url_for('admin.edit_key') }}">
|
<a href="{{ url_for('admin.edit_key') }}">
|
||||||
<button type="button" class="btn btn-primary float-right button_add_key">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_add_key">
|
||||||
<i class="fa-solid fa-plus"></i> Add Key
|
Add Key <i class="fa fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_keys" class="table table-bordered table-striped">
|
<table id="tbl_keys" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -50,7 +36,7 @@
|
|||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Domains</th>
|
<th>Domains</th>
|
||||||
<th>Accounts</th>
|
<th>Accounts</th>
|
||||||
<th>Actions</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -62,35 +48,31 @@
|
|||||||
<td>{% for domain in key.domains %}{{ domain.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td>
|
<td>{% for domain in key.domains %}{{ domain.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td>
|
||||||
<td>{% for account in key.accounts %}{{ account.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td>
|
<td>{% for account in key.accounts %}{{ account.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td>
|
||||||
<td width="15%">
|
<td width="15%">
|
||||||
<div class="dropdown">
|
<button type="button" class="btn btn-flat btn-success button_edit"
|
||||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
onclick="window.location.href='{{ url_for('admin.edit_key', key_id=key.id) }}'">
|
||||||
<i class="fa-solid fa-bars"></i> Actions
|
Edit <i class="fa fa-lock"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
<button type="button" class="btn btn-flat btn-danger button_delete"
|
||||||
<button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_key', key_id=key.id) }}'">
|
id="{{ key.id }}">
|
||||||
<i class="fa-solid fa-edit"></i> Edit API Key
|
Delete <i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ key.id }}">
|
|
||||||
<font color="red">
|
|
||||||
<i class="fa-solid fa-trash"></i> Delete API Key
|
|
||||||
</font>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// set up key data table
|
// set up key data table
|
||||||
$("#tbl_keys").DataTable({
|
$("#tbl_keys").DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
@ -122,32 +104,30 @@
|
|||||||
modal.modal('hide');
|
modal.modal('hide');
|
||||||
})
|
})
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade modal-warning" id="modal_delete">
|
<div class="modal fade modal-warning" id="modal_delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
Close
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button>
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-danger" id="button_delete_confirm">
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,49 +1,33 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_users" %}
|
{% set active_page = "admin_users" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>User Management - {{ SITE_NAME }}</title>
|
||||||
User Management - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<section class="content-header">
|
||||||
{% endblock %}
|
<h1>
|
||||||
|
User <small>Manage user privileges</small>
|
||||||
{% 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">
|
|
||||||
User
|
|
||||||
<small>Manage user privileges</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">User</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
|
||||||
<li class="breadcrumb-item active">User</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
{% endblock %} {% block content %}
|
||||||
</div>
|
<section class="content">
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="content">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">User Management</h3>
|
<h3 class="box-title">User Management</h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
<a href="{{ url_for('admin.edit_user') }}">
|
<a href="{{ url_for('admin.edit_user') }}">
|
||||||
<button type="button" class="btn btn-primary float-right button_add_user">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_add_user">
|
||||||
<i class="fa-solid fa-plus"></i> Add User
|
Add User <i class="fa fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_users" class="table table-bordered table-striped">
|
<table id="tbl_users" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -68,55 +52,45 @@
|
|||||||
{% if user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}disabled{% endif %}>
|
{% if user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}disabled{% endif %}>
|
||||||
{% for role in roles %}
|
{% for role in roles %}
|
||||||
<option value="{{ role.name }}"
|
<option value="{{ role.name }}"
|
||||||
{% if role.id==user.role.id %}selected{% endif %}>
|
{% if role.id==user.role.id %}selected{% endif %}>{{ role.name }}</option>
|
||||||
{{ role.name }}
|
|
||||||
</option>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<button type="button" class="btn btn-warning button_revoke"
|
<button type="button" class="btn btn-flat btn-warning button_revoke"
|
||||||
id="{{ user.username }}"
|
id="{{ user.username }}"
|
||||||
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
|
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
|
||||||
<i class="fa-solid fa-link-slash"></i> Revoke
|
Revoke <i class="fa fa-lock"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td width="15%">
|
<td width="15%">
|
||||||
|
<button type="button" class="btn btn-flat btn-success button_edit"
|
||||||
<div class="dropdown">
|
onclick="window.location.href='{{ url_for('admin.edit_user', user_username=user.username) }}'"
|
||||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
|
|
||||||
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
|
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
|
||||||
<i class="fa-solid fa-bars"></i> Actions
|
Edit <i class="fa fa-lock"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
<button type="button" class="btn btn-flat btn-danger button_delete"
|
||||||
<button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_user', user_username=user.username) }}'">
|
id="{{ user.username }}"
|
||||||
<i class="fa-solid fa-edit"></i> Edit User
|
{% if user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}disabled{% endif %}>
|
||||||
|
Delete <i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
{% if not user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ user.username }}">
|
|
||||||
<font color="red">
|
|
||||||
<i class="fa-solid fa-trash"></i> Delete User
|
|
||||||
</font>
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// set up user data table
|
// set up user data table
|
||||||
$("#tbl_users").DataTable({
|
$("#tbl_users").DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
@ -136,8 +110,8 @@
|
|||||||
$(document.body).on('click', '.button_revoke', function () {
|
$(document.body).on('click', '.button_revoke', function () {
|
||||||
var modal = $("#modal_revoke");
|
var modal = $("#modal_revoke");
|
||||||
var username = $(this).prop('id');
|
var username = $(this).prop('id');
|
||||||
var info = "Are you sure you want to revoke all privileges for user " + username +
|
var info = "Are you sure you want to revoke all privileges for " + username +
|
||||||
"? They will not able to access any domain.";
|
". They will not able to access any domain.";
|
||||||
modal.find('.modal-body p').text(info);
|
modal.find('.modal-body p').text(info);
|
||||||
modal.find('#button_revoke_confirm').click(function () {
|
modal.find('#button_revoke_confirm').click(function () {
|
||||||
var postdata = {
|
var postdata = {
|
||||||
@ -150,12 +124,11 @@
|
|||||||
})
|
})
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
// handle deletion of user
|
// handle deletion of user
|
||||||
$(document.body).on('click', '.button_delete', function () {
|
$(document.body).on('click', '.button_delete', function () {
|
||||||
var modal = $("#modal_delete");
|
var modal = $("#modal_delete");
|
||||||
var username = $(this).prop('id');
|
var username = $(this).prop('id');
|
||||||
var info = "Are you sure you want to delete user " + username + "?";
|
var info = "Are you sure you want to delete " + username + "?";
|
||||||
modal.find('.modal-body p').text(info);
|
modal.find('.modal-body p').text(info);
|
||||||
modal.find('#button_delete_confirm').click(function () {
|
modal.find('#button_delete_confirm').click(function () {
|
||||||
var postdata = {
|
var postdata = {
|
||||||
@ -167,6 +140,7 @@
|
|||||||
modal.modal('hide');
|
modal.modal('hide');
|
||||||
})
|
})
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// handle user role changing
|
// handle user role changing
|
||||||
@ -183,55 +157,49 @@
|
|||||||
};
|
};
|
||||||
applyChanges(postdata, $SCRIPT_ROOT + '/admin/manage-user', showResult = true);
|
applyChanges(postdata, $SCRIPT_ROOT + '/admin/manage-user', showResult = true);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade" id="modal_revoke">
|
<div class="modal fade modal-warning" id="modal_revoke">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
Close
|
<button type="button" class="btn btn-flat btn-danger" id="button_revoke_confirm">Revoke</button>
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-danger float-right" id="button_revoke_confirm">
|
|
||||||
Revoke
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
<div class="modal fade" id="modal_delete">
|
<div class="modal fade modal-warning" id="modal_delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
Close
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button>
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-danger float-right" id="button_delete_confirm">
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,92 +1,79 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_console" %}
|
{% set active_page = "admin_console" %}
|
||||||
|
{% block title %}<title>Admin Console - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Admin Console - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
PowerDNS server configuration & statistics
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
PowerDNS
|
|
||||||
<small>Server Statistics & Configuration</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Admin Console</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">PowerDNS Server Statistics & Configuration</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card shadow">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">PowerDNS Server Statistics</h3>
|
<h3 class="box-title">PDNS Statistics</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_statistics" class="table table-bordered table-striped">
|
<table id="tbl_statistics" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="30%">Statistic</th>
|
<th width="6%">Docs</th>
|
||||||
|
<th>Statistic</th>
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for statistic in statistics %}
|
{% for statistic in statistics %}
|
||||||
<tr class="odd gradeX">
|
<tr class="odd gradeX">
|
||||||
<td>
|
<td><a href="https://doc.powerdns.com/authoritative/search.html?q={{ statistic['name'] }}"
|
||||||
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ statistic['name'] }}"
|
target="_blank" class="btn btn-flat btn-xs blue"><i
|
||||||
target="_blank" class="btn btn-primary">
|
class="fa fa-search"></i></a></td>
|
||||||
<i class="fa fa-search"></i> {{ statistic['name'] }}
|
<td>{{ statistic['name'] }}</td>
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>{{ statistic['value'] }}</td>
|
<td>{{ statistic['value'] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card shadow">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">PowerDNS Server Configuration</h3>
|
<h3 class="box-title">PDNS Configuration</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_configuration" class="table table-bordered table-striped">
|
<table id="tbl_configuration" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="30%">Configuration</th>
|
<th width="6%">Docs</th>
|
||||||
|
<th>Statistic</th>
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for config in configs %}
|
{% for config in configs %}
|
||||||
<tr class="odd gradeX">
|
<tr class="odd gradeX">
|
||||||
<td>
|
<td><a href="https://doc.powerdns.com/authoritative/search.html?q={{ config['name'] }}"
|
||||||
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ config['name'] }}"
|
target="_blank" class="btn btn-flat btn-xs blue"><i
|
||||||
target="_blank" class="btn btn-primary">
|
class="fa fa-search"></i></a></td>
|
||||||
<i class="fa-solid fa-search"></i> {{ config['name'] }}
|
<td>{{ config['name'] }}</td>
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{{ config['value'] }}
|
{{ config['value'] }}
|
||||||
</td>
|
</td>
|
||||||
@ -95,19 +82,21 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// set up statistics data table
|
// set up statistics data table
|
||||||
$("#tbl_statistics").DataTable({
|
$("#tbl_statistics").DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": false,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"info": true,
|
"info": true,
|
||||||
@ -117,7 +106,7 @@
|
|||||||
// set up configuration data table
|
// set up configuration data table
|
||||||
$("#tbl_configuration").DataTable({
|
$("#tbl_configuration").DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": false,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"info": true,
|
"info": true,
|
||||||
|
@ -1,81 +1,67 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_settings" %}
|
{% set active_page = "admin_settings" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>Authentication Settings - {{ SITE_NAME }}</title>
|
||||||
Authentication Settings - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<!-- Content Header (Page header) -->
|
||||||
{% endblock %}
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
{% block dashboard_stat %}
|
Settings <small>PowerDNS-Admin settings</small>
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Settings
|
|
||||||
<small>PowerDNS-Admin Settings</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="#">Setting</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
<li class="active">Authentication</li>
|
||||||
<li class="breadcrumb-item">Settings</li>
|
|
||||||
<li class="breadcrumb-item active">Authentication</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
<script>
|
||||||
</div>
|
function ldapSelection() {
|
||||||
</div>
|
if (document.getElementById('ldap').checked) {
|
||||||
</div>
|
document.getElementById('ldap_openldap_fields').style.display = 'block';
|
||||||
{% endblock %}
|
document.getElementById('ldap_openldap_group_filters').style.display = 'block';
|
||||||
|
document.getElementById('ldap_ad_fields').style.display = 'none';
|
||||||
|
} else {
|
||||||
|
document.getElementById('ldap_openldap_fields').style.display = 'none';
|
||||||
|
document.getElementById('ldap_openldap_group_filters').style.display = 'none';
|
||||||
|
document.getElementById('ldap_ad_fields').style.display = 'block';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function() {
|
||||||
|
ldapSelection();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-lg-12">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Authentication Settings</h3>
|
<h3 class="box-title">Authentication Settings</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
{% if result %}
|
{% if result %}
|
||||||
<div class="alert {% if result['status'] %}alert-success{% else %}alert-danger{% endif%} alert-dismissible">
|
<div class="alert {% if result['status'] %}alert-success{% else %}alert-danger{% endif%} alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
{{ result['msg'] }}
|
{{ result['msg'] }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="nav-tabs-custom">
|
<!-- Custom Tabs -->
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<div class="nav-tabs-custom" id="tabs">
|
||||||
<li class="nav-item">
|
<ul class="nav nav-tabs">
|
||||||
<a class="nav-link active" href="#tabs-general" data-toggle="pill" role="tab">General</a>
|
<li class="active"><a href="#tabs-general" data-toggle="tab">General</a></li>
|
||||||
</li>
|
<li><a href="#tabs-ldap" data-toggle="tab">LDAP</a></li>
|
||||||
<li class="nav-item">
|
<li><a href="#tabs-google" data-toggle="tab">Google OAuth</a></li>
|
||||||
<a class="nav-link" href="#tabs-ldap" data-toggle="pill" role="tab">LDAP</a>
|
<li><a href="#tabs-github" data-toggle="tab">Github OAuth</a></li>
|
||||||
</li>
|
<li><a href="#tabs-azure" data-toggle="tab">Microsoft OAuth</a></li>
|
||||||
<li class="nav-item">
|
<li><a href="#tabs-oidc" data-toggle="tab">OpenID Connect OAuth</a></li>
|
||||||
<a class="nav-link" href="#tabs-google" data-toggle="pill" role="tab">Google OAuth</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#tabs-github" data-toggle="pill" role="tab">Github OAuth</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#tabs-azure" data-toggle="pill" role="tab">Microsoft OAuth</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#tabs-oidc" data-toggle="pill" role="tab">OpenID Connect OAuth</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="tabs-general">
|
<div class="tab-pane active" id="tabs-general">
|
||||||
<form role="form" method="post">
|
<form role="form" method="post">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" value="general" name="config_tab" />
|
<input type="hidden" value="general" name="config_tab" />
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Basic Settings</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="checkbox" id="local_db_enabled" name="local_db_enabled" class="checkbox" {% if SETTING.get('local_db_enabled') %}checked{% endif %}>
|
<input type="checkbox" id="local_db_enabled" name="local_db_enabled" class="checkbox" {% if SETTING.get('local_db_enabled') %}checked{% endif %}>
|
||||||
<label for="local_db_enabled">Local DB Authentication</label>
|
<label for="local_db_enabled">Local DB Authentication</label>
|
||||||
@ -84,13 +70,15 @@
|
|||||||
<input type="checkbox" id="signup_enabled" name="signup_enabled" class="checkbox" {% if SETTING.get('signup_enabled') %}checked{% endif %}>
|
<input type="checkbox" id="signup_enabled" name="signup_enabled" class="checkbox" {% if SETTING.get('signup_enabled') %}checked{% endif %}>
|
||||||
<label for="signup_enabled">Allow users to sign up</label>
|
<label for="signup_enabled">Allow users to sign up</label>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-flat btn-primary">Save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-ldap">
|
<div class="tab-pane" id="tabs-ldap">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
@ -251,7 +239,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<legend>Help</legend>
|
<legend>Help</legend>
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Enable LDAP Authentication</dt>
|
<dt>Enable LDAP Authentication</dt>
|
||||||
@ -345,9 +333,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-google">
|
<div class="tab-pane" id="tabs-google">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card">
|
|
||||||
<div class="card-body">
|
|
||||||
<form role="form" method="post" data-toggle="validator">
|
<form role="form" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" value="google" name="config_tab" />
|
<input type="hidden" value="google" name="config_tab" />
|
||||||
@ -391,29 +377,21 @@
|
|||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="card-footer">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary float-right">Save</button>
|
<button type="submit" class="btn btn-flat btn-primary">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-8">
|
||||||
</div>
|
<legend>Help</legend>
|
||||||
<div class="col-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Help</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<p>Fill in all the fields in the left form.</p>
|
<p>Fill in all the fields in the left form.</p>
|
||||||
<p>Make sure you add PDA redirection URI (e.g http://localhost:9191/google/authorized) to your Google App Credentials Restriction.</p>
|
<p>Make sure you add PDA redirection URI (e.g http://localhost:9191/google/authorized) to your Google App Credentials Restriction.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane" id="tabs-github">
|
<div class="tab-pane" id="tabs-github">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<form role="form" method="post" data-toggle="validator">
|
<form role="form" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" value="github" name="config_tab" />
|
<input type="hidden" value="github" name="config_tab" />
|
||||||
@ -462,7 +440,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<legend>Help</legend>
|
<legend>Help</legend>
|
||||||
<p>Fill in all the fields in the left form.</p>
|
<p>Fill in all the fields in the left form.</p>
|
||||||
</div>
|
</div>
|
||||||
@ -470,7 +448,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-azure">
|
<div class="tab-pane" id="tabs-azure">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<form role="form" method="post" data-toggle="validator">
|
<form role="form" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" value="azure" name="config_tab" />
|
<input type="hidden" value="azure" name="config_tab" />
|
||||||
@ -584,7 +562,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<legend>Help</legend>
|
<legend>Help</legend>
|
||||||
<p>Fill in all the fields in the left form.</p>
|
<p>Fill in all the fields in the left form.</p>
|
||||||
<p>You first need to define an Application Registration in your Azure Active Directory, with the appropriate HTTPS URL for this endpoint, and with the appropriate rights, as explained in the documentation.</p>
|
<p>You first need to define an Application Registration in your Azure Active Directory, with the appropriate HTTPS URL for this endpoint, and with the appropriate rights, as explained in the documentation.</p>
|
||||||
@ -606,7 +584,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="tabs-oidc">
|
<div class="tab-pane" id="tabs-oidc">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<form role="form" method="post" data-toggle="validator">
|
<form role="form" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" value="oidc" name="config_tab" />
|
<input type="hidden" value="oidc" name="config_tab" />
|
||||||
@ -693,7 +671,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<legend>Help</legend>
|
<legend>Help</legend>
|
||||||
<p>Fill in all the fields in the left form.</p>
|
<p>Fill in all the fields in the left form.</p>
|
||||||
</div>
|
</div>
|
||||||
@ -705,31 +683,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
{% assets "js_validation" -%}
|
{% assets "js_validation" -%}
|
||||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function ldapSelection() {
|
|
||||||
if (document.getElementById('ldap').checked) {
|
|
||||||
document.getElementById('ldap_openldap_fields').style.display = 'block';
|
|
||||||
document.getElementById('ldap_openldap_group_filters').style.display = 'block';
|
|
||||||
document.getElementById('ldap_ad_fields').style.display = 'none';
|
|
||||||
} else {
|
|
||||||
document.getElementById('ldap_openldap_fields').style.display = 'none';
|
|
||||||
document.getElementById('ldap_openldap_group_filters').style.display = 'none';
|
|
||||||
document.getElementById('ldap_ad_fields').style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
ldapSelection();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#tabs').tabs({
|
$('#tabs').tabs({
|
||||||
@ -1108,13 +1069,16 @@
|
|||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default pull-left" id="button_cancel" name="purge" value="OFF" data-dismiss="modal" >Cancel</button>
|
<button type="button" class="btn btn-flat btn-default pull-left" id="button_cancel" name="purge" value="OFF" data-dismiss="modal" >Cancel</button>
|
||||||
<button type="button" class="btn btn-success" id="button_confirm">Confirm</button>
|
<button type="button" class="btn btn-flat btn-success" id="button_confirm">Confirm</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade modal-warning" id="modal_warning" data-keyboard="false" data-backdrop="static">
|
<div class="modal fade modal-warning" id="modal_warning" data-keyboard="false" data-backdrop="static">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -1128,9 +1092,13 @@
|
|||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-success" id="button_warning_confirm">Yes I understand</button>
|
<button type="button" class="btn btn-flat btn-success" id="button_warning_confirm">Yes I understand</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,77 +1,54 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_settings" %}
|
{% set active_page = "admin_settings" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>Basic Settings - {{ SITE_NAME }}</title>
|
||||||
Basic Settings - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<!-- Content Header (Page header) -->
|
||||||
{% endblock %}
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
{% block dashboard_stat %}
|
Settings <small>PowerDNS-Admin settings</small>
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Settings
|
|
||||||
<small>Basic</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="#">Setting</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">Basic</li>
|
||||||
<li class="breadcrumb-item active">Settings - Basic</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
{% endblock %} {% block content %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="row">
|
||||||
<div class="card">
|
<div class="col-xs-12">
|
||||||
<div class="card-header with-border">
|
<div class="box">
|
||||||
<h3 class="card-title">Basic Settings</h3>
|
<div class="box-header">
|
||||||
|
<h3 class="box-title">Basic Settings</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_settings" class="table table-bordered table-striped">
|
<table id="tbl_settings" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Setting Name</th>
|
<th>Name</th>
|
||||||
<th>Current Value</th>
|
<th>Value</th>
|
||||||
<th>Action</th>
|
<th>Change</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for setting in settings %}
|
{% for setting in settings %}
|
||||||
<tr class="odd">
|
<tr class="odd ">
|
||||||
<td>
|
<td>{{ setting }}</td>
|
||||||
{{ setting }}
|
{% if SETTING.get(setting) in [True, False] %}
|
||||||
</td>
|
<td>{{ SETTING.get(setting)|display_setting_state }}</td>
|
||||||
{% if SETTING.get(setting) in [False] %}
|
<td width="6%">
|
||||||
<td><i class="fas fa-toggle-off"></i> Off</td>
|
<button type="button" class="btn btn-flat btn-warning setting-toggle-button"
|
||||||
<td width="20%">
|
id="{{ setting }}">
|
||||||
<button type="button" class="btn btn-success setting-toggle-button" id="{{ setting }}">
|
Toggle <i class="fa fa-info"></i>
|
||||||
<i class="fa-solid fa-toggle-on"></i> Turn On
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
{% elif SETTING.get(setting) in [True] %}
|
|
||||||
<td><i class="fas fa-toggle-on"></i> On</td>
|
|
||||||
<td width="20%">
|
|
||||||
<button type="button" class="btn btn-danger setting-toggle-button" id="{{ setting }}">
|
|
||||||
<i class="fa-solid fa-toggle-off"></i> Turn Off
|
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>
|
<td><input name="value" id="value" value="{{ SETTING.get(setting) }}"></td>
|
||||||
<input name="value" id="value" value="{{ SETTING.get(setting) }}">
|
<td width="6%">
|
||||||
</td>
|
<button type="button" class="btn btn-flat btn-warning setting-save-button"
|
||||||
<td width="20%">
|
id="{{ setting }}">
|
||||||
<button type="button" class="btn btn-primary setting-save-button" id="{{ setting }}">
|
Save <i class="fa fa-info"></i>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -80,14 +57,18 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// set up settings table
|
// set up history data table
|
||||||
$("#tbl_settings").DataTable({
|
$("#tbl_settings").DataTable({
|
||||||
"paging": false,
|
"paging": false,
|
||||||
"lengthChange": false,
|
"lengthChange": false,
|
||||||
@ -112,5 +93,5 @@
|
|||||||
};
|
};
|
||||||
applyChanges(postdata, $SCRIPT_ROOT + '/admin/setting/basic/' + setting + '/edit', false, true)
|
applyChanges(postdata, $SCRIPT_ROOT + '/admin/setting/basic/' + setting + '/edit', false, true)
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,46 +1,33 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_settings" %}
|
{% set active_page = "admin_settings" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>PDNS Settings - {{ SITE_NAME }}</title>
|
||||||
PDNS Settings - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<!-- Content Header (Page header) -->
|
||||||
{% endblock %}
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
{% block dashboard_stat %}
|
Settings <small>PowerDNS-Admin settings</small>
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Settings
|
|
||||||
<small>PowerDNS Authoritative Server</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="#">Setting</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">PDNS</li>
|
||||||
<li class="breadcrumb-item active">Settings - PowerDNS Authoritative Server</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card shadow card-outline card-secondary">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">PDNS Settings</h3>
|
<h3 class="box-title">PDNS Settings</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post" data-toggle="validator">
|
<form role="form" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
{% if not SETTING.get('pdns_api_url') or not SETTING.get('pdns_api_key') or not SETTING.get('pdns_version') %}
|
{% if not SETTING.get('pdns_api_url') or not SETTING.get('pdns_api_key') or not SETTING.get('pdns_version') %}
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
@ -49,62 +36,58 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="pdns_api_url">PowerDNS API URL</label>
|
<label class="control-label" for="pdns_api_url">PDNS API URL</label>
|
||||||
<input type="url" class="form-control" placeholder="PowerDNS API URL" name="pdns_api_url"
|
<input type="url" class="form-control" placeholder="PowerDNS API url" name="pdns_api_url"
|
||||||
data-error="Please input a valid PowerDNS API URL" required value="{{ pdns_api_url }}">
|
data-error="Please input a valid PowerDNS API URL" required value="{{ pdns_api_url }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="pdns_api_key">PowerDNS API Key</label>
|
<label class="control-label" for="pdns_api_key">PDNS API KEY</label>
|
||||||
<input type="password" class="form-control" placeholder="PowerDNS API Key"
|
<input type="password" class="form-control" placeholder="PowerDNS API key"
|
||||||
name="pdns_api_key" data-error="Please input a valid PowerDNS API key" required
|
name="pdns_api_key" data-error="Please input a valid PowerDNS API key" required
|
||||||
value="{{ pdns_api_key }}">
|
value="{{ pdns_api_key }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label class="control-label" for="pdns_version">PowerDNS Version</label>
|
<label class="control-label" for="pdns_version">PDNS VERSION</label>
|
||||||
<input type="text" class="form-control" placeholder="PowerDNS Version" name="pdns_version"
|
<input type="text" class="form-control" placeholder="PowerDNS version" name="pdns_version"
|
||||||
data-error="Please input PowerDNS version" required value="{{ pdns_version }}">
|
data-error="Please input PowerDNS version" required value="{{ pdns_version }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="submit" class="btn btn-primary float-right">
|
<button type="submit" class="btn btn-flat btn-primary">Update</button>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card shadow card-outline card-secondary">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help</h3>
|
<h3 class="box-title">Help</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<p>You must configure the API connection information before PowerDNS-Admin can query your
|
<p>You must configure the API connection information before PowerDNS-Admin can query your
|
||||||
PowerDNS data. Following fields are required:</p>
|
PowerDNS data. Following fields are required:</p>
|
||||||
<dt>PowerDNS API URL</dt>
|
<dt>PDNS API URL</dt>
|
||||||
<dd>Your PowerDNS API URL (eg. http://127.0.0.1:8081/).</dd>
|
<dd>Your PowerDNS API URL (eg. http://127.0.0.1:8081/).</dd>
|
||||||
<dt>PowerDNS API Key</dt>
|
<dt>PDNS API KEY</dt>
|
||||||
<dd>Your PowerDNS API key.</dd>
|
<dd>Your PowerDNS API key.</dd>
|
||||||
<dt>PowerDNS Version</dt>
|
<dt>PDNS VERSION</dt>
|
||||||
<dd>Your PowerDNS version number (eg. 4.7.0).</dd>
|
<dd>Your PowerDNS version number (eg. 4.1.1).</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Find more details at
|
<p>Find more details at <a
|
||||||
<a href="https://doc.powerdns.com/md/httpapi/README/">https://doc.powerdns.com/md/httpapi/README/</a>
|
href="https://doc.powerdns.com/md/httpapi/README/">https://doc.powerdns.com/md/httpapi/README/</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
{% assets "js_validation" -%}
|
{% assets "js_validation" -%}
|
||||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,47 +1,34 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_settings" %}
|
{% set active_page = "admin_settings" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>DNS Records Settings - {{ SITE_NAME }}</title>
|
||||||
DNS Records Settings - {{ SITE_NAME }}
|
{% endblock %} {% block dashboard_stat %}
|
||||||
</title>
|
<!-- Content Header (Page header) -->
|
||||||
{% endblock %}
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
{% block dashboard_stat %}
|
Settings <small>PowerDNS-Admin settings</small>
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Settings
|
|
||||||
<small>Records</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="#">Setting</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">Records</li>
|
||||||
<li class="breadcrumb-item active">Settings - Records </li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-5">
|
<div class="col-md-5">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">DNS record Settings</h3>
|
<h3 class="box-title">DNS record Settings</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post">
|
<form role="form" method="post">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" name="create" value="{{ create }}">
|
<input type="hidden" name="create" value="{{ create }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 10px">#</th>
|
<th style="width: 10px">#</th>
|
||||||
@ -65,37 +52,32 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="submit" class="btn btn-primary float-right">
|
<button type="submit" class="btn btn-flat btn-primary">Update</button>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-md-7">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help</h3>
|
<h3 class="box-title">Help</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>Select record types you allow user to edit in the forward zone and reverse zone. Take a look at
|
<p>Select record types you allow user to edit in the forward zone and reverse zone. Take a look at
|
||||||
<a href="https://doc.powerdns.com/authoritative/appendices/types.html">PowerDNS docs</a> for
|
<a href="https://doc.powerdns.com/authoritative/appendices/types.html">PowerDNS docs</a> for
|
||||||
full list of supported record types.
|
full list of supported record types.</p>
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
$('.checkbox').iCheck({
|
$('.checkbox').iCheck({
|
||||||
checkboxClass: 'icheckbox_square-blue',
|
checkboxClass: 'icheckbox_square-blue',
|
||||||
increaseArea: '20%'
|
increaseArea: '20%'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
||||||
{% block title %}
|
{% block title %}<title>{{ SITE_NAME }}</title>{% endblock %}
|
||||||
<title>
|
|
||||||
{{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/style.css') }}">
|
||||||
<!-- Get Google Fonts we like -->
|
<!-- Get Google Fonts we like -->
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/source_sans_pro.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/source_sans_pro.css') }}">
|
||||||
@ -21,42 +17,22 @@
|
|||||||
{% assets "css_main" -%}
|
{% assets "css_main" -%}
|
||||||
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
{% if SETTING.get('custom_css') %}
|
{% if SETTING.get('custom_css') %}
|
||||||
<link rel="stylesheet" href="/static/custom/{{ SETTING.get('custom_css') }}">
|
<link rel="stylesheet" href="/static/custom/{{ SETTING.get('custom_css') }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
<body class="hold-transition skin-blue sidebar-mini {% if not SETTING.get('fullscreen_layout') %}layout-boxed{% endif %}">
|
||||||
<body class="hold-transition sidebar-mini {% if not SETTING.get('fullscreen_layout') %}layout-boxed{% endif %}">
|
{% set user_image_url = url_for('user.image', username=current_user.username) %}
|
||||||
{% set user_image_url = url_for('user.image', username=current_user.username) %}
|
<div class="wrapper">
|
||||||
<div class="wrapper">
|
|
||||||
{% block pageheader %}
|
{% block pageheader %}
|
||||||
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
<header class="main-header">
|
||||||
<!-- Header Navbar: style can be found in header.less -->
|
|
||||||
<!-- Sidebar toggle button-->
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button">
|
|
||||||
<i class="fa-solid fa-bars"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
|
||||||
<i class="fa-solid fa-expand-arrows-alt"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
<!-- Left side column. contains the logo and sidebar -->
|
|
||||||
<aside class="main-sidebar sidebar-dark-primary">
|
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<a href="{{ url_for('index.index') }}" class="brand-link">
|
<a href="{{ url_for('index.index') }}" class="logo">
|
||||||
<img src="{{ url_for('static', filename='img/favicon.png') }}" alt="PowerDNS-Admin FavIcon" class="brand-image img-circle elevation-3" style="opacity: .8">
|
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||||
<span class="brand-text font-weight-light">
|
<span class="logo-mini"><b>PD</b>A</span>
|
||||||
|
<!-- logo for regular state and mobile devices -->
|
||||||
|
<span class="logo-lg">
|
||||||
{% if SETTING.get('site_name') %}
|
{% if SETTING.get('site_name') %}
|
||||||
<b>{{ SITE_NAME }}</b>
|
<b>{{ SITE_NAME }}</b>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -64,147 +40,128 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<!-- sidebar: style can be found in sidebar.less -->
|
<!-- Header Navbar: style can be found in header.less -->
|
||||||
<div class="sidebar">
|
<nav class="navbar navbar-static-top">
|
||||||
|
<!-- Sidebar toggle button-->
|
||||||
|
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="navbar-custom-menu">
|
||||||
{% if current_user.id is defined %}
|
{% if current_user.id is defined %}
|
||||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
<ul class="nav navbar-nav">
|
||||||
<div class="image">
|
<!-- User Account: style can be found in dropdown.less -->
|
||||||
<img src="{{ user_image_url }}" class="img-circle elevation-2" alt="User Image">
|
<li class="dropdown user user-menu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<img src="{{ user_image_url }}" class="user-image" alt="User Image"/>
|
||||||
|
<span class="hidden-xs">
|
||||||
|
{{ current_user.firstname }}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li class="user-header">
|
||||||
|
<img src="{{ user_image_url }}" class="img-circle" alt="User Image"/>
|
||||||
|
<p>
|
||||||
|
{{ current_user.firstname }} {{ current_user.lastname }}
|
||||||
|
<small>{{ current_user.role.name }}</small>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Menu Footer-->
|
||||||
|
<li class="user-footer">
|
||||||
|
<div class="pull-left">
|
||||||
|
<a href="{{ url_for('user.profile') }}" class="btn btn-flat btn-primary">My Profile</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="pull-right">
|
||||||
<a href="{{ url_for('user.profile') }}" class="d-block">{{ current_user.firstname }} {{ current_user.lastname }}</a>
|
<a href="{{ url_for('index.logout') }}" class="btn btn-flat btn-warning">Log out</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
{% endblock %}
|
||||||
|
<!-- Left side column. contains the logo and sidebar -->
|
||||||
|
<aside class="main-sidebar">
|
||||||
|
<!-- sidebar: style can be found in sidebar.less -->
|
||||||
|
<section class="sidebar">
|
||||||
|
{% if current_user.id is defined %}
|
||||||
|
<div class="user-panel">
|
||||||
|
<div class="pull-left image">
|
||||||
|
<img src="{{ user_image_url }}" class="img-circle" alt="User Image"/>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left info">
|
||||||
|
<p>{{ current_user.firstname }} {{ current_user.lastname }}</p>
|
||||||
|
<a href="#"><i class="fa fa-circle text-success"></i> Logged In</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">
|
<ul class="sidebar-menu" data-widget="tree">
|
||||||
<li class="{{ 'nav-item active' if active_page == 'user_profile' else 'nav-item' }}">
|
<li class="header">USER ACTIONS</li>
|
||||||
<a href="{{ url_for('user.profile') }}" class="nav-link">
|
<li class="{{ 'active' if active_page == 'dashboard' else '' }}">
|
||||||
<i class="nav-icon fa-solid fa-user"></i>
|
<a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> <span>Dashboard</span></a>
|
||||||
<p>Profile</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ url_for('index.logout') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-sign-out-alt"></i>
|
|
||||||
<p>Logout</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-header">Zone Management</li>
|
|
||||||
<li class="{{ 'nav-item active' if active_page == 'nav-item dashboard' else 'nav-item' }}">
|
|
||||||
<a href="{{ url_for('dashboard.dashboard') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-tachometer-alt"></i>
|
|
||||||
<p>Dashboard</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% if SETTING.get('allow_user_create_domain') or current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if SETTING.get('allow_user_create_domain') or current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<li class="{{ 'nav-item active' if active_page == 'nav-item new_domain' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'new_domain' else '' }}">
|
||||||
<a href="{{ url_for('domain.add') }}" class="nav-link">
|
<a href="{{ url_for('domain.add') }}"><i class="fa fa-plus"></i> <span>New Domain</span></a>
|
||||||
<i class="nav-icon fa-solid fa-plus"></i>
|
|
||||||
<p>New Domain</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SETTING.get('allow_user_remove_domain') or current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if SETTING.get('allow_user_remove_domain') or current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<li class="{{ 'nav-item active' if active_page == 'remove_domain' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'remove_domain' else '' }}">
|
||||||
<a href="{{ url_for('domain.remove') }}" class="nav-link">
|
<a href="{{ url_for('domain.remove') }}"><i class="fa fa-trash-o"></i> <span>Remove Domain</span></a>
|
||||||
<i class="nav-icon fa-solid fa-trash-alt"></i>
|
|
||||||
<p>Remove Domain</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<li class="nav-header">Administration</li>
|
<li class="header">ADMINISTRATION</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_console' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_console' else '' }}">
|
||||||
<a href="{{ url_for('admin.pdns_stats') }}" class="nav-link">
|
<a href="{{ url_for('admin.pdns_stats') }}"><i class="fa fa-info-circle"></i> <span>PDNS</span></a>
|
||||||
<i class="nav-icon fa-solid fa-info-circle"></i>
|
|
||||||
<p>PowerDNS Info</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_global_search' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_global_search' else '' }}">
|
||||||
<a href="{{ url_for('admin.global_search') }}" class="nav-link">
|
<a href="{{ url_for('admin.global_search') }}"><i class="fa fa-search"></i> <span>Global Search</span></a>
|
||||||
<i class="nav-icon fa-solid fa-search"></i>
|
|
||||||
<p>Global Search</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_history' else '' }}">
|
||||||
<a href="{{ url_for('admin.history') }}" class="nav-link">
|
<a href="{{ url_for('admin.history') }}"><i class="fa fa-calendar"></i> <span>History</span></a>
|
||||||
<i class="nav-icon fa-solid fa-calendar-alt"></i>
|
|
||||||
<p>History</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_domain_template' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_domain_template' else '' }}">
|
||||||
<a href="{{ url_for('admin.templates') }}" class="nav-link">
|
<a href="{{ url_for('admin.templates') }}"><i class="fa fa-clone"></i> <span>Domain Templates</span></a>
|
||||||
<i class="nav-icon fa-solid fa-clone"></i>
|
|
||||||
<p>Domain Templates</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_accounts' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_accounts' else '' }}">
|
||||||
<a href="{{ url_for('admin.manage_account') }}" class="nav-link">
|
<a href="{{ url_for('admin.manage_account') }}"><i class="fa fa-industry"></i> <span>Accounts</span></a>
|
||||||
<i class="nav-icon fa-solid fa-industry"></i>
|
|
||||||
<p>Accounts</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_users' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_users' else '' }}">
|
||||||
<a href="{{ url_for('admin.manage_user') }}" class="nav-link">
|
<a href="{{ url_for('admin.manage_user') }}"><i class="fa fa-users"></i> <span>Users</span></a>
|
||||||
<i class="nav-icon fa-solid fa-users"></i>
|
|
||||||
<p>Users</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_keys' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_keys' else '' }}">
|
||||||
<a href="{{ url_for('admin.manage_keys') }}" class="nav-link">
|
<a href="{{ url_for('admin.manage_keys') }}"><i class="fa fa-key"></i> <span>API Keys</span></a>
|
||||||
<i class="nav-icon fa-solid fa-key"></i>
|
|
||||||
<p>API Keys</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_settings' else 'nav-item' }}">
|
<li class="{{ 'treeview active' if active_page == 'admin_settings' else 'treeview' }}">
|
||||||
<a href="#" class="nav-link">
|
<a href="#">
|
||||||
<i class="nav-icon fa-solid fa-cog"></i>
|
<i class="fa fa-cog"></i> <span>Settings</span>
|
||||||
<p>
|
<span class="pull-right-container">
|
||||||
Settings
|
<i class="fa fa-angle-left pull-right"></i>
|
||||||
<i class="right fa-solid fa-angle-left"></i>
|
</span>
|
||||||
</p>
|
|
||||||
</a>
|
</a>
|
||||||
<ul class="nav nav-treeview" {% if active_page == 'admin_settings' %}style="display: block;"{% endif %}>
|
<ul class="treeview-menu" {% if active_page == 'admin_settings' %}style="display: block;"{% endif %}>
|
||||||
<li class="nav-item">
|
<li><a href="{{ url_for('admin.setting_basic') }}"><i class="fa fa-circle-o"></i></i> <span>Basic</span></a></li>
|
||||||
<a href="{{ url_for('admin.setting_basic') }}" class="nav-link">
|
<li><a href="{{ url_for('admin.setting_records') }}"><i class="fa fa-circle-o"></i> <span>Records</span></a></li>
|
||||||
<i class="nav-icon fa-solid fa-circle"></i>
|
|
||||||
<p>Basic</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ url_for('admin.setting_records') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-circle"></i>
|
|
||||||
<p>Records</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% if current_user.role.name == 'Administrator' %}
|
{% if current_user.role.name == 'Administrator' %}
|
||||||
<li class="nav-item">
|
<li><a href="{{ url_for('admin.setting_pdns') }}"><i class="fa fa-circle-o"></i> <span>PDNS</a></li>
|
||||||
<a href="{{ url_for('admin.setting_pdns') }}" class="nav-link">
|
<li><a href="{{ url_for('admin.setting_authentication') }}"><i class="fa fa-circle-o"></i> <span>Authentication</span></a></li>
|
||||||
<i class="nav-icon fa-solid fa-circle"></i>
|
|
||||||
<p>PowerDNS Connection</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ url_for('admin.setting_authentication') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-circle"></i>
|
|
||||||
<p>Authentication</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% elif SETTING.get('allow_user_view_history') %}
|
{% elif SETTING.get('allow_user_view_history') %}
|
||||||
<li class="nav-header">Administration</li>
|
<li class="header">ADMINISTRATION</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
|
<li class="{{ 'active' if active_page == 'admin_history' else '' }}">
|
||||||
<a href="{{ url_for('admin.history') }}" class="nav-link">
|
<a href="{{ url_for('admin.history') }}"><i class="fa fa-calendar"></i> <span>History</span></a>
|
||||||
<i class="nav-icon fa-solid fa-calendar-alt"></i>
|
|
||||||
<p>History</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</section>
|
||||||
<!-- /.sidebar -->
|
<!-- /.sidebar -->
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
@ -212,24 +169,16 @@
|
|||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<div class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<h1>
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Dashboard
|
Dashboard
|
||||||
<small>Control panel</small>
|
<small>Control panel</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Dashboard</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
|
||||||
<li class="breadcrumb-item active">Dashboard</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -363,43 +312,49 @@
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Error</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Error</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-right"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.modal -->
|
<!-- /.modal -->
|
||||||
<div class="modal fade modal-success" id="modal_success">
|
<div class="modal fade modal-success" id="modal_success">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Success</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Success</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-right"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal -->
|
||||||
|
<!-- /.session-warning-modal -->
|
||||||
<div class="modal fade modal-warning" data-backdrop="static" id="modal_session_warning">
|
<div class="modal fade modal-warning" data-backdrop="static" id="modal_session_warning">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -412,16 +367,17 @@
|
|||||||
<p>To coninue your ssession, select <strong>Stay Signed In</strong></p>
|
<p>To coninue your ssession, select <strong>Stay Signed In</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-success float-right button_stay_signed_in" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-danger pull-left button_stay_signed_in"
|
||||||
Stay Signed In
|
data-dismiss="modal">Stay Signed In</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-default pull-right button_sign_out"
|
||||||
<button type="button" class="btn btn-danger float-left button_sign_out" data-dismiss="modal">
|
data-dismiss="modal">Sign Out</button>
|
||||||
Sign Out
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.session-warning-modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.session-warning-modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.session-warning-modal -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,61 +1,50 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "dashboard" %}
|
{% set active_page = "dashboard" %}
|
||||||
|
{% block title %}<title>Dashboard - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Dashboard - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Dashboard
|
Dashboard
|
||||||
<small>Info</small>
|
<small>Info</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Dashboard</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% import 'applied_change_macro.html' as applied_change_macro %}
|
{% import 'applied_change_macro.html' as applied_change_macro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3">
|
<div class="col-xs-3">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Statistics</h3>
|
<h3 class="box-title">Statistics</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-lg-6">
|
||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-info">
|
<div class="small-box bg-aqua">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3>{{ domain_count }}</h3>
|
<h3>{{ domain_count }}</h3>
|
||||||
<p>{% if domain_count > 1 %}Domains{% else %}Domain{% endif %}</p>
|
<p>{% if domain_count > 1 %}Domains{% else %}Domain{% endif %}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="fa-solid fa-book"></i>
|
<i class="fa fa-book"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<div class="col-6">
|
<div class="col-lg-6">
|
||||||
<a href="{{ url_for('admin.manage_user') }}">
|
<a href="{{ url_for('admin.manage_user') }}">
|
||||||
<div class="small-box bg-green">
|
<div class="small-box bg-green">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
@ -63,7 +52,7 @@
|
|||||||
<p>{% if user_num > 1 %}Users{% else %}User{% endif %}</p>
|
<p>{% if user_num > 1 %}Users{% else %}User{% endif %}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="fa-solid fa-users"></i>
|
<i class="fa fa-users"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@ -71,7 +60,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-lg-6">
|
||||||
<a href="{{ url_for('admin.history') }}">
|
<a href="{{ url_for('admin.history') }}">
|
||||||
<div class="small-box bg-green">
|
<div class="small-box bg-green">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
@ -79,13 +68,13 @@
|
|||||||
<p>{% if history_number > 1 %}Histories{% else %}History{% endif %}</p>
|
<p>{% if history_number > 1 %}Histories{% else %}History{% endif %}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="fa-solid fa-calendar"></i>
|
<i class="fa fa-calendar"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<div class="col-6">
|
<div class="col-lg-6">
|
||||||
<a href="{{ url_for('admin.pdns_stats') }}">
|
<a href="{{ url_for('admin.pdns_stats') }}">
|
||||||
<div class="small-box bg-green">
|
<div class="small-box bg-green">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
@ -93,7 +82,7 @@
|
|||||||
<p>Uptime</p>
|
<p>Uptime</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="fa-solid fa-clock"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@ -103,12 +92,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
<div class="col-xs-9">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Recent History</h3>
|
<h3 class="box-title">Recent History</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_history" class="table table-bordered table-striped">
|
<table id="tbl_history" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -135,11 +124,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-sm btn-primary history-info-button"
|
<button type="button" class="btn btn-flat btn-primary history-info-button"
|
||||||
{% if history.detailed_msg == "" and history.change_set is none %}
|
{% if history.detailed_msg == "" and history.change_set is none %}
|
||||||
style="visibility: hidden;"
|
style="visibility: hidden;"
|
||||||
{% endif %} value="{{ loop.index0 }}">
|
{% endif %} value="{{ loop.index0 }}">Info <i class="fa fa-info"></i>
|
||||||
<i class="fa-solid fa-info-circle"></i> Info
|
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -151,39 +139,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
<!--SYBPATCH START-->
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="nav-tabs-custom">
|
<div class="nav-tabs-custom">
|
||||||
<ul class="nav nav-tabs card-header-tabs" id="custom-content-below-tab" role="tablist">
|
<ul class="nav nav-tabs">
|
||||||
<li class="nav-item">
|
<li class="active"><a href="#tab_{{custom_boxes.order[0]}}" data-toggle="tab">Hosted Domains <b>{{custom_boxes.boxes[custom_boxes.order[0]][0]}}</b></a></li>
|
||||||
<a class="nav-link active" href="#tab_{{custom_boxes.order[0]}}" data-toggle="pill" role="tab">
|
|
||||||
Hosted Domains <b>{{custom_boxes.boxes[custom_boxes.order[0]][0]}}</b>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% for boxId in custom_boxes.order[1:] %}
|
{% for boxId in custom_boxes.order[1:] %}
|
||||||
<li class="nav-item">
|
<li><a href="#tab_{{boxId}}" data-toggle="tab">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></a></li>
|
||||||
<a class="nav-link" href="#tab_{{boxId}}" data-toggle="pill" role="tab">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
{% for boxId in custom_boxes.order %}
|
{% for boxId in custom_boxes.order %}
|
||||||
<div class="tab-pane fade show" id='tab_{{boxId}}'>
|
<div class="tab-pane" id='tab_{{boxId}}'>
|
||||||
<div class="card-header">
|
<div class="row">
|
||||||
<h3 class="card-title">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></h3>
|
<div class="col-xs-12">
|
||||||
{% if show_bg_domain_button %}
|
<div class="box">
|
||||||
<button type="button" class="btn btn-primary refresh-bg-button float-right">
|
<div class="box-header">
|
||||||
<i class="fa-solid fa-sync"></i>
|
<h3 class="box-title">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></h3>{% if show_bg_domain_button %}<button type="button" class="btn btn-flat btn-primary refresh-bg-button pull-right"><i class="fa fa-refresh"></i> Sync domains </button>{% endif %}
|
||||||
Sync Domains
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id='tbl_domain_list_{{boxId}}' class="table table-bordered table-striped">
|
<table id='tbl_domain_list_{{boxId}}' class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -191,9 +165,9 @@
|
|||||||
<th>DNSSEC</th>
|
<th>DNSSEC</th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Serial</th>
|
<th>Serial</th>
|
||||||
<th>Primary</th>
|
<th>Master</th>
|
||||||
<th>Account</th>
|
<th>Account</th>
|
||||||
<th>Actions</th>
|
<th {% if current_user.role.name not in ['Administrator','Operator'] %}width="6%"{% else %}width="25%"{% endif %}>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -201,17 +175,17 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div><!-- /.tab-content -->
|
||||||
</div>
|
</div><!-- custom tabs -->
|
||||||
</div>
|
<!--SYBPATCH END-->
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
//SYBPATCH START//
|
//SYBPATCH START//
|
||||||
@ -256,7 +230,7 @@
|
|||||||
"searching" : false,
|
"searching" : false,
|
||||||
"ordering" : false,
|
"ordering" : false,
|
||||||
"info" : false,
|
"info" : false,
|
||||||
"autoWidth" : true,
|
"autoWidth" : false,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"render": function ( data, type, row ) {
|
"render": function ( data, type, row ) {
|
||||||
@ -315,104 +289,110 @@
|
|||||||
$(document.body).on("click", ".button_dnssec_enable", function() {
|
$(document.body).on("click", ".button_dnssec_enable", function() {
|
||||||
var domain = $(this).prop('id');
|
var domain = $(this).prop('id');
|
||||||
enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/enable', '{{ csrf_token() }}');
|
enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/enable', '{{ csrf_token() }}');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document.body).on("click", ".button_dnssec_disable", function() {
|
$(document.body).on("click", ".button_dnssec_disable", function() {
|
||||||
var domain = $(this).prop('id');
|
var domain = $(this).prop('id');
|
||||||
enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/disable', '{{ csrf_token() }}');
|
enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/disable', '{{ csrf_token() }}');
|
||||||
|
|
||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade" id="modal_history_info">
|
<div class="modal fade" id="modal_history_info">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">History Details</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">History Details</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="modal-info-content">
|
<div id="modal-info-content"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-right"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade modal-primary" id="modal_template">
|
<div class="modal fade modal-primary" id="modal_template">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Clone to template</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Clone to template</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" id="button_close" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left"
|
||||||
Close
|
id="button_close" data-dismiss="modal">Close</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-primary" id="button_save">Save</button>
|
||||||
<button type="button" class="btn btn-primary float-right" id="button_save">
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal -->
|
||||||
<div class="modal fade" id="modal_dnssec_info">
|
<div class="modal fade" id="modal_dnssec_info">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">DNSSEC</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">DNSSEC</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-right"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal -->
|
||||||
<div class="modal fade" id="modal_bg_reload">
|
<div class="modal fade" id="modal_bg_reload">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Sync Domains from backend</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Sync domains from nameserver</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="modal_bg_reload_content">
|
|
||||||
<i class="fa fa-refresh fa-spin"></i> Update in progress ..
|
<div class="overlay">
|
||||||
|
<div id="modal_bg_reload_content"><i class="fa fa-refresh fa-spin"></i> Update in progress ..</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-right"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
{% macro dnssec(domain) %}
|
{% macro dnssec(domain) %}
|
||||||
{% if domain.dnssec %}
|
{% if domain.dnssec %}
|
||||||
<td><span style="cursor:pointer" class="badge badge-success button_dnssec" id="{{ domain.name }}"><i class="fa-solid fa-lock"></i> Enabled</span></td>
|
<td><span style="cursor:pointer" class="label label-success button_dnssec" id="{{ domain.name }}"><i class="fa fa-lock"></i> Enabled</span></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td><span style="cursor:pointer" class="badge badge-danger button_dnssec" id="{{ domain.name }}"><i class="fa-solid fa-lock-open"></i> Disabled</span></td>
|
<td><span style="cursor:pointer" class="label label-primary button_dnssec" id="{{ domain.name }}"><i class="fa fa-unlock-alt"></i> Disabled</span></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
@ -29,51 +29,31 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro actions(domain) %}
|
{% macro actions(domain) %}
|
||||||
<td width="6%">
|
|
||||||
<div class="dropdown">
|
|
||||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
||||||
<i class="fa-solid fa-bars"></i> Actions
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<button class="dropdown-item btn-success button_template" id="{{ domain.name }}" type="button">
|
<td width="25%">
|
||||||
<i class="fa-solid fa-clone"></i> Clone to Template
|
<button type="button" class="btn btn-flat btn-success button_template" id="{{ domain.name }}">
|
||||||
|
Template <i class="fa fa-clone"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
|
<button type="button" class="btn btn-flat btn-success" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
|
||||||
<i class="fa-solid fa-cog"></i> Manage Domain
|
Manage <i class="fa fa-cog"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item btn-danger" type="button" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
|
<button type="button" class="btn btn-flat btn-danger" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
|
||||||
<i class="fa-solid fa-cog"></i> Admin Settings
|
Admin <i class="fa fa-cog"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
|
<button type="button" class="btn btn-flat btn-primary" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
|
||||||
<i class="fa-solid fa-history" aria-hidden="true"></i> Domain Changelog
|
Changelog <i class="fa fa-history" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-divider"></div>
|
</td>
|
||||||
<button type="button"class="dropdown-item btn-secondary button_delete" onclick="window.location.href='{{ url_for('domain.remove') }}'">
|
|
||||||
<font color="red">
|
|
||||||
<i class="fa-solid fa-trash"></i> Remove Domain
|
|
||||||
</font>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
|
<td width="6%">
|
||||||
<i class="fa-solid fa-cog"></i> Manage Domain
|
<button type="button" class="btn btn-flat btn-success" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
|
||||||
|
Manage <i class="fa fa-cog"></i>
|
||||||
</button>
|
</button>
|
||||||
{% if allow_user_view_history %}
|
{% if allow_user_view_history %}
|
||||||
<button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
|
<button type="button" class="btn btn-flat btn-primary" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
|
||||||
<i class="fa-solid fa-history" aria-hidden="true"></i> Domain Changelog
|
Changelog <i class="fa fa-history" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if allow_user_remove_domain %}
|
</td>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button type="button"class="dropdown-item btn-secondary button_delete" onclick="window.location.href='{{ url_for('domain.remove') }}'">
|
|
||||||
<font color="red">
|
|
||||||
<i class="fa-solid fa-trash"></i> Remove Domain
|
|
||||||
</font>
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -1,67 +1,51 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>{{ domain.name | pretty_domain_name }} - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
{{ domain.name | pretty_domain_name }} - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<h1>
|
||||||
<div class="row mb-2">
|
Manage domain: <b>{{ domain.name | pretty_domain_name }}</b>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Domain: <b>{{ domain.name | pretty_domain_name }}</b>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i
|
||||||
<ol class="breadcrumb float-sm-right">
|
class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li>Domain</li>
|
||||||
<li class="breadcrumb-item active">Domain: {{ domain.name | pretty_domain_name }}</li>
|
<li class="active">{{ domain.name | pretty_domain_name }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-body">
|
||||||
{% if domain.type != 'Slave' %}
|
{% if domain.type != 'Slave' %}
|
||||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left button_add_record" id="{{ domain.name }}">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_add_record" id="{{ domain.name }}">
|
||||||
<i class="fa-solid fa-plus"></i>
|
Add Record <i class="fa fa-plus"></i>
|
||||||
Add Record
|
|
||||||
</button>
|
</button>
|
||||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-right button_apply_changes" id="{{ domain.name }}" value="{{ domain.serial }}">
|
<button type="button" class="btn btn-flat btn-primary pull-right button_apply_changes" id="{{ domain.name }}" value="{{ domain.serial }}">
|
||||||
<i class="fa-solid fa-save"></i>
|
Apply Changes <i class="fa fa-floppy-o"></i>
|
||||||
Apply Changes
|
|
||||||
</button>
|
</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left button_update_from_primary" id="{{ domain.name }}">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_update_from_master" id="{{ domain.name }}">
|
||||||
<i class="fa-solid fa-sync"></i>
|
Update from Master <i class="fa fa-download"></i>
|
||||||
Update from Primary
|
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left btn-danger" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
|
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-flat btn-primary pull-left btn-danger" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
|
||||||
<i class="fa-solid fa-toolbox"></i>
|
Admin <i class="fa fa-cog"></i>
|
||||||
Admin
|
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary button_changelog" id="{{ domain.name }}">
|
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-flat btn-primary button_changelog" id="{{ domain.name }}">
|
||||||
<i class="fa-solid fa-history" aria-hidden="true"></i>
|
Changelog <i class="fa fa-history" aria-hidden="true"></i>
|
||||||
Changelog
|
</i>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_records" class="table table-bordered table-striped">
|
<table id="tbl_records" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -70,54 +54,64 @@
|
|||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>TTL</th>
|
<th>TTL</th>
|
||||||
<th>Data</th>
|
<th>Data</th>
|
||||||
{% if domain.type != 'Slave' %}
|
|
||||||
<th>Comment</th>
|
<th>Comment</th>
|
||||||
<th>Edit</th>
|
<th>Edit</th>
|
||||||
<th>Delete</th>
|
<th>Delete</th>
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
<th >Changelog</th>
|
<th >Changelog</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
|
||||||
<th>Invisible Sorting Column</th>
|
<th>Invisible Sorting Column</th>
|
||||||
{% endif %}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for record in records %}
|
{% for record in records %}
|
||||||
<tr class="odd row_record" id="{{ domain.name }}">
|
<tr class="odd row_record" id="{{ domain.name }}">
|
||||||
<td>{{ (record.name,domain.name) | display_record_name | pretty_domain_name }}</td>
|
<td>
|
||||||
<td>{{ record.type }}</td>
|
{{ (record.name,domain.name) | display_record_name | pretty_domain_name }}
|
||||||
<td>{{ record.status }}</td>
|
</td>
|
||||||
<td>{{ record.ttl }}</td>
|
<td>
|
||||||
<td>{{ record.data | pretty_domain_name }}</td>
|
{{ record.type }}
|
||||||
{% if domain.type != 'Secondary' %}
|
</td>
|
||||||
<td>{{ record.comment }}</td>
|
<td>
|
||||||
|
{{ record.status }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.ttl }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.data | pretty_domain_name }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.comment }}
|
||||||
|
</td>
|
||||||
|
{% if domain.type != 'Slave' %}
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
{% if record.is_allowed_edit() %}
|
{% if record.is_allowed_edit() %}
|
||||||
<button type="button" class="btn btn-warning button_edit">
|
<button type="button" class="btn btn-flat btn-warning button_edit">Edit <i class="fa fa-edit"></i></button>
|
||||||
<i class="fa-solid fa-edit"></i>
|
|
||||||
</button>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="button" class="btn btn-warning">
|
<button type="button" class="btn btn-flat btn-warning"> <i class="fa fa-exclamation-circle"></i></button>
|
||||||
<i class="fa-solid fa-exclamation-circle"></i>
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
{% if record.is_allowed_delete() %}
|
{% if record.is_allowed_delete() %}
|
||||||
<button type="button" class="btn btn-danger button_delete">
|
<button type="button" class="btn btn-flat btn-danger button_delete">Delete <i class="fa fa-trash"></i></button>
|
||||||
<i class="fa-solid fa-trash"></i>
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td width="6%">
|
||||||
|
<button type="button" class="btn btn-flat btn-warning"> <i class="fa fa-exclamation-circle"></i> </button>
|
||||||
|
</td>
|
||||||
|
<td width="6%">
|
||||||
|
<button type="button" class="btn btn-flat btn-warning"> <i class="fa fa-exclamation-circle"></i> </button>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<button type="button" onclick="show_record_changelog('{{record.name}}','{{record.type}}',event)" class="btn btn-primary">
|
<button type="button" onclick="show_record_changelog('{{record.name}}','{{record.type}}',event)" class="btn btn-flat btn-primary">
|
||||||
<i class="fa-solid fa-history" aria-hidden="true"></i>
|
<i class="fa fa-history" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
<!-- hidden column that we can sort on -->
|
<!-- hidden column that we can sort on -->
|
||||||
<td>1</td>
|
<td>1</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -125,13 +119,15 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// superglobals
|
// superglobals
|
||||||
@ -173,30 +169,22 @@
|
|||||||
// hidden column so that we can add new records on top
|
// hidden column so that we can add new records on top
|
||||||
// regardless of whatever sorting is done. See orderFixed
|
// regardless of whatever sorting is done. See orderFixed
|
||||||
visible: false,
|
visible: false,
|
||||||
{% if domain.type != 'Slave' %}
|
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
targets: [ 9 ]
|
targets: [ 9 ]
|
||||||
{% else %}
|
{% else %}
|
||||||
targets: [ 8 ]
|
targets: [ 8 ]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
|
||||||
targets: [ 5 ]
|
|
||||||
{% endif %}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: "length-break",
|
className: "length-break",
|
||||||
targets: [ 4, 5 ]
|
targets: [ 4, 5 ]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{% if domain.type != 'Slave' %}
|
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
"orderFixed": [[9, 'asc']]
|
"orderFixed": [[9, 'asc']]
|
||||||
{% else %}
|
{% else %}
|
||||||
"orderFixed": [[8, 'asc']]
|
"orderFixed": [[8, 'asc']]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
|
||||||
"orderFixed": [[5, 'asc']]
|
|
||||||
{% endif %}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -231,7 +219,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// handle edit button and record click
|
// handle edit button and record click
|
||||||
{% if domain.type != 'Slave' %}
|
|
||||||
$(document.body).on("click", ".button_edit{% if quick_edit %}, .row_record{% endif %}", function(e) {
|
$(document.body).on("click", ".button_edit{% if quick_edit %}, .row_record{% endif %}", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if ($(this).is('tr')) {
|
if ($(this).is('tr')) {
|
||||||
@ -260,7 +247,6 @@
|
|||||||
nEditing = nRow;
|
nEditing = nRow;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
// handle apply changes button
|
// handle apply changes button
|
||||||
$(document.body).on("click",".button_apply_changes", function() {
|
$(document.body).on("click",".button_apply_changes", function() {
|
||||||
@ -331,8 +317,8 @@
|
|||||||
nNew = false;
|
nNew = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//handle update_from_primary button
|
//handle update_from_master button
|
||||||
$(document.body).on("click", ".button_update_from_primary", function (e) {
|
$(document.body).on("click", ".button_update_from_master", function (e) {
|
||||||
var domain = $(this).prop('id');
|
var domain = $(this).prop('id');
|
||||||
applyChanges({'domain': domain, '_csrf_token': '{{ csrf_token() }}'}, $SCRIPT_ROOT + '/domain/' + domain + '/update', true);
|
applyChanges({'domain': domain, '_csrf_token': '{{ csrf_token() }}'}, $SCRIPT_ROOT + '/domain/' + domain + '/update', true);
|
||||||
});
|
});
|
||||||
@ -565,84 +551,74 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
document.getElementById("loading-spinner").style.display = "none";
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade" id="modal_delete">
|
<div class="modal fade modal-warning" id="modal_delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary pull-left" id="button_delete_cancel" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" id="button_delete_cancel"
|
||||||
<i class="fa-solid fa-window-close"></i> Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button>
|
||||||
<button type="button" class="btn btn-danger" id="button_delete_confirm">
|
|
||||||
<i class="fa-solid fa-trash"></i> Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
<div class="modal fade" id="modal_apply_changes">
|
<div class="modal fade modal-primary" id="modal_apply_changes">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left"
|
||||||
<i class="fa-solid fa-window-close"></i> Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-primary" id="button_apply_confirm">Apply</button>
|
||||||
<button type="button" class="btn btn-success" id="button_apply_confirm">
|
|
||||||
<i class="fa-solid fa-save"></i> Apply Changes
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
<div class="modal fade bg-primary" id="modal_custom_record">
|
<div class="modal fade modal-primary" id="modal_custom_record">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
<h4 class="modal-title">Custom Record</h4>
|
<h4 class="modal-title">Custom Record</h4>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-primary" id="button_save">Save</button>
|
||||||
<i class="fa-solid fa-window-close"></i> Close
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-success" id="button_save">
|
|
||||||
<i class="fa-solid fa-save"></i> Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,53 +1,44 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "new_domain" %}
|
{% set active_page = "new_domain" %}
|
||||||
|
{% block title %}<title>Add Domain - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Add Domain - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Domain
|
Domain
|
||||||
<small>New Domain</small>
|
<small>Create new</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="{{ url_for('dashboard.dashboard') }}">Domain</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">Add Domain</li>
|
||||||
<li class="breadcrumb-item active">Domain - New Domain</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Create new domain</h3>
|
<h3 class="box-title">Create new domain</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post" action="{{ url_for('domain.add') }}">
|
<form role="form" method="post" action="{{ url_for('domain.add') }}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" name="domain_name" id="domain_name" placeholder="Enter a valid domain name (required)">
|
<input type="text" class="form-control" name="domain_name" id="domain_name"
|
||||||
|
placeholder="Enter a valid domain name (required)">
|
||||||
</div>
|
</div>
|
||||||
{% if domain_override_toggle == True %}
|
{% if domain_override_toggle == True %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Domain Override Record</label>
|
<label>Domain Override Record</label>
|
||||||
<input type="checkbox" id="domain_override" name="domain_override" class="checkbox">
|
<input type="checkbox" id="domain_override" name="domain_override"
|
||||||
|
class="checkbox">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<select name="accountid" class="form-control" style="width:15em;">
|
<select name="accountid" class="form-control" style="width:15em;">
|
||||||
@ -55,8 +46,7 @@
|
|||||||
{% for account in accounts %}
|
{% for account in accounts %}
|
||||||
<option value="{{ account.id }}">{{ account.name }}</option>
|
<option value="{{ account.id }}">{{ account.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select><br />
|
||||||
<br />
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Type</label>
|
<label>Type</label>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
@ -64,17 +54,13 @@
|
|||||||
<input type="radio" name="radio_type" id="radio_type_native" value="native" checked>
|
<input type="radio" name="radio_type" id="radio_type_native" value="native" checked>
|
||||||
Native
|
Native
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
<div class="radio">
|
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="radio_type" id="radio_type_primary" value="primary">
|
<input type="radio" name="radio_type" id="radio_type_master" value="master"> Master
|
||||||
Primary
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
<div class="radio">
|
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="radio_type" id="radio_type_secondary" value="secondary">
|
<input type="radio" name="radio_type" id="radio_type_slave" value="slave">Slave
|
||||||
Secondary
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -87,21 +73,23 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" style="display: none;" id="domain_primary_address_div">
|
<div class="form-group" style="display: none;" id="domain_master_address_div">
|
||||||
<input type="text" class="form-control" name="domain_primary_address" id="domain_primary_address" placeholder="Enter valid Primary Server IP addresses (separated by commas)">
|
<input type="text" class="form-control" name="domain_master_address"
|
||||||
|
id="domain_master_address"
|
||||||
|
placeholder="Enter valid master ip addresses (separated by commas)">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>SOA-EDIT-API</label>
|
<label>SOA-EDIT-API</label>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="radio_type_soa_edit_api" id="radio_default" value="DEFAULT" checked>
|
<input type="radio" name="radio_type_soa_edit_api" id="radio_default"
|
||||||
DEFAULT
|
value="DEFAULT" checked> DEFAULT
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="radio_type_soa_edit_api" id="radio_increase" value="INCREASE">
|
<input type="radio" name="radio_type_soa_edit_api" id="radio_increase"
|
||||||
INCREASE
|
value="INCREASE"> INCREASE
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
@ -117,42 +105,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<!-- /.box-body -->
|
||||||
<button type="button" class="btn btn-secondary" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">
|
|
||||||
<i class="fa-solid fa-window-close"></i> Cancel
|
<div class="box-footer">
|
||||||
</button>
|
<button type="submit" class="btn btn-flat btn-primary">Submit</button>
|
||||||
<button type="submit" class="btn btn-primary float-right">
|
<button type="button" class="btn btn-flat btn-default"
|
||||||
<i class="fa-solid fa-save"></i> Create
|
onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">Cancel</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help with creating a new domain</h3>
|
<h3 class="box-title">Help with creating a new domain</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Domain name</dt>
|
<dt>Domain name</dt>
|
||||||
<dd>Enter your domain name in the format of name.tld (eg. powerdns-admin.com). You can also
|
<dd>Enter your domain name in the format of name.tld (eg. powerdns-admin.com). You can also
|
||||||
enter sub-domains to create a sub-root zone (eg. sub.powerdns-admin.com) in case you want to
|
enter sub-domains to create a sub-root zone (eg. sub.powerdns-admin.com) in case you want to
|
||||||
delegate sub-domain management to specific users.
|
delegate sub-domain management to specific users.</dd>
|
||||||
</dd>
|
|
||||||
<dt>Type</dt>
|
<dt>Type</dt>
|
||||||
<dd>The type decides how the domain will be replicated across multiple DNS servers.
|
<dd>The type decides how the domain will be replicated across multiple DNS servers.
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<b>Native - </b>{{ SITE_NAME }} will not perform any Primary or Secondary zone functions.
|
Native - PowerDNS will not perform any replication. Use this if you only have one
|
||||||
|
PowerDNS server or you handle replication via your backend.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>Primary - </b>{{ SITE_NAME }} will serve as the Primary and will send zone transfers
|
Master - This PowerDNS server will serve as the master and will send zone transfers
|
||||||
(AXFRs) to other servers configured as secondaries.
|
(AXFRs) to other servers configured as slaves.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>Secondary - </b>{{ SITE_NAME }} will serve as the Secondary and will request and receive
|
Slave - This PowerDNS server will serve as the slave and will request and receive
|
||||||
zone transfers (AXFRs) from other servers configured as Primaries.
|
zone transfers (AXFRs) from other servers configured as masters.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -161,79 +149,73 @@
|
|||||||
made to the domain.
|
made to the domain.
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<b>DEFAULT - </b>Generate a soa serial of YYYYMMDD01. If the current serial is lower than
|
DEFAULT - Generate a soa serial of YYYYMMDD01. If the current serial is lower than
|
||||||
the generated serial, use the generated serial. If the current serial is higher or
|
the generated serial, use the generated serial. If the current serial is higher or
|
||||||
equal to the generated serial, increase the current serial by 1.
|
equal to the generated serial, increase the current serial by 1.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>INCREASE - </b>Increase the current serial by 1.
|
INCREASE - Increase the current serial by 1.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>EPOCH - </b>Change the serial to the number of seconds since the EPOCH, aka unixtime.
|
EPOCH - Change the serial to the number of seconds since the EPOCH, aka unixtime.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>OFF - </b>Disable automatic updates of the SOA serial.
|
OFF - Disable automatic updates of the SOA serial.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>
|
<p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a>
|
||||||
Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
$("input[name=radio_type]").change(function () {
|
$("input[name=radio_type]").change(function () {
|
||||||
var type = $(this).val();
|
var type = $(this).val();
|
||||||
if (type == "secondary") {
|
if (type == "slave") {
|
||||||
$("#domain_primary_address_div").show();
|
$("#domain_master_address_div").show();
|
||||||
} else {
|
} else {
|
||||||
$("#domain_primary_address_div").hide();
|
$("#domain_master_address_div").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<script>
|
<script>
|
||||||
{% if domain_override_message %}
|
{% if domain_override_message %}
|
||||||
$(document.body).ready(function () {
|
$(document.body).ready(function () {
|
||||||
var modal = $("#modal_warning");
|
var modal = $("#modal_warning");
|
||||||
var info = "{{ domain_override_message }}";
|
var info = "{{ domain_override_message }}";
|
||||||
modal.find('.modal-body p').text(info);
|
modal.find('.modal-body p').text(info);
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
|
</div>
|
||||||
<div class="modal fade" id="modal_warning">
|
<div class="modal fade" id="modal_warning">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content modal-sm">
|
<div class="modal-content modal-sm">
|
||||||
<div class="modal-header alert-danger">
|
<div class="modal-header alert-danger">
|
||||||
<h4 class="modal-title">
|
|
||||||
WARNING
|
|
||||||
</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">WARNING</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary center-block" data-dismiss="modal" id="button_confirm_warn_modal">
|
<button type="button" class="btn btn-flat btn-primary center-block" data-dismiss="modal" id="button_confirm_warn_modal">
|
||||||
CLOSE
|
CLOSE</button>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,50 +1,38 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>{{ domain.name | pretty_domain_name }} - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
{{ domain.name | pretty_domain_name }} - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<h1>
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
{% if record_name and record_type %}
|
{% if record_name and record_type %}
|
||||||
Record changelog: <b>{{ record_name}}   {{ record_type }}</b>
|
Record changelog: <b>{{ record_name}}   {{ record_type }}</b>
|
||||||
{% else %}
|
{% else %}
|
||||||
Domain changelog: <b>{{ domain.name | pretty_domain_name }}</b>
|
Domain changelog: <b>{{ domain.name | pretty_domain_name }}</b>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li>Domain</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">{{ domain.name | pretty_domain_name }}</li>
|
||||||
<li class="breadcrumb-item active">Changelog: {{ domain.name | pretty_domain_name }}</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% import 'applied_change_macro.html' as applied_change_macro %}
|
{% import 'applied_change_macro.html' as applied_change_macro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<button type="button" class="btn btn-primary float-left button_show_records" id="{{ domain.name }}">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_show_records"
|
||||||
<i class="fa-solid fa-arrow-left"></i>
|
id="{{ domain.name }}">
|
||||||
Manage Domain {{ domain.name }}
|
Manage <i class="fa fa-arrow-left"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
|
|
||||||
<table id="tbl_changelog" class="table table-bordered table-striped">
|
<table id="tbl_changelog" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -54,6 +42,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for applied_change in allHistoryChanges %}
|
{% for applied_change in allHistoryChanges %}
|
||||||
|
|
||||||
<tr class="odd row_record" id="{{ domain.name }}">
|
<tr class="odd row_record" id="{{ domain.name }}">
|
||||||
<td id="changed_on" class="changed_on">
|
<td id="changed_on" class="changed_on">
|
||||||
{{ allHistoryChanges[applied_change][0].history_entry.created_on }}
|
{{ allHistoryChanges[applied_change][0].history_entry.created_on }}
|
||||||
@ -79,7 +68,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,84 +1,72 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "remove_domain" %}
|
{% set active_page = "remove_domain" %}
|
||||||
|
{% block title %}<title>Remove Domain - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Remove Domain - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Domain
|
Domain
|
||||||
<small>Remove</small>
|
<small>Remove existing</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li><a href="{{ url_for('dashboard.dashboard') }}">Domain</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
<li class="active">Remove Domain</li>
|
||||||
<li class="breadcrumb-item active">Domain - Remove Domain</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-md-4">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Remove Domain</h3>
|
<h3 class="box-title">Remove domain</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post" action="{{ url_for('domain.remove') }}">
|
<form role="form" method="post" action="{{ url_for('domain.remove') }}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<select id=domainid class="form-control" style="width:15em;">
|
<select id=domainid class="form-control" style="width:15em;">
|
||||||
<option value="0">- Select Domain -</option>
|
<option value="0">- Select Domain -</option>
|
||||||
{% for domain in domainss %}
|
{% for domain in domainss %}
|
||||||
<option value="{{ domain.id }}">{{ domain.name }}</option>
|
<option value="{{ domain.id }}">{{ domain.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select><br />
|
||||||
<br />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<!-- /.box-body -->
|
||||||
<button type="button" class="btn btn-secondary" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">
|
|
||||||
<i class="fa-solid fa-window-close"></i> Cancel
|
<div class="box-footer">
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-danger button_delete">Remove</button>
|
||||||
<button type="button" class="btn btn-danger button_delete float-right">
|
<button type="button" class="btn btn-flat btn-default"
|
||||||
<i class="fa-solid fa-trash-alt"></i> Remove
|
onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">Cancel</button>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help with removing a domain</h3>
|
<h3 class="box-title">Help with removing a new domain</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Domain Name</dt>
|
<dt>Domain name</dt>
|
||||||
<dd>Select the domain you wish to remove from the system.</dd>
|
<dd>Select domain you wish to remove from DNS.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a></p>
|
<p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// handle delete button
|
// handle delete button
|
||||||
@ -89,6 +77,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var modal = $("#modal_delete");
|
var modal = $("#modal_delete");
|
||||||
var domain = $("#domainid option:selected").text();
|
var domain = $("#domainid option:selected").text();
|
||||||
var info = "Are you sure you want to delete " + domain + "?";
|
var info = "Are you sure you want to delete " + domain + "?";
|
||||||
@ -103,6 +92,7 @@
|
|||||||
modal.modal('hide');
|
modal.modal('hide');
|
||||||
})
|
})
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
|
|
||||||
$("#button_delete_cancel").unbind().one('click', function(e) {
|
$("#button_delete_cancel").unbind().one('click', function(e) {
|
||||||
modal.modal('hide');
|
modal.modal('hide');
|
||||||
});
|
});
|
||||||
@ -115,23 +105,23 @@
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" id="button_delete_cancel" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" id="button_delete_cancel"
|
||||||
<i class="fa-solid fa-window-close"></i> Cancel
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button>
|
||||||
<button type="button" class="btn btn-danger float-right" id="button_delete_confirm">
|
|
||||||
<i class="fa-solid fa-trash-alt"></i> Remove
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,66 +1,46 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>Domain Management - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Domain Management - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
|
|
||||||
{% if status %}
|
{% if status %}
|
||||||
{% if status.get('status') == 'ok' %}
|
{% if status.get('status') == 'ok' %}
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
<strong>Success!</strong> {{ status.get('msg') }}
|
<strong>Success!</strong> {{ status.get('msg') }}
|
||||||
</div>
|
|
||||||
{% elif status.get('status') == 'error' %}
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
{% if status.get('msg') != None %}
|
|
||||||
<strong>Error!</strong>
|
|
||||||
{{ status.get('msg') }}
|
|
||||||
{% else %}
|
|
||||||
<strong>Error!</strong>
|
|
||||||
An undefined error occurred.
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Domain Settings
|
|
||||||
<small>{{ domain.name | pretty_domain_name }}</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">Domain Settings: {{ domain.name | pretty_domain_name }}</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{% elif status.get('status') == 'error' %}
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{% if status.get('msg') != None %}
|
||||||
|
<strong>Error!</strong> {{ status.get('msg') }}
|
||||||
|
{% else %}
|
||||||
|
<strong>Error!</strong> An undefined error occurred.
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
Manage domain <small>{{ domain.name | pretty_domain_name }}</small>
|
||||||
|
</h1>
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
|
<li class="active">Domain Management</li>
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<form method="post" action="{{ url_for('domain.setting', domain_name=domain.name) }}">
|
<form method="post" action="{{ url_for('domain.setting', domain_name=domain.name) }}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Domain Access Control</h3>
|
<h3 class="box-title">Domain Access Control</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-2">
|
<div class="col-xs-2">
|
||||||
<p>Users on the right have access to manage the records in
|
<p>Users on the right have access to manage the records in
|
||||||
the {{ domain.name | pretty_domain_name }} domain.</p>
|
the {{ domain.name | pretty_domain_name }} domain.</p>
|
||||||
<p>Click on users to move from between columns.</p>
|
<p>Click on users to move from between columns.</p>
|
||||||
@ -69,7 +49,7 @@
|
|||||||
and already have access to <b>ALL</b> domains.
|
and already have access to <b>ALL</b> domains.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-2">
|
<div class="form-group col-xs-2">
|
||||||
<select multiple="multiple" class="form-control" id="domain_multi_user"
|
<select multiple="multiple" class="form-control" id="domain_multi_user"
|
||||||
name="domain_multi_user[]">
|
name="domain_multi_user[]">
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
@ -80,13 +60,11 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="col-offset-2">
|
<div class="col-xs-offset-2">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-flat btn-primary"><i class="fa fa-check"></i>
|
||||||
<i class="fa-solid fa-check"></i>
|
Save</button>
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -96,13 +74,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Account</h3>
|
<h3 class="box-title">Account</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<form method="post"
|
<form method="post"
|
||||||
action="{{ url_for('domain.change_account', domain_name=domain.name) }}">
|
action="{{ url_for('domain.change_account', domain_name=domain.name) }}">
|
||||||
@ -116,7 +94,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select><br />
|
</select><br />
|
||||||
<button type="submit" class="btn btn-flat btn-primary" id="change_soa_edit_api">
|
<button type="submit" class="btn btn-flat btn-primary" id="change_soa_edit_api">
|
||||||
<i class="fa-solid fa-check"></i> Change account for {{ domain.name | pretty_domain_name }}
|
<i class="fa fa-check"></i> Change account for {{ domain.name | pretty_domain_name }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -126,12 +104,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Auto PTR creation</h3>
|
<h3 class="box-title">Auto PTR creation</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p><input type="checkbox" id="{{ domain.name }}" class="auto_ptr_toggle"
|
<p><input type="checkbox" id="{{ domain.name }}" class="auto_ptr_toggle"
|
||||||
{% for setting in domain.settings %}{% if setting.setting=='auto_ptr' and setting.value=='True' %}checked{% endif %}{% endfor %}
|
{% for setting in domain.settings %}{% if setting.setting=='auto_ptr' and setting.value=='True' %}checked{% endif %}{% endfor %}
|
||||||
{% if SETTING.get('auto_ptr') %}disabled="True" {% endif %}>
|
{% if SETTING.get('auto_ptr') %}disabled="True" {% endif %}>
|
||||||
@ -145,12 +123,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">DynDNS 2 Settings</h3>
|
<h3 class="box-title">DynDNS 2 Settings</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p><input type="checkbox" id="{{ domain.name }}" class="dyndns_on_demand_toggle"
|
<p><input type="checkbox" id="{{ domain.name }}" class="dyndns_on_demand_toggle"
|
||||||
{% for setting in domain.settings %}{% if setting.setting=='create_via_dyndns' and setting.value=='True' %}checked{% endif %}{% endfor %}>
|
{% for setting in domain.settings %}{% if setting.setting=='create_via_dyndns' and setting.value=='True' %}checked{% endif %}{% endfor %}>
|
||||||
Allow on-demand creation of records via DynDNS updates?</p>
|
Allow on-demand creation of records via DynDNS updates?</p>
|
||||||
@ -159,12 +137,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Change Type</h3>
|
<h3 class="box-title">Change Type</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>The type decides how the domain will be replicated across multiple DNS servers.</p>
|
<p>The type decides how the domain will be replicated across multiple DNS servers.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -172,12 +150,12 @@
|
|||||||
PowerDNS server or you handle replication via your backend.
|
PowerDNS server or you handle replication via your backend.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Primary - This PowerDNS server will serve as the primary and will send zone transfers
|
Master - This PowerDNS server will serve as the master and will send zone transfers
|
||||||
(AXFRs) to other servers configured as secondaries.
|
(AXFRs) to other servers configured as slaves.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Secondary - This PowerDNS server will serve as the secondaries and will request and receive
|
Slave - This PowerDNS server will serve as the slave and will request and receive
|
||||||
zone transfers (AXFRs) from other servers configured as primaries.
|
zone transfers (AXFRs) from other servers configured as masters.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<b>New Domain Type Setting:</b>
|
<b>New Domain Type Setting:</b>
|
||||||
@ -186,16 +164,16 @@
|
|||||||
<select name="domain_type" class="form-control" style="width:15em;">
|
<select name="domain_type" class="form-control" style="width:15em;">
|
||||||
<option selected value="0">- Unchanged -</option>
|
<option selected value="0">- Unchanged -</option>
|
||||||
<option value="native">Native</option>
|
<option value="native">Native</option>
|
||||||
<option value="priamry">Primary</option>
|
<option value="master">Master</option>
|
||||||
<option value="secondary">Secondary</option>
|
<option value="slave">Slave</option>
|
||||||
</select><br />
|
</select><br />
|
||||||
<div class="form-group" style="display: none;" id="domain_primary_address_div">
|
<div class="form-group" style="display: none;" id="domain_master_address_div">
|
||||||
<input type="text" class="form-control" name="domain_primary_address"
|
<input type="text" class="form-control" name="domain_master_address"
|
||||||
id="domain_primary_address"
|
id="domain_master_address"
|
||||||
placeholder="Enter valid Primary Server IP addresses (separated by commas)">
|
placeholder="Enter valid master ip addresses (separated by commas)">
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary" id="change_type">
|
<button type="submit" class="btn btn-flat btn-primary" id="change_type">
|
||||||
<i class="fa-solid fa-check"></i> Change type for {{ domain.name | pretty_domain_name }}
|
<i class="fa fa-check"></i> Change type for {{ domain.name | pretty_domain_name }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -203,12 +181,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Change SOA-EDIT-API</h3>
|
<h3 class="box-title">Change SOA-EDIT-API</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>The SOA-EDIT-API setting defines how the SOA serial number will be updated after a change is made
|
<p>The SOA-EDIT-API setting defines how the SOA serial number will be updated after a change is made
|
||||||
to the domain.</p>
|
to the domain.</p>
|
||||||
<ul>
|
<ul>
|
||||||
@ -237,8 +215,8 @@
|
|||||||
<option>EPOCH</option>
|
<option>EPOCH</option>
|
||||||
<option>OFF</option>
|
<option>OFF</option>
|
||||||
</select><br />
|
</select><br />
|
||||||
<button type="submit" class="btn btn-primary" id="change_soa_edit_api">
|
<button type="submit" class="btn btn-flat btn-primary" id="change_soa_edit_api">
|
||||||
<i class="fa-solid fa-check"></i> Change SOA-EDIT-API setting for {{ domain.name | pretty_domain_name }}
|
<i class="fa fa-check"></i> Change SOA-EDIT-API setting for {{ domain.name | pretty_domain_name }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -246,24 +224,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Domain Deletion</h3>
|
<h3 class="box-title">Domain Deletion</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<p>This function is used to remove a domain from PowerDNS-Admin <b>AND</b> PowerDNS. All records and
|
<p>This function is used to remove a domain from PowerDNS-Admin <b>AND</b> PowerDNS. All records and
|
||||||
user privileges associated with this domain will also be removed. This change cannot be
|
user privileges associated with this domain will also be removed. This change cannot be
|
||||||
reverted.</p>
|
reverted.</p>
|
||||||
<button type="button" class="btn btn-danger float-left delete_domain"
|
<button type="button" class="btn btn-flat btn-danger pull-left delete_domain"
|
||||||
id="{{ domain.name }}">
|
id="{{ domain.name }}">
|
||||||
<i class="fa-solid fa-trash"></i> DELETE DOMAIN {{ domain.name | pretty_domain_name }}
|
<i class="fa fa-trash"></i> DELETE DOMAIN {{ domain.name | pretty_domain_name }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
@ -359,37 +336,39 @@
|
|||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
// domain primary address input handeling
|
// domain master address input handeling
|
||||||
$("select[name=domain_type]").change(function () {
|
$("select[name=domain_type]").change(function () {
|
||||||
var type = $(this).val();
|
var type = $(this).val();
|
||||||
if (type == "secondary") {
|
if (type == "slave") {
|
||||||
$("#domain_primary_address_div").show();
|
$("#domain_master_address_div").show();
|
||||||
} else {
|
} else {
|
||||||
$("#domain_primary_address_div").hide();
|
$("#domain_master_address_div").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
<div class="modal fade" id="modal_delete_domain">
|
<div class="modal fade modal-warning" id="modal_delete_domain">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-danger" id="button_delete_confirm">
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">
|
||||||
Delete</button>
|
Delete</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,42 +1,28 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>PowerDNS-Admin - 400 Error</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
400 Error - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
400
|
400
|
||||||
<small>Error</small>
|
<small>Error</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li>400</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">400 Error</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
<div class="error-page">
|
<div class="error-page">
|
||||||
<h2 class="headline text-yellow">
|
<h2 class="headline text-yellow">400</h2>
|
||||||
400
|
|
||||||
</h2>
|
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="fas fa-exclamation-triangle text-yellow"></i>
|
<i class="fa fa-warning text-yellow"></i> Oops! Bad request
|
||||||
Oops! Bad request
|
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
{% if msg %}
|
{% if msg %}
|
||||||
@ -47,6 +33,9 @@
|
|||||||
<br/>You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
<br/>You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<!-- /.error-page -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,48 +1,37 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>PowerDNS-Admin - 403 Error</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
403 Error - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
403
|
403
|
||||||
<small>Error</small>
|
<small>Error</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li>403</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">403 Error</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
<div class="error-page">
|
<div class="error-page">
|
||||||
<h2 class="headline text-yellow">
|
<h2 class="headline text-yellow">403</h2>
|
||||||
403
|
|
||||||
</h2>
|
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="fas fa-exclamation-triangle text-yellow"></i>
|
<i class="fa fa-warning text-yellow"></i> Oops! Access denied
|
||||||
Oops! Access denied
|
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
You don't have permission to access this page
|
You don't have permission to access this page
|
||||||
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<!-- /.error-page -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,48 +1,37 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>PowerDNS-Admin - 404 Error</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
404 Error - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
404
|
404
|
||||||
<small>Error</small>
|
<small>Error</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li>404</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">404 Error</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
<div class="error-page">
|
<div class="error-page">
|
||||||
<h2 class="headline text-yellow">
|
<h2 class="headline text-yellow">404</h2>
|
||||||
404
|
|
||||||
</h2>
|
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="fas fa-exclamation-triangle text-yellow"></i>
|
<i class="fa fa-warning text-yellow"></i> Oops! You're lost
|
||||||
Oops! You're lost
|
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
The page you requested could not be found.
|
The page you requested could not be found.
|
||||||
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<!-- /.error-page -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,48 +1,37 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>PowerDNS-Admin - 500 Error</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
500 Error - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
500
|
500
|
||||||
<small>Error</small>
|
<small>Error</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li>500</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">500 Error</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
<div class="error-page">
|
<div class="error-page">
|
||||||
<h2 class="headline text-yellow">
|
<h2 class="headline text-yellow">500</h2>
|
||||||
500
|
|
||||||
</h2>
|
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="fas fa-exclamation-triangle text-yellow"></i>
|
<i class="fa fa-warning text-yellow"></i> Oops! Something went wrong
|
||||||
Oops! Something went wrong
|
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
Try again later.
|
Try again later.
|
||||||
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<!-- /.error-page -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,61 +1,45 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>PowerDNS-Admin - SAML Authentication Error</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
SAML Authentication Error - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
SAML
|
SAML
|
||||||
<small>Error</small>
|
<small>Error</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li>SAML</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">SAML Authentication Error</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
<div class="error-page">
|
<div class="error-page">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="headline text-yellow" style="font-size:46px;">
|
<h1 class="headline text-yellow" style="font-size:46px;">SAML Authentication Error</h1></div><br/><br/>
|
||||||
SAML Authentication Error
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="fas fa-exclamation-triangle text-yellow"></i>
|
<i class="fa fa-warning text-yellow"></i> Oops! Something went wrong
|
||||||
Oops! Something went wrong
|
</h3><br>
|
||||||
</h3>
|
|
||||||
<br>
|
|
||||||
<p>
|
<p>
|
||||||
Login failed.
|
Login failed.<br>
|
||||||
<br>
|
Error(s) when processing SAML Response:<br>
|
||||||
Error(s) when processing SAML Response:
|
|
||||||
<br>
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for error in errors %}
|
{% for error in errors %}
|
||||||
<li>{{ error }}</li>
|
<li>{{ error }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
You may <a href="{{ url_for('dashboard.dashboard') }}">return to the dashboard</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<!-- /.error-page -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>Log In - {{ SITE_NAME }}</title>
|
<title>Log In - {{ SITE_NAME }}</title>
|
||||||
@ -11,23 +11,24 @@
|
|||||||
{% assets "css_login" -%}
|
{% assets "css_login" -%}
|
||||||
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
{% if SETTING.get('custom_css') %}
|
{% if SETTING.get('custom_css') %}
|
||||||
<link rel="stylesheet" href="/static/custom/{{ SETTING.get('custom_css') }}">
|
<link rel="stylesheet" href="/static/custom/{{ SETTING.get('custom_css') }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
<body class="hold-transition login-page">
|
|
||||||
|
<body class="hold-transition login-page">
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<div class="card card-outline card-primary">
|
<div class="login-logo">
|
||||||
<div class="card-header text-center">
|
<a href="{{ url_for('index.index') }}">
|
||||||
<a href="{{ url_for('index.index') }}" class="h3">
|
|
||||||
{% if SETTING.get('site_name') %}
|
{% if SETTING.get('site_name') %}
|
||||||
{{ SITE_NAME }}
|
<b>{{ SITE_NAME }}</b>
|
||||||
{% else %}
|
{% else %}
|
||||||
<b>PowerDNS</b>-Admin
|
<b>PowerDNS</b>-Admin
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body login-card-body">
|
<!-- /.login-logo -->
|
||||||
|
<div class="login-box-body">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
@ -38,11 +39,13 @@
|
|||||||
<form action="" method="post" data-toggle="validator">
|
<form action="" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" placeholder="Username" name="username" data-error="Please input your username" required {% if username %}value="{{ username }}" {% endif %}>
|
<input type="text" class="form-control" placeholder="Username" name="username"
|
||||||
|
data-error="Please input your username" required {% if username %}value="{{ username }}" {% endif %}>
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="password" class="form-control" placeholder="Password" name="password" data-error="Please input your password" required {% if password %}value="{{ password }}" {% endif %}>
|
<input type="password" class="form-control" placeholder="Password" name="password"
|
||||||
|
data-error="Please input your password" required {% if password %}value="{{ password }}" {% endif %}>
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
{% if SETTING.get('otp_field_enabled') %}
|
{% if SETTING.get('otp_field_enabled') %}
|
||||||
@ -53,17 +56,11 @@
|
|||||||
{% if SETTING.get('ldap_enabled') and SETTING.get('local_db_enabled') %}
|
{% if SETTING.get('ldap_enabled') and SETTING.get('local_db_enabled') %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<select class="form-control" name="auth_method">
|
<select class="form-control" name="auth_method">
|
||||||
<option value="LOCAL">
|
<option value="LOCAL">LOCAL Authentication</option>
|
||||||
LOCAL Authentication
|
|
||||||
</option>
|
|
||||||
{% if SETTING.get('login_ldap_first') %}
|
{% if SETTING.get('login_ldap_first') %}
|
||||||
<option value="LDAP" selected="selected">
|
<option value="LDAP" selected="selected">LDAP Authentication</option>
|
||||||
LDAP Authentication
|
|
||||||
</option>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<option value="LDAP">
|
<option value="LDAP">LDAP Authentication</option>
|
||||||
LDAP Authentication
|
|
||||||
</option>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -80,18 +77,20 @@
|
|||||||
<input type="hidden" name="auth_method" value="LOCAL">
|
<input type="hidden" name="auth_method" value="LOCAL">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8">
|
<div class="col-xs-8">
|
||||||
<div class="icheck-primary">
|
<div class="checkbox icheck">
|
||||||
<input type="checkbox" id="remember">
|
<label>
|
||||||
<label for="remember">
|
<input type="checkbox" name="remember"> Remember Me
|
||||||
Remember Me
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<!-- /.col -->
|
||||||
<button type="submit" class="btn btn-primary btn-block">Sign In</button>
|
<div class="col-xs-4">
|
||||||
|
<button type="submit" class="btn btn-flat btn-primary btn-block">Sign In</button>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -101,62 +100,57 @@
|
|||||||
<p>- OR -</p>
|
<p>- OR -</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SETTING.get('oidc_oauth_enabled') %}
|
{% if SETTING.get('oidc_oauth_enabled') %}
|
||||||
<a href="{{ url_for('index.oidc_login') }}" class="btn btn-block btn-social btn-openid btn-flat">
|
<a href="{{ url_for('index.oidc_login') }}" class="btn btn-block btn-social btn-openid btn-flat"><i
|
||||||
<i class="fa-brands fa-openid"></i>
|
class="fa fa-openid"></i> Sign in using
|
||||||
Sign in using OpenID Connect
|
OpenID Connect</a>
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SETTING.get('github_oauth_enabled') %}
|
{% if SETTING.get('github_oauth_enabled') %}
|
||||||
<a href="{{ url_for('index.github_login') }}" class="btn btn-block btn-social btn-github btn-flat">
|
<a href="{{ url_for('index.github_login') }}" class="btn btn-block btn-social btn-github btn-flat"><i
|
||||||
<i class="fa-brands fa-github"></i>
|
class="fa fa-github"></i> Sign in using
|
||||||
Sign in using Github
|
Github</a>
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SETTING.get('google_oauth_enabled') %}
|
{% if SETTING.get('google_oauth_enabled') %}
|
||||||
<a href="{{ url_for('index.google_login') }}" class="btn btn-block btn-social btn-google btn-flat">
|
<a href="{{ url_for('index.google_login') }}" class="btn btn-block btn-social btn-google btn-flat"><i
|
||||||
<i class="fa-brands fa-google"></i>
|
class="fa fa-google"></i> Sign in using
|
||||||
Sign in using Google
|
Google</a>
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SETTING.get('azure_oauth_enabled') %}
|
{% if SETTING.get('azure_oauth_enabled') %}
|
||||||
<a href="{{ url_for('index.azure_login') }}" class="btn btn-block btn-social btn-microsoft btn-flat">
|
<a href="{{ url_for('index.azure_login') }}" class="btn btn-block btn-social btn-microsoft btn-flat"><i
|
||||||
<i class="fa-brands fa-windows"></i>
|
class="fa fa-windows"></i> Sign in using
|
||||||
Sign in using Microsoft Azure
|
Microsoft Azure</a>
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if saml_enabled %}
|
{% if saml_enabled %}
|
||||||
<a href="{{ url_for('index.saml_login') }}">
|
<a href="{{ url_for('index.saml_login') }}">SAML login</a>
|
||||||
SAML login
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if SETTING.get('signup_enabled') %}
|
{% if SETTING.get('signup_enabled') %}
|
||||||
<br>
|
<br>
|
||||||
<a href="{{ url_for('index.register') }}" class="text-center">
|
<a href="{{ url_for('index.register') }}" class="text-center">Create an account </a>
|
||||||
Create an account
|
|
||||||
</a>
|
|
||||||
{% if SETTING.get('verify_user_email') %}
|
{% if SETTING.get('verify_user_email') %}
|
||||||
<br/>
|
<br/>
|
||||||
<a href="{{ url_for('index.resend_confirmation_email') }}" class="text-center">
|
<a href="{{ url_for('index.resend_confirmation_email') }}" class="text-center">Resend confirmation email</a>
|
||||||
Resend confirmation email
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.login-box-body -->
|
||||||
<div class="login-box-footer">
|
<div class="login-box-footer">
|
||||||
<center>
|
<center>
|
||||||
<p>Powered by <a href="https://github.com/PowerDNS-Admin/PowerDNS-Admin">PowerDNS-Admin</a></p>
|
<p>Powered by <a href="https://github.com/PowerDNS-Admin/PowerDNS-Admin">PowerDNS-Admin</a></p>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.login-box -->
|
||||||
|
|
||||||
{% assets "js_login" -%}
|
{% assets "js_login" -%}
|
||||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
{% assets "js_validation" -%}
|
{% assets "js_validation" -%}
|
||||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('input').iCheck({
|
$('input').iCheck({
|
||||||
@ -166,5 +160,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,32 +1,24 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>Register - {{ SITE_NAME }}</title>
|
<title>Register - {{ SITE_NAME }}</title>
|
||||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
||||||
<!-- Tell the browser to be responsive to screen width -->
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
|
|
||||||
{% assets "css_login" -%}
|
{% assets "css_login" -%}
|
||||||
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hold-transition register-page">
|
<body class="hold-transition register-page">
|
||||||
<div class="register-box">
|
<div class="register-box">
|
||||||
<div class="card card-outline card-primary">
|
<div class="register-logo">
|
||||||
<div class="card-header text-center">
|
<a href="{{ url_for('index.index') }}"><b>PowerDNS</b>-Admin</a>
|
||||||
<a href="{{ url_for('index.index') }}" class="h3">
|
|
||||||
{% if SETTING.get('site_name') %}
|
|
||||||
{{ SITE_NAME }}
|
|
||||||
{% else %}
|
|
||||||
<b>PowerDNS</b>-Admin
|
|
||||||
{% endif %}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="register-box-body">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
@ -34,147 +26,64 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p class="login-box-msg">Enter your personal details below</p>
|
<p class="login-box-msg">Enter your personal details below</p>
|
||||||
<form action="{{ url_for('index.register') }}" method="post" validator>
|
<form action="{{ url_for('index.register') }}" method="post" data-toggle="validator">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
|
<div class="form-group has-feedback">
|
||||||
<div class="form-group">
|
<input type="text" class="form-control" placeholder="First Name" name="firstname"
|
||||||
<div class="input-group">
|
data-error="Please input your first name" required>
|
||||||
<div class="input-group-prepend">
|
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||||
<span class="input-group-text">
|
<span class="help-block with-errors"></span>
|
||||||
<i class="fas fa-user"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control {{ 'is-invalid' if 'firstname' in error_messages else '' }}" placeholder="First Name" name="firstname" id="firstname" value="{{ request.form.firstname }}" required>
|
<div class="form-group has-feedback">
|
||||||
{% if 'firstname' in error_messages %}
|
<input type="text" class="form-control" placeholder="Last name" name="lastname"
|
||||||
<div class="invalid-feedback">
|
data-error="Please input your last name" required>
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||||
{{ error_messages['firstname'] }}
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<div class="form-group has-feedback">
|
||||||
|
<input type="email" class="form-control" placeholder="Email" name="email"
|
||||||
|
data-error="Please input your valid email address" required>
|
||||||
|
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">
|
|
||||||
<i class="fas fa-user"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control {{ 'is-invalid' if 'lastname' in error_messages else '' }}" placeholder="Last name" name="lastname" id="lastname" value="{{ request.form.lastname }}" required>
|
|
||||||
{% if 'lastname' in error_messages %}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
|
||||||
{{ error_messages['lastname'] }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">
|
|
||||||
<i class="fas fa-envelope"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<input type="email" class="form-control {{ 'is-invalid' if 'email' in error_messages else '' }}" placeholder="Email" name="email" id="email" value="{{ request.form.email }}" required>
|
|
||||||
{% if 'email' in error_messages %}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
|
||||||
{{ error_messages['email'] }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="login-box-msg">Enter your account details below</p>
|
<p class="login-box-msg">Enter your account details below</p>
|
||||||
|
<div class="form-group has-feedback">
|
||||||
<div class="form-group">
|
<input type="text" class="form-control" placeholder="Username" name="username"
|
||||||
<div class="input-group">
|
data-error="Please input your username" required>
|
||||||
<div class="input-group-prepend">
|
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||||
<span class="input-group-text">
|
<span class="help-block with-errors"></span>
|
||||||
<i class="fas fa-user"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control {{ 'is-invalid' if 'username' in error_messages else '' }}" placeholder="Username" name="username" id="username" value="{{ request.form.username }}" required>
|
<div class="form-group has-feedback">
|
||||||
{% if 'username' in error_messages %}
|
<input type="password" class="form-control" placeholder="Password" id="password" name="password"
|
||||||
<div class="invalid-feedback">
|
data-error="Please input your password" required>
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||||
{{ error_messages['username'] }}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<div class="form-group has-feedback">
|
||||||
|
<input type="password" class="form-control" placeholder="Retype password" name="rpassword"
|
||||||
|
data-match="#password" data-match-error="Password confirmation does not match" required>
|
||||||
|
<span class="glyphicon glyphicon-log-in form-control-feedback"></span>
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">
|
|
||||||
<i class="fas fa-lock"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<input type="password" class="form-control {{ 'is-invalid' if 'password' in error_messages else '' }}" placeholder="Password" id="password" name="password" required>
|
|
||||||
{% if 'password' in error_messages %}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
|
||||||
{{ error_messages['password'] }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">
|
|
||||||
<i class="fas fa-lock"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<input type="password" class="form-control {{ 'is-invalid' if 'rpassword' in error_messages else '' }}" placeholder="Retype password" id="rpassword" name="rpassword" required>
|
|
||||||
{% if 'rpassword' in error_messages %}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
|
||||||
{{ error_messages['rpassword'] }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if captcha_enable %}
|
|
||||||
<p class="login-box-msg">Please complete the CAPTCHA below</p>
|
|
||||||
<div class="form-group">
|
|
||||||
{{ captcha() }}
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">
|
|
||||||
<i class="fas fa-shield-alt"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control {{ 'is-invalid' if 'captcha_result' in error_messages else '' }}" placeholder="CAPTCHA" id="captcha" name="captcha" required>
|
|
||||||
{% if 'captcha_result' in error_messages %}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<i class="fas fa-exclamation-triangle"></i>
|
|
||||||
{{ error_messages['captcha_result'] }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify-content-between mx-auto mt-3">
|
<div class="col-xs-4 pull-left">
|
||||||
<button type="button" class="btn btn-secondary" id="button_back">Back</button>
|
<button type="button" class="btn btn-flat btn-block" id="button_back">Back</button>
|
||||||
<button type="submit" class="btn btn-primary btn-block mx-3">Register</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-4 pull-right">
|
||||||
|
<button type="submit" class="btn btn-flat btn-primary btn-block">Register</button>
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.form-box -->
|
||||||
<div class="login-box-footer">
|
<div class="login-box-footer">
|
||||||
<center>
|
<center>
|
||||||
<p>Powered by <a href="https://github.com/PowerDNS-Admin/PowerDNS-Admin">PowerDNS-Admin</a></p>
|
<p>Powered by <a href="https://github.com/PowerDNS-Admin/PowerDNS-Admin">PowerDNS-Admin</a></p>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.login-box -->
|
||||||
|
|
||||||
{% assets "js_login" -%}
|
{% assets "js_login" -%}
|
||||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
@ -188,5 +97,6 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<button type="submit" class="btn btn-primary btn-block">Continue</button>
|
<button type="submit" class="btn btn-flat btn-primary btn-block">Continue</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,89 +1,71 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_domain_template" %}
|
{% set active_page = "admin_domain_template" %}
|
||||||
|
{% block title %}<title>Templates - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Templates - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
<div class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<h1>
|
||||||
<div class="row mb-2">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Templates
|
Templates
|
||||||
<small>List</small>
|
<small>List</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('admin.templates') }}"><i class="fa fa-dashboard"></i> Templates</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">List</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">Templates - List</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
{% with errors = get_flashed_messages(category_filter=["error"]) %} {% if errors %}
|
||||||
{% with errors = get_flashed_messages(category_filter=["error"]) %}
|
|
||||||
{% if errors %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-md-12">
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4>
|
<h4>
|
||||||
<i class="fa-solid fa-ban"></i> Error!
|
<i class="icon fa fa-ban"></i> Error!
|
||||||
</h4>
|
</h4>
|
||||||
<div class="alert-message block-message error">
|
<div class="alert-message block-message error">
|
||||||
<a class="close" href="#">x</a>
|
<a class="close" href="#">x</a>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for msg in errors %}
|
{%- for msg in errors %}
|
||||||
<li>{{ msg }}</li>
|
<li>{{ msg }}</li> {% endfor -%}
|
||||||
{% endfor -%}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %} {% endwith %}
|
||||||
{% endwith %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Templates</h3>
|
<h3 class="box-title">Templates</h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
<a href="{{ url_for('admin.create_template') }}">
|
<a href="{{ url_for('admin.create_template') }}">
|
||||||
<button type="button" class="btn btn-primary float-right">
|
<button type="button" class="btn btn-flat btn-primary pull-left">
|
||||||
<i class="fa-solid fa-plus"></i> Create Template
|
Create Template <i class="fa fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_template_list" class="table table-bordered table-striped">
|
<table id="tbl_template_list" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Number of Records</th>
|
<th>Number of Records</th>
|
||||||
<th width="20%">Actions</th>
|
<th width="20%">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for template in templates %}
|
{% for template in templates %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url_for('admin.edit_template', template=template.name) }}">
|
<a
|
||||||
<strong>{{ template.name }}</strong>
|
href="{{ url_for('admin.edit_template', template=template.name) }}"><strong>{{ template.name }}</strong></a>
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ template.description }}
|
{{ template.description }}
|
||||||
@ -92,38 +74,33 @@
|
|||||||
{{ template.records|count }}
|
{{ template.records|count }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown">
|
<a href="{{ url_for('admin.edit_template', template=template.name) }}">
|
||||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-flat btn-warning button_edit" id="btn_edit">
|
||||||
<i class="fa-solid fa-bars"></i> Actions
|
Edit <i class="fa fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
</a>
|
||||||
<button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_template', template=template.name) }}'">
|
<button type="button" class="btn btn-flat btn-danger button_delete" id="{{template.name}}">
|
||||||
<i class="fa-solid fa-edit"></i> Edit Template
|
Delete <i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{template.name}}">
|
|
||||||
<font color="red">
|
|
||||||
<i class="fa-solid fa-trash"></i> Delete Template
|
|
||||||
</font>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// set up template data table
|
// set up history data table
|
||||||
$("#tbl_template_list").DataTable({
|
$("#tbl_template_list").DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
@ -132,7 +109,6 @@
|
|||||||
"info": false,
|
"info": false,
|
||||||
"autoWidth": false
|
"autoWidth": false
|
||||||
});
|
});
|
||||||
|
|
||||||
// handle delete button
|
// handle delete button
|
||||||
$(document.body).on("click", ".button_delete", function (e) {
|
$(document.body).on("click", ".button_delete", function (e) {
|
||||||
var template = $(this).prop('id');
|
var template = $(this).prop('id');
|
||||||
@ -141,9 +117,9 @@
|
|||||||
}, function () {
|
}, function () {
|
||||||
window.location.href = '{{ url_for('admin.templates') }}';
|
window.location.href = '{{ url_for('admin.templates') }}';
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,67 +1,55 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_domain_template" %}
|
{% set active_page = "admin_domain_template" %}
|
||||||
|
{% block title %}<title>Create Template - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Create Template - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Template
|
Template
|
||||||
<small>Create</small>
|
<small>Create</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('admin.templates') }}"><i class="fa fa-dashboard"></i> Templates</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">Create</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('admin.templates') }}">Templates</a></li>
|
|
||||||
<li class="breadcrumb-item active">Create</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
{% with errors = get_flashed_messages(category_filter=["error"]) %} {%
|
||||||
{% with errors = get_flashed_messages(category_filter=["error"]) %}
|
if errors %}
|
||||||
{% if errors %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-md-12">
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4>
|
<h4>
|
||||||
<i class="fa-solid fa-ban"></i> Error!
|
<i class="icon fa fa-ban"></i> Error!
|
||||||
</h4>
|
</h4>
|
||||||
<div class="alert-message block-message error">
|
<div class="alert-message block-message error">
|
||||||
<a class="close" href="#">x</a>
|
<a class="close" href="#">x</a>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for msg in errors %}
|
{%- for msg in errors %}
|
||||||
<li>{{ msg }}</li>
|
<li>{{ msg }}</li> {% endfor -%}
|
||||||
{% endfor -%}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
{% endwith %}
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Create new template</h3>
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %} {% endwith %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">Create new template</h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
<form role="form" method="post" action="{{ url_for('admin.create_template') }}">
|
<form role="form" method="post" action="{{ url_for('admin.create_template') }}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" name="name" id="name"
|
<input type="text" class="form-control" name="name" id="name"
|
||||||
placeholder="Enter a valid template name (required)">
|
placeholder="Enter a valid template name (required)">
|
||||||
@ -71,23 +59,21 @@
|
|||||||
placeholder="Enter a template description (optional)">
|
placeholder="Enter a template description (optional)">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="box-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.templates') }}'">
|
<button type="submit" class="btn btn-flat btn-primary">Submit</button>
|
||||||
Cancel
|
<button type="button" class="btn btn-flat btn-default"
|
||||||
</button>
|
onclick="window.location.href='{{ url_for('admin.templates') }}'">Cancel</button>
|
||||||
<button type="submit" class="btn btn-primary float-right">
|
|
||||||
<i class="fa-solid fa-save"></i> Save
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<h3 class="card-title">Help with creating a new template</h3>
|
<h3 class="box-title">Help with creating a new template</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Template name</dt>
|
<dt>Template name</dt>
|
||||||
<dd>Enter your template name, this is the name of the template that
|
<dd>Enter your template name, this is the name of the template that
|
||||||
@ -101,17 +87,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
$("input[name=radio_type]").change(function () {
|
$("input[name=radio_type]").change(function () {
|
||||||
var type = $(this).val();
|
var type = $(this).val();
|
||||||
if (type == "secondary") {
|
if (type == "slave") {
|
||||||
$("#domain_primary_address_div").show();
|
$("#domain_master_address_div").show();
|
||||||
} else {
|
} else {
|
||||||
$("#domain_primary_address_div").hide();
|
$("#domain_master_address_div").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,52 +1,38 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% set active_page = "admin_domain_template" %}
|
{% set active_page = "admin_domain_template" %}
|
||||||
|
{% block title %}<title>Edit Template - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
Edit Template - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<h1>
|
||||||
<div class="row mb-2">
|
Edit template <small>{{ template }}</small>
|
||||||
<div class="col-sm-6">
|
|
||||||
<h1 class="m-0 text-dark">
|
|
||||||
Template Edit
|
|
||||||
<small>{{ template }}</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i
|
||||||
<ol class="breadcrumb float-sm-right">
|
class="fa fa-dashboard"></i> Home</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('admin.templates') }}">Templates</a></li>
|
<li>Templates</li>
|
||||||
<li class="breadcrumb-item active">Template Edit: {{ template }}</li>
|
<li class="active">{{ template }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-xs-12">
|
||||||
<div class="card">
|
<div class="box">
|
||||||
<div class="card-header">
|
<div class="box-header">
|
||||||
<h3 class="card-title">Manage Template Records for {{ template }}</h3>
|
<h3 class="box-title">Manage Template Records for {{ template }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<button type="button" class="btn btn-primary float-left button_add_record" id="{{ template }}">
|
<button type="button" class="btn btn-flat btn-primary pull-left button_add_record" id="{{ template }}">
|
||||||
<i class="fa-solid fa-plus"></i> Add Record
|
Add Record <i class="fa fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary float-right button_apply_changes" id="{{ template }}">
|
<button type="button" class="btn btn-flat btn-primary pull-right button_apply_changes" id="{{ template }}">
|
||||||
<i class="fa-solid fa-save"></i> Save Changes
|
Apply Changes <i class="fa fa-floppy-o"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="box-body">
|
||||||
<table id="tbl_records" class="table table-bordered table-striped">
|
<table id="tbl_records" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -83,13 +69,13 @@
|
|||||||
{{ record.comment }}
|
{{ record.comment }}
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<button type="button" class="btn btn-warning button_edit">
|
<button type="button" class="btn btn-flat btn-warning button_edit">
|
||||||
<i class="fa-solid fa-edit"></i> Edit
|
Edit <i class="fa fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<button type="button" class="btn btn-danger button_delete">
|
<button type="button" class="btn btn-flat btn-danger button_delete">
|
||||||
<i class="fa-solid fa-trash"></i> Delete
|
Delete <i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -104,14 +90,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
// superglobals
|
// superglobals
|
||||||
window.records_allow_edit = {{ editable_records | tojson }};
|
window.records_allow_edit = {{ editable_records|tojson }};
|
||||||
window.ttl_options = {{ ttl_options | tojson }};
|
window.ttl_options = {{ ttl_options|tojson }};
|
||||||
window.nEditing = null;
|
window.nEditing = null;
|
||||||
window.nNew = false;
|
window.nNew = false;
|
||||||
|
|
||||||
@ -238,7 +223,7 @@
|
|||||||
|
|
||||||
// add new row
|
// add new row
|
||||||
var default_type = records_allow_edit[0]
|
var default_type = records_allow_edit[0]
|
||||||
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', window.ttl_options[0][0], '', '', '', '', '0']);
|
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', 3600, '', '', '', '', '0']);
|
||||||
editRow($("#tbl_records").DataTable(), nRow);
|
editRow($("#tbl_records").DataTable(), nRow);
|
||||||
document.getElementById("edit-row-focus").focus();
|
document.getElementById("edit-row-focus").focus();
|
||||||
nEditing = nRow;
|
nEditing = nRow;
|
||||||
@ -430,67 +415,67 @@
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal"
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" id="button_delete_cancel" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left" id="button_delete_cancel"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button>
|
||||||
<button type="button" class="btn btn-danger" id="button_delete_confirm">
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade modal-primary" id="modal_apply_changes">
|
<div class="modal fade modal-primary" id="modal_apply_changes">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Confirmation</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal"
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Confirmation</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" data-dismiss="modal">
|
<button type="button" class="btn btn-flat btn-default pull-left"
|
||||||
Close
|
data-dismiss="modal">Close</button>
|
||||||
</button>
|
<button type="button" class="btn btn-flat btn-primary" id="button_apply_confirm">Apply</button>
|
||||||
<button type="button" class="btn btn-primary" id="button_apply_confirm">
|
|
||||||
Apply
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade modal-primary" id="modal_custom_record">
|
<div class="modal fade modal-primary" id="modal_custom_record">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Custom Record</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal"
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
aria-label="Close">
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
<h4 class="modal-title">Custom Record</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" id="button_save">Save</button>
|
<button type="button" class="btn btn-flat btn-primary" id="button_save">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,159 +1,124 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% block title %}<title>My Profile - {{ SITE_NAME }}</title>{% endblock %}
|
||||||
{% set active_page = "user_profile" %}
|
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
<title>
|
|
||||||
My Profile - {{ SITE_NAME }}
|
|
||||||
</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block dashboard_stat %}
|
{% block dashboard_stat %}
|
||||||
<div class="content-header">
|
<!-- Content Header (Page header) -->
|
||||||
<div class="container-fluid">
|
<section class="content-header">
|
||||||
<div class="row mb-2">
|
<h1>
|
||||||
<div class="col-sm-6">
|
Profile
|
||||||
<h1 class="m-0 text-dark">
|
<small>Edit my profile</small>
|
||||||
User
|
|
||||||
<small>My Profile</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
<ol class="breadcrumb">
|
||||||
<div class="col-sm-6">
|
<li><a href="{{ url_for('dashboard.dashboard') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
<ol class="breadcrumb float-sm-right">
|
<li class="active">My Profile</li>
|
||||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
||||||
<li class="breadcrumb-item active">My Profile</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-lg-12">
|
||||||
<div class="card">
|
<div class="box box-primary">
|
||||||
<div class="card-header">
|
<div class="box-header with-border">
|
||||||
<div class="nav-tabs-custom">
|
<h3 class="box-title">Edit my profile{% if session['authentication_type'] != 'LOCAL' %} [Disabled -
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
Authenticated externally]{% endif %}</h3>
|
||||||
<li class="nav-item">
|
</div>
|
||||||
<a class="nav-link active" href="#tabs-personal" data-toggle="tab">
|
<div class="box-body">
|
||||||
Personal Info
|
<!-- Custom Tabs -->
|
||||||
</a>
|
<div class="nav-tabs-custom" id="tabs">
|
||||||
</li>
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="active"><a href="#tabs-personal" data-toggle="tab">Personal
|
||||||
|
Info</a></li>
|
||||||
{% if session['authentication_type'] == 'LOCAL' %}
|
{% if session['authentication_type'] == 'LOCAL' %}
|
||||||
<li class="nav-item">
|
<li><a href="#tabs-password" data-toggle="tab">Change Password</a></li>
|
||||||
<a class="nav-link" href="#tabs-password" data-toggle="tab">
|
|
||||||
Change Password
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if session['authentication_type'] in ['LOCAL', 'LDAP'] %}
|
{% if session['authentication_type'] in ['LOCAL', 'LDAP'] %}
|
||||||
<li class="nav-item">
|
<li><a href="#tabs-authentication" data-toggle="tab">Authentication</a></li>
|
||||||
<a class="nav-link" href="#tabs-authentication" data-toggle="tab">
|
|
||||||
Authentication
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="card-body">
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane fade show active" id="tabs-personal">
|
<div class="tab-pane active" id="tabs-personal">
|
||||||
<form role="form" method="post" action="{{ user_profile }}">
|
<form role="form" method="post" action="{{ user_profile }}">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="firstname">First Name</label>
|
<label for="firstname">First Name</label> <input type="text"
|
||||||
<input type="text" class="form-control" name="firstname" id="firstname" placeholder="{{ current_user.firstname }}"
|
class="form-control" name="firstname" id="firstname"
|
||||||
|
placeholder="{{ current_user.firstname }}"
|
||||||
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
|
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="lastname">Last Name</label>
|
<label for="lastname">Last Name</label> <input type="text" class="form-control"
|
||||||
<input type="text" class="form-control" name="lastname" id="lastname" placeholder="{{ current_user.lastname }}"
|
name="lastname" id="lastname" placeholder="{{ current_user.lastname }}"
|
||||||
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
|
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">E-Mail</label> <input type="email" class="form-control" name="email" id="email" placeholder="{{ current_user.email }}"
|
<label for="email">E-mail</label> <input type="email" class="form-control"
|
||||||
|
name="email" id="email" placeholder="{{ current_user.email }}"
|
||||||
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
|
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
|
||||||
</div>
|
</div>{% if session['authentication_type'] == 'LOCAL' %}
|
||||||
{% if session['authentication_type'] == 'LOCAL' %}
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-flat btn-primary">Submit</button>
|
||||||
<i class="fa-solid fa-floppy-disk"></i> Save
|
</div>{% endif %}
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% if session['authentication_type'] == 'LOCAL' %}
|
{% if session['authentication_type'] == 'LOCAL' %}
|
||||||
<div class="tab-pane fade" id="tabs-password">
|
<div class="tab-pane" id="tabs-password">
|
||||||
{% if not current_user.password %}
|
{% if not current_user.password %}
|
||||||
Your account password is managed via LDAP which isn't supported to change here.
|
Your account password is managed via LDAP which isn't supported to change here.
|
||||||
{% else %}
|
{% else %}
|
||||||
<form action="{{ user_profile }}" method="post">
|
<form action="{{ user_profile }}" method="post">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">New Password</label>
|
<label for="password">New Password</label> <input type="password"
|
||||||
<input type="password" class="form-control" name="password" id="newpassword">
|
class="form-control" name="password" id="newpassword" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="rpassword">Re-type New Password</label>
|
<label for="rpassword">Re-type New Password</label> <input type="password"
|
||||||
<input type="password" class="form-control" name="rpassword" id="rpassword">
|
class="form-control" name="rpassword" id="rpassword" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-flat btn-primary">Change Password</button>
|
||||||
<i class="fa-solid fa-floppy-disk"></i> Save
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="tab-pane fade" id="tabs-authentication">
|
<!-- {% if session['authentication_type'] in ['LOCAL', 'LDAP'] %} -->
|
||||||
|
<div class="tab-pane" id="tabs-authentication">
|
||||||
<form action="{{ user_profile }}" method="post">
|
<form action="{{ user_profile }}" method="post">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="checkbox" id="otp_toggle" class="otp_toggle" {% if current_user.otp_secret %}checked{% endif %}>
|
<input type="checkbox" id="otp_toggle" class="otp_toggle"
|
||||||
|
{% if current_user.otp_secret %}checked{% endif %}>
|
||||||
<label for="otp_toggle">Enable Two Factor Authentication</label>
|
<label for="otp_toggle">Enable Two Factor Authentication</label>
|
||||||
{% if current_user.otp_secret %}
|
{% if current_user.otp_secret %}
|
||||||
<div id="token_information">
|
<div id="token_information">
|
||||||
<p>
|
<p><img id="qrcode" src="{{ url_for('user.qrcode') }}"></p>
|
||||||
<img id="qrcode" src="{{ url_for('user.qrcode') }}">
|
|
||||||
</p>
|
|
||||||
<div style="position: relative; left: 15px">
|
<div style="position: relative; left: 15px">
|
||||||
Your secret key is:
|
Your secret key is: <br />
|
||||||
<br />
|
|
||||||
<form>
|
<form>
|
||||||
<input type=text id="otp_secret" value={{current_user.otp_secret}} readonly>
|
<input type=text id="otp_secret" value={{current_user.otp_secret}} readonly>
|
||||||
<button type=button style="position:relative; right:28px" onclick="copy_otp_secret_to_clipboard()">
|
<button type=button style="position:relative; right:28px" onclick="copy_otp_secret_to_clipboard()"> <i class="fa fa-clipboard"></i> </button>
|
||||||
<i class="fa-solid fa-clipboard"></i>
|
<br /><font color="red" id="copy_tooltip" style="visibility:collapse">Copied.</font>
|
||||||
</button>
|
|
||||||
<br />
|
|
||||||
<font color="red" id="copy_tooltip" style="visibility:collapse">Copied.</font>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
You can use Google Authenticator
|
You can use Google Authenticator (<a target="_blank"
|
||||||
(<a target="_blank" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2"><i class="fa-brands fa-google-play"></i>Android</a>
|
href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Android</a>
|
||||||
- <a target="_blank" href="https://apps.apple.com/us/app/google-authenticator/id388497605"><i class="fa-brands fa-app-store-ios"></i>iOS</a>)
|
- <a target="_blank"
|
||||||
or FreeOTP
|
href="https://apps.apple.com/us/app/google-authenticator/id388497605">iOS</a>)
|
||||||
(<a target="_blank" href="https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp&hl=en"><i class="fa-brands fa-google-play"></i>Android</a>
|
or FreeOTP (<a target="_blank"
|
||||||
- <a target="_blank" href="https://itunes.apple.com/en/app/freeotp-authenticator/id872559395?mt=8"><i class="fa-brands fa-app-store-ios"></i>iOS</a>)
|
href="https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp&hl=en">Android</a>
|
||||||
|
- <a target="_blank"
|
||||||
|
href="https://itunes.apple.com/en/app/freeotp-authenticator/id872559395?mt=8">iOS</a>)
|
||||||
on your smartphone to scan the QR code.
|
on your smartphone to scan the QR code.
|
||||||
<br />
|
<br />
|
||||||
<font color="red">
|
<font color="red"><strong><i>Make sure only you can see this QR Code and secret key and
|
||||||
<strong>
|
nobody can capture them.</i></strong></font>
|
||||||
<i>Make sure only you can see this QR Code and secret key and
|
|
||||||
nobody can capture them.
|
|
||||||
</i>
|
|
||||||
</strong>
|
|
||||||
</font>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- {% endif %} -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -163,7 +128,19 @@
|
|||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
|
<!-- TODO: add password and password confirmation comparison check -->
|
||||||
<script>
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$('#tabs').tabs({
|
||||||
|
// add url anchor tags
|
||||||
|
activate: function (event, ui) {
|
||||||
|
window.location.hash = ui.newPanel.attr('id');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// re-set active tab (ui)
|
||||||
|
var activeTabIdx = $('#tabs').tabs('option', 'active');
|
||||||
|
$('#tabs li:eq(' + activeTabIdx + ')').tab('show')
|
||||||
|
});
|
||||||
|
|
||||||
// initialize pretty checkboxes
|
// initialize pretty checkboxes
|
||||||
$('.otp_toggle').iCheck({
|
$('.otp_toggle').iCheck({
|
||||||
@ -172,7 +149,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// handle checkbox toggling
|
// handle checkbox toggling
|
||||||
$('.otp_toggle').on('ifToggled', function(event) {
|
$('.otp_toggle').on('ifToggled', function (event) {
|
||||||
var enable_otp = $(this).prop('checked');
|
var enable_otp = $(this).prop('checked');
|
||||||
var postdata = {
|
var postdata = {
|
||||||
'action': 'enable_otp',
|
'action': 'enable_otp',
|
||||||
@ -181,10 +158,7 @@
|
|||||||
},
|
},
|
||||||
'_csrf_token': '{{ csrf_token() }}'
|
'_csrf_token': '{{ csrf_token() }}'
|
||||||
};
|
};
|
||||||
applyChanges(postdata, $SCRIPT_ROOT + '/user/profile', false, true, function() {
|
applyChanges(postdata, $SCRIPT_ROOT + '/user/profile', false, true);
|
||||||
window.location.reload();
|
|
||||||
$('#tabs li:eq(2) a').tab('show');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,31 +1,21 @@
|
|||||||
Flask==2.2.2
|
|
||||||
Flask-Assets==2.0
|
|
||||||
Flask-Login==0.6.2
|
|
||||||
Flask-SQLAlchemy==3.0.2
|
|
||||||
Flask-Migrate==4.0.0
|
|
||||||
Flask-Mail==0.9.1
|
|
||||||
Flask-SSLify==0.1.5
|
|
||||||
Flask-Session==0.4.0
|
|
||||||
Flask-SeaSurf==1.1.1
|
|
||||||
SQLAlchemy==1.4.45
|
|
||||||
mysqlclient==2.1.1
|
mysqlclient==2.1.1
|
||||||
configobj==5.0.8
|
configobj==5.0.6
|
||||||
bcrypt==4.0.1
|
bcrypt==4.0.1
|
||||||
requests==2.28.2
|
requests==2.28.1
|
||||||
python-ldap==3.4.3
|
python-ldap==3.4.3
|
||||||
pyotp==2.8.0
|
pyotp==2.8.0
|
||||||
qrcode==7.3.1
|
qrcode==7.3.1
|
||||||
dnspython>=2.3.0
|
dnspython>=1.16.0
|
||||||
gunicorn==20.1.0
|
gunicorn==20.1.0
|
||||||
python3-saml==1.14.0
|
python3-saml==1.14.0
|
||||||
pytz==2022.7.1
|
pytz==2022.7
|
||||||
cssmin==0.2.0
|
cssmin==0.2.0
|
||||||
rjsmin==1.2.1
|
rjsmin==1.2.1
|
||||||
Authlib==1.2.0
|
Authlib==1.2.0
|
||||||
|
Flask-SeaSurf==1.1.1
|
||||||
bravado-core==5.17.1
|
bravado-core==5.17.1
|
||||||
lima==0.5
|
|
||||||
pytest==7.2.1
|
|
||||||
jsonschema[format]>=2.5.1,<4.0.0 # until https://github.com/Yelp/bravado-core/pull/385
|
jsonschema[format]>=2.5.1,<4.0.0 # until https://github.com/Yelp/bravado-core/pull/385
|
||||||
|
lima==0.5
|
||||||
pytimeparse==1.1.8
|
pytimeparse==1.1.8
|
||||||
alembic==1.9.0
|
alembic==1.9.0
|
||||||
certifi==2022.12.7
|
certifi==2022.12.7
|
||||||
@ -34,11 +24,16 @@ passlib==1.7.4
|
|||||||
pyasn1==0.4.8
|
pyasn1==0.4.8
|
||||||
webcolors==1.12
|
webcolors==1.12
|
||||||
zipp==3.11.0
|
zipp==3.11.0
|
||||||
|
Flask==2.2.2
|
||||||
|
Flask-Assets==2.0
|
||||||
|
Flask-Login==0.6.2
|
||||||
|
Flask-SQLAlchemy==3.0.2
|
||||||
|
Flask-Migrate==4.0.0
|
||||||
|
SQLAlchemy==1.4.45
|
||||||
pyOpenSSL==22.1.0
|
pyOpenSSL==22.1.0
|
||||||
PyYAML==6.0
|
PyYAML==6.0
|
||||||
Jinja2==3.1.2
|
Flask-Mail==0.9.1
|
||||||
itsdangerous==2.1.2
|
Flask-SSLify==0.1.5
|
||||||
werkzeug==2.2.2
|
Flask-Session==0.4.0
|
||||||
cryptography==38.0.0
|
|
||||||
flask_session_captcha==1.3.0
|
|
||||||
lxml==4.6.5
|
lxml==4.6.5
|
||||||
|
pytest==7.2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user