|
|
@ -25,7 +25,7 @@ class AssetSerializer(BulkSerializerMixin, serializers.ModelSerializer):
|
|
|
|
def get_field_names(self, declared_fields, info):
|
|
|
|
def get_field_names(self, declared_fields, info):
|
|
|
|
fields = super().get_field_names(declared_fields, info)
|
|
|
|
fields = super().get_field_names(declared_fields, info)
|
|
|
|
fields.extend([
|
|
|
|
fields.extend([
|
|
|
|
'hardware_info', 'is_connective',
|
|
|
|
'hardware_info', 'is_connective', 'org_name'
|
|
|
|
])
|
|
|
|
])
|
|
|
|
return fields
|
|
|
|
return fields
|
|
|
|
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ class AssetGrantedSerializer(serializers.ModelSerializer):
|
|
|
|
fields = (
|
|
|
|
fields = (
|
|
|
|
"id", "hostname", "ip", "port", "system_users_granted",
|
|
|
|
"id", "hostname", "ip", "port", "system_users_granted",
|
|
|
|
"is_active", "system_users_join", "os", 'domain',
|
|
|
|
"is_active", "system_users_join", "os", 'domain',
|
|
|
|
"platform", "comment", "protocol", "org_id",
|
|
|
|
"platform", "comment", "protocol", "org_id", "org_name",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
@ -61,6 +61,6 @@ class MyAssetGrantedSerializer(AssetGrantedSerializer):
|
|
|
|
model = Asset
|
|
|
|
model = Asset
|
|
|
|
fields = (
|
|
|
|
fields = (
|
|
|
|
"id", "hostname", "system_users_granted",
|
|
|
|
"id", "hostname", "system_users_granted",
|
|
|
|
"is_active", "system_users_join",
|
|
|
|
"is_active", "system_users_join", "org_name",
|
|
|
|
"os", "platform", "comment",
|
|
|
|
"os", "platform", "comment", "org_id", "protocol"
|
|
|
|
)
|
|
|
|
)
|
|
|
|