@perses-dev/plugin-system 0.0.0-snapshot-panel-extra-content-3-17f9c42 → 0.0.0-snapshot-scatterplot-fix-imports-95e1b59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/dist/cjs/components/CalculationSelector/CalculationSelector.js +7 -5
  2. package/dist/cjs/components/CalculationSelector/index.js +10 -8
  3. package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +350 -0
  4. package/dist/cjs/components/DatasourceEditorForm/index.js +30 -0
  5. package/dist/cjs/components/DatasourceSelect.js +137 -25
  6. package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +19 -17
  7. package/dist/cjs/components/LegendOptionsEditor/index.js +10 -8
  8. package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +25 -30
  9. package/dist/cjs/components/OptionsEditorRadios/index.js +10 -8
  10. package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +7 -5
  11. package/dist/cjs/components/OptionsEditorTabPanel/index.js +10 -8
  12. package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +13 -11
  13. package/dist/cjs/components/OptionsEditorTabs/index.js +10 -8
  14. package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +60 -19
  15. package/dist/cjs/components/PanelSpecEditor/index.js +10 -8
  16. package/dist/cjs/components/PluginEditor/PluginEditor.js +25 -32
  17. package/dist/cjs/components/PluginEditor/index.js +11 -9
  18. package/dist/cjs/components/PluginEditor/plugin-editor-api.js +8 -6
  19. package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +25 -14
  20. package/dist/cjs/components/PluginKindSelect/index.js +10 -8
  21. package/dist/cjs/components/PluginRegistry/PluginRegistry.js +11 -9
  22. package/dist/cjs/components/PluginRegistry/index.js +10 -8
  23. package/dist/cjs/components/PluginRegistry/plugin-indexes.js +7 -3
  24. package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +9 -7
  25. package/dist/cjs/components/PluginSpecEditor/index.js +10 -8
  26. package/dist/cjs/components/ProjectSelect.js +96 -0
  27. package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +192 -0
  28. package/dist/cjs/components/TimeRangeControls/index.js +30 -0
  29. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +45 -49
  30. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +23 -21
  31. package/dist/cjs/components/TimeSeriesQueryEditor/index.js +10 -8
  32. package/dist/cjs/components/TraceQueryEditor/TraceQueryEditor.js +143 -0
  33. package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +96 -0
  34. package/dist/cjs/components/TraceQueryEditor/index.js +30 -0
  35. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +445 -230
  36. package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +38 -32
  37. package/dist/cjs/components/Variables/VariableEditorForm/index.js +11 -9
  38. package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +36 -37
  39. package/dist/cjs/components/Variables/index.js +11 -9
  40. package/dist/cjs/components/Variables/variable-model.js +24 -17
  41. package/dist/cjs/components/index.js +24 -19
  42. package/dist/cjs/constants/index.js +10 -8
  43. package/dist/cjs/constants/user-interface-text.js +7 -2
  44. package/dist/cjs/context/ProjectStoreProvider.js +78 -0
  45. package/dist/cjs/context/index.js +30 -0
  46. package/dist/cjs/context/query-params.js +49 -0
  47. package/dist/cjs/index.js +17 -13
  48. package/dist/cjs/model/index.js +18 -15
  49. package/dist/cjs/model/legend.js +32 -20
  50. package/dist/cjs/model/panels.js +2 -2
  51. package/dist/cjs/model/plugin-base.js +2 -2
  52. package/dist/cjs/model/plugin-loading.js +3 -1
  53. package/dist/cjs/model/trace-queries.js +16 -0
  54. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +67 -35
  55. package/dist/cjs/runtime/DataQueriesProvider/index.js +11 -9
  56. package/dist/cjs/runtime/DataQueriesProvider/model.js +81 -0
  57. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +55 -27
  58. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +43 -0
  59. package/dist/cjs/runtime/TimeRangeProvider/index.js +12 -9
  60. package/dist/cjs/runtime/TimeRangeProvider/query-params.js +45 -59
  61. package/dist/cjs/runtime/TimeRangeProvider/refresh-interval.js +30 -0
  62. package/dist/cjs/runtime/builtin-variables.js +81 -0
  63. package/dist/cjs/runtime/datasources.js +31 -12
  64. package/dist/cjs/runtime/index.js +17 -13
  65. package/dist/cjs/runtime/plugin-registry.js +44 -14
  66. package/dist/cjs/runtime/template-variables.js +51 -13
  67. package/dist/cjs/runtime/time-series-queries.js +43 -31
  68. package/dist/cjs/runtime/trace-queries.js +76 -0
  69. package/dist/cjs/stories/shared-utils/decorators/WithDataQueries.js +7 -5
  70. package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +21 -16
  71. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +42 -0
  72. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +31 -13
  73. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js +6 -4
  74. package/dist/cjs/stories/shared-utils/decorators/WithTimeRange.js +9 -7
  75. package/dist/cjs/stories/shared-utils/decorators/index.js +15 -12
  76. package/dist/cjs/stories/shared-utils/index.js +10 -8
  77. package/dist/cjs/test/index.js +11 -8
  78. package/dist/cjs/test/mock-data.js +80 -0
  79. package/dist/cjs/test/render.js +13 -11
  80. package/dist/cjs/test/test-plugins/bert/index.js +16 -12
  81. package/dist/cjs/test/test-plugins/ernie/index.js +15 -11
  82. package/dist/cjs/test/test-plugins/index.js +14 -10
  83. package/dist/cjs/test-utils/index.js +10 -8
  84. package/dist/cjs/test-utils/mock-plugin-registry.js +9 -5
  85. package/dist/cjs/utils/action.js +43 -0
  86. package/dist/cjs/utils/index.js +11 -8
  87. package/dist/cjs/utils/variables.js +26 -8
  88. package/dist/cjs/validation/datasource.js +30 -0
  89. package/dist/cjs/validation/duration.js +25 -0
  90. package/dist/cjs/validation/index.js +34 -0
  91. package/dist/cjs/validation/resource.js +24 -0
  92. package/dist/cjs/validation/role.js +86 -0
  93. package/dist/cjs/validation/rolebinding.js +55 -0
  94. package/dist/cjs/validation/secret.js +176 -0
  95. package/dist/cjs/validation/user.js +46 -0
  96. package/dist/cjs/validation/variable.js +48 -0
  97. package/dist/components/CalculationSelector/CalculationSelector.d.ts +1 -2
  98. package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
  99. package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
  100. package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
  101. package/dist/components/CalculationSelector/index.js.map +1 -1
  102. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +14 -0
  103. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -0
  104. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +342 -0
  105. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -0
  106. package/dist/components/DatasourceEditorForm/index.d.ts +2 -0
  107. package/dist/components/DatasourceEditorForm/index.d.ts.map +1 -0
  108. package/dist/components/DatasourceEditorForm/index.js +15 -0
  109. package/dist/components/DatasourceEditorForm/index.js.map +1 -0
  110. package/dist/components/DatasourceSelect.d.ts +8 -3
  111. package/dist/components/DatasourceSelect.d.ts.map +1 -1
  112. package/dist/components/DatasourceSelect.js +120 -23
  113. package/dist/components/DatasourceSelect.js.map +1 -1
  114. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +1 -2
  115. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
  116. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +3 -3
  117. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  118. package/dist/components/LegendOptionsEditor/index.js.map +1 -1
  119. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +5 -5
  120. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
  121. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +18 -25
  122. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
  123. package/dist/components/OptionsEditorRadios/index.js.map +1 -1
  124. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +1 -1
  125. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -1
  126. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
  127. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
  128. package/dist/components/OptionsEditorTabPanel/index.js.map +1 -1
  129. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +3 -3
  130. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
  131. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
  132. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  133. package/dist/components/OptionsEditorTabs/index.js.map +1 -1
  134. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +2 -3
  135. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
  136. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +50 -11
  137. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  138. package/dist/components/PanelSpecEditor/index.js.map +1 -1
  139. package/dist/components/PluginEditor/PluginEditor.d.ts +1 -2
  140. package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
  141. package/dist/components/PluginEditor/PluginEditor.js +17 -26
  142. package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
  143. package/dist/components/PluginEditor/index.js.map +1 -1
  144. package/dist/components/PluginEditor/plugin-editor-api.d.ts +3 -3
  145. package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
  146. package/dist/components/PluginEditor/plugin-editor-api.js +5 -5
  147. package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
  148. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +3 -3
  149. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
  150. package/dist/components/PluginKindSelect/PluginKindSelect.js +23 -14
  151. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  152. package/dist/components/PluginKindSelect/index.js.map +1 -1
  153. package/dist/components/PluginRegistry/PluginRegistry.d.ts +4 -4
  154. package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
  155. package/dist/components/PluginRegistry/PluginRegistry.js +3 -3
  156. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  157. package/dist/components/PluginRegistry/index.js.map +1 -1
  158. package/dist/components/PluginRegistry/plugin-indexes.js +1 -1
  159. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  160. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +2 -2
  161. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
  162. package/dist/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
  163. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  164. package/dist/components/PluginSpecEditor/index.js.map +1 -1
  165. package/dist/components/ProjectSelect.d.ts +14 -0
  166. package/dist/components/ProjectSelect.d.ts.map +1 -0
  167. package/dist/components/ProjectSelect.js +91 -0
  168. package/dist/components/ProjectSelect.js.map +1 -0
  169. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +13 -0
  170. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -0
  171. package/dist/components/TimeRangeControls/TimeRangeControls.js +168 -0
  172. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -0
  173. package/dist/components/TimeRangeControls/index.d.ts +2 -0
  174. package/dist/components/TimeRangeControls/index.d.ts.map +1 -0
  175. package/dist/components/TimeRangeControls/index.js +15 -0
  176. package/dist/components/TimeRangeControls/index.js.map +1 -0
  177. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +1 -2
  178. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -1
  179. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +38 -44
  180. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
  181. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +1 -2
  182. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +1 -1
  183. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
  184. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
  185. package/dist/components/TimeSeriesQueryEditor/index.js.map +1 -1
  186. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +8 -0
  187. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +1 -0
  188. package/dist/components/TraceQueryEditor/TraceQueryEditor.js +130 -0
  189. package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +1 -0
  190. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +12 -0
  191. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +1 -0
  192. package/dist/components/TraceQueryEditor/TraceQueryInput.js +83 -0
  193. package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +1 -0
  194. package/dist/components/TraceQueryEditor/index.d.ts +2 -0
  195. package/dist/components/TraceQueryEditor/index.d.ts.map +1 -0
  196. package/dist/components/TraceQueryEditor/index.js +15 -0
  197. package/dist/components/TraceQueryEditor/index.js.map +1 -0
  198. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +10 -8
  199. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  200. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +395 -184
  201. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  202. package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +2 -3
  203. package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
  204. package/dist/components/Variables/VariableEditorForm/VariablePreview.js +4 -4
  205. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  206. package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
  207. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +8 -19
  208. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
  209. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +30 -35
  210. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  211. package/dist/components/Variables/index.js.map +1 -1
  212. package/dist/components/Variables/variable-model.d.ts.map +1 -1
  213. package/dist/components/Variables/variable-model.js +9 -10
  214. package/dist/components/Variables/variable-model.js.map +1 -1
  215. package/dist/components/index.d.ts +3 -0
  216. package/dist/components/index.d.ts.map +1 -1
  217. package/dist/components/index.js +3 -0
  218. package/dist/components/index.js.map +1 -1
  219. package/dist/constants/index.js.map +1 -1
  220. package/dist/constants/user-interface-text.d.ts +2 -0
  221. package/dist/constants/user-interface-text.d.ts.map +1 -1
  222. package/dist/constants/user-interface-text.js +4 -1
  223. package/dist/constants/user-interface-text.js.map +1 -1
  224. package/dist/context/ProjectStoreProvider.d.ts +16 -0
  225. package/dist/context/ProjectStoreProvider.d.ts.map +1 -0
  226. package/dist/context/ProjectStoreProvider.js +56 -0
  227. package/dist/context/ProjectStoreProvider.js.map +1 -0
  228. package/dist/context/index.d.ts +2 -0
  229. package/dist/context/index.d.ts.map +1 -0
  230. package/dist/context/index.js +15 -0
  231. package/dist/context/index.js.map +1 -0
  232. package/dist/context/query-params.d.ts +5 -0
  233. package/dist/context/query-params.d.ts.map +1 -0
  234. package/dist/context/query-params.js +41 -0
  235. package/dist/context/query-params.js.map +1 -0
  236. package/dist/index.d.ts +2 -0
  237. package/dist/index.d.ts.map +1 -1
  238. package/dist/index.js +2 -0
  239. package/dist/index.js.map +1 -1
  240. package/dist/model/datasource.d.ts +2 -1
  241. package/dist/model/datasource.d.ts.map +1 -1
  242. package/dist/model/datasource.js +3 -1
  243. package/dist/model/datasource.js.map +1 -1
  244. package/dist/model/index.d.ts +1 -0
  245. package/dist/model/index.d.ts.map +1 -1
  246. package/dist/model/index.js +1 -0
  247. package/dist/model/index.js.map +1 -1
  248. package/dist/model/legend.d.ts +3 -3
  249. package/dist/model/legend.d.ts.map +1 -1
  250. package/dist/model/legend.js +14 -14
  251. package/dist/model/legend.js.map +1 -1
  252. package/dist/model/panels.d.ts +3 -2
  253. package/dist/model/panels.d.ts.map +1 -1
  254. package/dist/model/panels.js.map +1 -1
  255. package/dist/model/plugin-base.js.map +1 -1
  256. package/dist/model/plugin-loading.js.map +1 -1
  257. package/dist/model/plugins.d.ts +6 -4
  258. package/dist/model/plugins.d.ts.map +1 -1
  259. package/dist/model/plugins.js.map +1 -1
  260. package/dist/model/time-series-queries.d.ts +2 -2
  261. package/dist/model/time-series-queries.d.ts.map +1 -1
  262. package/dist/model/time-series-queries.js.map +1 -1
  263. package/dist/model/trace-queries.d.ts +19 -0
  264. package/dist/model/trace-queries.d.ts.map +1 -0
  265. package/dist/model/trace-queries.js +15 -0
  266. package/dist/model/trace-queries.js.map +1 -0
  267. package/dist/model/variables.d.ts +2 -2
  268. package/dist/model/variables.d.ts.map +1 -1
  269. package/dist/model/variables.js +3 -1
  270. package/dist/model/variables.js.map +1 -1
  271. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +6 -6
  272. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
  273. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +52 -28
  274. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  275. package/dist/runtime/DataQueriesProvider/index.js.map +1 -1
  276. package/dist/runtime/DataQueriesProvider/model.d.ts +18 -13
  277. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  278. package/dist/runtime/DataQueriesProvider/model.js +67 -1
  279. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  280. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +9 -4
  281. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
  282. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +37 -20
  283. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  284. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +9 -0
  285. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -0
  286. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +30 -0
  287. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -0
  288. package/dist/runtime/TimeRangeProvider/index.d.ts +1 -0
  289. package/dist/runtime/TimeRangeProvider/index.d.ts.map +1 -1
  290. package/dist/runtime/TimeRangeProvider/index.js +1 -0
  291. package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
  292. package/dist/runtime/TimeRangeProvider/query-params.d.ts +5 -5
  293. package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
  294. package/dist/runtime/TimeRangeProvider/query-params.js +13 -45
  295. package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
  296. package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts +7 -0
  297. package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts.map +1 -0
  298. package/dist/runtime/TimeRangeProvider/refresh-interval.js +25 -0
  299. package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -0
  300. package/dist/runtime/builtin-variables.d.ts +11 -0
  301. package/dist/runtime/builtin-variables.d.ts.map +1 -0
  302. package/dist/runtime/builtin-variables.js +59 -0
  303. package/dist/runtime/builtin-variables.js.map +1 -0
  304. package/dist/runtime/datasources.d.ts +42 -7
  305. package/dist/runtime/datasources.d.ts.map +1 -1
  306. package/dist/runtime/datasources.js +15 -7
  307. package/dist/runtime/datasources.js.map +1 -1
  308. package/dist/runtime/index.d.ts +2 -0
  309. package/dist/runtime/index.d.ts.map +1 -1
  310. package/dist/runtime/index.js +2 -0
  311. package/dist/runtime/index.js.map +1 -1
  312. package/dist/runtime/plugin-registry.d.ts +5 -3
  313. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  314. package/dist/runtime/plugin-registry.js +22 -5
  315. package/dist/runtime/plugin-registry.js.map +1 -1
  316. package/dist/runtime/template-variables.d.ts +6 -5
  317. package/dist/runtime/template-variables.d.ts.map +1 -1
  318. package/dist/runtime/template-variables.js +36 -9
  319. package/dist/runtime/template-variables.js.map +1 -1
  320. package/dist/runtime/time-series-queries.d.ts +3 -3
  321. package/dist/runtime/time-series-queries.d.ts.map +1 -1
  322. package/dist/runtime/time-series-queries.js +21 -19
  323. package/dist/runtime/time-series-queries.js.map +1 -1
  324. package/dist/runtime/trace-queries.d.ts +14 -0
  325. package/dist/runtime/trace-queries.d.ts.map +1 -0
  326. package/dist/runtime/trace-queries.js +61 -0
  327. package/dist/runtime/trace-queries.js.map +1 -0
  328. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +2 -3
  329. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +1 -1
  330. package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
  331. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +1 -2
  332. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
  333. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js +2 -1
  334. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js.map +1 -1
  335. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +12 -0
  336. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -0
  337. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +39 -0
  338. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -0
  339. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +2 -3
  340. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
  341. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +24 -8
  342. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
  343. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts +2 -3
  344. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts.map +1 -1
  345. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
  346. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +4 -5
  347. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
  348. package/dist/stories/shared-utils/decorators/WithTimeRange.js +2 -2
  349. package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
  350. package/dist/stories/shared-utils/decorators/index.d.ts +1 -0
  351. package/dist/stories/shared-utils/decorators/index.d.ts.map +1 -1
  352. package/dist/stories/shared-utils/decorators/index.js +1 -0
  353. package/dist/stories/shared-utils/decorators/index.js.map +1 -1
  354. package/dist/stories/shared-utils/index.js.map +1 -1
  355. package/dist/test/index.d.ts +1 -0
  356. package/dist/test/index.d.ts.map +1 -1
  357. package/dist/test/index.js +1 -0
  358. package/dist/test/index.js.map +1 -1
  359. package/dist/test/mock-data.d.ts +4 -0
  360. package/dist/test/mock-data.d.ts.map +1 -0
  361. package/dist/test/mock-data.js +64 -0
  362. package/dist/test/mock-data.js.map +1 -0
  363. package/dist/test/render.d.ts +1 -1
  364. package/dist/test/render.d.ts.map +1 -1
  365. package/dist/test/render.js +2 -2
  366. package/dist/test/render.js.map +1 -1
  367. package/dist/test/setup-tests.js.map +1 -1
  368. package/dist/test/test-plugins/bert/index.js +2 -2
  369. package/dist/test/test-plugins/bert/index.js.map +1 -1
  370. package/dist/test/test-plugins/ernie/index.js +2 -2
  371. package/dist/test/test-plugins/ernie/index.js.map +1 -1
  372. package/dist/test/test-plugins/index.js.map +1 -1
  373. package/dist/test-utils/index.js.map +1 -1
  374. package/dist/test-utils/mock-plugin-registry.d.ts +1 -1
  375. package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
  376. package/dist/test-utils/mock-plugin-registry.js +3 -3
  377. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  378. package/dist/utils/action.d.ts +4 -0
  379. package/dist/utils/action.d.ts.map +1 -0
  380. package/dist/utils/action.js +27 -0
  381. package/dist/utils/action.js.map +1 -0
  382. package/dist/utils/index.d.ts +1 -0
  383. package/dist/utils/index.d.ts.map +1 -1
  384. package/dist/utils/index.js +1 -0
  385. package/dist/utils/index.js.map +1 -1
  386. package/dist/utils/variables.d.ts.map +1 -1
  387. package/dist/utils/variables.js +17 -5
  388. package/dist/utils/variables.js.map +1 -1
  389. package/dist/validation/datasource.d.ts +19 -0
  390. package/dist/validation/datasource.d.ts.map +1 -0
  391. package/dist/validation/datasource.js +22 -0
  392. package/dist/validation/datasource.js.map +1 -0
  393. package/dist/validation/duration.d.ts +3 -0
  394. package/dist/validation/duration.d.ts.map +1 -0
  395. package/dist/validation/duration.js +17 -0
  396. package/dist/validation/duration.js.map +1 -0
  397. package/dist/validation/index.d.ts +6 -0
  398. package/dist/validation/index.d.ts.map +1 -0
  399. package/dist/validation/index.js +19 -0
  400. package/dist/validation/index.js.map +1 -0
  401. package/dist/validation/resource.d.ts +3 -0
  402. package/dist/validation/resource.d.ts.map +1 -0
  403. package/dist/validation/resource.js +16 -0
  404. package/dist/validation/resource.js.map +1 -0
  405. package/dist/validation/role.d.ts +228 -0
  406. package/dist/validation/role.d.ts.map +1 -0
  407. package/dist/validation/role.js +67 -0
  408. package/dist/validation/role.js.map +1 -0
  409. package/dist/validation/rolebinding.d.ts +137 -0
  410. package/dist/validation/rolebinding.d.ts.map +1 -0
  411. package/dist/validation/rolebinding.js +47 -0
  412. package/dist/validation/rolebinding.js.map +1 -0
  413. package/dist/validation/secret.d.ts +964 -0
  414. package/dist/validation/secret.d.ts.map +1 -0
  415. package/dist/validation/secret.js +157 -0
  416. package/dist/validation/secret.js.map +1 -0
  417. package/dist/validation/user.d.ts +93 -0
  418. package/dist/validation/user.d.ts.map +1 -0
  419. package/dist/validation/user.js +38 -0
  420. package/dist/validation/user.js.map +1 -0
  421. package/dist/validation/variable.d.ts +96 -0
  422. package/dist/validation/variable.d.ts.map +1 -0
  423. package/dist/validation/variable.js +40 -0
  424. package/dist/validation/variable.js.map +1 -0
  425. package/package.json +9 -6
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/model/plugins.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,IAAI,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,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;KAEtB,CAAC,IAAI,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK;CAC3F,CAAC,MAAM,gBAAgB,CAAC,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,eAAe,EAAE,qBAAqB,CAAC;IACvC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,UAAU,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAEnF;;GAEG;AACH,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AACvD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/plugins.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Metadata, UnknownSpec } from '@perses-dev/core';\nimport { TimeSeriesQueryPlugin } from './time-series-queries';\nimport { PanelPlugin } from './panels';\nimport { VariablePlugin } from './variables';\nimport { DatasourcePlugin } from './datasource';\nimport { Plugin } from './plugin-base';\n\n/**\n * Information about a module/package that contains plugins.\n */\nexport interface PluginModuleResource {\n kind: 'PluginModule';\n metadata: Metadata;\n spec: PluginSpec;\n}\n\nexport interface PluginSpec {\n plugins: PluginMetadata[];\n}\n\n/**\n * Metadata about an individual plugin that's part of a PluginModule.\n */\nexport interface PluginMetadata {\n pluginType: PluginType;\n kind: string;\n display: {\n name: string;\n description?: string;\n };\n}\n\n/**\n * All supported plugin types. A plugin's implementation must extend from `Plugin<UnknownSpec>` to be considered a valid\n * `PluginType`.\n */\nexport type PluginType = {\n // Filter out implementations on SupportedPlugins that don't extend `Plugin<UnknownSpec>`\n [K in keyof SupportedPlugins]: SupportedPlugins[K] extends Plugin<UnknownSpec> ? K : never;\n}[keyof SupportedPlugins];\n\n/**\n * Map of plugin type key/string -> implementation type. Use Typescript module augmentation to extend the plugin system\n * with new plugin types.\n */\nexport interface SupportedPlugins {\n Variable: VariablePlugin;\n Panel: PanelPlugin;\n TimeSeriesQuery: TimeSeriesQueryPlugin;\n Datasource: DatasourcePlugin;\n}\n\n/**\n * The implementation for a given plugin type.\n */\nexport type PluginImplementation<Type extends PluginType> = SupportedPlugins[Type];\n\n/**\n * Default plugin kinds by plugin type.\n */\ntype PluginKinds = Partial<Record<PluginType, string>>;\nexport type DefaultPluginKinds = Required<Pick<PluginKinds, 'TimeSeriesQuery'>> & Omit<PluginKinds, 'TimeSeriesQuery'>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WA6DuH"}
1
+ {"version":3,"sources":["../../src/model/plugins.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Metadata, UnknownSpec } from '@perses-dev/core';\nimport { TimeSeriesQueryPlugin } from './time-series-queries';\nimport { PanelPlugin } from './panels';\nimport { VariablePlugin } from './variables';\nimport { DatasourcePlugin } from './datasource';\nimport { Plugin } from './plugin-base';\nimport { TraceQueryPlugin } from './trace-queries';\n\n/**\n * Information about a module/package that contains plugins.\n */\nexport interface PluginModuleResource {\n kind: 'PluginModule';\n metadata: Metadata;\n spec: PluginSpec;\n}\n\nexport interface PluginSpec {\n plugins: PluginMetadata[];\n}\n\n/**\n * Metadata about an individual plugin that's part of a PluginModule.\n */\nexport interface PluginMetadata {\n pluginType: PluginType;\n kind: string;\n display: {\n name: string;\n description?: string;\n };\n}\n\n/**\n * All supported plugin types. A plugin's implementation must extend from `Plugin<UnknownSpec>` to be considered a valid\n * `PluginType`.\n */\nexport type PluginType = {\n // Filter out implementations on SupportedPlugins that don't extend `Plugin<UnknownSpec>`\n [K in keyof SupportedPlugins]: SupportedPlugins[K] extends Plugin<UnknownSpec> ? K : never;\n}[keyof SupportedPlugins];\n\n/**\n * Map of plugin type key/string -> implementation type. Use Typescript module augmentation to extend the plugin system\n * with new plugin types.\n */\nexport interface SupportedPlugins {\n Variable: VariablePlugin;\n Panel: PanelPlugin;\n TimeSeriesQuery: TimeSeriesQueryPlugin;\n TraceQuery: TraceQueryPlugin;\n Datasource: DatasourcePlugin;\n}\n\n/**\n * The implementation for a given plugin type.\n */\nexport type PluginImplementation<Type extends PluginType> = SupportedPlugins[Type];\n\n/**\n * Default plugin kinds by plugin type.\n */\ntype PluginKinds = Partial<Record<PluginType, string>>;\nexport type DefaultPluginKinds = Required<Pick<PluginKinds, 'TimeSeriesQuery'>> & Omit<PluginKinds, 'TimeSeriesQuery'>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAiEjC,WAAuH"}
@@ -5,7 +5,7 @@ import { Plugin } from './plugin-base';
5
5
  /**
6
6
  * An object containing all the dependencies of a TimeSeriesQuery.
7
7
  */
8
- declare type TimeSeriesQueryPluginDependencies = {
8
+ type TimeSeriesQueryPluginDependencies = {
9
9
  /**
10
10
  * Returns a list of variables name this time series query depends on.
11
11
  */
@@ -29,6 +29,6 @@ export interface TimeSeriesQueryContext {
29
29
  refreshKey: string;
30
30
  refreshIntervalInMs: number;
31
31
  }
32
- export declare type TimeSeriesDataQuery = Query<TimeSeriesData, unknown, TimeSeriesData, QueryKey>;
32
+ export type TimeSeriesDataQuery = Query<TimeSeriesData, unknown, TimeSeriesData, QueryKey>;
33
33
  export {};
34
34
  //# sourceMappingURL=time-series-queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time-series-queries.d.ts","sourceRoot":"","sources":["../../src/model/time-series-queries.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAA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M,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,KAAK,iCAAiC,GAAG;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IAC7E,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,sBAAsB,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAExF,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,sBAAsB,KAAK,iCAAiC,CAAC;CAC5F;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,aAAa,EAAE,gBAAgB,CAAC;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/time-series-queries.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Query, QueryKey } from '@tanstack/react-query';\nimport { AbsoluteTimeRange, UnknownSpec, TimeSeriesData } from '@perses-dev/core';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of a TimeSeriesQuery.\n */\ntype TimeSeriesQueryPluginDependencies = {\n /**\n * Returns a list of variables name this time series query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running time series queries.\n */\nexport interface TimeSeriesQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getTimeSeriesData: (spec: Spec, ctx: TimeSeriesQueryContext) => Promise<TimeSeriesData>;\n\n dependsOn?: (spec: Spec, ctx: TimeSeriesQueryContext) => TimeSeriesQueryPluginDependencies;\n}\n\n/**\n * Context available to TimeSeriesQuery plugins at runtime.\n */\nexport interface TimeSeriesQueryContext {\n suggestedStepMs?: number;\n timeRange: AbsoluteTimeRange;\n variableState: VariableStateMap;\n datasourceStore: DatasourceStore;\n refreshKey: string;\n refreshIntervalInMs: number;\n}\n\nexport type TimeSeriesDataQuery = Query<TimeSeriesData, unknown, TimeSeriesData, QueryKey>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAoC2F"}
1
+ {"version":3,"sources":["../../src/model/time-series-queries.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Query, QueryKey } from '@tanstack/react-query';\nimport { AbsoluteTimeRange, UnknownSpec, TimeSeriesData } from '@perses-dev/core';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of a TimeSeriesQuery.\n */\ntype TimeSeriesQueryPluginDependencies = {\n /**\n * Returns a list of variables name this time series query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running time series queries.\n */\nexport interface TimeSeriesQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getTimeSeriesData: (spec: Spec, ctx: TimeSeriesQueryContext) => Promise<TimeSeriesData>;\n\n dependsOn?: (spec: Spec, ctx: TimeSeriesQueryContext) => TimeSeriesQueryPluginDependencies;\n}\n\n/**\n * Context available to TimeSeriesQuery plugins at runtime.\n */\nexport interface TimeSeriesQueryContext {\n suggestedStepMs?: number;\n timeRange: AbsoluteTimeRange;\n variableState: VariableStateMap;\n datasourceStore: DatasourceStore;\n refreshKey: string;\n refreshIntervalInMs: number;\n}\n\nexport type TimeSeriesDataQuery = Query<TimeSeriesData, unknown, TimeSeriesData, QueryKey>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAsCjC,WAA2F"}
@@ -0,0 +1,19 @@
1
+ import { Query, QueryKey } from '@tanstack/react-query';
2
+ import { UnknownSpec, TraceData, AbsoluteTimeRange } from '@perses-dev/core';
3
+ import { DatasourceStore } from '../runtime';
4
+ import { Plugin } from './plugin-base';
5
+ /**
6
+ * A plugin for running trace queries.
7
+ */
8
+ export interface TraceQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {
9
+ getTraceData: (spec: Spec, ctx: TraceQueryContext) => Promise<TraceData>;
10
+ }
11
+ /**
12
+ * Context available to TraceQuery plugins at runtime.
13
+ */
14
+ export interface TraceQueryContext {
15
+ datasourceStore: DatasourceStore;
16
+ absoluteTimeRange?: AbsoluteTimeRange;
17
+ }
18
+ export type TraceDataQuery = Query<TraceData, unknown, TraceData, QueryKey>;
19
+ //# sourceMappingURL=trace-queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-queries.d.ts","sourceRoot":"","sources":["../../src/model/trace-queries.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACxE,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ export { };
14
+
15
+ //# sourceMappingURL=trace-queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/trace-queries.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Query, QueryKey } from '@tanstack/react-query';\nimport { UnknownSpec, TraceData, AbsoluteTimeRange } from '@perses-dev/core';\nimport { DatasourceStore } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * A plugin for running trace queries.\n */\nexport interface TraceQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getTraceData: (spec: Spec, ctx: TraceQueryContext) => Promise<TraceData>;\n}\n\n/**\n * Context available to TraceQuery plugins at runtime.\n */\nexport interface TraceQueryContext {\n datasourceStore: DatasourceStore;\n absoluteTimeRange?: AbsoluteTimeRange;\n}\n\nexport type TraceDataQuery = Query<TraceData, unknown, TraceData, QueryKey>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAsBjC,WAA4E"}
@@ -1,7 +1,7 @@
1
1
  import { UnknownSpec, AbsoluteTimeRange } from '@perses-dev/core';
2
2
  import { VariableStateMap, DatasourceStore } from '../runtime';
3
3
  import { Plugin } from './plugin-base';
4
- export declare type VariableOption = {
4
+ export type VariableOption = {
5
5
  label: string;
6
6
  value: string;
7
7
  };
@@ -13,7 +13,7 @@ export interface GetVariableOptionsContext {
13
13
  /**
14
14
  * An object containing all the dependencies of a VariablePlugin.
15
15
  */
16
- declare type VariablePluginDependencies = {
16
+ type VariablePluginDependencies = {
17
17
  /**
18
18
  * Returns a list of variables name this time series query depends on.
19
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../src/model/variables.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,oBAAY,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED;;GAEG;AACH,aAAK,0BAA0B,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACtE,kBAAkB,EAAE,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,yBAAyB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC,CAAC;IAE9G;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,yBAAyB,KAAK,0BAA0B,CAAC;CAC9F"}
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../src/model/variables.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED;;GAEG;AACH,KAAK,0BAA0B,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACtE,kBAAkB,EAAE,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,yBAAyB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC,CAAC;IAE9G;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,yBAAyB,KAAK,0BAA0B,CAAC;CAC9F"}
@@ -10,6 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export { };
13
+ /**
14
+ * Plugin for handling custom VariableDefinitions.
15
+ */ export { };
14
16
 
15
17
  //# sourceMappingURL=variables.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/variables.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { UnknownSpec, AbsoluteTimeRange } from '@perses-dev/core';\nimport { VariableStateMap, DatasourceStore } from '../runtime';\nimport { Plugin } from './plugin-base';\n\nexport type VariableOption = { label: string; value: string };\n\nexport interface GetVariableOptionsContext {\n variables: VariableStateMap;\n datasourceStore: DatasourceStore;\n timeRange: AbsoluteTimeRange;\n}\n\n/**\n * An object containing all the dependencies of a VariablePlugin.\n */\ntype VariablePluginDependencies = {\n /**\n * Returns a list of variables name this time series query depends on.\n */\n variables?: string[];\n};\n\n/**\n * Plugin for handling custom VariableDefinitions.\n */\nexport interface VariablePlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getVariableOptions: (definition: Spec, ctx: GetVariableOptionsContext) => Promise<{ data: VariableOption[] }>;\n\n /**\n * Returns a list of variables name this variable depends on. Used to optimize fetching\n */\n dependsOn?: (definition: Spec, ctx: GetVariableOptionsContext) => VariablePluginDependencies;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAgCC"}
1
+ {"version":3,"sources":["../../src/model/variables.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { UnknownSpec, AbsoluteTimeRange } from '@perses-dev/core';\nimport { VariableStateMap, DatasourceStore } from '../runtime';\nimport { Plugin } from './plugin-base';\n\nexport type VariableOption = { label: string; value: string };\n\nexport interface GetVariableOptionsContext {\n variables: VariableStateMap;\n datasourceStore: DatasourceStore;\n timeRange: AbsoluteTimeRange;\n}\n\n/**\n * An object containing all the dependencies of a VariablePlugin.\n */\ntype VariablePluginDependencies = {\n /**\n * Returns a list of variables name this time series query depends on.\n */\n variables?: string[];\n};\n\n/**\n * Plugin for handling custom VariableDefinitions.\n */\nexport interface VariablePlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getVariableOptions: (definition: Spec, ctx: GetVariableOptionsContext) => Promise<{ data: VariableOption[] }>;\n\n /**\n * Returns a list of variables name this variable depends on. Used to optimize fetching\n */\n dependsOn?: (definition: Spec, ctx: GetVariableOptionsContext) => VariablePluginDependencies;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAwBjC;;CAEC,GACD,WAOC"}
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { Definition, UnknownSpec } from '@perses-dev/core';
3
- import { DataQueriesProviderProps, UseDataQueryResults } from './model';
4
- export declare function useDataQueries(): UseDataQueryResults;
5
- export declare const DataQueriesContext: import("react").Context<UseDataQueryResults<Definition<UnknownSpec>> | undefined>;
6
- export declare function useDataQueriesContext(): UseDataQueryResults<Definition<UnknownSpec>>;
7
- export declare function DataQueriesProvider(props: DataQueriesProviderProps): JSX.Element;
2
+ import { QueryType } from '@perses-dev/core';
3
+ import { DataQueriesProviderProps, UseDataQueryResults, DataQueriesContextType } from './model';
4
+ export declare const DataQueriesContext: import("react").Context<DataQueriesContextType | undefined>;
5
+ export declare function useDataQueriesContext(): DataQueriesContextType;
6
+ export declare function useDataQueries<T extends keyof QueryType>(queryType: T): UseDataQueryResults<QueryType[T]>;
7
+ export declare function DataQueriesProvider(props: DataQueriesProviderProps): import("react/jsx-runtime").JSX.Element;
8
8
  //# sourceMappingURL=DataQueriesProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataQueriesProvider.d.ts","sourceRoot":"","sources":["../../../src/runtime/DataQueriesProvider/DataQueriesProvider.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,UAAU,EAA6B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAE,wBAAwB,EAAa,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnF,wBAAgB,cAAc,IAAI,mBAAmB,CAGpD;AAED,eAAO,MAAM,kBAAkB,mFAA4D,CAAC;AAE5F,wBAAgB,qBAAqB,iDAMpC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eA2ClE"}
1
+ {"version":3,"file":"DataQueriesProvider.d.ts","sourceRoot":"","sources":["../../../src/runtime/DataQueriesProvider/DataQueriesProvider.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,SAAS,EAA6B,MAAM,kBAAkB,CAAC;AAIxE,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EAEnB,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,kBAAkB,6DAA+D,CAAC;AAE/F,wBAAgB,qBAAqB,2BAMpC;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAqBzG;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAgDlE"}
@@ -13,10 +13,8 @@
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { createContext, useCallback, useContext, useMemo } from 'react';
15
15
  import { useTimeSeriesQueries } from '../time-series-queries';
16
- export function useDataQueries() {
17
- const ctx = useDataQueriesContext();
18
- return ctx;
19
- }
16
+ import { useTraceQueries } from '../trace-queries';
17
+ import { transformQueryResults, useQueryType } from './model';
20
18
  export const DataQueriesContext = /*#__PURE__*/ createContext(undefined);
21
19
  export function useDataQueriesContext() {
22
20
  const ctx = useContext(DataQueriesContext);
@@ -25,44 +23,70 @@ export function useDataQueriesContext() {
25
23
  }
26
24
  return ctx;
27
25
  }
26
+ export function useDataQueries(queryType) {
27
+ const ctx = useDataQueriesContext();
28
+ // Filter the query results based on the specified query type
29
+ const filteredQueryResults = ctx.queryResults.filter((queryResult)=>{
30
+ var _queryResult_definition;
31
+ return (queryResult === null || queryResult === void 0 ? void 0 : (_queryResult_definition = queryResult.definition) === null || _queryResult_definition === void 0 ? void 0 : _queryResult_definition.kind) === queryType;
32
+ });
33
+ // Filter the errors based on the specified query type
34
+ const filteredErrors = ctx.errors.filter((errors, index)=>{
35
+ var _ctx_queryResults_index_definition, _ctx_queryResults_index;
36
+ return ((_ctx_queryResults_index = ctx.queryResults[index]) === null || _ctx_queryResults_index === void 0 ? void 0 : (_ctx_queryResults_index_definition = _ctx_queryResults_index.definition) === null || _ctx_queryResults_index_definition === void 0 ? void 0 : _ctx_queryResults_index_definition.kind) === queryType;
37
+ });
38
+ // Create a new context object with the filtered results and errors
39
+ const filteredCtx = {
40
+ queryResults: filteredQueryResults,
41
+ isFetching: filteredQueryResults.some((result)=>result.isFetching),
42
+ isLoading: filteredQueryResults.some((result)=>result.isLoading),
43
+ refetchAll: ctx.refetchAll,
44
+ errors: filteredErrors
45
+ };
46
+ return filteredCtx;
47
+ }
28
48
  export function DataQueriesProvider(props) {
29
- const { definitions , options , children } = props;
30
- // For now we will map each query plugin definition to TimeSeriesQueryDefinition
31
- // Later on when we add support for other query types,
32
- // we will have to map each query maps to the correct QueryDefinition
33
- const timeSeriesQueries = definitions.map((definition)=>({
34
- kind: 'TimeSeriesQuery',
49
+ const { definitions, options, children, queryOptions } = props;
50
+ // Returns a query kind, for example "TimeSeriesQuery" = getQueryType("PrometheusTimeSeriesQuery")
51
+ const getQueryType = useQueryType();
52
+ const queryDefinitions = definitions.map((definition)=>{
53
+ const type = getQueryType(definition.kind);
54
+ return {
55
+ kind: type,
35
56
  spec: {
36
57
  plugin: definition
37
58
  }
38
- }));
39
- const results = useTimeSeriesQueries(timeSeriesQueries, options);
40
- const data = results.map(({ data , isFetching , isLoading , refetch , error }, i)=>{
41
- return {
42
- definition: definitions[i],
43
- data,
44
- isFetching,
45
- isLoading,
46
- refetch,
47
- error
48
59
  };
49
60
  });
61
+ // Filter definitions for time series query and other future query plugins
62
+ const timeSeriesQueries = queryDefinitions.filter((definition)=>definition.kind === 'TimeSeriesQuery');
63
+ const timeSeriesResults = useTimeSeriesQueries(timeSeriesQueries, options, queryOptions);
64
+ const traceQueries = queryDefinitions.filter((definition)=>definition.kind === 'TraceQuery');
65
+ const traceResults = useTraceQueries(traceQueries);
50
66
  const refetchAll = useCallback(()=>{
51
- results.forEach((result)=>result.refetch());
67
+ timeSeriesResults.forEach((result)=>result.refetch());
68
+ traceResults.forEach((result)=>result.refetch());
52
69
  }, [
53
- results
70
+ timeSeriesResults,
71
+ traceResults
54
72
  ]);
55
73
  const ctx = useMemo(()=>{
74
+ const mergedQueryResults = [
75
+ ...transformQueryResults(timeSeriesResults, timeSeriesQueries),
76
+ ...transformQueryResults(traceResults, traceQueries)
77
+ ];
56
78
  return {
57
- queryResults: data,
58
- isFetching: results.some((result)=>result.isFetching),
59
- isLoading: results.some((result)=>result.isLoading),
79
+ queryResults: mergedQueryResults,
80
+ isFetching: mergedQueryResults.some((result)=>result.isFetching),
81
+ isLoading: mergedQueryResults.some((result)=>result.isLoading),
60
82
  refetchAll,
61
- errors: results.map((result)=>result.error)
83
+ errors: mergedQueryResults.map((result)=>result.error)
62
84
  };
63
85
  }, [
64
- data,
65
- results,
86
+ timeSeriesQueries,
87
+ timeSeriesResults,
88
+ traceQueries,
89
+ traceResults,
66
90
  refetchAll
67
91
  ]);
68
92
  return /*#__PURE__*/ _jsx(DataQueriesContext.Provider, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/runtime/DataQueriesProvider/DataQueriesProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext, useCallback, useContext, useMemo } from 'react';\nimport { Definition, TimeSeriesQueryDefinition, UnknownSpec } from '@perses-dev/core';\nimport { useTimeSeriesQueries } from '../time-series-queries';\nimport { DataQueriesProviderProps, QueryData, UseDataQueryResults } from './model';\n\nexport function useDataQueries(): UseDataQueryResults {\n const ctx = useDataQueriesContext();\n return ctx;\n}\n\nexport const DataQueriesContext = createContext<UseDataQueryResults | undefined>(undefined);\n\nexport function useDataQueriesContext() {\n const ctx = useContext(DataQueriesContext);\n if (ctx === undefined) {\n throw new Error('No DataQueriesContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function DataQueriesProvider(props: DataQueriesProviderProps) {\n const { definitions, options, children } = props;\n\n // For now we will map each query plugin definition to TimeSeriesQueryDefinition\n // Later on when we add support for other query types,\n // we will have to map each query maps to the correct QueryDefinition\n const timeSeriesQueries = definitions.map(\n (definition) =>\n ({\n kind: 'TimeSeriesQuery',\n spec: {\n plugin: definition,\n },\n } as TimeSeriesQueryDefinition)\n );\n const results = useTimeSeriesQueries(timeSeriesQueries, options);\n\n const data = results.map(({ data, isFetching, isLoading, refetch, error }, i) => {\n return {\n definition: definitions[i],\n data,\n isFetching,\n isLoading,\n refetch,\n error,\n } as QueryData<Definition<UnknownSpec>>;\n });\n\n const refetchAll = useCallback(() => {\n results.forEach((result) => result.refetch());\n }, [results]);\n\n const ctx = useMemo(() => {\n return {\n queryResults: data,\n isFetching: results.some((result) => result.isFetching),\n isLoading: results.some((result) => result.isLoading),\n refetchAll,\n errors: results.map((result) => result.error),\n };\n }, [data, results, refetchAll]);\n\n return <DataQueriesContext.Provider value={ctx}>{children}</DataQueriesContext.Provider>;\n}\n"],"names":["createContext","useCallback","useContext","useMemo","useTimeSeriesQueries","useDataQueries","ctx","useDataQueriesContext","DataQueriesContext","undefined","Error","DataQueriesProvider","props","definitions","options","children","timeSeriesQueries","map","definition","kind","spec","plugin","results","data","isFetching","isLoading","refetch","error","i","refetchAll","forEach","result","queryResults","some","errors","Provider","value"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,aAAa,EAAEC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO,CAAC;AAExE,SAASC,oBAAoB,QAAQ,wBAAwB,CAAC;AAG9D,OAAO,SAASC,cAAc,GAAwB;IACpD,MAAMC,GAAG,GAAGC,qBAAqB,EAAE,AAAC;IACpC,OAAOD,GAAG,CAAC;AACb,CAAC;AAED,OAAO,MAAME,kBAAkB,iBAAGR,aAAa,CAAkCS,SAAS,CAAC,CAAC;AAE5F,OAAO,SAASF,qBAAqB,GAAG;IACtC,MAAMD,GAAG,GAAGJ,UAAU,CAACM,kBAAkB,CAAC,AAAC;IAC3C,IAAIF,GAAG,KAAKG,SAAS,EAAE;QACrB,MAAM,IAAIC,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IACD,OAAOJ,GAAG,CAAC;AACb,CAAC;AAED,OAAO,SAASK,mBAAmB,CAACC,KAA+B,EAAE;IACnE,MAAM,EAAEC,WAAW,CAAA,EAAEC,OAAO,CAAA,EAAEC,QAAQ,CAAA,EAAE,GAAGH,KAAK,AAAC;IAEjD,gFAAgF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UAAU;KAAC,CAAC,AAAC;IAEhC,qBAAO,KAACrB,kBAAkB,CAAC2B,QAAQ;QAACC,KAAK,EAAE9B,GAAG;kBAAGS,QAAQ;MAA+B,CAAC;AAC3F,CAAC"}
1
+ {"version":3,"sources":["../../../src/runtime/DataQueriesProvider/DataQueriesProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext, useCallback, useContext, useMemo } from 'react';\nimport { QueryType, TimeSeriesQueryDefinition } from '@perses-dev/core';\nimport { useTimeSeriesQueries } from '../time-series-queries';\nimport { useTraceQueries, TraceQueryDefinition } from '../trace-queries';\n\nimport {\n DataQueriesProviderProps,\n UseDataQueryResults,\n transformQueryResults,\n DataQueriesContextType,\n QueryData,\n useQueryType,\n} from './model';\n\nexport const DataQueriesContext = createContext<DataQueriesContextType | undefined>(undefined);\n\nexport function useDataQueriesContext() {\n const ctx = useContext(DataQueriesContext);\n if (ctx === undefined) {\n throw new Error('No DataQueriesContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useDataQueries<T extends keyof QueryType>(queryType: T): UseDataQueryResults<QueryType[T]> {\n const ctx = useDataQueriesContext();\n\n // Filter the query results based on the specified query type\n const filteredQueryResults = ctx.queryResults.filter(\n (queryResult) => queryResult?.definition?.kind === queryType\n ) as Array<QueryData<QueryType[T]>>;\n\n // Filter the errors based on the specified query type\n const filteredErrors = ctx.errors.filter((errors, index) => ctx.queryResults[index]?.definition?.kind === queryType);\n\n // Create a new context object with the filtered results and errors\n const filteredCtx = {\n queryResults: filteredQueryResults,\n isFetching: filteredQueryResults.some((result) => result.isFetching),\n isLoading: filteredQueryResults.some((result) => result.isLoading),\n refetchAll: ctx.refetchAll,\n errors: filteredErrors,\n };\n\n return filteredCtx;\n}\n\nexport function DataQueriesProvider(props: DataQueriesProviderProps) {\n const { definitions, options, children, queryOptions } = props;\n\n // Returns a query kind, for example \"TimeSeriesQuery\" = getQueryType(\"PrometheusTimeSeriesQuery\")\n const getQueryType = useQueryType();\n\n const queryDefinitions = definitions.map((definition) => {\n const type = getQueryType(definition.kind);\n return {\n kind: type,\n spec: {\n plugin: definition,\n },\n };\n });\n\n // Filter definitions for time series query and other future query plugins\n const timeSeriesQueries = queryDefinitions.filter(\n (definition) => definition.kind === 'TimeSeriesQuery'\n ) as TimeSeriesQueryDefinition[];\n const timeSeriesResults = useTimeSeriesQueries(timeSeriesQueries, options, queryOptions);\n\n const traceQueries = queryDefinitions.filter(\n (definition) => definition.kind === 'TraceQuery'\n ) as TraceQueryDefinition[];\n const traceResults = useTraceQueries(traceQueries);\n\n const refetchAll = useCallback(() => {\n timeSeriesResults.forEach((result) => result.refetch());\n traceResults.forEach((result) => result.refetch());\n }, [timeSeriesResults, traceResults]);\n\n const ctx = useMemo(() => {\n const mergedQueryResults = [\n ...transformQueryResults(timeSeriesResults, timeSeriesQueries),\n ...transformQueryResults(traceResults, traceQueries),\n ];\n\n return {\n queryResults: mergedQueryResults,\n isFetching: mergedQueryResults.some((result) => result.isFetching),\n isLoading: mergedQueryResults.some((result) => result.isLoading),\n refetchAll,\n errors: mergedQueryResults.map((result) => result.error),\n };\n }, [timeSeriesQueries, timeSeriesResults, traceQueries, traceResults, refetchAll]);\n\n return <DataQueriesContext.Provider value={ctx}>{children}</DataQueriesContext.Provider>;\n}\n"],"names":["createContext","useCallback","useContext","useMemo","useTimeSeriesQueries","useTraceQueries","transformQueryResults","useQueryType","DataQueriesContext","undefined","useDataQueriesContext","ctx","Error","useDataQueries","queryType","filteredQueryResults","queryResults","filter","queryResult","definition","kind","filteredErrors","errors","index","filteredCtx","isFetching","some","result","isLoading","refetchAll","DataQueriesProvider","props","definitions","options","children","queryOptions","getQueryType","queryDefinitions","map","type","spec","plugin","timeSeriesQueries","timeSeriesResults","traceQueries","traceResults","forEach","refetch","mergedQueryResults","error","Provider","value"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,aAAa,EAAEC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAExE,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,eAAe,QAA8B,mBAAmB;AAEzE,SAGEC,qBAAqB,EAGrBC,YAAY,QACP,UAAU;AAEjB,OAAO,MAAMC,mCAAqBR,cAAkDS,WAAW;AAE/F,OAAO,SAASC;IACd,MAAMC,MAAMT,WAAWM;IACvB,IAAIG,QAAQF,WAAW;QACrB,MAAM,IAAIG,MAAM;IAClB;IACA,OAAOD;AACT;AAEA,OAAO,SAASE,eAA0CC,SAAY;IACpE,MAAMH,MAAMD;IAEZ,6DAA6D;IAC7D,MAAMK,uBAAuBJ,IAAIK,YAAY,CAACC,MAAM,CAClD,CAACC;YAAgBA;eAAAA,CAAAA,wBAAAA,mCAAAA,0BAAAA,YAAaC,UAAU,cAAvBD,8CAAAA,wBAAyBE,IAAI,MAAKN;;IAGrD,sDAAsD;IACtD,MAAMO,iBAAiBV,IAAIW,MAAM,CAACL,MAAM,CAAC,CAACK,QAAQC;YAAUZ,oCAAAA;eAAAA,EAAAA,0BAAAA,IAAIK,YAAY,CAACO,MAAM,cAAvBZ,+CAAAA,qCAAAA,wBAAyBQ,UAAU,cAAnCR,yDAAAA,mCAAqCS,IAAI,MAAKN;;IAE1G,mEAAmE;IACnE,MAAMU,cAAc;QAClBR,cAAcD;QACdU,YAAYV,qBAAqBW,IAAI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,CAACX,SAAWA,OAAOsB,KAAK;QACzD;IACF,GAAG;QAACP;QAAmBC;QAAmBC;QAAcC;QAAchB;KAAW;IAEjF,qBAAO,KAACrB,mBAAmB0C,QAAQ;QAACC,OAAOxC;kBAAMuB;;AACnD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/runtime/DataQueriesProvider/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './DataQueriesProvider';\nexport * from './model';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"sources":["../../../src/runtime/DataQueriesProvider/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './DataQueriesProvider';\nexport * from './model';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,wBAAwB;AACtC,cAAc,UAAU"}
@@ -1,27 +1,32 @@
1
1
  /// <reference types="react" />
2
- import { Definition, TimeSeriesData, UnknownSpec } from '@perses-dev/core';
3
- declare type QueryOptions = Record<string, unknown>;
4
- interface DataQueriesDefinitions<QueryPluginDefinition> {
5
- definitions: QueryPluginDefinition[];
6
- }
7
- export interface DataQueriesProviderProps<QueryPluginDefinition = Definition<UnknownSpec>> extends DataQueriesDefinitions<QueryPluginDefinition> {
8
- options?: QueryOptions;
2
+ import { Definition, QueryDefinition, UnknownSpec, QueryDataType } from '@perses-dev/core';
3
+ import { QueryObserverOptions, UseQueryResult } from '@tanstack/react-query';
4
+ type QueryOptions = Record<string, unknown>;
5
+ export interface DataQueriesProviderProps<QueryPluginSpec = UnknownSpec> {
6
+ definitions: Array<Definition<QueryPluginSpec>>;
9
7
  children?: React.ReactNode;
8
+ options?: QueryOptions;
9
+ queryOptions?: QueryObserverOptions;
10
10
  }
11
- export interface UseDataQueryResults<QueryPluginDefinition = Definition<UnknownSpec>> {
12
- queryResults: Array<QueryData<QueryPluginDefinition>>;
11
+ export interface DataQueriesContextType {
12
+ queryResults: QueryData[];
13
13
  refetchAll: () => void;
14
14
  isFetching: boolean;
15
15
  isLoading: boolean;
16
16
  errors: unknown[];
17
17
  }
18
- export interface QueryData<QueryPluginDefinition> {
19
- data?: TimeSeriesData;
20
- definition: QueryPluginDefinition;
18
+ export interface UseDataQueryResults<T> extends Omit<DataQueriesContextType, 'queryResults'> {
19
+ queryResults: Array<QueryData<T>>;
20
+ }
21
+ export type QueryData<T = QueryDataType> = {
22
+ data?: T;
23
+ definition: QueryDefinition;
21
24
  error: unknown;
22
25
  isFetching: boolean;
23
26
  isLoading: boolean;
24
27
  refetch?: () => void;
25
- }
28
+ };
29
+ export declare function transformQueryResults(results: UseQueryResult[], definitions: QueryDefinition[]): QueryData<QueryDataType>[];
30
+ export declare function useQueryType(): (pluginKind: string) => string | undefined;
26
31
  export {};
27
32
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/runtime/DataQueriesProvider/model.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE3E,aAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5C,UAAU,sBAAsB,CAAC,qBAAqB;IACpD,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACtC;AACD,MAAM,WAAW,wBAAwB,CAAC,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC,CACvF,SAAQ,sBAAsB,CAAC,qBAAqB,CAAC;IACrD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB,CAAC,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC;IAClF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACtD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,SAAS,CAAC,qBAAqB;IAC9C,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,qBAAqB,CAAC;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/runtime/DataQueriesProv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I,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAsDzE"}
@@ -10,6 +10,72 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export { };
13
+ import { useCallback, useMemo } from 'react';
14
+ import { useListPluginMetadata } from '../plugin-registry';
15
+ export function transformQueryResults(results, definitions) {
16
+ return results.map(({ data, isFetching, isLoading, refetch, error }, i)=>{
17
+ return {
18
+ definition: definitions[i],
19
+ data,
20
+ isFetching,
21
+ isLoading,
22
+ refetch,
23
+ error
24
+ };
25
+ });
26
+ }
27
+ export function useQueryType() {
28
+ const { data: timeSeriesQueryPlugins, isLoading: isTimeSeriesQueryLoading } = useListPluginMetadata('TimeSeriesQuery');
29
+ const { data: traceQueryPlugins, isLoading: isTraceQueryPluginLoading } = useListPluginMetadata('TraceQuery');
30
+ // For example, `map: {"TimeSeriesQuery":["PrometheusTimeSeriesQuery"],"TraceQuery":["TempoTraceQuery"]}`
31
+ const queryTypeMap = useMemo(()=>{
32
+ const map = {
33
+ TimeSeriesQuery: [],
34
+ TraceQuery: []
35
+ };
36
+ if (timeSeriesQueryPlugins) {
37
+ timeSeriesQueryPlugins.forEach((plugin)=>{
38
+ var _map_plugin_pluginType;
39
+ (_map_plugin_pluginType = map[plugin.pluginType]) === null || _map_plugin_pluginType === void 0 ? void 0 : _map_plugin_pluginType.push(plugin.kind);
40
+ });
41
+ }
42
+ if (traceQueryPlugins) {
43
+ traceQueryPlugins.forEach((plugin)=>{
44
+ var _map_plugin_pluginType;
45
+ (_map_plugin_pluginType = map[plugin.pluginType]) === null || _map_plugin_pluginType === void 0 ? void 0 : _map_plugin_pluginType.push(plugin.kind);
46
+ });
47
+ }
48
+ return map;
49
+ }, [
50
+ timeSeriesQueryPlugins,
51
+ traceQueryPlugins
52
+ ]);
53
+ const getQueryType = useCallback((pluginKind)=>{
54
+ const isLoading = (pluginKind)=>{
55
+ switch(pluginKind){
56
+ case 'PrometheusTimeSeriesQuery':
57
+ return isTimeSeriesQueryLoading;
58
+ case 'TempoTraceQuery':
59
+ return isTraceQueryPluginLoading;
60
+ }
61
+ throw new Error(`Unable to determine the query type: ${pluginKind}`);
62
+ };
63
+ if (isLoading(pluginKind)) {
64
+ return undefined;
65
+ }
66
+ for(const queryType in queryTypeMap){
67
+ var _queryTypeMap_queryType;
68
+ if ((_queryTypeMap_queryType = queryTypeMap[queryType]) === null || _queryTypeMap_queryType === void 0 ? void 0 : _queryTypeMap_queryType.includes(pluginKind)) {
69
+ return queryType;
70
+ }
71
+ }
72
+ throw new Error(`Unable to determine the query type: ${pluginKind}`);
73
+ }, [
74
+ queryTypeMap,
75
+ isTimeSeriesQueryLoading,
76
+ isTraceQueryPluginLoading
77
+ ]);
78
+ return getQueryType;
79
+ }
14
80
 
15
81
  //# sourceMappingURL=model.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/runtime/DataQueriesProvider/model.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Definition, TimeSeriesData, UnknownSpec } from '@perses-dev/core';\n\ntype QueryOptions = Record<string, unknown>;\n\ninterface DataQueriesDefinitions<QueryPluginDefinition> {\n definitions: QueryPluginDefinition[];\n}\nexport interface DataQueriesProviderProps<QueryPluginDefinition = Definition<UnknownSpec>>\n extends DataQueriesDefinitions<QueryPluginDefinition> {\n options?: QueryOptions;\n children?: React.ReactNode;\n}\n\nexport interface UseDataQueryResults<QueryPluginDefinition = Definition<UnknownSpec>> {\n queryResults: Array<QueryData<QueryPluginDefinition>>;\n refetchAll: () => void;\n isFetching: boolean;\n isLoading: boolean;\n errors: unknown[];\n}\n\nexport interface QueryData<QueryPluginDefinition> {\n data?: TimeSeriesData;\n definition: QueryPluginDefinition;\n error: unknown;\n isFetching: boolean;\n isLoading: boolean;\n refetch?: () => void;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WA4BC"}
1
+ {"version":3,"sources":["../../../src/runtime/DataQueriesProvider/model.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Definition, QueryDefinition, UnknownSpec, QueryDataType } from '@perses-dev/core';\nimport { QueryObserverOptions, UseQueryResult } from '@tanstack/react-query';\nimport { useCallback, useMemo } from 'react';\nimport { useListPluginMetadata } from '../plugin-registry';\n\ntype QueryOptions = Record<string, unknown>;\nexport interface DataQueriesProviderProps<QueryPluginSpec = UnknownSpec> {\n definitions: Array<Definition<QueryPluginSpec>>;\n children?: React.ReactNode;\n options?: QueryOptions;\n queryOptions?: QueryObserverOptions;\n}\n\nexport interface DataQueriesContextType {\n queryResults: QueryData[];\n refetchAll: () => void;\n isFetching: boolean;\n isLoading: boolean;\n errors: unknown[];\n}\n\nexport interface UseDataQueryResults<T> extends Omit<DataQueriesContextType, 'queryResults'> {\n queryResults: Array<QueryData<T>>;\n}\n\nexport type QueryData<T = QueryDataType> = {\n data?: T;\n definition: QueryDefinition;\n error: unknown;\n isFetching: boolean;\n isLoading: boolean;\n refetch?: () => void;\n};\n\nexport function transformQueryResults(results: UseQueryResult[], definitions: QueryDefinition[]) {\n return results.map(({ data, isFetching, isLoading, refetch, error }, i) => {\n return {\n definition: definitions[i],\n data,\n isFetching,\n isLoading,\n refetch,\n error,\n } as QueryData;\n });\n}\n\nexport function useQueryType(): (pluginKind: string) => string | undefined {\n const { data: timeSeriesQueryPlugins, isLoading: isTimeSeriesQueryLoading } =\n useListPluginMetadata('TimeSeriesQuery');\n const { data: traceQueryPlugins, isLoading: isTraceQueryPluginLoading } = useListPluginMetadata('TraceQuery');\n\n // For example, `map: {\"TimeSeriesQuery\":[\"PrometheusTimeSeriesQuery\"],\"TraceQuery\":[\"TempoTraceQuery\"]}`\n const queryTypeMap = useMemo(() => {\n const map: Record<string, string[]> = {\n TimeSeriesQuery: [],\n TraceQuery: [],\n };\n\n if (timeSeriesQueryPlugins) {\n timeSeriesQueryPlugins.forEach((plugin) => {\n map[plugin.pluginType]?.push(plugin.kind);\n });\n }\n\n if (traceQueryPlugins) {\n traceQueryPlugins.forEach((plugin) => {\n map[plugin.pluginType]?.push(plugin.kind);\n });\n }\n return map;\n }, [timeSeriesQueryPlugins, traceQueryPlugins]);\n\n const getQueryType = useCallback(\n (pluginKind: string) => {\n const isLoading = (pluginKind: string) => {\n switch (pluginKind) {\n case 'PrometheusTimeSeriesQuery':\n return isTimeSeriesQueryLoading;\n case 'TempoTraceQuery':\n return isTraceQueryPluginLoading;\n }\n throw new Error(`Unable to determine the query type: ${pluginKind}`);\n };\n\n if (isLoading(pluginKind)) {\n return undefined;\n }\n\n for (const queryType in queryTypeMap) {\n if (queryTypeMap[queryType]?.includes(pluginKind)) {\n return queryType;\n }\n }\n\n throw new Error(`Unable to determine the query type: ${pluginKind}`);\n },\n [queryTypeMap, isTimeSeriesQueryLoading, isTraceQueryPluginLoading]\n );\n\n return getQueryType;\n}\n"],"names":["useCallback","useMemo","useListPluginMetadata","transformQueryResults","results","definitions","map","data","isFetching","isLoading","refetch","error","i","definition","useQueryType","timeSeriesQueryPlugins","isTimeSeriesQueryLoading","traceQueryPlugins","isTraceQueryPluginLoading","queryTypeMap","TimeSeriesQuery","TraceQuery","forEach","plugin","pluginType","push","kind","getQueryType","pluginKind","Error","undefined","queryType","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAASA,WAAW,EAAEC,OAAO,QAAQ,QAAQ;AAC7C,SAASC,qBAAqB,QAAQ,qBAAqB;AA+B3D,OAAO,SAASC,sBAAsBC,OAAyB,EAAEC,WAA8B;IAC7F,OAAOD,QAAQE,GAAG,CAAC,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,KAAK,EAAE,EAAEC;QACnE,OAAO;YACLC,YAAYR,WAAW,CAACO,EAAE;YAC1BL;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF;AAEA,OAAO,SAASG;IACd,MAAM,EAAEP,MAAMQ,sBAAsB,EAAEN,WAAWO,wBAAwB,EAAE,GACzEd,sBAAsB;IACxB,MAAM,EAAEK,MAAMU,iBAAiB,EAAER,WAAWS,yBAAyB,EAAE,GAAGhB,sBAAsB;IAEhG,yGAAyG;IACzG,MAAMiB,eAAelB,QAAQ;QAC3B,MAAMK,MAAgC;YACpCc,iBAAiB,EAAE;YACnBC,YAAY,EAAE;QAChB;QAEA,IAAIN,wBAAwB;YAC1BA,uBAAuBO,OAAO,CAAC,CAACC;oBAC9BjB;iBAAAA,yBAAAA,GAAG,CAACiB,OAAOC,UAAU,CAAC,cAAtBlB,6CAAAA,uBAAwBmB,IAAI,CAACF,OAAOG,IAAI;YAC1C;QACF;QAEA,IAAIT,mBAAmB;YACrBA,kBAAkBK,OAAO,CAAC,CAACC;oBACzBjB;iBAAAA,yBAAAA,GAAG,CAACiB,OAAOC,UAAU,CAAC,cAAtBlB,6CAAAA,uBAAwBmB,IAAI,CAACF,OAAOG,IAAI;YAC1C;QACF;QACA,OAAOpB;IACT,GAAG;QAACS;QAAwBE;KAAkB;IAE9C,MAAMU,eAAe3B,YACnB,CAAC4B;QACC,MAAMnB,YAAY,CAACmB;YACjB,OAAQA;gBACN,KAAK;oBACH,OAAOZ;gBACT,KAAK;oBACH,OAAOE;YACX;YACA,MAAM,IAAIW,MAAM,CAAC,oCAAoC,EAAED,WAAW,CAAC;QACrE;QAEA,IAAInB,UAAUmB,aAAa;YACzB,OAAOE;QACT;QAEA,IAAK,MAAMC,aAAaZ,aAAc;gBAChCA;YAAJ,KAAIA,0BAAAA,YAAY,CAACY,UAAU,cAAvBZ,8CAAAA,wBAAyBa,QAAQ,CAACJ,aAAa;gBACjD,OAAOG;YACT;QACF;QAEA,MAAM,IAAIF,MAAM,CAAC,oCAAoC,EAAED,WAAW,CAAC;IACrE,GACA;QAACT;QAAcH;QAA0BE;KAA0B;IAGrE,OAAOS;AACT"}
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { AbsoluteTimeRange, DurationString, TimeRangeValue } from '@perses-dev/core';
3
3
  export interface TimeRangeProviderProps {
4
- initialTimeRange: TimeRangeValue;
5
- initialRefreshInterval?: DurationString;
6
- enabledURLParams?: boolean;
4
+ timeRange: TimeRangeValue;
5
+ refreshInterval?: DurationString;
6
+ setTimeRange?: (value: TimeRangeValue) => void;
7
+ setRefreshInterval?: (value: DurationString) => void;
7
8
  children?: React.ReactNode;
8
9
  }
9
10
  export interface TimeRange {
@@ -22,8 +23,12 @@ export declare function useTimeRangeContext(): TimeRange;
22
23
  * Get and set the current resolved time range at runtime.
23
24
  */
24
25
  export declare function useTimeRange(): TimeRange;
26
+ /**
27
+ * Gets the suggested step for a graph query in ms for the currently selected time range.
28
+ */
29
+ export declare function useSuggestedStepMs(width?: number): number;
25
30
  /**
26
31
  * Provider implementation that supplies the time range state at runtime.
27
32
  */
28
- export declare function TimeRangeProvider(props: TimeRangeProviderProps): JSX.Element;
33
+ export declare function TimeRangeProvider(props: TimeRangeProviderProps): import("react/jsx-runtime").JSX.Element;
29
34
  //# sourceMappingURL=TimeRangeProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeRangeProvider.d.ts","sourceRoot":"","sources":["../../../src/runtime/TimeRangeProvider/TimeRangeProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoE,MAAM,OAAO,CAAC;AACzF,OAAO,EACL,iBAAiB,EACjB,cAAc,EAEd,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,cAAc,CAAC;IACjC,sBAAsB,CAAC,EAAE,cAAc,CAAC;IACxC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACrD;AAED,eAAO,MAAM,gBAAgB,sCAAkD,CAAC;AAEhF,wBAAgB,mBAAmB,cAMlC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAExC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eA8B9D"}
1
+ {"version":3,"file":"TimeRangeProv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