From eb70f6a066cbcc8604ab5a7e2f1e64a72af95480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20Churanov=C3=A1?= Date: Sat, 11 Dec 2021 15:49:05 +0100 Subject: [PATCH 01/42] fix: making the key name in the config database unique --- ...add_unique_index_to_settings_table_keys.py | 24 +++++++++++++++++++ powerdnsadmin/models/setting.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 migrations/versions/b24bf17725d2_add_unique_index_to_settings_table_keys.py diff --git a/migrations/versions/b24bf17725d2_add_unique_index_to_settings_table_keys.py b/migrations/versions/b24bf17725d2_add_unique_index_to_settings_table_keys.py new file mode 100644 index 0000000..48cfbe9 --- /dev/null +++ b/migrations/versions/b24bf17725d2_add_unique_index_to_settings_table_keys.py @@ -0,0 +1,24 @@ +"""Add unique index to settings table keys + +Revision ID: b24bf17725d2 +Revises: 0967658d9c0d +Create Date: 2021-12-12 20:29:17.103441 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'b24bf17725d2' +down_revision = '0967658d9c0d' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_index(op.f('ix_setting_name'), 'setting', ['name'], unique=True) + + +def downgrade(): + op.drop_index(op.f('ix_setting_name'), table_name='setting') diff --git a/powerdnsadmin/models/setting.py b/powerdnsadmin/models/setting.py index a46cfb6..4b9bcc5 100644 --- a/powerdnsadmin/models/setting.py +++ b/powerdnsadmin/models/setting.py @@ -11,7 +11,7 @@ from .base import db class Setting(db.Model): id = db.Column(db.Integer, primary_key=True) - name = db.Column(db.String(64)) + name = db.Column(db.String(64), unique=True, index=True) value = db.Column(db.Text()) defaults = { From 6a2ba1b1c3fa5d3876429a165b45fc1010f55251 Mon Sep 17 00:00:00 2001 From: AdvanticGmbH Date: Tue, 28 Jun 2022 11:15:43 +0200 Subject: [PATCH 02/42] Add list to manage with an account associated domains --- powerdnsadmin/routes/admin.py | 43 +++++++-- .../templates/admin_edit_account.html | 92 ++++++++++++------- 2 files changed, 95 insertions(+), 40 deletions(-) diff --git a/powerdnsadmin/routes/admin.py b/powerdnsadmin/routes/admin.py index c5f28d1..c8c9536 100644 --- a/powerdnsadmin/routes/admin.py +++ b/powerdnsadmin/routes/admin.py @@ -610,14 +610,24 @@ def manage_user(): @operator_role_required def edit_account(account_name=None): users = User.query.all() + account = Account.query.filter( + Account.name == account_name).first() + all_accounts = Account.query.all() + accounts = {} + domains = Domain.query.all() + + for acc in all_accounts: + accounts[acc.id] = acc if request.method == 'GET': - if account_name is None: + if account_name is None or not account: return render_template('admin_edit_account.html', + account=None, account_user_ids=[], users=users, + domains=domains, + accounts=accounts, create=1) - else: account = Account.query.filter( Account.name == account_name).first() @@ -626,11 +636,14 @@ def edit_account(account_name=None): account=account, account_user_ids=account_user_ids, users=users, + domains=domains, + accounts=accounts, create=0) if request.method == 'POST': fdata = request.form new_user_list = request.form.getlist('account_multi_user') + new_domain_list = request.form.getlist('account_domains') # on POST, synthesize account and account_user_ids from form data if not account_name: @@ -654,6 +667,8 @@ def edit_account(account_name=None): account=account, account_user_ids=account_user_ids, users=users, + domains=domains, + accounts=accounts, create=create, invalid_accountname=True) @@ -662,19 +677,33 @@ def edit_account(account_name=None): account=account, account_user_ids=account_user_ids, users=users, + domains=domains, + accounts=accounts, create=create, duplicate_accountname=True) result = account.create_account() - history = History(msg='Create account {0}'.format(account.name), - created_by=current_user.username) - else: result = account.update_account() - history = History(msg='Update account {0}'.format(account.name), - created_by=current_user.username) if result['status']: + account = Account.query.filter( + Account.name == account_name).first() + old_domains = Domain.query.filter(Domain.account_id == account.id).all() + + for domain_name in new_domain_list: + domain = Domain.query.filter( + Domain.name == domain_name).first() + if account.id != domain.account_id: + Domain(name=domain_name).assoc_account(account.id) + + for domain in old_domains: + if domain.name not in new_domain_list: + Domain(name=domain.name).assoc_account(None) + + history = History(msg='{0} account {1}'.format('Create' if create else 'Update', account.name), + created_by=current_user.username) + account.grant_privileges(new_user_list) history.add() return redirect(url_for('admin.manage_account')) diff --git a/powerdnsadmin/templates/admin_edit_account.html b/powerdnsadmin/templates/admin_edit_account.html index 1946bc9..ee8d1be 100644 --- a/powerdnsadmin/templates/admin_edit_account.html +++ b/powerdnsadmin/templates/admin_edit_account.html @@ -90,6 +90,28 @@ +
+

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. +

+

Hover over the red domain names to show the associated account. Click on domains to move between columns.

+
+ +
+
+ {% if captcha_enable %} + +
+ {{ captcha() }} + + +
+ {% endif %}
diff --git a/requirements.txt b/requirements.txt index 1fc2864..051d560 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,3 +31,4 @@ Jinja2==3.0.3 itsdangerous==2.0.1 werkzeug==2.0.3 cryptography==36.0.2 +flask_session_captcha==1.3.0 \ No newline at end of file From 7f25e3b555064087a91ac0e7625993c54150669d Mon Sep 17 00:00:00 2001 From: Tyler Todd Date: Thu, 2 Feb 2023 21:19:15 +0000 Subject: [PATCH 14/42] Initial go at upgrading from Bootstap v3 to v4 and to AdminLTE v3.2.0 --- package.json | 12 +- powerdnsadmin/static/custom/js/custom.js | 16 +- .../templates/admin_edit_account.html | 56 +-- powerdnsadmin/templates/admin_edit_key.html | 67 ++-- powerdnsadmin/templates/admin_edit_user.html | 19 + .../templates/admin_global_search.html | 20 ++ powerdnsadmin/templates/admin_history.html | 141 ++++---- .../templates/admin_manage_account.html | 132 +++---- .../templates/admin_manage_keys.html | 129 +++---- .../templates/admin_manage_user.html | 37 +- powerdnsadmin/templates/admin_pdns_stats.html | 20 ++ .../admin_setting_authentication.html | 60 ++-- .../templates/admin_setting_basic.html | 121 ++++--- .../templates/admin_setting_pdns.html | 4 +- powerdnsadmin/templates/base.html | 331 +++++++++++------- powerdnsadmin/templates/errors/400.html | 77 ++-- powerdnsadmin/templates/errors/403.html | 69 ++-- powerdnsadmin/templates/errors/404.html | 69 ++-- powerdnsadmin/templates/errors/500.html | 69 ++-- powerdnsadmin/templates/errors/SAML.html | 89 +++-- powerdnsadmin/templates/login.html | 315 +++++++++-------- powerdnsadmin/templates/register.html | 253 +++++++------ powerdnsadmin/templates/template_add.html | 29 +- requirements.txt | 42 +-- 24 files changed, 1246 insertions(+), 931 deletions(-) diff --git a/package.json b/package.json index 76982c8..a375986 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { "dependencies": { - "admin-lte": "2.4.9", - "bootstrap": "^3.4.1", - "bootstrap-datepicker": "^1.8.0", + "admin-lte": "3.2.0", + "bootstrap": "4.6.2", + "bootstrap-datepicker": "^1.9.0", "bootstrap-validator": "^0.11.9", - "datatables.net-plugins": "^1.10.19", + "datatables.net-plugins": "^1.13.1", "icheck": "^1.0.2", "jquery-slimscroll": "^1.3.8", - "jquery-ui-dist": "^1.12.1", + "jquery-ui-dist": "^1.13.2", "jquery.quicksearch": "^2.4.0", - "jtimeout": "^3.1.0", + "jtimeout": "^3.2.0", "multiselect": "^0.9.12" } } diff --git a/powerdnsadmin/static/custom/js/custom.js b/powerdnsadmin/static/custom/js/custom.js index e4b72b1..0f096bf 100644 --- a/powerdnsadmin/static/custom/js/custom.js +++ b/powerdnsadmin/static/custom/js/custom.js @@ -287,4 +287,18 @@ function copy_otp_secret_to_clipboard() { navigator.clipboard.writeText(copyBox.value); $("#copy_tooltip").css("visibility", "visible"); setTimeout(function(){ $("#copy_tooltip").css("visibility", "collapse"); }, 2000); - } \ No newline at end of file + } + +// 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'); diff --git a/powerdnsadmin/templates/admin_edit_account.html b/powerdnsadmin/templates/admin_edit_account.html index 1946bc9..08403b9 100644 --- a/powerdnsadmin/templates/admin_edit_account.html +++ b/powerdnsadmin/templates/admin_edit_account.html @@ -4,26 +4,34 @@ {% block dashboard_stat %} -
-

- Account - {% if create %}New account{% else %}{{ account.name }}{% endif %} -

- -
+
+
+
+
+

+ Account + {% if create %}New account{% else %}{{ account.name }}{% endif %} +

+
+
+ +
+
+
+
{% endblock %} {% block content %}
-
-
-

{% if create %}Add{% else %}Edit{% endif %} account

+
+
+

{% if create %}Add{% else %}Edit{% endif %} account

@@ -31,7 +39,7 @@ action="{% if create %}{{ url_for('admin.edit_account') }}{% else %}{{ url_for('admin.edit_account', account_name=account.name) }}{% endif %}"> -
+
{% if error %}
@@ -73,10 +81,10 @@
-
-

Access Control

+
+

Access Control

-
+

Users on the right have access to manage records in all domains associated with the account.

Click on users to move between columns.

@@ -90,7 +98,7 @@
- -
-
-
-

Help with creating a new account

+
+
+
+

Help with creating a new account

-
+

An account allows grouping of domains belonging to a particular entity, such as a customer or department.
diff --git a/powerdnsadmin/templates/admin_edit_key.html b/powerdnsadmin/templates/admin_edit_key.html index 6a94340..a97afcb 100644 --- a/powerdnsadmin/templates/admin_edit_key.html +++ b/powerdnsadmin/templates/admin_edit_key.html @@ -6,26 +6,35 @@ {% endblock %} {% block dashboard_stat %} -

-

- Key - {% if create %}New key{% else %}{{ key.id }}{% endif %} -

- -
+
+
+
+
+

+ API Keys + {% if create %}Add API Key{% else %}Edit API Key - {{ key.id }}{% endif %} +

+
+
+ +
+
+
+
+ {% endblock %} {% block content %}
-
-
-
-
-

{% if create %}Add{% else %}Edit{% endif %} key

+
+
+
+
+

{% if create %}Add{% else %}Edit{% endif %} Key

@@ -33,7 +42,7 @@ action="{% if create %}{{ url_for('admin.edit_key') }}{% else %}{{ url_for('admin.edit_key', key_id=key.id) }}{% endif %}"> -
+
-
+ +
+
+
+
+

+ Dashboard + Control panel +

+
+
+ +
+
+
+
{% endblock %} {% block content %} diff --git a/powerdnsadmin/templates/admin_global_search.html b/powerdnsadmin/templates/admin_global_search.html index 2e38bf1..815230c 100644 --- a/powerdnsadmin/templates/admin_global_search.html +++ b/powerdnsadmin/templates/admin_global_search.html @@ -13,6 +13,26 @@
  • Global Search
  • + +
    +
    +
    +
    +

    + Dashboard + Control panel +

    +
    +
    + +
    +
    +
    +
    + {% endblock %} {% block content %}
    diff --git a/powerdnsadmin/templates/admin_history.html b/powerdnsadmin/templates/admin_history.html index aa16c4a..23b45b9 100644 --- a/powerdnsadmin/templates/admin_history.html +++ b/powerdnsadmin/templates/admin_history.html @@ -4,15 +4,26 @@ History - {{ SITE_NAME }} {% endblock %} {% block dashboard_stat %} -
    -

    - History Recent events -

    - -
    + +
    +
    +
    +
    +

    + History + Recent Events +

    +
    +
    + +
    +
    +
    +
    + {% endblock %} {% block content %} {% import 'applied_change_macro.html' as applied_change_macro %} @@ -20,57 +31,57 @@
    +
    -
    -
    -
    -

    History Management

    +
    +
    +
    +

    History Management

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block extrascripts %} diff --git a/powerdnsadmin/templates/admin_manage_keys.html b/powerdnsadmin/templates/admin_manage_keys.html index dadc2a0..9f2c682 100644 --- a/powerdnsadmin/templates/admin_manage_keys.html +++ b/powerdnsadmin/templates/admin_manage_keys.html @@ -3,72 +3,75 @@ {% block title %} Key Management - {{ SITE_NAME }} {% endblock %} {% block dashboard_stat %} -
    -

    - Key Manage API keys -

    - -
    +
    +
    +
    +
    +

    + API Keys + Management +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %}
    -
    -
    -
    -
    -

    Key Management

    -
    - -
    - - - - - - - - - - - - - {% for key in keys %} - - - - - - - - - {% endfor %} - -
    IdRoleDescriptionDomainsAccountsAction
    {{ key.id }}{{ key.role.name }}{{ key.description }}{% for domain in key.domains %}{{ domain.name }}{% if not loop.last %}, {% endif %}{% endfor %}{% for account in key.accounts %}{{ account.name }}{% if not loop.last %}, {% endif %}{% endfor %} - - -
    -
    - -
    - -
    - +
    +
    +
    +

    Key Management

    +
    + +
    + + + + + + + + + + + + + {% for key in keys %} + + + + + + + + + {% endfor %} + +
    IdRoleDescriptionDomainsAccountsAction
    {{ key.id }}{{ key.role.name }}{{ key.description }}{% for domain in key.domains %}{{ domain.name }}{% if not loop.last %}, {% endif %}{% endfor %}{% for account in key.accounts %}{{ account.name }}{% if not loop.last %}, {% endif %}{% endfor %} + + +
    +
    - +
    {% endblock %} {% block extrascripts %} diff --git a/powerdnsadmin/templates/admin_manage_user.html b/powerdnsadmin/templates/admin_manage_user.html index d6a7204..f1b6022 100644 --- a/powerdnsadmin/templates/admin_manage_user.html +++ b/powerdnsadmin/templates/admin_manage_user.html @@ -3,31 +3,40 @@ {% block title %} User Management - {{ SITE_NAME }} {% endblock %} {% block dashboard_stat %} -
    -

    - User Manage user privileges -

    - -
    +
    +
    +
    +
    +

    + User + Manage user privileges +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %}
    -
    -
    -

    User Management

    +
    +
    +

    User Management

    -
    + -
    +
    diff --git a/powerdnsadmin/templates/admin_pdns_stats.html b/powerdnsadmin/templates/admin_pdns_stats.html index cd5a000..84a1ec6 100644 --- a/powerdnsadmin/templates/admin_pdns_stats.html +++ b/powerdnsadmin/templates/admin_pdns_stats.html @@ -13,6 +13,26 @@
  • Admin Console
  • + +
    +
    +
    +
    +

    + Dashboard + Control panel +

    +
    +
    + +
    +
    +
    +
    + {% endblock %} {% block content %} diff --git a/powerdnsadmin/templates/admin_setting_authentication.html b/powerdnsadmin/templates/admin_setting_authentication.html index 5d0fd10..0509cbb 100644 --- a/powerdnsadmin/templates/admin_setting_authentication.html +++ b/powerdnsadmin/templates/admin_setting_authentication.html @@ -4,33 +4,43 @@ Authentication Settings - {{ SITE_NAME }} {% endblock %} {% block dashboard_stat %} -
    -

    - Settings PowerDNS-Admin settings -

    - - + + + + - window.onload = function() { - ldapSelection(); - } - -
    {% endblock %} {% block content %}
    diff --git a/powerdnsadmin/templates/admin_setting_basic.html b/powerdnsadmin/templates/admin_setting_basic.html index d3d0905..3df8fc0 100644 --- a/powerdnsadmin/templates/admin_setting_basic.html +++ b/powerdnsadmin/templates/admin_setting_basic.html @@ -4,66 +4,73 @@ Basic Settings - {{ SITE_NAME }} {% endblock %} {% block dashboard_stat %} -
    -

    - Settings PowerDNS-Admin settings -

    - -
    +
    +
    +
    +
    +

    + Settings + Basic +

    +
    +
    + +
    +
    +
    +
    + {% endblock %} {% block content %}
    -
    -
    -
    -
    -

    Basic Settings

    -
    -
    -
    - - - - - - - - - {% for setting in settings %} - - - {% if SETTING.get(setting) in [True, False] %} - - - {% else %} - - - {% endif %} - - {% endfor %} - -
    NameValueChange
    {{ setting }}{{ SETTING.get(setting)|display_setting_state }} - - - -
    -
    - -
    - -
    - +
    +
    +
    +

    Basic Settings

    +
    +
    + + + + + + + + + + {% for setting in settings %} + + + {% if SETTING.get(setting) in [True, False] %} + + + {% else %} + + + {% endif %} + + {% endfor %} + +
    NameValueChange
    + {{ setting }} + {{ SETTING.get(setting)|display_setting_state }} + + + + + +
    +
    - +
    {% endblock %} {% block extrascripts %} diff --git a/powerdnsadmin/templates/admin_setting_pdns.html b/powerdnsadmin/templates/admin_setting_pdns.html index 84f86a9..08b42f1 100644 --- a/powerdnsadmin/templates/admin_setting_pdns.html +++ b/powerdnsadmin/templates/admin_setting_pdns.html @@ -4,7 +4,7 @@ PDNS Settings - {{ SITE_NAME }} {% endblock %} {% block dashboard_stat %} -
    +

    Settings PowerDNS-Admin settings

    @@ -13,7 +13,7 @@
  • Setting
  • PDNS
  • -
    +
    {% endblock %} {% block content %}
    diff --git a/powerdnsadmin/templates/base.html b/powerdnsadmin/templates/base.html index 35bfc51..f3261dd 100644 --- a/powerdnsadmin/templates/base.html +++ b/powerdnsadmin/templates/base.html @@ -2,37 +2,85 @@ {% block head %} - - - - {% block title %}{{ SITE_NAME }}{% endblock %} - - - - - - - - - {% assets "css_main" -%} + + + + {% block title %} + + {{ SITE_NAME }} + + {% endblock %} + + + + + + + + + + {% assets "css_main" -%} - {%- endassets %} -{% if SETTING.get('custom_css') %} - -{% endif %} + {%- endassets %} + {% if SETTING.get('custom_css') %} + + {% endif %} {% endblock %} + -{% set user_image_url = url_for('user.image', username=current_user.username) %} -
    + {% set user_image_url = url_for('user.image', username=current_user.username) %} +
    {% block pageheader %} -
    + + + {% endblock %} + +
    - {% endblock %} - -
    @@ -169,16 +224,24 @@
    {% block dashboard_stat %} -
    -

    - Dashboard - Control panel -

    - -
    +
    +
    +
    +
    +

    + Dashboard + Control panel +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %} {% endblock %} @@ -382,4 +445,4 @@ {% block modals %} {% endblock %} - + \ No newline at end of file diff --git a/powerdnsadmin/templates/errors/400.html b/powerdnsadmin/templates/errors/400.html index ec53684..b2ca864 100644 --- a/powerdnsadmin/templates/errors/400.html +++ b/powerdnsadmin/templates/errors/400.html @@ -1,41 +1,52 @@ {% extends "base.html" %} -{% block title %}PowerDNS-Admin - 400 Error{% endblock %} + +{% block title %} + + {{ SITE_NAME }} - 400 Error + +{% endblock %} {% block dashboard_stat %} - -
    -

    - 400 - Error -

    - -
    +
    +
    +
    +
    +

    + 400 + Error +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %} - -
    +
    -

    400

    -
    -

    - Oops! Bad request -

    -

    - {% if msg %} - {{ msg }} - {% else %} - The server refused to process your request and return a 400 error. - {% endif %} -
    You may return to the dashboard. -

    -
    - +

    + 400 +

    +
    +

    + + Oops! Bad request +

    +

    + {% if msg %} + {{ msg }} + {% else %} + The server refused to process your request and return a 400 error. + {% endif %} +
    You may return to the dashboard. +

    +
    - -
    - -{% endblock %} +
    +{% endblock %} \ No newline at end of file diff --git a/powerdnsadmin/templates/errors/403.html b/powerdnsadmin/templates/errors/403.html index ffe96bf..f629eb8 100644 --- a/powerdnsadmin/templates/errors/403.html +++ b/powerdnsadmin/templates/errors/403.html @@ -1,37 +1,48 @@ {% extends "base.html" %} -{% block title %}PowerDNS-Admin - 403 Error{% endblock %} + +{% block title %} + + {{ SITE_NAME }} - 403 Error + +{% endblock %} {% block dashboard_stat %} - -
    -

    - 403 - Error -

    - -
    +
    +
    +
    +
    +

    + 403 + Error +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %} - -
    +
    -

    403

    -
    -

    - Oops! Access denied -

    -

    - You don't have permission to access this page - You may return to the dashboard. -

    -
    - +

    + 403 +

    +
    +

    + + Oops! Access denied +

    +

    + You don't have permission to access this page + You may return to the dashboard. +

    +
    - -
    - -{% endblock %} +
    +{% endblock %} \ No newline at end of file diff --git a/powerdnsadmin/templates/errors/404.html b/powerdnsadmin/templates/errors/404.html index a93c731..858731f 100644 --- a/powerdnsadmin/templates/errors/404.html +++ b/powerdnsadmin/templates/errors/404.html @@ -1,37 +1,48 @@ {% extends "base.html" %} -{% block title %}PowerDNS-Admin - 404 Error{% endblock %} + +{% block title %} + + {{ SITE_NAME }} - 404 Error + +{% endblock %} {% block dashboard_stat %} - -
    -

    - 404 - Error -

    - -
    +
    +
    +
    +
    +

    + 404 + Error +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %} - -
    +
    -

    404

    -
    -

    - Oops! You're lost -

    -

    - The page you requested could not be found. - You may return to the dashboard. -

    -
    - +

    + 404 +

    +
    +

    + + Oops! You're lost +

    +

    + The page you requested could not be found. + You may return to the dashboard. +

    +
    - -
    - -{% endblock %} +
    +{% endblock %} \ No newline at end of file diff --git a/powerdnsadmin/templates/errors/500.html b/powerdnsadmin/templates/errors/500.html index d223b0b..51142f0 100644 --- a/powerdnsadmin/templates/errors/500.html +++ b/powerdnsadmin/templates/errors/500.html @@ -1,37 +1,48 @@ {% extends "base.html" %} -{% block title %}PowerDNS-Admin - 500 Error{% endblock %} + +{% block title %} + + {{ SITE_NAME }} - 500 Error + +{% endblock %} {% block dashboard_stat %} - -
    -

    - 500 - Error -

    - -
    +
    +
    +
    +
    +

    + 500 + Error +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %} - -
    +
    -

    500

    -
    -

    - Oops! Something went wrong -

    -

    - Try again later. - You may return to the dashboard. -

    -
    - +

    + 500 +

    +
    +

    + + Oops! Something went wrong +

    +

    + Try again later. + You may return to the dashboard. +

    +
    - -
    - -{% endblock %} +
    +{% endblock %} \ No newline at end of file diff --git a/powerdnsadmin/templates/errors/SAML.html b/powerdnsadmin/templates/errors/SAML.html index 2cfacbd..c779022 100644 --- a/powerdnsadmin/templates/errors/SAML.html +++ b/powerdnsadmin/templates/errors/SAML.html @@ -1,45 +1,60 @@ {% extends "base.html" %} -{% block title %}PowerDNS-Admin - SAML Authentication Error{% endblock %} + +{% block title %} + + {{ SITE_NAME }} - SAML Authentication Error + +{% endblock %} {% block dashboard_stat %} - -
    -

    - SAML - Error -

    - -
    +
    +
    +
    +
    +

    + SAML + Error +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %} - -
    +
    -
    -

    SAML Authentication Error



    -
    -

    - Oops! Something went wrong -


    -

    - Login failed.
    - Error(s) when processing SAML Response:
    -

      - {% for error in errors %} -
    • {{ error }}
    • - {% endfor %} -
    - - You may return to the dashboard. -

    -
    - +
    +

    + SAML Authentication Error +

    +
    +
    +
    +
    +

    + Oops! Something went wrong +

    +
    +

    + Login failed. +
    + Error(s) when processing SAML Response: +
    +

      + {% for error in errors %} +
    • {{ error }}
    • + {% endfor %} +
    + You may return to the dashboard. +

    +
    - -
    - -{% endblock %} +
    +{% endblock %} \ No newline at end of file diff --git a/powerdnsadmin/templates/login.html b/powerdnsadmin/templates/login.html index 805422b..02f3e41 100644 --- a/powerdnsadmin/templates/login.html +++ b/powerdnsadmin/templates/login.html @@ -1,166 +1,171 @@ - - - - - Log In - {{ SITE_NAME }} - - - - - {% assets "css_login" -%} - - {%- endassets %} -{% if SETTING.get('custom_css') %} - -{% endif %} - - - -
    + {% endblock %} + +{% block extrascripts %} + +{% endblock %} + +{% block modals %} + + + +{% endblock %} \ No newline at end of file diff --git a/powerdnsadmin/templates/domain_changelog.html b/powerdnsadmin/templates/domain_changelog.html index a6b530a..27b5bc4 100644 --- a/powerdnsadmin/templates/domain_changelog.html +++ b/powerdnsadmin/templates/domain_changelog.html @@ -2,72 +2,79 @@ {% block title %}{{ domain.name | pretty_domain_name }} - {{ SITE_NAME }}{% endblock %} {% block dashboard_stat %} -
    -

    - {% if record_name and record_type %} - Record changelog: {{ record_name}}   {{ record_type }} - {% else %} - Domain changelog: {{ domain.name | pretty_domain_name }} - {% endif %} -

    - -
    +
    +
    +
    +
    +

    + {% if record_name and record_type %} + Record changelog: {{ record_name}}   {{ record_type }} + {% else %} + Domain changelog: {{ domain.name | pretty_domain_name }} + {% endif %} +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% import 'applied_change_macro.html' as applied_change_macro %} {% block content %}
    +
    -
    -
    -
    - -
    -
    - - - - - - - - - - {% for applied_change in allHistoryChanges %} - - - - - - - - - - - {% endfor %} - -
    Changed onChanged by
    - {{ allHistoryChanges[applied_change][0].history_entry.created_on }} - - {{allHistoryChanges[applied_change][0].history_entry.created_by }} -
    -
    - {% call applied_change_macro.applied_change_template(allHistoryChanges[applied_change]) %} - {% endcall %} -
    -
    -
    -
    +
    +
    +
    + +
    +
    + + + + + + + + + {% for applied_change in allHistoryChanges %} + + + + + + + + + + {% endfor %} + +
    Changed onChanged by
    + {{ allHistoryChanges[applied_change][0].history_entry.created_on }} + + {{allHistoryChanges[applied_change][0].history_entry.created_by }} +
    +
    + {% call applied_change_macro.applied_change_template(allHistoryChanges[applied_change]) %} + {% endcall %} +
    +
    +
    +
    +
    {% endblock %} diff --git a/powerdnsadmin/templates/domain_remove.html b/powerdnsadmin/templates/domain_remove.html index 6ac5401..5c20f13 100644 --- a/powerdnsadmin/templates/domain_remove.html +++ b/powerdnsadmin/templates/domain_remove.html @@ -1,127 +1,135 @@ {% extends "base.html" %} + {% set active_page = "remove_domain" %} -{% block title %}Remove Domain - {{ SITE_NAME }}{% endblock %} + +{% block title %} + + Remove Domain - {{ SITE_NAME }} + +{% endblock %} {% block dashboard_stat %} - -
    -

    - Domain - Remove existing -

    - -
    +
    +
    +
    +
    +

    + Domain + Remove +

    +
    +
    + +
    +
    +
    +
    {% endblock %} {% block content %}
    +
    -
    -
    -
    -

    Remove domain

    -
    - - -
    - -
    -
    - -
    - - - -
    +
    +
    +
    +

    Remove domain

    +
    +
    + +
    + +
    - -
    -
    -
    -
    -

    Help with removing a new domain

    -
    -
    -
    -
    Domain name
    -
    Select domain you wish to remove from DNS.
    -
    -

    Find more details at https://docs.powerdns.com/md/ -

    -
    + +
    +
    +
    +
    +
    +

    Help with removing a new domain

    +
    +
    +
    +
    Domain name
    +
    Select domain you wish to remove from DNS.
    +
    +

    Find more details at https://docs.powerdns.com/md/

    +
    +
    +
    +
    {% endblock %} + {% block extrascripts %} {% endblock %} {% block modals %}
    {% endblock %} + +{% block content %} +
    +
    +
    +
    +
    +
    +

    User Management

    +
    + +
    + + + + + + + + + + + + + + {% for user in users %} + + + + + + + + + + {% endfor %} + +
    UsernameFirst NameLast NameEmailRolePrivilegesAction
    {{ user.username }}{{ user.firstname }}{{ user.lastname }}{{ user.email }} + + + + + + +
    +
    +
    +
    +
    +
    +
    +{% endblock %} + {% block extrascripts %} - + {% endblock %} + {% block modals %} -