Document size-column setting
And change the value from splitGraph to split-graph for consistency. Change-Id: Ia98aac367702933b205b4d8cea5b5579ebd9a062
This commit is contained in:
parent
a34fdef1ed
commit
57626e4f3b
|
@ -431,3 +431,39 @@ General Options
|
||||||
following line. The time interval is specified in the same way as
|
following line. The time interval is specified in the same way as
|
||||||
the "age:" term in Gerrit's search syntax. To disable it
|
the "age:" term in Gerrit's search syntax. To disable it
|
||||||
altogether, set the value to the empty string.
|
altogether, set the value to the empty string.
|
||||||
|
|
||||||
|
**size-column**
|
||||||
|
By default, the size column is a pair of stacked logarithmic graphs.
|
||||||
|
The top, red graph represents the number of lines removed, the
|
||||||
|
bottom, green graph the number added. For an alternate
|
||||||
|
representation, use this setting.
|
||||||
|
|
||||||
|
**type**
|
||||||
|
A string with one of the following values:
|
||||||
|
|
||||||
|
**graph**
|
||||||
|
The default stacked bar graphs.
|
||||||
|
|
||||||
|
**split-graph**
|
||||||
|
Rather than vertically stacked, the bar graphs are side-by-side
|
||||||
|
|
||||||
|
**number**
|
||||||
|
A single number which represents the number of lines changed
|
||||||
|
(added and removed).
|
||||||
|
|
||||||
|
**thresholds**
|
||||||
|
A list of integers to determine the magnitude of the graph
|
||||||
|
increments, or the color coding of the number. If the type is
|
||||||
|
``graph`` or ``split-graph``, the list should be four elements
|
||||||
|
long. The default is 1, 10, 100, 1000 for a logarithmic
|
||||||
|
representation. If the type is ``number``, the list should be
|
||||||
|
eight elements long; the default in that case is 1, 10, 100, 200,
|
||||||
|
400, 600, 800, 1000.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
.. code-block: yaml
|
||||||
|
|
||||||
|
size-column:
|
||||||
|
type: graph
|
||||||
|
thresholds: [1, 10, 100, 1000]
|
||||||
|
|
|
@ -143,12 +143,3 @@ reviewkeys:
|
||||||
- key: 'meta 4'
|
- key: 'meta 4'
|
||||||
approvals: []
|
approvals: []
|
||||||
message: "recheck"
|
message: "recheck"
|
||||||
|
|
||||||
# 'size-column' is a set of customize parameters for the 'Size' column
|
|
||||||
# on your dashboard.
|
|
||||||
# 'type' must be 'graph' or 'number'. Default is 'graph'.
|
|
||||||
# 'thresholds' is for bar graphs width (when graph) or color styles
|
|
||||||
# (when number).
|
|
||||||
size-column:
|
|
||||||
type: 'graph'
|
|
||||||
thresholds: [1, 10, 100, 1000]
|
|
||||||
|
|
|
@ -246,3 +246,12 @@ reviewkeys:
|
||||||
- category: 'Code-Review'
|
- category: 'Code-Review'
|
||||||
value: 2
|
value: 2
|
||||||
submit: True
|
submit: True
|
||||||
|
|
||||||
|
# 'size-column' is a set of customize parameters for the 'Size' column
|
||||||
|
# on your dashboard.
|
||||||
|
# 'type' must be 'graph', 'split-graph' or 'number'. Default is 'graph'.
|
||||||
|
# 'thresholds' is for bar graphs width (when graph) or color styles
|
||||||
|
# (when number).
|
||||||
|
# size-column:
|
||||||
|
# type: 'graph'
|
||||||
|
# thresholds: [1, 10, 100, 1000]
|
||||||
|
|
|
@ -112,7 +112,7 @@ class ConfigSchema(object):
|
||||||
keymaps = [keymap]
|
keymaps = [keymap]
|
||||||
|
|
||||||
thresholds = [int, int, int, int, int, int, int, int]
|
thresholds = [int, int, int, int, int, int, int, int]
|
||||||
size_column = {v.Required('type'): v.Any('graph', 'splitGraph', 'number',
|
size_column = {v.Required('type'): v.Any('graph', 'split-graph', 'number',
|
||||||
'disabled', None),
|
'disabled', None),
|
||||||
v.Optional('thresholds'): thresholds}
|
v.Optional('thresholds'): thresholds}
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ class ChangeRow(urwid.Button, ChangeListColumns):
|
||||||
elif (total_added_removed >= thresholds[0]):
|
elif (total_added_removed >= thresholds[0]):
|
||||||
size_style = 'line-count-threshold-1'
|
size_style = 'line-count-threshold-1'
|
||||||
self.size.set_text((size_style, str(total_added_removed)))
|
self.size.set_text((size_style, str(total_added_removed)))
|
||||||
elif self.app.config.size_column['type'] == 'splitGraph':
|
elif self.app.config.size_column['type'] == 'split-graph':
|
||||||
self.size.set_text(self._makeSizeSplitGraph(total_added,
|
self.size.set_text(self._makeSizeSplitGraph(total_added,
|
||||||
total_removed))
|
total_removed))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue