Skip to content

Commit

Permalink
Add 50k rows example
Browse files Browse the repository at this point in the history
  • Loading branch information
asimonok committed Mar 14, 2024
1 parent 7ff2219 commit 992196d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
54 changes: 54 additions & 0 deletions provisioning/dashboards/panels.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
"y": 0
},
"id": 6,
"options": {
"columnMode": "auto",
"columns": []
},
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -188,6 +192,56 @@
],
"title": "Grafana Table",
"type": "table"
},
{
"datasource": {
"type": "marcusolsson-static-datasource",
"uid": "P1D2C73DC01F2359B"
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 13
},
"id": 8,
"options": {
"columnMode": "auto",
"columns": []
},
"targets": [
{
"datasource": {
"type": "marcusolsson-static-datasource",
"uid": "P1D2C73DC01F2359B"
},
"frame": {
"fields": [
{
"config": {},
"name": "id",
"type": "number",
"values": []
},
{
"config": {},
"name": "name",
"type": "string",
"values": []
}
],
"meta": {
"custom": {
"customCode": "const array = Array.from({ length: 5000 }, (_, i) => i + 1)\n\nconst result = {\n ...frame,\n fields: frame.fields.map((field) => ({\n ...field,\n values: array.map((row) => field.name === 'id' ? row : `Device ${row}`)\n }))\n}\n\nreturn Promise.resolve(result);",
"valuesEditor": "custom"
}
}
},
"refId": "A"
}
],
"title": "50k rows",
"type": "volkovlabs-table-panel"
}
],
"refresh": "",
Expand Down
2 changes: 2 additions & 0 deletions provisioning/datasources/datasources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ datasources:
orgId: 1
version: 1
editable: true
jsonData:
codeEditorEnabled: true

0 comments on commit 992196d

Please sign in to comment.