diff options
author | Justin Choquette <jchoquette@iol.unh.edu> | 2023-06-08 12:46:53 -0400 |
---|---|---|
committer | Justin Choquette <jchoquette@iol.unh.edu> | 2023-07-21 13:17:51 -0400 |
commit | a09db9f287a02873c0226759f8ea444bb304cd59 (patch) | |
tree | 59e744e4b998973a808abbae2d21fbdd6201d829 /src/analytics | |
parent | 8ddc7e820e120f1dde4e901d3cb6f1dd3f281e65 (diff) |
LaaS 3.0 Almost MVP
Change-Id: Ided9a43cf3088bb58a233dc459711c03f43e11b8
Signed-off-by: Justin Choquette <jchoquette@iol.unh.edu>
Diffstat (limited to 'src/analytics')
-rw-r--r-- | src/analytics/admin.py | 5 | ||||
-rw-r--r-- | src/analytics/migrations/0003_delete_activevpnuser.py | 16 | ||||
-rw-r--r-- | src/analytics/models.py | 22 |
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 |