Эх сурвалжийг харах

[desktop] Generate the mdl with sorted metrics

Erick Tryzelaar 10 жил өмнө
parent
commit
90227f3

+ 2 - 0
desktop/core/src/desktop/management/commands/generate_mdl.py

@@ -36,6 +36,8 @@ class Command(NoArgsCommand):
     for schema in registry.schemas:
       definitions.extend(schema.to_json())
 
+    definitions.sort(lambda a, b: cmp(a['context'], b['context']))
+
     d = {
         'name': 'HUE',
         'nameForCrossEntityAggregateMetrics': 'hues',