Skip to content

Commit c606467

Browse files
committed
Bug 1231791 - Show e10s property in alerts view
1 parent 972b3ce commit c606467

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

treeherder/webapp/api/performance_serializers.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,29 @@
55
PerformanceSignature)
66

77

8+
class TestOptionsSerializer(serializers.JSONField):
9+
def to_representation(self, obj):
10+
# if extra_propeties is blank, just return nothing
11+
if type(obj) == dict:
12+
return obj.get('test_options', [])
13+
return []
14+
15+
816
class PerformanceSignatureSerializer(serializers.ModelSerializer):
917
option_collection_hash = serializers.SlugRelatedField(
1018
read_only=True, slug_field="option_collection_hash",
1119
source="option_collection")
1220
machine_platform = serializers.SlugRelatedField(read_only=True,
1321
slug_field="platform",
1422
source="platform")
23+
test_options = TestOptionsSerializer(read_only=True,
24+
source="extra_properties")
1525

1626
class Meta:
1727
model = PerformanceSignature
1828
fields = ['signature_hash', 'machine_platform', 'suite', 'test',
19-
'lower_is_better', 'option_collection_hash']
29+
'lower_is_better', 'option_collection_hash',
30+
'test_options']
2031

2132

2233
class PerformanceDecimalField(serializers.DecimalField):

0 commit comments

Comments
 (0)