diff --git a/api/tacticalrmm/accounts/migrations/0002_auto_20200810_0544.py b/api/tacticalrmm/accounts/migrations/0002_auto_20200810_0544.py new file mode 100644 index 00000000..e697c5d2 --- /dev/null +++ b/api/tacticalrmm/accounts/migrations/0002_auto_20200810_0544.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-08-10 05:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='first_name', + field=models.CharField(blank=True, max_length=150, verbose_name='first name'), + ), + ] diff --git a/api/tacticalrmm/agents/migrations/0012_auto_20200810_0544.py b/api/tacticalrmm/agents/migrations/0012_auto_20200810_0544.py new file mode 100644 index 00000000..fccbe82c --- /dev/null +++ b/api/tacticalrmm/agents/migrations/0012_auto_20200810_0544.py @@ -0,0 +1,28 @@ +# Generated by Django 3.1 on 2020-08-10 05:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('agents', '0011_recoveryaction'), + ] + + operations = [ + migrations.AlterField( + model_name='agent', + name='disks', + field=models.JSONField(null=True), + ), + migrations.AlterField( + model_name='agent', + name='services', + field=models.JSONField(null=True), + ), + migrations.AlterField( + model_name='agent', + name='wmi_detail', + field=models.JSONField(null=True), + ), + ] diff --git a/api/tacticalrmm/agents/models.py b/api/tacticalrmm/agents/models.py index b57e109d..1e75f0bb 100644 --- a/api/tacticalrmm/agents/models.py +++ b/api/tacticalrmm/agents/models.py @@ -13,7 +13,6 @@ from loguru import logger from django.db import models from django.conf import settings -from django.contrib.postgres.fields import JSONField from core.models import TZ_CHOICES @@ -34,11 +33,11 @@ class Agent(models.Model): local_ip = models.TextField(null=True) agent_id = models.CharField(max_length=200) last_seen = models.DateTimeField(null=True, blank=True) - services = JSONField(null=True) + services = models.JSONField(null=True) public_ip = models.CharField(null=True, max_length=255) total_ram = models.IntegerField(null=True) used_ram = models.IntegerField(null=True) - disks = JSONField(null=True) + disks = models.JSONField(null=True) boot_time = models.FloatField(null=True) logged_in_username = models.CharField(null=True, max_length=200) client = models.CharField(max_length=200) @@ -56,7 +55,7 @@ class Agent(models.Model): update_pending = models.BooleanField(default=False) salt_update_pending = models.BooleanField(default=False) choco_installed = models.BooleanField(default=False) - wmi_detail = JSONField(null=True) + wmi_detail = models.JSONField(null=True) time_zone = models.CharField( max_length=255, choices=TZ_CHOICES, null=True, blank=True ) diff --git a/api/tacticalrmm/checks/migrations/0005_auto_20200810_0544.py b/api/tacticalrmm/checks/migrations/0005_auto_20200810_0544.py new file mode 100644 index 00000000..990dbd20 --- /dev/null +++ b/api/tacticalrmm/checks/migrations/0005_auto_20200810_0544.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1 on 2020-08-10 05:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('checks', '0004_check_parent_check'), + ] + + operations = [ + migrations.AlterField( + model_name='check', + name='extra_details', + field=models.JSONField(blank=True, null=True), + ), + migrations.AlterField( + model_name='check', + name='outage_history', + field=models.JSONField(blank=True, null=True), + ), + ] diff --git a/api/tacticalrmm/checks/models.py b/api/tacticalrmm/checks/models.py index be762dde..9958a716 100644 --- a/api/tacticalrmm/checks/models.py +++ b/api/tacticalrmm/checks/models.py @@ -5,7 +5,7 @@ from statistics import mean from django.db import models from django.conf import settings -from django.contrib.postgres.fields import ArrayField, JSONField +from django.contrib.postgres.fields import ArrayField from django.core.validators import MinValueValidator, MaxValueValidator from core.models import CoreSettings @@ -86,8 +86,8 @@ class Check(models.Model): fail_count = models.PositiveIntegerField(default=0) email_sent = models.DateTimeField(null=True, blank=True) text_sent = models.DateTimeField(null=True, blank=True) - outage_history = JSONField(null=True, blank=True) # store - extra_details = JSONField(null=True, blank=True) + outage_history = models.JSONField(null=True, blank=True) # store + extra_details = models.JSONField(null=True, blank=True) # check specific fields diff --git a/api/tacticalrmm/logs/migrations/0002_auto_20200810_0544.py b/api/tacticalrmm/logs/migrations/0002_auto_20200810_0544.py new file mode 100644 index 00000000..47448aa6 --- /dev/null +++ b/api/tacticalrmm/logs/migrations/0002_auto_20200810_0544.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-08-10 05:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('logs', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='pendingaction', + name='details', + field=models.JSONField(blank=True, null=True), + ), + ] diff --git a/api/tacticalrmm/logs/models.py b/api/tacticalrmm/logs/models.py index 843180be..30870c68 100644 --- a/api/tacticalrmm/logs/models.py +++ b/api/tacticalrmm/logs/models.py @@ -1,7 +1,6 @@ import datetime as dt from django.db import models -from django.contrib.postgres.fields import JSONField from agents.models import Agent @@ -28,7 +27,7 @@ class PendingAction(models.Model): max_length=255, choices=STATUS_CHOICES, default="pending", ) celery_id = models.CharField(null=True, blank=True, max_length=255) - details = JSONField(null=True, blank=True) + details = models.JSONField(null=True, blank=True) def __str__(self): return f"{self.agent.hostname} - {self.action_type}" diff --git a/api/tacticalrmm/requirements.txt b/api/tacticalrmm/requirements.txt index 10d14032..1baa5ed2 100644 --- a/api/tacticalrmm/requirements.txt +++ b/api/tacticalrmm/requirements.txt @@ -7,7 +7,7 @@ cffi==1.14.1 chardet==3.0.4 cryptography==3.0 decorator==4.4.2 -Django==3.0.8 +Django==3.1 django-cors-headers==3.4.0 django-rest-knox==4.1.0 djangorestframework==3.11.1 diff --git a/api/tacticalrmm/software/migrations/0002_auto_20200810_0544.py b/api/tacticalrmm/software/migrations/0002_auto_20200810_0544.py new file mode 100644 index 00000000..4c42c87c --- /dev/null +++ b/api/tacticalrmm/software/migrations/0002_auto_20200810_0544.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1 on 2020-08-10 05:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('software', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='chocosoftware', + name='chocos', + field=models.JSONField(), + ), + migrations.AlterField( + model_name='installedsoftware', + name='software', + field=models.JSONField(), + ), + ] diff --git a/api/tacticalrmm/software/models.py b/api/tacticalrmm/software/models.py index b17a66d3..eac1f757 100644 --- a/api/tacticalrmm/software/models.py +++ b/api/tacticalrmm/software/models.py @@ -1,11 +1,10 @@ from django.db import models -from django.contrib.postgres.fields import JSONField from agents.models import Agent class ChocoSoftware(models.Model): - chocos = JSONField() + chocos = models.JSONField() added = models.DateTimeField(auto_now_add=True) @classmethod @@ -54,7 +53,7 @@ class ChocoLog(models.Model): class InstalledSoftware(models.Model): agent = models.ForeignKey(Agent, on_delete=models.CASCADE) - software = JSONField() + software = models.JSONField() def __str__(self): return self.agent.hostname