perf: 修改 terminal session

This commit is contained in:
ibuler
2022-08-24 16:14:32 +08:00
parent dca1388a67
commit 063c42b94d
29 changed files with 167 additions and 283 deletions

View File

@@ -1,6 +1,6 @@
from .common import *
from .host import *
from .database import *
from .network import *
from .remote_app import *
from .networking import *
from .web import *
from .cloud import *

View File

@@ -2,5 +2,5 @@
from .common import Asset
class Network(Asset):
class Networking(Asset):
pass

View File

@@ -1,10 +0,0 @@
from django.utils.translation import gettext_lazy as _
from django.db import models
from .common import Asset
class RemoteApp(Asset):
app_path = models.CharField(max_length=1024, verbose_name=_("App path"))
connect_host = models.ForeignKey('assets.Host', null=True, on_delete=models.SET_NULL)
attrs = models.JSONField(default=dict, verbose_name=_('Attrs'))

View File

@@ -0,0 +1,8 @@
from django.utils.translation import gettext_lazy as _
from django.db import models
from .common import Asset
class Web(Asset):
url = models.CharField(max_length=1024, verbose_name=_("url"))

View File

@@ -24,8 +24,8 @@ class Platform(models.Model):
('gbk', 'GBK'),
)
name = models.SlugField(verbose_name=_("Name"), unique=True, allow_unicode=True)
category = models.CharField(max_length=16, choices=Category.choices, default=Category.HOST, verbose_name=_("Category"))
type = models.CharField(choices=AllTypes.choices, max_length=32, default='Linux', verbose_name=_("Type"))
category = models.CharField(default='host', max_length=32, verbose_name=_("Category"))
type = models.CharField(max_length=32, default='linux', verbose_name=_("Type"))
charset = models.CharField(default='utf8', choices=CHARSET_CHOICES, max_length=8, verbose_name=_("Charset"))
meta = JsonDictTextField(blank=True, null=True, verbose_name=_("Meta"))
internal = models.BooleanField(default=False, verbose_name=_("Internal"))