|
47 | 47 | "viz": false
|
48 | 48 | },
|
49 | 49 | "insertNulls": false,
|
50 |
| - "lineInterpolation": "linear", |
| 50 | + "lineInterpolation": "smooth", |
51 | 51 | "lineWidth": 1,
|
52 | 52 | "pointSize": 5,
|
53 | 53 | "scaleDistribution": {
|
|
68 | 68 | "mode": "absolute",
|
69 | 69 | "steps": [
|
70 | 70 | {
|
71 |
| - "color": "green", |
72 |
| - "value": null |
| 71 | + "color": "red" |
73 | 72 | },
|
74 | 73 | {
|
75 | 74 | "color": "red",
|
|
86 | 85 | "x": 0,
|
87 | 86 | "y": 0
|
88 | 87 | },
|
| 88 | + "id": 3, |
| 89 | + "options": { |
| 90 | + "legend": { |
| 91 | + "calcs": [], |
| 92 | + "displayMode": "list", |
| 93 | + "placement": "bottom", |
| 94 | + "showLegend": true |
| 95 | + }, |
| 96 | + "tooltip": { |
| 97 | + "mode": "single", |
| 98 | + "sort": "none" |
| 99 | + } |
| 100 | + }, |
| 101 | + "pluginVersion": "10.4.2", |
| 102 | + "targets": [ |
| 103 | + { |
| 104 | + "datasource": { |
| 105 | + "type": "mongodb-grafana-datasource", |
| 106 | + "uid": "fdkn0wi0apkw0c" |
| 107 | + }, |
| 108 | + "queryText": "{\n collection: \"movies\",\n aggregations: [\n {\n $match: {\n released: {\n $gte: new Date($from),\n $lte: new Date($to),\n },\n },\n },\n {\n $group: {\n _id: {\n year: {\n $year: \"$released\",\n },\n month: {\n $month: \"$released\",\n },\n },\n __value: {\n $sum: 1,\n },\n },\n },\n {\n $addFields: {\n __name: { $literal: \"movies in month\" },\n __timestamp: {\n $dateFromString: {\n dateString: {\n $concat: [\n {\n $toString: \"$_id.year\",\n },\n \"-\",\n {\n $toString: {\n $cond: {\n if: {\n $lte: [\"$_id.month\", 9],\n },\n then: \"0\",\n else: \"\",\n },\n },\n },\n {\n $toString: \"$_id.month\",\n },\n \"-01\",\n ],\n },\n format: \"%Y-%m-%d\",\n },\n },\n },\n },\n {\n $sort: {\n __timestamp: 1,\n },\n },\n {\n $project: {\n _id: 0,\n },\n },\n ],\n}", |
| 109 | + "queryType": "timeserie", |
| 110 | + "refId": "A" |
| 111 | + } |
| 112 | + ], |
| 113 | + "title": "Panel Title", |
| 114 | + "type": "timeseries" |
| 115 | + }, |
| 116 | + { |
| 117 | + "datasource": { |
| 118 | + "type": "mongodb-grafana-datasource", |
| 119 | + "uid": "fdkn0wi0apkw0c" |
| 120 | + }, |
| 121 | + "fieldConfig": { |
| 122 | + "defaults": { |
| 123 | + "color": { |
| 124 | + "mode": "palette-classic" |
| 125 | + }, |
| 126 | + "custom": { |
| 127 | + "axisBorderShow": false, |
| 128 | + "axisCenteredZero": false, |
| 129 | + "axisColorMode": "text", |
| 130 | + "axisLabel": "", |
| 131 | + "axisPlacement": "auto", |
| 132 | + "barAlignment": 0, |
| 133 | + "drawStyle": "bars", |
| 134 | + "fillOpacity": 0, |
| 135 | + "gradientMode": "none", |
| 136 | + "hideFrom": { |
| 137 | + "legend": false, |
| 138 | + "tooltip": false, |
| 139 | + "viz": false |
| 140 | + }, |
| 141 | + "insertNulls": false, |
| 142 | + "lineInterpolation": "smooth", |
| 143 | + "lineWidth": 2, |
| 144 | + "pointSize": 5, |
| 145 | + "scaleDistribution": { |
| 146 | + "type": "linear" |
| 147 | + }, |
| 148 | + "showPoints": "auto", |
| 149 | + "spanNulls": false, |
| 150 | + "stacking": { |
| 151 | + "group": "A", |
| 152 | + "mode": "none" |
| 153 | + }, |
| 154 | + "thresholdsStyle": { |
| 155 | + "mode": "off" |
| 156 | + } |
| 157 | + }, |
| 158 | + "mappings": [], |
| 159 | + "thresholds": { |
| 160 | + "mode": "absolute", |
| 161 | + "steps": [ |
| 162 | + { |
| 163 | + "color": "green" |
| 164 | + }, |
| 165 | + { |
| 166 | + "color": "red", |
| 167 | + "value": 80 |
| 168 | + } |
| 169 | + ] |
| 170 | + } |
| 171 | + }, |
| 172 | + "overrides": [] |
| 173 | + }, |
| 174 | + "gridPos": { |
| 175 | + "h": 11, |
| 176 | + "w": 12, |
| 177 | + "x": 12, |
| 178 | + "y": 0 |
| 179 | + }, |
89 | 180 | "id": 2,
|
90 | 181 | "options": {
|
91 | 182 | "legend": {
|
|
108 | 199 | "queryText": "{\n collection: \"movies\",\n aggregations: [\n {\n $match: {\n released: {\n $gte: new Date($from),\n $lte: new Date($to),\n },\n },\n },\n {\n $group: {\n _id: {\n year: {\n $year: \"$released\",\n },\n month: {\n $month: \"$released\",\n },\n },\n __value: {\n $sum: 1,\n },\n },\n },\n {\n $addFields: {\n __name: { $literal: \"movies in month\" },\n __timestamp: {\n $dateFromString: {\n dateString: {\n $concat: [\n {\n $toString: \"$_id.year\",\n },\n \"-\",\n {\n $toString: {\n $cond: {\n if: {\n $lte: [\"$_id.month\", 9],\n },\n then: \"0\",\n else: \"\",\n },\n },\n },\n {\n $toString: \"$_id.month\",\n },\n \"-01\",\n ],\n },\n format: \"%Y-%m-%d\",\n },\n },\n },\n },\n {\n $sort: {\n __timestamp: 1,\n },\n },\n {\n $project: {\n _id: 0,\n },\n },\n ],\n}",
|
109 | 200 | "queryType": "timeserie",
|
110 | 201 | "refId": "A"
|
| 202 | + }, |
| 203 | + { |
| 204 | + "datasource": { |
| 205 | + "type": "mongodb-grafana-datasource", |
| 206 | + "uid": "fdkn0wi0apkw0c" |
| 207 | + }, |
| 208 | + "hide": false, |
| 209 | + "queryText": "{\n \"collection\": \"movies\",\n \"aggregations\": [\n {\n \"$match\": {\n \"released\": {\n \"$gte\": $from,\n \"$lte\": $to\n },\n \"genres\": { \"$elemMatch\": { \"$eq\": \"Comedy\" } }\n }\n },\n {\n \"$group\": {\n \"_id\": {\n \"year\": { \"$year\": \"$released\" },\n \"month\": { \"$month\": \"$released\" }\n },\n \"__value\": { \"$sum\": 1 }\n }\n },\n {\n \"$addFields\": {\n \"__name\": { \"$literal\": \"genre\" },\n \"__timestamp\": {\n \"$dateFromString\": {\n \"dateString\": {\n \"$concat\": [\n { \"$toString\": \"$_id.year\" },\n \"-\",\n {\n \"$toString\": {\n \"$cond\": {\n \"if\": { \"$lte\": [\"$_id.month\", 9] },\n \"then\": \"0\",\n \"else\": \"\"\n }\n }\n },\n { \"$toString\": \"$_id.month\" },\n \"-01\"\n ]\n },\n \"format\": \"%Y-%m-%d\"\n }\n }\n }\n },\n {\n \"$sort\": { \"__timestamp\": 1 }\n },\n {\n \"$project\": { \"_id\": 0 }\n }\n ]\n}\n", |
| 210 | + "queryType": "timeserie", |
| 211 | + "refId": "B" |
111 | 212 | }
|
112 | 213 | ],
|
113 | 214 | "title": "Panel Title",
|
114 | 215 | "type": "timeseries"
|
115 | 216 | },
|
| 217 | + { |
| 218 | + "datasource": { |
| 219 | + "type": "mongodb-grafana-datasource", |
| 220 | + "uid": "fdkn0wi0apkw0c" |
| 221 | + }, |
| 222 | + "fieldConfig": { |
| 223 | + "defaults": { |
| 224 | + "color": { |
| 225 | + "mode": "palette-classic" |
| 226 | + }, |
| 227 | + "custom": { |
| 228 | + "hideFrom": { |
| 229 | + "legend": false, |
| 230 | + "tooltip": false, |
| 231 | + "viz": false |
| 232 | + } |
| 233 | + }, |
| 234 | + "mappings": [] |
| 235 | + }, |
| 236 | + "overrides": [] |
| 237 | + }, |
| 238 | + "gridPos": { |
| 239 | + "h": 11, |
| 240 | + "w": 12, |
| 241 | + "x": 0, |
| 242 | + "y": 8 |
| 243 | + }, |
| 244 | + "id": 5, |
| 245 | + "options": { |
| 246 | + "displayLabels": ["name"], |
| 247 | + "legend": { |
| 248 | + "displayMode": "list", |
| 249 | + "placement": "bottom", |
| 250 | + "showLegend": true |
| 251 | + }, |
| 252 | + "pieType": "pie", |
| 253 | + "reduceOptions": { |
| 254 | + "calcs": ["lastNotNull"], |
| 255 | + "fields": "", |
| 256 | + "values": true |
| 257 | + }, |
| 258 | + "tooltip": { |
| 259 | + "mode": "single", |
| 260 | + "sort": "none" |
| 261 | + } |
| 262 | + }, |
| 263 | + "pluginVersion": "10.4.2", |
| 264 | + "targets": [ |
| 265 | + { |
| 266 | + "datasource": { |
| 267 | + "type": "mongodb-grafana-datasource", |
| 268 | + "uid": "fdkn0wi0apkw0c" |
| 269 | + }, |
| 270 | + "queryText": "{\n \"collection\": \"movies\",\n \"aggregations\": [\n {\n \"$unwind\": {\n \"path\": \"$genres\"\n }\n },\n {\n \"$project\": {\n \"genres\": 1\n }\n },\n {\n \"$group\": {\n \"_id\": \"$genres\",\n \"__value\": {\n \"$sum\": 1\n }\n }\n }\n ]\n}", |
| 271 | + "queryType": "table", |
| 272 | + "refId": "A" |
| 273 | + } |
| 274 | + ], |
| 275 | + "title": "Panel Title", |
| 276 | + "transformations": [ |
| 277 | + { |
| 278 | + "id": "convertFieldType", |
| 279 | + "options": { |
| 280 | + "conversions": [ |
| 281 | + { |
| 282 | + "destinationType": "number", |
| 283 | + "targetField": "__value" |
| 284 | + } |
| 285 | + ], |
| 286 | + "fields": {} |
| 287 | + } |
| 288 | + } |
| 289 | + ], |
| 290 | + "type": "piechart" |
| 291 | + }, |
116 | 292 | {
|
117 | 293 | "datasource": {
|
118 | 294 | "type": "mongodb-grafana-datasource",
|
|
135 | 311 | "mode": "absolute",
|
136 | 312 | "steps": [
|
137 | 313 | {
|
138 |
| - "color": "green", |
139 |
| - "value": null |
| 314 | + "color": "green" |
140 | 315 | },
|
141 | 316 | {
|
142 | 317 | "color": "red",
|
|
150 | 325 | "gridPos": {
|
151 | 326 | "h": 8,
|
152 | 327 | "w": 12,
|
153 |
| - "x": 0, |
154 |
| - "y": 8 |
| 328 | + "x": 12, |
| 329 | + "y": 11 |
155 | 330 | },
|
156 | 331 | "id": 1,
|
157 | 332 | "options": {
|
|
180 | 355 | "type": "table"
|
181 | 356 | }
|
182 | 357 | ],
|
183 |
| - "refresh": "", |
184 | 358 | "schemaVersion": 39,
|
185 | 359 | "tags": [],
|
186 | 360 | "templating": {
|
|
194 | 368 | "timezone": "browser",
|
195 | 369 | "title": "mflix",
|
196 | 370 | "uid": "bdkpj0btmpr7kc",
|
197 |
| - "version": 9, |
| 371 | + "version": 19, |
198 | 372 | "weekStart": ""
|
199 | 373 | }
|
0 commit comments