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 | content=null, |
| 6 | datasource='default', |
| 7 | description=null, |
| 8 | mode='markdown', |
| 9 | repeat=null, |
| 10 | repeatDirection=null, |
| 11 | title=null, |
| 12 | transparent=false, |
| 13 | ):: { |
| 14 | [if content != null then 'content']: content, |
| 15 | [if datasource != null then 'datasource']: datasource, |
| 16 | [if description != null then 'description']: description, |
| 17 | [if mode != null then 'mode']: mode, |
| 18 | [if repeat != null then 'repeat']: repeat, |
| 19 | [if repeatDirection != null then 'repeatDirection']: repeatDirection, |
| 20 | [if title != null then 'title']: title, |
| 21 | [if transparent != null then 'transparent']: transparent, |
| 22 | type: 'text', |
| 23 | |
| 24 | setGridPos( |
| 25 | h=8, |
| 26 | w=12, |
| 27 | x=null, |
| 28 | y=null, |
| 29 | ):: self {} |
| 30 | + { gridPos+: { [if h != null then 'h']: h } } |
| 31 | + { gridPos+: { [if w != null then 'w']: w } } |
| 32 | + { gridPos+: { [if x != null then 'x']: x } } |
| 33 | + { gridPos+: { [if y != null then 'y']: y } } |
| 34 | , |
| 35 | |
| 36 | |
| 37 | addPanelLink( |
| 38 | targetBlank=true, |
| 39 | title=null, |
| 40 | url=null, |
| 41 | ):: self {} |
| 42 | + { links+: [ |
| 43 | { |
| 44 | [if targetBlank != null then 'targetBlank']: targetBlank, |
| 45 | [if title != null then 'title']: title, |
| 46 | [if url != null then 'url']: url, |
| 47 | }, |
| 48 | ] }, |
| 49 | |
| 50 | addTarget( |
| 51 | target |
| 52 | ):: self {} |
| 53 | + { targets+: [ |
| 54 | target, |
| 55 | ] }, |
| 56 | |
| 57 | }, |
| 58 | } |