Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: gm/rebaseline_server/column.py

Issue 287473002: rename rebaseline_server JSON constants to be more consistent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 ColumnHeaderFactory class (see class docstring for details) 9 ColumnHeaderFactory class (see class docstring for details)
10 """ 10 """
11 11
12 # Keys used within dictionary representation of each column header. 12 # Keys used within dictionary representation of each column header.
13 # NOTE: Keep these in sync with static/constants.js 13 # NOTE: Keep these in sync with static/constants.js
14 KEY__EXTRACOLUMNHEADERS = 'extraColumnHeaders'
epoger 2014/05/12 19:17:08 Some of the constant definitions moved around (th
15 KEY__EXTRACOLUMNHEADERS__HEADER_TEXT = 'headerText' 14 KEY__EXTRACOLUMNHEADERS__HEADER_TEXT = 'headerText'
16 KEY__EXTRACOLUMNHEADERS__HEADER_URL = 'headerUrl' 15 KEY__EXTRACOLUMNHEADERS__HEADER_URL = 'headerUrl'
17 KEY__EXTRACOLUMNHEADERS__IS_FILTERABLE = 'isFilterable' 16 KEY__EXTRACOLUMNHEADERS__IS_FILTERABLE = 'isFilterable'
18 KEY__EXTRACOLUMNHEADERS__IS_SORTABLE = 'isSortable' 17 KEY__EXTRACOLUMNHEADERS__IS_SORTABLE = 'isSortable'
19 KEY__EXTRACOLUMNHEADERS__VALUES_AND_COUNTS = 'valuesAndCounts' 18 KEY__EXTRACOLUMNHEADERS__VALUES_AND_COUNTS = 'valuesAndCounts'
20 19
21 20
22 class ColumnHeaderFactory(object): 21 class ColumnHeaderFactory(object):
23 """Factory which assembles the header for a single column of data.""" 22 """Factory which assembles the header for a single column of data."""
24 23
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 KEY__EXTRACOLUMNHEADERS__HEADER_TEXT: self._header_text, 58 KEY__EXTRACOLUMNHEADERS__HEADER_TEXT: self._header_text,
60 KEY__EXTRACOLUMNHEADERS__IS_FILTERABLE: self._is_filterable, 59 KEY__EXTRACOLUMNHEADERS__IS_FILTERABLE: self._is_filterable,
61 KEY__EXTRACOLUMNHEADERS__IS_SORTABLE: self._is_sortable, 60 KEY__EXTRACOLUMNHEADERS__IS_SORTABLE: self._is_sortable,
62 } 61 }
63 if self._header_url: 62 if self._header_url:
64 asdict[KEY__EXTRACOLUMNHEADERS__HEADER_URL] = self._header_url 63 asdict[KEY__EXTRACOLUMNHEADERS__HEADER_URL] = self._header_url
65 if self._include_values_and_counts and values_and_counts_dict: 64 if self._include_values_and_counts and values_and_counts_dict:
66 asdict[KEY__EXTRACOLUMNHEADERS__VALUES_AND_COUNTS] = sorted( 65 asdict[KEY__EXTRACOLUMNHEADERS__VALUES_AND_COUNTS] = sorted(
67 values_and_counts_dict.items()) 66 values_and_counts_dict.items())
68 return asdict 67 return asdict
OLDNEW
« no previous file with comments | « no previous file | gm/rebaseline_server/compare_configs.py » ('j') | gm/rebaseline_server/static/constants.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698