diff --git a/manager/migrations/0003_device_name.py b/manager/migrations/0003_device_name.py new file mode 100644 index 0000000..7a06158 --- /dev/null +++ b/manager/migrations/0003_device_name.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.3 on 2018-11-25 17:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('manager', '0002_auto_20181125_1457'), + ] + + operations = [ + migrations.AddField( + model_name='device', + name='name', + field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Common Name'), + ), + ] diff --git a/manager/migrations/0004_network_organizations.py b/manager/migrations/0004_network_organizations.py new file mode 100644 index 0000000..c7bfa50 --- /dev/null +++ b/manager/migrations/0004_network_organizations.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.3 on 2018-11-25 17:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('manager', '0003_device_name'), + ] + + operations = [ + migrations.AddField( + model_name='network', + name='organizations', + field=models.ManyToManyField(to='manager.Organization'), + ), + ] diff --git a/manager/migrations/0005_device_lasttime.py b/manager/migrations/0005_device_lasttime.py new file mode 100644 index 0000000..f1ef53b --- /dev/null +++ b/manager/migrations/0005_device_lasttime.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.3 on 2018-11-25 20:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('manager', '0004_network_organizations'), + ] + + operations = [ + migrations.AddField( + model_name='device', + name='lasttime', + field=models.DateTimeField(blank=True, null=True, verbose_name='Last Received Heartbeat'), + ), + ] diff --git a/manager/templates/base.html b/manager/templates/base.html new file mode 100644 index 0000000..423028b --- /dev/null +++ b/manager/templates/base.html @@ -0,0 +1,65 @@ + + + +
+ + + + + + +Organization: {{ organization }}
+User: {{ user.firstname }} {{ user.lastname }} ({{ user.username }})
+ +Your username and password didn't match. Please try again.
+{% endif %} + +{% if next %} + {% if user.is_authenticated %} +Your account doesn't have access to this page. To proceed, + please login with an account that has access.
+ {% else %} +Please login to see this page.
+ {% endif %} +{% endif %} + + + +{# Assumes you setup the password_reset view in your URLconf #} + + +{% endblock %} diff --git a/uwsgi.sh b/uwsgi.sh new file mode 100755 index 0000000..c505209 --- /dev/null +++ b/uwsgi.sh @@ -0,0 +1,2 @@ +#!/bin/bash +uwsgi --socket 127.0.0.1:9360 --module vpnmanager.wsgi --uid 1001 diff --git a/vpnmanager.service b/vpnmanager.service new file mode 100644 index 0000000..f1bd9f0 --- /dev/null +++ b/vpnmanager.service @@ -0,0 +1,10 @@ +[Unit] +Description = VPNManager +After = network.target + +[Service] +WorkingDirectory = /opt/vpnmanager/ +ExecStart=/opt/vpnmanager/uwsgi.sh + +[Install] +WantedBy=multi-user.target diff --git a/vpnmanager/settings.py b/vpnmanager/settings.py index a8a0c8a..7b808d4 100644 --- a/vpnmanager/settings.py +++ b/vpnmanager/settings.py @@ -25,14 +25,13 @@ SECRET_KEY = '=go8&h#^kh6ksr11e2z-@4qqd6t%63$x#-!s#l_yhw@oyanrys' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["admin360.kumi.host"] # Application definition INSTALLED_APPS = [ 'manager.apps.ManagerConfig', - 'bootstrap3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',