mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-24 21:08:30 +00:00
feat: 添加组件类型 razor 并替换 XRDP_ENABLED
This commit is contained in:
@@ -21,7 +21,7 @@ def migrate_endpoints(apps, schema_editor):
|
||||
}
|
||||
Endpoint.objects.create(**default_data)
|
||||
|
||||
if not settings.XRDP_ENABLED:
|
||||
if not settings.TERMINAL_RAZOR_ENABLED:
|
||||
return
|
||||
# migrate xrdp
|
||||
xrdp_addr = settings.TERMINAL_RDP_ADDR
|
||||
@@ -41,7 +41,7 @@ def migrate_endpoints(apps, schema_editor):
|
||||
else:
|
||||
rdp_port = 3389
|
||||
xrdp_data = {
|
||||
'name': 'XRDP',
|
||||
'name': 'Razor',
|
||||
'host': host,
|
||||
'https_port': 0,
|
||||
'http_port': 0,
|
||||
@@ -56,7 +56,7 @@ def migrate_endpoints(apps, schema_editor):
|
||||
|
||||
EndpointRule = apps.get_model("terminal", "EndpointRule")
|
||||
xrdp_rule_data = {
|
||||
'name': 'XRDP',
|
||||
'name': 'Razor',
|
||||
'ip_group': ['*'],
|
||||
'priority': 20,
|
||||
'endpoint': xrdp_endpoint,
|
||||
|
18
apps/terminal/migrations/0050_auto_20220606_1745.py
Normal file
18
apps/terminal/migrations/0050_auto_20220606_1745.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.1.14 on 2022-06-06 09:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('terminal', '0049_endpoint_redis_port'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='terminal',
|
||||
name='type',
|
||||
field=models.CharField(choices=[('koko', 'KoKo'), ('guacamole', 'Guacamole'), ('omnidb', 'OmniDB'), ('xrdp', 'Xrdp'), ('lion', 'Lion'), ('core', 'Core'), ('celery', 'Celery'), ('magnus', 'Magnus'), ('razor', 'Razor')], default='koko', max_length=64, verbose_name='type'),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user