mirror of https://github.com/jumpserver/jumpserver
perf: web selector 默认值修改
parent
7b0d26bbff
commit
d60f9a7c69
|
@ -1,4 +1,5 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from common.db.models import ChoicesMixin
|
from common.db.models import ChoicesMixin
|
||||||
|
|
||||||
__all__ = ['Protocol']
|
__all__ = ['Protocol']
|
||||||
|
@ -102,9 +103,9 @@ class Protocol(ChoicesMixin, models.TextChoices):
|
||||||
'port': 80,
|
'port': 80,
|
||||||
'secret_types': ['password'],
|
'secret_types': ['password'],
|
||||||
'setting': {
|
'setting': {
|
||||||
'username_selector': 'input[type=text]',
|
'username_selector': 'name=username',
|
||||||
'password_selector': 'input[type=password]',
|
'password_selector': 'name=password',
|
||||||
'submit_selector': 'button[type=submit]',
|
'submit_selector': 'id=longin_button',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
from assets.models import Web
|
from assets.models import Web
|
||||||
from .common import AssetSerializer
|
from .common import AssetSerializer
|
||||||
|
|
||||||
|
@ -19,12 +18,12 @@ class WebSerializer(AssetSerializer):
|
||||||
'label': 'URL'
|
'label': 'URL'
|
||||||
},
|
},
|
||||||
'username_selector': {
|
'username_selector': {
|
||||||
'default': 'input[type=text]'
|
'default': 'name=username'
|
||||||
},
|
},
|
||||||
'password_selector': {
|
'password_selector': {
|
||||||
'default': 'input[type=password]'
|
'default': 'name=password'
|
||||||
},
|
},
|
||||||
'submit_selector': {
|
'submit_selector': {
|
||||||
'default': 'button[type=submit]',
|
'default': 'id=longin_button',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,24 +3,23 @@ from collections import defaultdict
|
||||||
|
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
|
|
||||||
from users.models import User
|
from common.decorator import on_transaction_commit
|
||||||
|
from common.utils import get_logger
|
||||||
|
from common.utils.common import lazyproperty, timeit
|
||||||
from orgs.models import Organization
|
from orgs.models import Organization
|
||||||
from orgs.utils import (
|
from orgs.utils import (
|
||||||
tmp_to_org,
|
tmp_to_org,
|
||||||
tmp_to_root_org
|
tmp_to_root_org
|
||||||
)
|
)
|
||||||
from common.decorator import on_transaction_commit
|
|
||||||
from common.utils import get_logger
|
|
||||||
from common.utils.common import lazyproperty, timeit
|
|
||||||
|
|
||||||
from perms.locks import UserGrantedTreeRebuildLock
|
from perms.locks import UserGrantedTreeRebuildLock
|
||||||
from perms.models import (
|
from perms.models import (
|
||||||
AssetPermission,
|
AssetPermission,
|
||||||
UserAssetGrantedTreeNodeRelation
|
UserAssetGrantedTreeNodeRelation
|
||||||
)
|
)
|
||||||
|
from perms.utils.user_permission import UserGrantedTreeBuildUtils
|
||||||
|
from users.models import User
|
||||||
from .permission import AssetPermissionUtil
|
from .permission import AssetPermissionUtil
|
||||||
|
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
__all__ = ['UserPermTreeRefreshUtil', 'UserPermTreeExpireUtil']
|
__all__ = ['UserPermTreeRefreshUtil', 'UserPermTreeExpireUtil']
|
||||||
|
@ -142,4 +141,3 @@ class UserPermTreeExpireUtil(_UserPermTreeCacheMixin):
|
||||||
p.delete(k)
|
p.delete(k)
|
||||||
p.execute()
|
p.execute()
|
||||||
logger.info('Expire all user perm tree')
|
logger.info('Expire all user perm tree')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue