mirror of
https://github.com/grafana/grafana.git
synced 2025-01-28 09:17:12 -06:00
Testdata: generate data that can link to USA state codes (#36537)
This commit is contained in:
parent
1dc5d037e4
commit
44afe4a597
pkg/tsdb/testdatasource
scenarios.go
testdata
usa-timeseries-wide.txtusa-timeseries.txtusa-values-as-fields.txtusa-values-as-labeled-fields.txtusa-values-as-rows.txt
usa_stats.gousa_stats_test.gopublic/app/plugins/datasource/testdata
@ -31,6 +31,7 @@ const (
|
||||
predictableCSVWaveQuery queryType = "predictable_csv_wave"
|
||||
streamingClientQuery queryType = "streaming_client"
|
||||
flightPath queryType = "flight_path"
|
||||
usaQueryKey queryType = "usa"
|
||||
liveQuery queryType = "live"
|
||||
grafanaAPIQuery queryType = "grafana_api"
|
||||
arrowQuery queryType = "arrow"
|
||||
@ -143,6 +144,12 @@ Timestamps will line up evenly on timeStepSeconds (For example, 60 seconds means
|
||||
handler: p.handleFlightPathScenario,
|
||||
})
|
||||
|
||||
p.registerScenario(&Scenario{
|
||||
ID: string(usaQueryKey),
|
||||
Name: "USA generated data",
|
||||
handler: p.handleUSAScenario,
|
||||
})
|
||||
|
||||
p.registerScenario(&Scenario{
|
||||
ID: string(grafanaAPIQuery),
|
||||
Name: "Grafana API",
|
||||
|
25
pkg/tsdb/testdatasource/testdata/usa-timeseries-wide.txt
vendored
Normal file
25
pkg/tsdb/testdatasource/testdata/usa-timeseries-wide.txt
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0]
|
||||
Name:
|
||||
Dimensions: 7 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+
|
||||
| Name: Time | Name: foo | Name: foo | Name: foo | Name: bar | Name: bar | Name: bar |
|
||||
| Labels: | Labels: state=CA | Labels: state=OR | Labels: state=NV | Labels: state=CA | Labels: state=OR | Labels: state=NV |
|
||||
| Type: []time.Time | Type: []float64 | Type: []float64 | Type: []float64 | Type: []float64 | Type: []float64 | Type: []float64 |
|
||||
+-------------------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | 0.7591864109375384 | 0.9882682601465907 | 0 | 0.6508732545187114 | -0.1527280131044415 | 1 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | 0.9913874643906261 | 0.7446917214252602 | 0.5458434494486994 | 0.13096142733310906 | -0.6674086005144695 | 0.8378871813639024 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | 0.9021552854179972 | 0.25966703475349645 | 0.9147104586490411 | -0.4314114520876468 | -0.9656982091017495 | 0.40410985738788996 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | 0.520421234112239 | -0.309548361739801 | 0.9870048864743552 | -0.8539096785287623 | -0.9508837004303972 | -0.16069024262768705 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | -0.03004672347354234 | -0.7784002433814474 | 0.7392870259917509 | -0.9995484952759943 | -0.6277683180152559 | -0.6733904463238785 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | -0.5707727629931729 | -0.994874810059912 | 0.2518733583799049 | -0.8211080641579032 | -0.10111435263232425 | -0.9677602034277024 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | -0.9264396396937303 | -0.8887854574406474 | -0.31720410936455373 | -0.37644334766887727 | 0.4583234781701883 | -0.9483572918485101 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | -0.981731033820365 | -0.4945290734844293 | -0.7834358726049309 | 0.19027395311496903 | 0.8691610871861625 | -0.6214726329580013 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | -0.7187200578767007 | 0.060066314471906294 | -0.9956576407880757 | 0.6952995601938146 | 0.998194388817009 | -0.09309061359945539 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | -0.22268161314765392 | 0.5951866633399958 | -0.8850616758817763 | 0.9748912242737435 | 0.8035874786121313 | 0.46547376927743367 |
|
||||
+-------------------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////OAQAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFAAAAACAAAAKAAAAAQAAABU/P//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAAHT8//8IAAAADAAAAAAAAAAAAAAABAAAAG5hbWUAAAAABwAAAEgDAACsAgAAJAIAAJwBAAAUAQAAjAAAAAQAAADm/P//FAAAAGgAAABoAAAAAAAAA2gAAAACAAAAKAAAAAQAAADY/P//CAAAAAwAAAADAAAAYmFyAAQAAABuYW1lAAAAAPj8//8IAAAAGAAAAA4AAAB7InN0YXRlIjoiTlYifQAABgAAAGxhYmVscwAAAAAAAPb8//8AAAIAAwAAAGJhcgBq/f//FAAAAGgAAABoAAAAAAAAA2gAAAACAAAAKAAAAAQAAABc/f//CAAAAAwAAAADAAAAYmFyAAQAAABuYW1lAAAAAHz9//8IAAAAGAAAAA4AAAB7InN0YXRlIjoiT1IifQAABgAAAGxhYmVscwAAAAAAAHr9//8AAAIAAwAAAGJhcgDu/f//FAAAAGgAAABoAAAAAAAAA2gAAAACAAAAKAAAAAQAAADg/f//CAAAAAwAAAADAAAAYmFyAAQAAABuYW1lAAAAAAD+//8IAAAAGAAAAA4AAAB7InN0YXRlIjoiQ0EifQAABgAAAGxhYmVscwAAAAAAAP79//8AAAIAAwAAAGJhcgBy/v//FAAAAGgAAABoAAAAAAAAA2gAAAACAAAAKAAAAAQAAABk/v//CAAAAAwAAAADAAAAZm9vAAQAAABuYW1lAAAAAIT+//8IAAAAGAAAAA4AAAB7InN0YXRlIjoiTlYifQAABgAAAGxhYmVscwAAAAAAAIL+//8AAAIAAwAAAGZvbwD2/v//FAAAAGgAAABoAAAAAAAAA2gAAAACAAAAKAAAAAQAAADo/v//CAAAAAwAAAADAAAAZm9vAAQAAABuYW1lAAAAAAj///8IAAAA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XMQ==
|
140
pkg/tsdb/testdatasource/testdata/usa-timeseries.txt
vendored
Normal file
140
pkg/tsdb/testdatasource/testdata/usa-timeseries.txt
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0]
|
||||
Name: foo
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+
|
||||
| Name: Time | Name: Value |
|
||||
| Labels: | Labels: state=CA |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+-------------------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | 0.7591864109375384 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | 0.9913874643906261 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | 0.9021552854179972 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | 0.520421234112239 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | -0.03004672347354234 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | -0.5707727629931729 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | -0.9264396396937303 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | -0.981731033820365 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | -0.7187200578767007 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | -0.22268161314765392 |
|
||||
+-------------------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[1]
|
||||
Name: foo
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+
|
||||
| Name: Time | Name: Value |
|
||||
| Labels: | Labels: state=OR |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+-------------------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | 0.9882682601465907 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | 0.7446917214252602 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | 0.25966703475349645 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | -0.309548361739801 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | -0.7784002433814474 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | -0.994874810059912 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | -0.8887854574406474 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | -0.4945290734844293 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | 0.060066314471906294 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | 0.5951866633399958 |
|
||||
+-------------------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[2]
|
||||
Name: foo
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+
|
||||
| Name: Time | Name: Value |
|
||||
| Labels: | Labels: state=NV |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+-------------------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | 0 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | 0.5458434494486994 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | 0.9147104586490411 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | 0.9870048864743552 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | 0.7392870259917509 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | 0.2518733583799049 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | -0.31720410936455373 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | -0.7834358726049309 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | -0.9956576407880757 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | -0.8850616758817763 |
|
||||
+-------------------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[3]
|
||||
Name: bar
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+
|
||||
| Name: Time | Name: Value |
|
||||
| Labels: | Labels: state=CA |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+-------------------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | 0.6508732545187114 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | 0.13096142733310906 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | -0.4314114520876468 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | -0.8539096785287623 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | -0.9995484952759943 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | -0.8211080641579032 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | -0.37644334766887727 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | 0.19027395311496903 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | 0.6952995601938146 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | 0.9748912242737435 |
|
||||
+-------------------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[4]
|
||||
Name: bar
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+
|
||||
| Name: Time | Name: Value |
|
||||
| Labels: | Labels: state=OR |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+-------------------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | -0.1527280131044415 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | -0.6674086005144695 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | -0.9656982091017495 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | -0.9508837004303972 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | -0.6277683180152559 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | -0.10111435263232425 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | 0.4583234781701883 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | 0.8691610871861625 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | 0.998194388817009 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | 0.8035874786121313 |
|
||||
+-------------------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[5]
|
||||
Name: bar
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-------------------------------+----------------------+
|
||||
| Name: Time | Name: Value |
|
||||
| Labels: | Labels: state=NV |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+-------------------------------+----------------------+
|
||||
| 2020-01-10 23:00:00 +0000 UTC | 1 |
|
||||
| 2020-01-10 23:00:01 +0000 UTC | 0.8378871813639024 |
|
||||
| 2020-01-10 23:00:02 +0000 UTC | 0.40410985738788996 |
|
||||
| 2020-01-10 23:00:03 +0000 UTC | -0.16069024262768705 |
|
||||
| 2020-01-10 23:00:04 +0000 UTC | -0.6733904463238785 |
|
||||
| 2020-01-10 23:00:05 +0000 UTC | -0.9677602034277024 |
|
||||
| 2020-01-10 23:00:06 +0000 UTC | -0.9483572918485101 |
|
||||
| 2020-01-10 23:00:07 +0000 UTC | -0.6214726329580013 |
|
||||
| 2020-01-10 23:00:08 +0000 UTC | -0.09309061359945539 |
|
||||
| 2020-01-10 23:00:09 +0000 UTC | 0.46547376927743367 |
|
||||
+-------------------------------+----------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////mAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFAAAAACAAAAKAAAAAQAAAD4/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAABj///8IAAAADAAAAAMAAABmb28ABAAAAG5hbWUAAAAAAgAAAKQAAAAEAAAAdv///xQAAABsAAAAbAAAAAAAAANsAAAAAgAAACwAAAAEAAAAaP///wgAAAAQAAAABQAAAFZhbHVlAAAABAAAAG5hbWUAAAAAjP///wgAAAAYAAAADgAAAHsic3RhdGUiOiJDQSJ9AAAGAAAAbGFiZWxzAAAAAAAAiv///wAAAgAFAAAAVmFsdWUAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAABEAAAATAAAAAAAAApMAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAA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xpfv3Nk/8KRvdH+RxL/+ywwfaozlvwj0Aj/k9+6/BjMtZPFY7r9vPD2TGuPjv2Jn+VTJ1Le/ulAMflLK3T8QAAAADAAUABIADAAIAAQADAAAABAAAAAsAAAAOAAAAAAAAwABAAAAqAEAAAAAAADAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAoADAAAAAgABAAKAAAACAAAAFAAAAACAAAAKAAAAAQAAAD4/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAABj///8IAAAADAAAAAMAAABiYXIABAAAAG5hbWUAAAAAAgAAAKQAAAAEAAAAdv///xQAAABsAAAAbAAAAAAAAANsAAAAAgAAACwAAAAEAAAAaP///wgAAAAQAAAABQAAAFZhbHVlAAAABAAAAG5hbWUAAAAAjP///wgAAAAYAAAADgAAAHsic3RhdGUiOiJOViJ9AAAGAAAAbGFiZWxzAAAAAAAAiv///wAAAgAFAAAAVmFsdWUAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAABEAAAATAAAAAAAAApMAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAAEAAAAAQAAABUaW1lAAAAAAQAAABuYW1lAAAAAAAAAAAAAAYACAAGAAYAAAAAAAMABAAAAFRpbWUAAAAAwAEAAEFSUk9XMQ==
|
30
pkg/tsdb/testdatasource/testdata/usa-values-as-fields.txt
vendored
Normal file
30
pkg/tsdb/testdatasource/testdata/usa-values-as-fields.txt
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0]
|
||||
Name: foo
|
||||
Dimensions: 3 Fields by 1 Rows
|
||||
+--------------------+--------------------+----------------------+
|
||||
| Name: CA | Name: OR | Name: NV |
|
||||
| Labels: | Labels: | Labels: |
|
||||
| Type: []float64 | Type: []float64 | Type: []float64 |
|
||||
+--------------------+--------------------+----------------------+
|
||||
| 0.3455559195129913 | 0.9373322369907638 | -0.48750602508751073 |
|
||||
+--------------------+--------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[1]
|
||||
Name: bar
|
||||
Dimensions: 3 Fields by 1 Rows
|
||||
+--------------------+--------------------+-------------------+
|
||||
| Name: CA | Name: OR | Name: NV |
|
||||
| Labels: | Labels: | Labels: |
|
||||
| Type: []float64 | Type: []float64 | Type: []float64 |
|
||||
+--------------------+--------------------+-------------------+
|
||||
| 0.9383981598924473 | 0.3484369060502785 | 0.873119622676856 |
|
||||
+--------------------+--------------------+-------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////sAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFAAAAACAAAAKAAAAAQAAADU/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAAPT+//8IAAAADAAAAAMAAABmb28ABAAAAG5hbWUAAAAAAwAAAMgAAABcAAAABAAAAFb///8UAAAAOAAAADgAAAAAAAADOAAAAAEAAAAEAAAARP///wgAAAAMAAAAAgAAAE5WAAAEAAAAbmFtZQAAAAAAAAAAOv///wAAAgACAAAATlYAAKr///8UAAAAOAAAADgAAAAAAAADOAAAAAEAAAAEAAAAmP///wgAAAAMAAAAAgAAAE9SAAAEAAAAbmFtZQAAAAAAAAAAjv///wAAAgACAAAAT1IAAAAAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAABAAAAASAAAAAAAAANIAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAADAAAAAIAAABDQQAABAAAAG5hbWUAAAAAAAAAAAAABgAIAAYABgAAAAAAAgACAAAAQ0EAAP/////oAAAAFAAAAAAAAAAMABYAFAATAAwABAAMAAAAGAAAAAAAAAAUAAAAAAAAAwMACgAYAAwACAAEAAoAAAAUAAAAeAAAAAEAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgA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E9SAAAEAAAAbmFtZQAAAAAAAAAAjv///wAAAgACAAAAT1IAAAAAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAABAAAAASAAAAAAAAANIAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAADAAAAAIAAABDQQAABAAAAG5hbWUAAAAAAAAAAAAABgAIAAYABgAAAAAAAgACAAAAQ0EAAOABAABBUlJPVzE=
|
30
pkg/tsdb/testdatasource/testdata/usa-values-as-labeled-fields.txt
vendored
Normal file
30
pkg/tsdb/testdatasource/testdata/usa-values-as-labeled-fields.txt
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0]
|
||||
Name: foo
|
||||
Dimensions: 3 Fields by 1 Rows
|
||||
+--------------------+--------------------+----------------------+
|
||||
| Name: | Name: | Name: |
|
||||
| Labels: state=CA | Labels: state=OR | Labels: state=NV |
|
||||
| Type: []float64 | Type: []float64 | Type: []float64 |
|
||||
+--------------------+--------------------+----------------------+
|
||||
| 0.3455559195129913 | 0.9373322369907638 | -0.48750602508751073 |
|
||||
+--------------------+--------------------+----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[1]
|
||||
Name: bar
|
||||
Dimensions: 3 Fields by 1 Rows
|
||||
+--------------------+--------------------+-------------------+
|
||||
| Name: | Name: | Name: |
|
||||
| Labels: state=CA | Labels: state=OR | Labels: state=NV |
|
||||
| Type: []float64 | Type: []float64 | Type: []float64 |
|
||||
+--------------------+--------------------+-------------------+
|
||||
| 0.9383981598924473 | 0.3484369060502785 | 0.873119622676856 |
|
||||
+--------------------+--------------------+-------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////QAIAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFAAAAACAAAAKAAAAAQAAABU/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAA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7//wgAAAAMAAAAAAAAAAAAAAAEAAAAbmFtZQAAAADo/v//CAAAABgAAAAOAAAAeyJzdGF0ZSI6Ik5WIn0AAAYAAABsYWJlbHMAAAAAAADe/v//AAACAAAAAAAAAAAAfv///xQAAABoAAAAaAAAAAAAAANoAAAAAgAAACgAAAAEAAAATP///wgAAAAMAAAAAAAAAAAAAAAEAAAAbmFtZQAAAABs////CAAAABgAAAAOAAAAeyJzdGF0ZSI6Ik9SIn0AAAYAAABsYWJlbHMAAAAAAABi////AAACAAAAAAAAABIAGAAUAAAAEwAMAAAACAAEABIAAAAUAAAAcAAAAHgAAAAAAAADeAAAAAIAAAAwAAAABAAAAOD///8IAAAADAAAAAAAAAAAAAAABAAAAG5hbWUAAAAACAAMAAgABAAIAAAACAAAABgAAAAOAAAAeyJzdGF0ZSI6IkNBIn0AAAYAAABsYWJlbHMAAAAAAAAAAAYACAAGAAYAAAAAAAIAAAAAAAAAAABoAgAAQVJST1cx
|
25
pkg/tsdb/testdatasource/testdata/usa-values-as-rows.txt
vendored
Normal file
25
pkg/tsdb/testdatasource/testdata/usa-values-as-rows.txt
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0]
|
||||
Name:
|
||||
Dimensions: 4 Fields by 51 Rows
|
||||
+----------------+----------------------+----------------------+---------------------+
|
||||
| Name: state | Name: foo | Name: bar | Name: baz |
|
||||
| Labels: | Labels: | Labels: | Labels: |
|
||||
| Type: []string | Type: []float64 | Type: []float64 | Type: []float64 |
|
||||
+----------------+----------------------+----------------------+---------------------+
|
||||
| AL | 0.6779842417778559 | 0.7350764367743711 | 0.9223316213929472 |
|
||||
| AK | 0.9096030926893556 | -0.41547829518515106 | -2.1892914822036755 |
|
||||
| AZ | -0.11168671678088725 | -0.9937434665418967 | 0.11238988787472795 |
|
||||
| AR | -0.9791366197808846 | -0.2032030506760749 | 4.818513386109159 |
|
||||
| CA | -0.4979007493043646 | 0.8672340190756773 | -0.5741250208738828 |
|
||||
| CO | 0.6691553056325918 | 0.74312258540819 | 0.9004642286104536 |
|
||||
| CT | 0.914501128595007 | -0.4045833483949364 | -2.260352859856979 |
|
||||
| DE | -0.09980837850296802 | -0.9950066771537809 | 0.10030925499763493 |
|
||||
| DC | -0.976639481217665 | -0.21488444272885437 | 4.544952016140177 |
|
||||
| ... | ... | ... | ... |
|
||||
+----------------+----------------------+----------------------+---------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////EAIAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFAAAAACAAAAKAAAAAQAAAB0/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAAJT+//8IAAAADAAAAAAAAAAAAAAABAAAAG5hbWUAAAAABAAAACgBAAC0AAAAXAAAAAQAAAD6/v//FAAAADgAAAA4AAAAAAAAAzgAAAABAAAABAAAAOj+//8IAAAADAAAAAMAAABiYXoABAAAAG5hbWUAAAAAAAAAAFb///8AAAIAAwAAAGJhegBO////FAAAADgAAAA4AAAAAAAAAzgAAAABAAAABAAAADz///8IAAAADAAAAAMAAABiYXIABAAAAG5hbWUAAAAAAAAAAKr///8AAAIAAwAAAGJhcgCi////FAAAADgAAABAAAAAAAAAA0AAAAABAAAABAAAAJD///8IAAAADAAAAAMAAABmb28ABAAAAG5hbWUAAAAAAAAAAAAABgAIAAYABgAAAAAAAgADAAAAZm9vAAAAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAABEAAAASAAAAAAAAAVEAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAAEAAAAAUAAABzdGF0ZQAAAAQAAABuYW1lAAAAAAAAAAAEAAQABAAAAAUAAABzdGF0ZQAAAP////8oAQAAFAAAAAAAAAAMABYAFAATAAwABAAMAAAAAAYAAAAAAAAUAAAAAAAAAwMACgAYAAwACAAEAAoAAAAUAAAAqAAAADMA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3IbpP2JItzBOdgXAVoBX0jiepD/jLHIBojYMQDZgojXdjuW/qDlc2Dzo6D+ud7VQfkUGwOD4TxVQ/Zw/QCBx8iv7CkDA8eV1Sx7mv55P63uJTOg/cwJlr+8iB8C5//wyTcCQP6tz4EEl2AlAJHV9IB2w5r8i683BorPnP9xC5kc6EAjAIIzo5g4Scj8WrExLv8oIQPQUvIhsROe/PkZ4RsB4A0AQAAAADAAUABIADAAIAAQADAAAABAAAAAsAAAAPAAAAAAAAwABAAAAIAIAAAAAAAAwAQAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAwAAAAIAAQACgAAAAgAAABQAAAAAgAAACgAAAAEAAAAdP7//wgAAAAMAAAAAAAAAAAAAAAFAAAAcmVmSWQAAACU/v//CAAAAAwAAAAAAAAAAAAAAAQAAABuYW1lAAAAAAQAAAAoAQAAtAAAAFwAAAAEAAAA+v7//xQAAAA4AAAAOAAAAAAAAAM4AAAAAQAAAAQAAADo/v//CAAAAAwAAAADAAAAYmF6AAQAAABuYW1lAAAAAAAAAABW////AAACAAMAAABiYXoATv///xQAAAA4AAAAOAAAAAAAAAM4AAAAAQAAAAQAAAA8////CAAAAAwAAAADAAAAYmFyAAQAAABuYW1lAAAAAAAAAACq////AAACAAMAAABiYXIAov///xQAAAA4AAAAQAAAAAAAAANAAAAAAQAAAAQAAACQ////CAAAAAwAAAADAAAAZm9vAAQAAABuYW1lAAAAAAAAAAAAAAYACAAGAAYAAAAAAAIAAwAAAGZvbwAAABIAGAAUAAAAEwAMAAAACAAEABIAAAAUAAAARAAAAEgAAAAAAAAFRAAAAAEAAAAMAAAACAAMAAgABAAIAAAACAAAABAAAAAFAAAAc3RhdGUAAAAEAAAAbmFtZQAAAAAAAAAABAAEAAQAAAAFAAAAc3RhdGUAAABAAgAAQVJST1cx
|
198
pkg/tsdb/testdatasource/usa_stats.go
Normal file
198
pkg/tsdb/testdatasource/usa_stats.go
Normal file
@ -0,0 +1,198 @@
|
||||
package testdatasource
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/data"
|
||||
)
|
||||
|
||||
var modeValueAsRow = "values-as-rows"
|
||||
var modeValueAsFields = "values-as-fields"
|
||||
var modeValueAsLabeledFields = "values-as-labeled-fields"
|
||||
var modeTimeseries = "timeseries"
|
||||
var modeTimeseriesWide = "timeseries-wide"
|
||||
|
||||
var allStateCodes = []string{"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "MD", "MA", "MI", "MN", "MS", "MO", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"}
|
||||
|
||||
type usaQueryWrapper struct {
|
||||
USA usaQuery `json:"usa"`
|
||||
}
|
||||
|
||||
type usaQuery struct {
|
||||
Mode string `json:"mode"`
|
||||
Period string `json:"period"`
|
||||
Fields []string `json:"fields"`
|
||||
States []string `json:"states"`
|
||||
|
||||
// From the main query
|
||||
maxDataPoints int64
|
||||
timeRange backend.TimeRange
|
||||
interval time.Duration
|
||||
period time.Duration
|
||||
}
|
||||
|
||||
func (p *testDataPlugin) handleUSAScenario(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
|
||||
resp := backend.NewQueryDataResponse()
|
||||
|
||||
for _, q := range req.Queries {
|
||||
wrapper := &usaQueryWrapper{}
|
||||
err := json.Unmarshal(q.JSON, wrapper)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse query json: %v", err)
|
||||
}
|
||||
|
||||
usa := wrapper.USA
|
||||
periodString := usa.Period
|
||||
if periodString == "" {
|
||||
periodString = "30m"
|
||||
}
|
||||
period, err := time.ParseDuration(periodString)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse query json: %v", err)
|
||||
}
|
||||
|
||||
if len(usa.Fields) == 0 {
|
||||
usa.Fields = []string{"foo", "bar", "baz"}
|
||||
}
|
||||
if len(usa.States) == 0 {
|
||||
usa.States = allStateCodes
|
||||
}
|
||||
|
||||
usa.period = period
|
||||
usa.maxDataPoints = q.MaxDataPoints * 2
|
||||
usa.timeRange = q.TimeRange
|
||||
usa.interval = q.Interval
|
||||
|
||||
resp.Responses[q.RefID] = doStateQuery(usa)
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func doStateQuery(query usaQuery) backend.DataResponse {
|
||||
switch query.Mode {
|
||||
default:
|
||||
case modeTimeseries:
|
||||
return getStateValueAsTimeseries(query, false)
|
||||
case modeTimeseriesWide:
|
||||
return getStateValueAsTimeseries(query, true)
|
||||
case modeValueAsFields:
|
||||
return getStateValueAsFrame(query.timeRange.To, query, false)
|
||||
case modeValueAsLabeledFields:
|
||||
return getStateValueAsFrame(query.timeRange.To, query, true)
|
||||
}
|
||||
return getStateValueAsRow(query.timeRange.To, query)
|
||||
}
|
||||
|
||||
func getStateValueAsFrame(t time.Time, query usaQuery, asLabel bool) backend.DataResponse {
|
||||
dr := backend.DataResponse{}
|
||||
|
||||
var labels data.Labels
|
||||
for _, fname := range query.Fields {
|
||||
frame := data.NewFrame(fname)
|
||||
vals := getStateValues(t, fname, query)
|
||||
for idx, state := range query.States {
|
||||
name := state
|
||||
if asLabel {
|
||||
labels = data.Labels{"state": state}
|
||||
name = ""
|
||||
}
|
||||
field := data.NewField(name, labels, []float64{vals[idx]})
|
||||
frame.Fields = append(frame.Fields, field)
|
||||
}
|
||||
dr.Frames = append(dr.Frames, frame)
|
||||
}
|
||||
return dr
|
||||
}
|
||||
|
||||
// One frame for each time+value
|
||||
func getStateValueAsTimeseries(query usaQuery, wide bool) backend.DataResponse {
|
||||
dr := backend.DataResponse{}
|
||||
tr := query.timeRange
|
||||
|
||||
var labels data.Labels
|
||||
for _, fname := range query.Fields {
|
||||
timeWalkerMs := tr.From.UnixNano() / int64(time.Millisecond)
|
||||
to := tr.To.UnixNano() / int64(time.Millisecond)
|
||||
stepMillis := query.interval.Milliseconds()
|
||||
|
||||
// Calculate all values
|
||||
timeVals := make([]time.Time, 0)
|
||||
stateVals := make([][]float64, 0)
|
||||
for i := int64(0); i < query.maxDataPoints && timeWalkerMs < to; i++ {
|
||||
t := time.Unix(timeWalkerMs/int64(1e+3), (timeWalkerMs%int64(1e+3))*int64(1e+6)).UTC()
|
||||
|
||||
vals := getStateValues(t, fname, query)
|
||||
timeVals = append(timeVals, t)
|
||||
stateVals = append(stateVals, vals)
|
||||
|
||||
timeWalkerMs += stepMillis
|
||||
}
|
||||
|
||||
values := make([]float64, len(timeVals))
|
||||
for idx, state := range query.States {
|
||||
for i := 0; i < len(timeVals); i++ {
|
||||
values[i] = stateVals[i][idx]
|
||||
}
|
||||
|
||||
labels = data.Labels{"state": state}
|
||||
frame := data.NewFrame(fname,
|
||||
data.NewField(data.TimeSeriesTimeFieldName, nil, timeVals),
|
||||
data.NewField(data.TimeSeriesValueFieldName, labels, values),
|
||||
)
|
||||
dr.Frames = append(dr.Frames, frame)
|
||||
}
|
||||
}
|
||||
|
||||
// Stick them next to eachother
|
||||
if wide {
|
||||
wideFrame := data.NewFrame("", dr.Frames[0].Fields[0])
|
||||
for _, frame := range dr.Frames {
|
||||
field := frame.Fields[1]
|
||||
field.Name = frame.Name
|
||||
wideFrame.Fields = append(wideFrame.Fields, field)
|
||||
}
|
||||
dr.Frames = data.Frames{wideFrame}
|
||||
}
|
||||
|
||||
return dr
|
||||
}
|
||||
|
||||
func getStateValueAsRow(t time.Time, query usaQuery) backend.DataResponse {
|
||||
frame := data.NewFrame("", data.NewField("state", nil, query.States))
|
||||
for _, f := range query.Fields {
|
||||
frame.Fields = append(frame.Fields, data.NewField(f, nil, getStateValues(t, f, query)))
|
||||
}
|
||||
|
||||
return backend.DataResponse{
|
||||
Frames: data.Frames{frame},
|
||||
}
|
||||
}
|
||||
|
||||
func getStateValues(t time.Time, field string, query usaQuery) []float64 {
|
||||
tv := float64(t.UnixNano())
|
||||
pn := float64(query.period.Nanoseconds())
|
||||
incr := pn / float64(len(query.States))
|
||||
|
||||
fn := math.Sin
|
||||
|
||||
// period offsets
|
||||
switch field {
|
||||
case "bar":
|
||||
fn = math.Cos
|
||||
case "baz":
|
||||
fn = math.Tan
|
||||
}
|
||||
|
||||
values := make([]float64, len(query.States))
|
||||
for i := range query.States {
|
||||
tv += incr
|
||||
values[i] = fn(float64(int64(tv) % int64(pn)))
|
||||
}
|
||||
return values
|
||||
}
|
70
pkg/tsdb/testdatasource/usa_stats_test.go
Normal file
70
pkg/tsdb/testdatasource/usa_stats_test.go
Normal file
@ -0,0 +1,70 @@
|
||||
package testdatasource
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/experimental"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestUSAScenario(t *testing.T) {
|
||||
cfg := setting.NewCfg()
|
||||
p := &testDataPlugin{
|
||||
Cfg: cfg,
|
||||
}
|
||||
|
||||
t.Run("usa query modes", func(t *testing.T) {
|
||||
start := time.Date(2020, time.January, 10, 23, 0, 0, 0, time.UTC)
|
||||
qr := &backend.QueryDataRequest{}
|
||||
for _, mode := range []string{
|
||||
modeValueAsRow,
|
||||
modeValueAsFields,
|
||||
modeValueAsLabeledFields,
|
||||
modeTimeseries,
|
||||
modeTimeseriesWide,
|
||||
} {
|
||||
query := usaQueryWrapper{
|
||||
USA: usaQuery{
|
||||
Mode: mode,
|
||||
},
|
||||
}
|
||||
|
||||
if mode != modeValueAsRow {
|
||||
query.USA.Fields = []string{"foo", "bar"}
|
||||
query.USA.States = []string{"CA", "OR", "NV"}
|
||||
}
|
||||
|
||||
raw, _ := json.Marshal(query)
|
||||
qr.Queries = append(qr.Queries,
|
||||
backend.DataQuery{
|
||||
RefID: mode,
|
||||
TimeRange: backend.TimeRange{
|
||||
From: start,
|
||||
To: start.Add(time.Second * 10),
|
||||
},
|
||||
Interval: time.Second,
|
||||
MaxDataPoints: 10,
|
||||
JSON: raw,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
rsp, err := p.handleUSAScenario(context.Background(), qr)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, rsp)
|
||||
for k, v := range rsp.Responses {
|
||||
dr := v
|
||||
filePath := filepath.Join("testdata", fmt.Sprintf("usa-%s.txt", k))
|
||||
err = experimental.CheckGoldenDataResponse(filePath, &dr, true)
|
||||
assert.NoError(t, err) // require will fail after a single value
|
||||
}
|
||||
})
|
||||
}
|
@ -10,7 +10,7 @@ import { StreamingClientEditor, RandomWalkEditor } from './components';
|
||||
|
||||
// Types
|
||||
import { TestDataDataSource } from './datasource';
|
||||
import { TestDataQuery, Scenario, NodesQuery, CSVWave } from './types';
|
||||
import { TestDataQuery, Scenario, NodesQuery, CSVWave, USAQuery } from './types';
|
||||
import { PredictablePulseEditor } from './components/PredictablePulseEditor';
|
||||
import { CSVWavesEditor } from './components/CSVWaveEditor';
|
||||
import { defaultCSVWaveQuery, defaultPulseQuery, defaultQuery } from './constants';
|
||||
@ -19,6 +19,7 @@ import { NodeGraphEditor } from './components/NodeGraphEditor';
|
||||
import { defaultStreamQuery } from './runStreams';
|
||||
import { CSVFileEditor } from './components/CSVFileEditor';
|
||||
import { CSVContentEditor } from './components/CSVContentEditor';
|
||||
import { USAQueryEditor, usaQueryModes } from './components/USAQueryEditor';
|
||||
|
||||
const showLabelsFor = ['random_walk', 'predictable_pulse'];
|
||||
const endpoints = [
|
||||
@ -102,6 +103,10 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery }: Props)
|
||||
case 'predictable_csv_wave':
|
||||
update.csvWave = defaultCSVWaveQuery;
|
||||
break;
|
||||
case 'usa':
|
||||
update.usa = {
|
||||
mode: usaQueryModes[0].value,
|
||||
};
|
||||
}
|
||||
|
||||
onUpdate(update);
|
||||
@ -139,6 +144,9 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery }: Props)
|
||||
|
||||
const onStreamClientChange = onFieldChange('stream');
|
||||
const onPulseWaveChange = onFieldChange('pulseWave');
|
||||
const onUSAStatsChange = (usa?: USAQuery) => {
|
||||
onUpdate({ ...query, usa });
|
||||
};
|
||||
|
||||
const onCSVWaveChange = (csvWave?: CSVWave[]) => {
|
||||
onUpdate({ ...query, csvWave });
|
||||
@ -244,6 +252,7 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery }: Props)
|
||||
</InlineFieldRow>
|
||||
)}
|
||||
|
||||
{scenarioId === 'usa' && <USAQueryEditor onChange={onUSAStatsChange} query={query.usa ?? {}} />}
|
||||
{scenarioId === 'grafana_api' && (
|
||||
<InlineField labelWidth={14} label="Endpoint">
|
||||
<Select
|
||||
|
143
public/app/plugins/datasource/testdata/components/USAQueryEditor.tsx
vendored
Normal file
143
public/app/plugins/datasource/testdata/components/USAQueryEditor.tsx
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
import React from 'react';
|
||||
import { InlineFieldRow, InlineField, Select, Input } from '@grafana/ui';
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { USAQuery } from '../types';
|
||||
|
||||
export interface Props {
|
||||
onChange: (value: USAQuery) => void;
|
||||
query: USAQuery;
|
||||
}
|
||||
|
||||
export function USAQueryEditor({ query, onChange }: Props) {
|
||||
return (
|
||||
<>
|
||||
<InlineFieldRow>
|
||||
<InlineField labelWidth={14} label="Mode">
|
||||
<Select
|
||||
options={usaQueryModes}
|
||||
onChange={(v) => {
|
||||
onChange({ ...query, mode: v.value });
|
||||
}}
|
||||
width={32}
|
||||
value={usaQueryModes.find((ep) => ep.value === query.mode)}
|
||||
/>
|
||||
</InlineField>
|
||||
|
||||
<InlineField label="Fields">
|
||||
<Select
|
||||
options={fieldNames}
|
||||
onChange={(vals: SelectableValue[]) => {
|
||||
onChange({ ...query, fields: vals.map((v) => v.value) });
|
||||
}}
|
||||
width={28}
|
||||
isMulti={true}
|
||||
placeholder="all"
|
||||
value={query.fields}
|
||||
/>
|
||||
</InlineField>
|
||||
<InlineField label="Period">
|
||||
<Input
|
||||
value={query.period}
|
||||
placeholder={'30m'}
|
||||
onChange={(v) => {
|
||||
onChange({ ...query, period: v.currentTarget.value });
|
||||
}}
|
||||
/>
|
||||
</InlineField>
|
||||
</InlineFieldRow>
|
||||
<InlineFieldRow>
|
||||
<InlineField labelWidth={14} label="Fields">
|
||||
<Select
|
||||
options={fieldNames}
|
||||
onChange={(vals: SelectableValue[]) => {
|
||||
onChange({ ...query, fields: vals.map((v) => v.value) });
|
||||
}}
|
||||
width={32}
|
||||
isMulti={true}
|
||||
placeholder="all"
|
||||
value={query.fields}
|
||||
/>
|
||||
</InlineField>
|
||||
<InlineField label="States" grow>
|
||||
<Select
|
||||
options={stateNames}
|
||||
onChange={(vals: SelectableValue[]) => {
|
||||
onChange({ ...query, states: vals.map((v) => v.value) });
|
||||
}}
|
||||
isMulti={true}
|
||||
placeholder="all"
|
||||
value={query.states}
|
||||
/>
|
||||
</InlineField>
|
||||
</InlineFieldRow>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export const usaQueryModes = [
|
||||
'values-as-rows',
|
||||
'values-as-fields',
|
||||
'values-as-labeled-fields',
|
||||
'timeseries',
|
||||
'timeseries-wide',
|
||||
].map((f) => ({ label: f, value: f }));
|
||||
|
||||
export const fieldNames = [
|
||||
'foo',
|
||||
'bar',
|
||||
'baz', // all short
|
||||
].map((f) => ({ label: f, value: f }));
|
||||
|
||||
export const stateNames = [
|
||||
'AL',
|
||||
'AK',
|
||||
'AZ',
|
||||
'AR',
|
||||
'CA',
|
||||
'CO',
|
||||
'CT',
|
||||
'DE',
|
||||
'DC',
|
||||
'FL',
|
||||
'GA',
|
||||
'HI',
|
||||
'ID',
|
||||
'IL',
|
||||
'IN',
|
||||
'IA',
|
||||
'KS',
|
||||
'KY',
|
||||
'LA',
|
||||
'ME',
|
||||
'MT',
|
||||
'NE',
|
||||
'NV',
|
||||
'NH',
|
||||
'NJ',
|
||||
'NM',
|
||||
'NY',
|
||||
'NC',
|
||||
'ND',
|
||||
'OH',
|
||||
'OK',
|
||||
'OR',
|
||||
'MD',
|
||||
'MA',
|
||||
'MI',
|
||||
'MN',
|
||||
'MS',
|
||||
'MO',
|
||||
'PA',
|
||||
'RI',
|
||||
'SC',
|
||||
'SD',
|
||||
'TN',
|
||||
'TX',
|
||||
'UT',
|
||||
'VT',
|
||||
'VA',
|
||||
'WA',
|
||||
'WV',
|
||||
'WI',
|
||||
'WY',
|
||||
].map((f) => ({ label: f, value: f }));
|
@ -20,6 +20,7 @@ export interface TestDataQuery extends DataQuery {
|
||||
nodes?: NodesQuery;
|
||||
csvFileName?: string;
|
||||
csvContent?: string;
|
||||
usa?: USAQuery;
|
||||
}
|
||||
|
||||
export interface NodesQuery {
|
||||
@ -49,3 +50,10 @@ export interface CSVWave {
|
||||
valuesCSV?: string;
|
||||
labels?: string;
|
||||
}
|
||||
|
||||
export interface USAQuery {
|
||||
mode?: string;
|
||||
period?: string;
|
||||
fields?: string[]; // foo, bar, baz
|
||||
states?: string[];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user