jumpserver/apps/assets/models/asset/web.py

18 lines
830 B
Python
Raw Normal View History

2022-08-24 08:14:32 +00:00
from django.db import models
2022-10-19 10:56:46 +00:00
from django.utils.translation import gettext_lazy as _
2022-08-24 08:14:32 +00:00
from .common import Asset
class Web(Asset):
2022-10-20 08:39:11 +00:00
class FillType(models.TextChoices):
no = 'no', _('Disabled')
basic = 'basic', _('Basic')
script = 'script', _('Script')
autofill = models.CharField(max_length=16, choices=FillType.choices, default='basic', verbose_name=_("Autofill"))
2022-10-19 10:56:46 +00:00
username_selector = models.CharField(max_length=128, blank=True, default='', verbose_name=_("Username selector"))
password_selector = models.CharField(max_length=128, blank=True, default='', verbose_name=_("Password selector"))
submit_selector = models.CharField(max_length=128, blank=True, default='', verbose_name=_("Submit selector"))
2022-10-20 08:39:11 +00:00
script = models.JSONField(blank=True, default=list, verbose_name=_("Script"))