add goarch constant
This commit is contained in:
parent
c404ae7ac8
commit
3edf6c57ba
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.0.4 on 2022-06-06 04:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agents', '0053_remove_agenthistory_status'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='agent',
|
||||
name='goarch',
|
||||
field=models.CharField(blank=True, choices=[('amd64', 'amd64'), ('386', '386'), ('arm64', 'arm64'), ('arm', 'arm')], max_length=255, null=True),
|
||||
),
|
||||
]
|
|
@ -32,6 +32,7 @@ from tacticalrmm.constants import (
|
|||
CheckType,
|
||||
CustomFieldType,
|
||||
DebugLogType,
|
||||
GoArch,
|
||||
)
|
||||
from tacticalrmm.models import PermissionQuerySet
|
||||
|
||||
|
@ -60,7 +61,9 @@ class Agent(BaseAuditModel):
|
|||
plat = models.CharField(
|
||||
max_length=255, choices=AgentPlat.choices, default=AgentPlat.WINDOWS
|
||||
)
|
||||
goarch = models.CharField(max_length=255, null=True, blank=True)
|
||||
goarch = models.CharField(
|
||||
max_length=255, choices=GoArch.choices, null=True, blank=True
|
||||
)
|
||||
hostname = models.CharField(max_length=255)
|
||||
agent_id = models.CharField(max_length=200, unique=True)
|
||||
last_seen = models.DateTimeField(null=True, blank=True)
|
||||
|
|
|
@ -23,6 +23,13 @@ AGENT_STATUS_OFFLINE = "offline"
|
|||
AGENT_STATUS_OVERDUE = "overdue"
|
||||
|
||||
|
||||
class GoArch(models.TextChoices):
|
||||
AMD64 = "amd64", "amd64"
|
||||
i386 = "386", "386"
|
||||
ARM64 = "arm64", "arm64"
|
||||
ARM32 = "arm", "arm"
|
||||
|
||||
|
||||
class CustomFieldModel(models.TextChoices):
|
||||
CLIENT = "client", "Client"
|
||||
SITE = "site", "Site"
|
||||
|
|
Loading…
Reference in New Issue