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

17 lines
764 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 assets.const import FillType
2022-08-24 08:14:32 +00:00
from .common import Asset
class Web(Asset):
2022-10-20 08:39:11 +00:00
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"))
2023-02-17 08:54:51 +00:00
class Meta:
verbose_name = _("Web")