浏览代码

[desktop] Generate the mdl with sorted metrics

Erick Tryzelaar 10 年之前
父节点
当前提交
90227f3
共有 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',