Merge pull request #10943 from jumpserver/pr@dev@perf_connect_method

perf: 修改组件支持
pull/10944/head
老广 1 year ago committed by GitHub
commit ddbd142ea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -163,6 +163,7 @@ class Protocol(ChoicesMixin, models.TextChoices):
'secret_types': ['password'],
'setting': {
'autofill': {
'label': _('Autofill'),
'type': 'choice',
'choices': FillType.choices,
'default': 'basic',
@ -181,6 +182,11 @@ class Protocol(ChoicesMixin, models.TextChoices):
'type': 'str',
'default': 'type=submit',
'label': _('Submit selector')
},
'script': {
'type': 'text',
'default': '',
'label': _('Script'),
}
}
},

@ -12,7 +12,7 @@ def add_chatgpt_platform(apps, schema_editor):
domain_enabled=False, su_enabled=False, comment='ChatGPT',
created_by='System', updated_by='System',
)
platform.protocols.create(name='chatgpt', port=443, primary=True)
platform.protocols.create(name='chatgpt', port=443, primary=True, setting={'api_mode': 'gpt-3.5-turbo'})
automation_cls.objects.create(ansible_enabled=False, platform=platform)

@ -1399,7 +1399,7 @@ msgstr "忽略证书校验"
#: assets/models/asset/gpt.py:8
msgid "Proxy"
msgstr ""
msgstr "代理"
#: assets/models/asset/web.py:9 assets/serializers/asset/info/spec.py:16
msgid "Autofill"
@ -1727,7 +1727,7 @@ msgstr ""
#: assets/serializers/asset/gpt.py:23
msgid "HTTP proxy"
msgstr "HTTP 代理"
msgstr "HTTP(s) 代理"
#: assets/serializers/asset/info/gathered.py:6
msgid "Vendor"

@ -214,6 +214,12 @@ class ConnectMethodUtil:
'support': [Protocol.rdp],
'match': 'map'
},
TerminalType.kael: {
'web_methods': [WebMethod.web_gui],
'listen': [Protocol.http],
'support': [Protocol.chatgpt],
'match': 'm2m'
}
}
return protocols

Loading…
Cancel
Save