mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 16:31:33 +00:00
[Update] 支持网域
This commit is contained in:
@@ -16,6 +16,7 @@ class AssetCreateForm(forms.ModelForm):
|
||||
fields = [
|
||||
'hostname', 'ip', 'public_ip', 'port', 'comment',
|
||||
'nodes', 'is_active', 'admin_user', 'labels', 'platform',
|
||||
'domain',
|
||||
|
||||
]
|
||||
widgets = {
|
||||
@@ -29,6 +30,9 @@ class AssetCreateForm(forms.ModelForm):
|
||||
'class': 'select2', 'data-placeholder': _('Labels')
|
||||
}),
|
||||
'port': forms.TextInput(),
|
||||
'domain': forms.Select(attrs={
|
||||
'class': 'select2', 'data-placeholder': _('Domain')
|
||||
}),
|
||||
}
|
||||
help_texts = {
|
||||
'hostname': '* required',
|
||||
@@ -38,7 +42,8 @@ class AssetCreateForm(forms.ModelForm):
|
||||
'root or other NOPASSWD sudo privilege user existed in asset,'
|
||||
'If asset is windows or other set any one, more see admin user left menu'
|
||||
),
|
||||
'platform': _("* required Must set exact system platform, Windows, Linux ...")
|
||||
'platform': _("* required Must set exact system platform, Windows, Linux ..."),
|
||||
'domain': _("If your have some network not connect with each other, you can set domain")
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +53,7 @@ class AssetUpdateForm(forms.ModelForm):
|
||||
fields = [
|
||||
'hostname', 'ip', 'port', 'nodes', 'is_active', 'platform',
|
||||
'public_ip', 'number', 'comment', 'admin_user', 'labels',
|
||||
'domain',
|
||||
]
|
||||
widgets = {
|
||||
'nodes': forms.SelectMultiple(attrs={
|
||||
@@ -60,6 +66,9 @@ class AssetUpdateForm(forms.ModelForm):
|
||||
'class': 'select2', 'data-placeholder': _('Labels')
|
||||
}),
|
||||
'port': forms.TextInput(),
|
||||
'domain': forms.Select(attrs={
|
||||
'class': 'select2', 'data-placeholder': _('Domain')
|
||||
}),
|
||||
}
|
||||
help_texts = {
|
||||
'hostname': '* required',
|
||||
@@ -70,7 +79,8 @@ class AssetUpdateForm(forms.ModelForm):
|
||||
'root or other NOPASSWD sudo privilege user existed in asset,'
|
||||
'If asset is windows or other set any one, more see admin user left menu'
|
||||
),
|
||||
'platform': _("* required Must set exact system platform, Windows, Linux ...")
|
||||
'platform': _("* required Must set exact system platform, Windows, Linux ..."),
|
||||
'domain': _("If your have some network not connect with each other, you can set domain")
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user