diff --git a/README.md b/README.md index f7a15a5..ff2e58a 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,15 @@ PowerDNS Web-GUI - Built by Flask - Multiple domain management - Local / LDAP user authentication - User management -- User access management base on domain +- User access management based on domain - User activity logging - Dashboard and pdns service statistics ## Setup +### PowerDNS Version Support: +PowerDNS-Admin supports PowerDNS autoritative server versions **3.4.2** and higher but does **not** yet support PowerDNS 4.0.0 + ### pdns Service I assume that you have already installed powerdns service. Make sure that your `/etc/pdns/pdns.conf` has these contents ``` @@ -30,7 +33,7 @@ MariaDB [(none)]> GRANT ALL PRIVILEGES ON powerdnsadmin.* TO powerdnsadmin@'%' I ### PowerDNS-Admin -In this installation guide, I am using CentOS 7 and run my python stuffs with *virtualenv*. If you don't have it, let install: +In this installation guide, I am using CentOS 7 and run my python stuffs with *virtualenv*. If you don't have it, lets install it: ``` $ sudo yum install python-pip $ sudo pip install virtualenv @@ -55,7 +58,7 @@ Web application configuration is stored in `config.py` file. Let's clone it from Create database after having proper configs ``` -(flask)% ./createdb.py +(flask)% ./create_db.py ``` @@ -64,5 +67,9 @@ Run the application and enjoy! (flask)$ ./run.py ``` -### Screenshot -![Alt text](http://i.imgur.com/wA5qy2d.png) +### Screenshots +![login page](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/images/readme_screenshots/fullscreen-login.png?raw=true) +![dashboard](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/images/readme_screenshots/fullscreen-dashboard.png?raw=true) +![create domain page](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/images/readme_screenshots/fullscreen-domaincreate.png?raw=true) +![manage domain page](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/images/readme_screenshots/fullscreen-domainmanage.png?raw=true) + diff --git a/app/static/custom/js/custom.js b/app/static/custom/js/custom.js index 71f77b7..a0b319d 100644 --- a/app/static/custom/js/custom.js +++ b/app/static/custom/js/custom.js @@ -1,4 +1,4 @@ -function applyChanges(data, url, showResult) { +function applyChanges(data, url, showResult, refreshPage) { var success = false; $.ajax({ type : "POST", @@ -14,6 +14,9 @@ function applyChanges(data, url, showResult) { modal.find('.modal-body p').text("Applied changes successfully"); modal.modal('show'); } + if (refreshPage) { + location.reload(true); + } }, error : function(jqXHR, status) { @@ -91,7 +94,7 @@ function editRow(oTable, nRow) { jqTds[1].innerHTML = ''; jqTds[2].innerHTML = ''; jqTds[3].innerHTML = ''; - jqTds[4].innerHTML = ''; + jqTds[4].innerHTML = ''; jqTds[5].innerHTML = ''; jqTds[6].innerHTML = ''; diff --git a/app/templates/admin_createuser.html b/app/templates/admin_createuser.html new file mode 100644 index 0000000..3abd689 --- /dev/null +++ b/app/templates/admin_createuser.html @@ -0,0 +1,91 @@ +{% extends "base.html" %} +{% block title %}DNS Control Panel - Create User{% endblock %} + +{% block dashboard_stat %} + +
+

+ User + Create new +

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

Create new user

+
+ + +
+
+
+ + +
+
+ + +
+
+ + + {% if duplicate_email %} + This e-mail address is already in use. + {% endif %} +
+ +
+ + + {% if duplicate_username %} + This username is already in use. + {% endif %} +
+
+ + + {% if blank_password %} + The password cannot be blank. + {% endif %} +
+
+ +
+
+
+
+
+
+

Help with creating a new user

+
+
+

Fill in all the fields to the in the form to the left.

+

Newly created users do not have access to any domains. You will need to grant access to the user once it is created via the domain management buttons on the dashboard.

+
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/app/templates/admin_manageuser.html b/app/templates/admin_manageuser.html index a50a695..ca60c41 100644 --- a/app/templates/admin_manageuser.html +++ b/app/templates/admin_manageuser.html @@ -19,6 +19,13 @@

User Management

+
+ + + +
@@ -97,9 +104,8 @@ modal.find('.modal-body p').text(info); modal.find('#button_delete_confirm').click(function() { var postdata = {'action': 'delete_user', 'data': username} - applyChanges(postdata, '/admin/manageuser'); + applyChanges(postdata, '/admin/manageuser', false, true); modal.modal('hide'); - location.reload(); }) modal.modal('show'); diff --git a/app/templates/admin_settings.html b/app/templates/admin_settings.html index 9d10b18..d8874f0 100644 --- a/app/templates/admin_settings.html +++ b/app/templates/admin_settings.html @@ -73,65 +73,13 @@ $(".setting-toggle-button").click(function() { var setting = $(this).prop('id'); - applyChanges('','/admin/setting/' + setting + '/toggle') - location.reload(); + applyChanges('','/admin/setting/' + setting + '/toggle', false, true) }); // TODO: allow editing of value field $(".setting-edit-button").click(function() { var setting = $(this).prop('id'); - applyChanges('','/admin/setting/' + setting + '/edit') - location.reload(); + applyChanges('','/admin/setting/' + setting + '/edit', false, true) }); {% endblock %} -{% block modals %} - - - - -{% endblock %} diff --git a/app/templates/base.html b/app/templates/base.html index be0dfcc..a34f615 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -57,6 +57,7 @@ @@ -103,7 +105,7 @@ @@ -149,102 +151,8 @@ {% endblock %} - - {% block content %} -
- -
-
- -
-
-

150

-

Domains

-
-
- -
- More info -
-
- -
- -
-
-

53%

-

Users

-
-
- -
- More info -
-
- -
- -
-
-

44

-

Histories

-
-
- -
- More info -
-
- -
- -
-
-

65

-

Uptime

-
-
- -
- More info -
-
- -
- - -
- -
- - - -
- - -
- -
- -
- - -
{% endblock %} -