Browse Source

Document size-column setting

And change the value from splitGraph to split-graph for consistency.

Change-Id: Ia98aac367702933b205b4d8cea5b5579ebd9a062
James E. Blair 1 year ago
parent
commit
57626e4f3b

+ 36
- 0
doc/source/configuration.rst View File

@@ -431,3 +431,39 @@ General Options
431 431
   following line.  The time interval is specified in the same way as
432 432
   the "age:" term in Gerrit's search syntax.  To disable it
433 433
   altogether, set the value to the empty string.
434
+
435
+**size-column**
436
+  By default, the size column is a pair of stacked logarithmic graphs.
437
+  The top, red graph represents the number of lines removed, the
438
+  bottom, green graph the number added.  For an alternate
439
+  representation, use this setting.
440
+
441
+  **type**
442
+    A string with one of the following values:
443
+
444
+    **graph**
445
+      The default stacked bar graphs.
446
+
447
+    **split-graph**
448
+      Rather than vertically stacked, the bar graphs are side-by-side
449
+
450
+    **number**
451
+      A single number which represents the number of lines changed
452
+      (added and removed).
453
+
454
+  **thresholds**
455
+    A list of integers to determine the magnitude of the graph
456
+    increments, or the color coding of the number.  If the type is
457
+    ``graph`` or ``split-graph``, the list should be four elements
458
+    long.  The default is 1, 10, 100, 1000 for a logarithmic
459
+    representation.  If the type is ``number``, the list should be
460
+    eight elements long; the default in that case is 1, 10, 100, 200,
461
+    400, 600, 800, 1000.
462
+
463
+Example:
464
+
465
+.. code-block: yaml
466
+
467
+   size-column:
468
+     type: graph
469
+     thresholds: [1, 10, 100, 1000]

+ 0
- 9
examples/openstack-gertty.yaml View File

@@ -143,12 +143,3 @@ reviewkeys:
143 143
   - key: 'meta 4'
144 144
     approvals: []
145 145
     message: "recheck"
146
-
147
-# 'size-column' is a set of customize parameters for the 'Size' column
148
-# on your dashboard.
149
-# 'type' must be 'graph' or 'number'. Default is 'graph'.
150
-# 'thresholds' is for bar graphs width (when graph) or color styles
151
-# (when number).
152
-size-column:
153
-  type: 'graph'
154
-  thresholds: [1, 10, 100, 1000]

+ 9
- 0
examples/reference-gertty.yaml View File

@@ -246,3 +246,12 @@ reviewkeys:
246 246
       - category: 'Code-Review'
247 247
         value: 2
248 248
     submit: True
249
+
250
+# 'size-column' is a set of customize parameters for the 'Size' column
251
+# on your dashboard.
252
+# 'type' must be 'graph', 'split-graph' or 'number'. Default is 'graph'.
253
+# 'thresholds' is for bar graphs width (when graph) or color styles
254
+# (when number).
255
+# size-column:
256
+#   type: 'graph'
257
+#   thresholds: [1, 10, 100, 1000]

+ 1
- 1
gertty/config.py View File

@@ -112,7 +112,7 @@ class ConfigSchema(object):
112 112
     keymaps = [keymap]
113 113
 
114 114
     thresholds = [int, int, int, int, int, int, int, int]
115
-    size_column = {v.Required('type'): v.Any('graph', 'splitGraph', 'number',
115
+    size_column = {v.Required('type'): v.Any('graph', 'split-graph', 'number',
116 116
                                              'disabled', None),
117 117
                    v.Optional('thresholds'): thresholds}
118 118
 

+ 1
- 1
gertty/view/change_list.py View File

@@ -279,7 +279,7 @@ class ChangeRow(urwid.Button, ChangeListColumns):
279 279
             elif (total_added_removed >= thresholds[0]):
280 280
                 size_style = 'line-count-threshold-1'
281 281
             self.size.set_text((size_style, str(total_added_removed)))
282
-        elif self.app.config.size_column['type'] == 'splitGraph':
282
+        elif self.app.config.size_column['type'] == 'split-graph':
283 283
             self.size.set_text(self._makeSizeSplitGraph(total_added,
284 284
                                                           total_removed))
285 285
         else:

Loading…
Cancel
Save