소스 검색

[desktop] Generate the mdl with sorted metrics

Erick Tryzelaar 10 년 전
부모
커밋
90227f34f2
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      desktop/core/src/desktop/management/commands/generate_mdl.py

+ 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',