mirror of https://github.com/jumpserver/jumpserver
perf: 修改 device platform 支持 su
parent
111296ecd2
commit
36813f64db
|
@ -90,9 +90,11 @@ class PlatformProtocolSerializer(serializers.ModelSerializer):
|
||||||
class PlatformCustomField(serializers.Serializer):
|
class PlatformCustomField(serializers.Serializer):
|
||||||
TYPE_CHOICES = [
|
TYPE_CHOICES = [
|
||||||
("str", "str"),
|
("str", "str"),
|
||||||
|
("text", "text"),
|
||||||
("int", "int"),
|
("int", "int"),
|
||||||
("bool", "bool"),
|
("bool", "bool"),
|
||||||
("choice", "choice"),
|
("choice", "choice"),
|
||||||
|
("list", "list"),
|
||||||
]
|
]
|
||||||
name = serializers.CharField(label=_("Name"), max_length=128)
|
name = serializers.CharField(label=_("Name"), max_length=128)
|
||||||
label = serializers.CharField(label=_("Label"), max_length=128)
|
label = serializers.CharField(label=_("Label"), max_length=128)
|
||||||
|
|
|
@ -11,6 +11,7 @@ type_field_map = {
|
||||||
"bool": serializers.BooleanField,
|
"bool": serializers.BooleanField,
|
||||||
"text": serializers.CharField,
|
"text": serializers.CharField,
|
||||||
"choice": serializers.ChoiceField,
|
"choice": serializers.ChoiceField,
|
||||||
|
"list": serializers.ListField,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue