aboutsummaryrefslogtreecommitdiffstats
path: root/src/analytics
diff options
context:
space:
mode:
Diffstat (limited to 'src/analytics')
-rw-r--r--src/analytics/admin.py5
-rw-r--r--src/analytics/migrations/0003_delete_activevpnuser.py16
-rw-r--r--src/analytics/models.py22
3 files changed, 16 insertions, 27 deletions
diff --git a/src/analytics/admin.py b/src/analytics/admin.py
index 63f139f..043bad6 100644
--- a/src/analytics/admin.py
+++ b/src/analytics/admin.py
@@ -6,8 +6,3 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-
-from django.contrib import admin
-from analytics.models import ActiveVPNUser
-
-admin.site.register(ActiveVPNUser)
diff --git a/src/analytics/migrations/0003_delete_activevpnuser.py b/src/analytics/migrations/0003_delete_activevpnuser.py
new file mode 100644
index 0000000..4d21250
--- /dev/null
+++ b/src/analytics/migrations/0003_delete_activevpnuser.py
@@ -0,0 +1,16 @@
+# Generated by Django 2.2 on 2023-06-08 19:13
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('analytics', '0002_auto_20201109_2149'),
+ ]
+
+ operations = [
+ migrations.DeleteModel(
+ name='ActiveVPNUser',
+ ),
+ ]
diff --git a/src/analytics/models.py b/src/analytics/models.py
index 10baa0c..043bad6 100644
--- a/src/analytics/models.py
+++ b/src/analytics/models.py
@@ -6,25 +6,3 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-
-from django.db import models
-from account.models import Lab
-
-
-class ActiveVPNUser(models.Model):
- """ Keeps track of how many VPN Users are connected to Lab """
- time_stamp = models.DateTimeField(auto_now_add=True)
- lab = models.ForeignKey(Lab, on_delete=models.CASCADE, null=False)
- active_users = models.IntegerField()
-
- @classmethod
- def create(cls, lab_name, active_users):
- """
- This creates an Active VPN Users entry from
- from lab_name as a string
- """
-
- lab = Lab.objects.get(name=lab_name)
- avu = cls(lab=lab, active_users=active_users)
- avu.save()
- return avu