perf: web selector 默认值修改

This commit is contained in:
Eric
2022-12-14 17:19:35 +08:00
committed by Eric_Lee
parent 7b0d26bbff
commit d60f9a7c69
3 changed files with 16 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
from django.db import models
from common.db.models import ChoicesMixin
__all__ = ['Protocol']
@@ -102,9 +103,9 @@ class Protocol(ChoicesMixin, models.TextChoices):
'port': 80,
'secret_types': ['password'],
'setting': {
'username_selector': 'input[type=text]',
'password_selector': 'input[type=password]',
'submit_selector': 'button[type=submit]',
'username_selector': 'name=username',
'password_selector': 'name=password',
'submit_selector': 'id=longin_button',
}
},
}
@@ -112,7 +113,7 @@ class Protocol(ChoicesMixin, models.TextChoices):
@classmethod
def settings(cls):
return {
**cls.device_protocols(),
**cls.database_protocols(),
**cls.cloud_protocols()
**cls.device_protocols(),
**cls.database_protocols(),
**cls.cloud_protocols()
}