Serge Bazanski | 7d311e9 | 2020-10-10 17:57:44 +0200 | [diff] [blame] | 1 | // This file was generated by https://github.com/grafana/dashboard-spec |
| 2 | |
| 3 | { |
| 4 | new( |
| 5 | bars=false, |
| 6 | dashLength=10, |
| 7 | dashes=false, |
| 8 | datasource='default', |
| 9 | decimals=null, |
| 10 | description=null, |
| 11 | fill=1, |
| 12 | fillGradient=0, |
| 13 | hiddenSeries=false, |
| 14 | lines=true, |
| 15 | linewidth=1, |
| 16 | nullPointMode='null', |
| 17 | percentage=false, |
| 18 | pointradius=null, |
| 19 | points=false, |
| 20 | repeat=null, |
| 21 | repeatDirection=null, |
| 22 | spaceLength=10, |
| 23 | stack=false, |
| 24 | steppedLine=false, |
| 25 | timeFrom=null, |
| 26 | timeShift=null, |
| 27 | title=null, |
| 28 | transparent=false, |
| 29 | ):: { |
| 30 | [if bars != null then 'bars']: bars, |
| 31 | [if dashLength != null then 'dashLength']: dashLength, |
| 32 | [if dashes != null then 'dashes']: dashes, |
| 33 | [if datasource != null then 'datasource']: datasource, |
| 34 | [if decimals != null then 'decimals']: decimals, |
| 35 | [if description != null then 'description']: description, |
| 36 | [if fill != null then 'fill']: fill, |
| 37 | [if fillGradient != null then 'fillGradient']: fillGradient, |
| 38 | [if hiddenSeries != null then 'hiddenSeries']: hiddenSeries, |
| 39 | [if lines != null then 'lines']: lines, |
| 40 | [if linewidth != null then 'linewidth']: linewidth, |
| 41 | [if nullPointMode != null then 'nullPointMode']: nullPointMode, |
| 42 | [if percentage != null then 'percentage']: percentage, |
| 43 | [if pointradius != null then 'pointradius']: pointradius, |
| 44 | [if points != null then 'points']: points, |
| 45 | [if repeat != null then 'repeat']: repeat, |
| 46 | [if repeatDirection != null then 'repeatDirection']: repeatDirection, |
| 47 | [if spaceLength != null then 'spaceLength']: spaceLength, |
| 48 | [if stack != null then 'stack']: stack, |
| 49 | [if steppedLine != null then 'steppedLine']: steppedLine, |
| 50 | [if timeFrom != null then 'timeFrom']: timeFrom, |
| 51 | [if timeShift != null then 'timeShift']: timeShift, |
| 52 | [if title != null then 'title']: title, |
| 53 | [if transparent != null then 'transparent']: transparent, |
| 54 | renderer: 'flot', |
| 55 | type: 'graph', |
| 56 | tooltip+: { value_type: 'individual' }, |
| 57 | |
| 58 | setGridPos( |
| 59 | h=8, |
| 60 | w=12, |
| 61 | x=null, |
| 62 | y=null, |
| 63 | ):: self {} |
| 64 | + { gridPos+: { [if h != null then 'h']: h } } |
| 65 | + { gridPos+: { [if w != null then 'w']: w } } |
| 66 | + { gridPos+: { [if x != null then 'x']: x } } |
| 67 | + { gridPos+: { [if y != null then 'y']: y } } |
| 68 | , |
| 69 | |
| 70 | setLegend( |
| 71 | alignAsTable=null, |
| 72 | avg=false, |
| 73 | current=false, |
| 74 | max=false, |
| 75 | min=false, |
| 76 | rightSide=false, |
| 77 | show=true, |
| 78 | sideWidth=null, |
| 79 | total=false, |
| 80 | values=true, |
| 81 | ):: self {} |
| 82 | + { legend+: { [if alignAsTable != null then 'alignAsTable']: alignAsTable } } |
| 83 | + { legend+: { [if avg != null then 'avg']: avg } } |
| 84 | + { legend+: { [if current != null then 'current']: current } } |
| 85 | + { legend+: { [if max != null then 'max']: max } } |
| 86 | + { legend+: { [if min != null then 'min']: min } } |
| 87 | + { legend+: { [if rightSide != null then 'rightSide']: rightSide } } |
| 88 | + { legend+: { [if show != null then 'show']: show } } |
| 89 | + { legend+: { [if sideWidth != null then 'sideWidth']: sideWidth } } |
| 90 | + { legend+: { [if total != null then 'total']: total } } |
| 91 | + { legend+: { [if values != null then 'values']: values } } |
| 92 | , |
| 93 | |
| 94 | setThresholds( |
| 95 | thresholdMode='absolute', |
| 96 | ):: self {} |
| 97 | + { thresholds+: { [if thresholdMode != null then 'mode']: thresholdMode } } |
| 98 | , |
| 99 | |
| 100 | setTooltip( |
| 101 | shared=true, |
| 102 | sort=2, |
| 103 | ):: self {} |
| 104 | + { tooltip+: { [if shared != null then 'shared']: shared } } |
| 105 | + { tooltip+: { [if sort != null then 'sort']: sort } } |
| 106 | , |
| 107 | |
| 108 | setXaxis( |
| 109 | buckets=null, |
| 110 | mode='time', |
| 111 | name=null, |
| 112 | show=true, |
| 113 | ):: self {} |
| 114 | + { xaxis+: { [if buckets != null then 'buckets']: buckets } } |
| 115 | + { xaxis+: { [if mode != null then 'mode']: mode } } |
| 116 | + { xaxis+: { [if name != null then 'name']: name } } |
| 117 | + { xaxis+: { [if show != null then 'show']: show } } |
| 118 | , |
| 119 | |
| 120 | setYaxis( |
| 121 | align=false, |
| 122 | alignLevel=0, |
| 123 | ):: self {} |
| 124 | + { yaxis+: { [if align != null then 'align']: align } } |
| 125 | + { yaxis+: { [if alignLevel != null then 'alignLevel']: alignLevel } } |
| 126 | , |
| 127 | |
| 128 | |
| 129 | addDataLink( |
| 130 | targetBlank=true, |
| 131 | title=null, |
| 132 | url=null, |
| 133 | ):: self {} |
| 134 | + { options+: { dataLinks+: [ |
| 135 | { |
| 136 | [if targetBlank != null then 'targetBlank']: targetBlank, |
| 137 | [if title != null then 'title']: title, |
| 138 | [if url != null then 'url']: url, |
| 139 | }, |
| 140 | ] } }, |
| 141 | |
| 142 | addPanelLink( |
| 143 | targetBlank=true, |
| 144 | title=null, |
| 145 | url=null, |
| 146 | ):: self {} |
| 147 | + { links+: [ |
| 148 | { |
| 149 | [if targetBlank != null then 'targetBlank']: targetBlank, |
| 150 | [if title != null then 'title']: title, |
| 151 | [if url != null then 'url']: url, |
| 152 | }, |
| 153 | ] }, |
| 154 | |
| 155 | addOverride( |
| 156 | matcher=null, |
| 157 | properties=null, |
| 158 | ):: self {} |
| 159 | + { fieldConfig+: { overrides+: [ |
| 160 | { |
| 161 | [if matcher != null then 'matcher']: matcher, |
| 162 | [if properties != null then 'properties']: properties, |
| 163 | }, |
| 164 | ] } }, |
| 165 | |
| 166 | addSeriesOverride( |
| 167 | alias=null, |
| 168 | bars=null, |
| 169 | color=null, |
| 170 | dashLength=null, |
| 171 | dashes=null, |
| 172 | fill=null, |
| 173 | fillBelowTo=null, |
| 174 | fillGradient=null, |
| 175 | hiddenSeries=null, |
| 176 | hideTooltip=null, |
| 177 | legend=null, |
| 178 | lines=null, |
| 179 | linewidth=null, |
| 180 | nullPointMode=null, |
| 181 | pointradius=null, |
| 182 | points=null, |
| 183 | spaceLength=null, |
| 184 | stack=null, |
| 185 | steppedLine=null, |
| 186 | transform=null, |
| 187 | yaxis=null, |
| 188 | zindex=null, |
| 189 | ):: self {} |
| 190 | + { seriesOverrides+: [ |
| 191 | { |
| 192 | [if alias != null then 'alias']: alias, |
| 193 | [if bars != null then 'bars']: bars, |
| 194 | [if color != null then 'color']: color, |
| 195 | [if dashLength != null then 'dashLength']: dashLength, |
| 196 | [if dashes != null then 'dashes']: dashes, |
| 197 | [if fill != null then 'fill']: fill, |
| 198 | [if fillBelowTo != null then 'fillBelowTo']: fillBelowTo, |
| 199 | [if fillGradient != null then 'fillGradient']: fillGradient, |
| 200 | [if hiddenSeries != null then 'hiddenSeries']: hiddenSeries, |
| 201 | [if hideTooltip != null then 'hideTooltip']: hideTooltip, |
| 202 | [if legend != null then 'legend']: legend, |
| 203 | [if lines != null then 'lines']: lines, |
| 204 | [if linewidth != null then 'linewidth']: linewidth, |
| 205 | [if nullPointMode != null then 'nullPointMode']: nullPointMode, |
| 206 | [if pointradius != null then 'pointradius']: pointradius, |
| 207 | [if points != null then 'points']: points, |
| 208 | [if spaceLength != null then 'spaceLength']: spaceLength, |
| 209 | [if stack != null then 'stack']: stack, |
| 210 | [if steppedLine != null then 'steppedLine']: steppedLine, |
| 211 | [if transform != null then 'transform']: transform, |
| 212 | [if yaxis != null then 'yaxis']: yaxis, |
| 213 | [if zindex != null then 'zindex']: zindex, |
| 214 | }, |
| 215 | ] }, |
| 216 | |
| 217 | addThresholdStep( |
| 218 | color=null, |
| 219 | value=null, |
| 220 | ):: self {} |
| 221 | + { thresholds+: { steps+: [ |
| 222 | { |
| 223 | [if color != null then 'color']: color, |
| 224 | [if value != null then 'value']: value, |
| 225 | }, |
| 226 | ] } }, |
| 227 | |
| 228 | addTarget( |
| 229 | target |
| 230 | ):: self {} |
| 231 | + { targets+: [ |
| 232 | target, |
| 233 | ] }, |
| 234 | |
| 235 | addYaxis( |
| 236 | decimals=null, |
| 237 | format='short', |
| 238 | label=null, |
| 239 | logBase=1, |
| 240 | max=null, |
| 241 | min=null, |
| 242 | show=true, |
| 243 | ):: self {} |
| 244 | + { yaxes+: [ |
| 245 | { |
| 246 | [if decimals != null then 'decimals']: decimals, |
| 247 | [if format != null then 'format']: format, |
| 248 | [if label != null then 'label']: label, |
| 249 | [if logBase != null then 'logBase']: logBase, |
| 250 | [if max != null then 'max']: max, |
| 251 | [if min != null then 'min']: min, |
| 252 | [if show != null then 'show']: show, |
| 253 | }, |
| 254 | ] }, |
| 255 | |
| 256 | }, |
| 257 | } |