| 1 | { |
| 2 | "jsonSchema": { |
| 3 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | "title": "Example collector configuration.", |
| 5 | "type": "object", |
| 6 | "properties": { |
| 7 | "update_every": { |
| 8 | "title": "Update every", |
| 9 | "description": "Data collection interval, measured in seconds.", |
| 10 | "type": "integer", |
| 11 | "minimum": 1, |
| 12 | "default": 1 |
| 13 | }, |
| 14 | "charts": { |
| 15 | "title": "Charts configuration", |
| 16 | "type": [ |
| 17 | "object", |
| 18 | "null" |
| 19 | ], |
| 20 | "properties": { |
| 21 | "type": { |
| 22 | "title": "Chart type", |
| 23 | "description": "The type of all charts.", |
| 24 | "type": "string", |
| 25 | "enum": [ |
| 26 | "line", |
| 27 | "area", |
| 28 | "stacked" |
| 29 | ], |
| 30 | "default": "line" |
| 31 | }, |
| 32 | "num": { |
| 33 | "title": "Number of charts", |
| 34 | "description": "The total number of charts to create.", |
| 35 | "type": "integer", |
| 36 | "minimum": 0, |
| 37 | "default": 1 |
| 38 | }, |
| 39 | "contexts": { |
| 40 | "title": "Number of contexts", |
| 41 | "description": "The total number of unique contexts.", |
| 42 | "type": "integer", |
| 43 | "minimum": 0, |
| 44 | "default": 0 |
| 45 | }, |
| 46 | "dimensions": { |
| 47 | "title": "Number of dimensions", |
| 48 | "description": "The number of dimensions each chart will have.", |
| 49 | "type": "integer", |
| 50 | "minimum": 1, |
| 51 | "default": 4 |
| 52 | }, |
| 53 | "labels": { |
| 54 | "title": "Number of labels", |
| 55 | "description": "The number of labels each chart will have.", |
| 56 | "type": "integer", |
| 57 | "minimum": 0, |
| 58 | "default": 0 |
| 59 | } |
| 60 | }, |
| 61 | "required": [ |
| 62 | "type", |
| 63 | "num", |
| 64 | "contexts", |
| 65 | "dimensions", |
| 66 | "labels" |
| 67 | ] |
| 68 | }, |
| 69 | "hidden_charts": { |
| 70 | "title": "Hidden charts configuration", |
| 71 | "type": [ |
| 72 | "object", |
| 73 | "null" |
| 74 | ], |
| 75 | "properties": { |
| 76 | "type": { |
| 77 | "title": "Chart type", |
| 78 | "description": "The type of all charts.", |
| 79 | "type": "string", |
| 80 | "enum": [ |
| 81 | "line", |
| 82 | "area", |
| 83 | "stacked" |
| 84 | ], |
| 85 | "default": "line" |
| 86 | }, |
| 87 | "num": { |
| 88 | "title": "Number of charts", |
| 89 | "description": "The total number of charts to create.", |
| 90 | "type": "integer", |
| 91 | "minimum": 0, |
| 92 | "default": 0 |
| 93 | }, |
| 94 | "contexts": { |
| 95 | "title": "Number of contexts", |
| 96 | "description": "The total number of unique contexts.", |
| 97 | "type": "integer", |
| 98 | "minimum": 0, |
| 99 | "default": 0 |
| 100 | }, |
| 101 | "dimensions": { |
| 102 | "title": "Number of dimensions", |
| 103 | "description": "The number of dimensions each chart will have.", |
| 104 | "type": "integer", |
| 105 | "minimum": 1, |
| 106 | "default": 4 |
| 107 | }, |
| 108 | "labels": { |
| 109 | "title": "Number of labels", |
| 110 | "description": "The number of labels each chart will have.", |
| 111 | "type": "integer", |
| 112 | "minimum": 0, |
| 113 | "default": 0 |
| 114 | } |
| 115 | }, |
| 116 | "required": [ |
| 117 | "type", |
| 118 | "num", |
| 119 | "contexts", |
| 120 | "dimensions", |
| 121 | "labels" |
| 122 | ] |
| 123 | } |
| 124 | }, |
| 125 | "required": [ |
| 126 | "charts" |
| 127 | ] |
| 128 | }, |
| 129 | "uiSchema": { |
| 130 | "uiOptions": { |
| 131 | "fullPage": true |
| 132 | }, |
| 133 | "charts": { |
| 134 | "type": { |
| 135 | "ui:widget": "radio", |
| 136 | "ui:options": { |
| 137 | "inline": true |
| 138 | } |
| 139 | } |
| 140 | }, |
| 141 | "hidden_charts": { |
| 142 | "type": { |
| 143 | "ui:widget": "radio", |
| 144 | "ui:options": { |
| 145 | "inline": true |
| 146 | } |
| 147 | } |
| 148 | }, |
| 149 | "ui:flavour": "tabs", |
| 150 | "ui:options": { |
| 151 | "tabs": [ |
| 152 | { |
| 153 | "title": "Base", |
| 154 | "fields": [ |
| 155 | "update_every" |
| 156 | ] |
| 157 | }, |
| 158 | { |
| 159 | "title": "Charts", |
| 160 | "fields": [ |
| 161 | "charts" |
| 162 | ] |
| 163 | }, |
| 164 | { |
| 165 | "title": "Hidden charts", |
| 166 | "fields": [ |
| 167 | "hidden_charts" |
| 168 | ] |
| 169 | } |
| 170 | ] |
| 171 | } |
| 172 | } |
| 173 | } |