@perses-dev/plugin-system 0.54.0-beta.1 → 0.54.0-beta.11

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 (261) hide show
  1. package/dist/cjs/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.js +283 -0
  2. package/dist/cjs/components/Annotations/AnnotationEditorForm/AnnotationPreview.js +197 -0
  3. package/dist/cjs/components/Annotations/AnnotationEditorForm/index.js +30 -0
  4. package/dist/cjs/components/Annotations/constants.js +23 -0
  5. package/dist/cjs/components/Annotations/index.js +31 -0
  6. package/dist/cjs/components/MultiQueryEditor/QueryEditorContainer.js +97 -12
  7. package/dist/cjs/components/MultiQueryEditor/index.js +1 -0
  8. package/dist/cjs/components/MultiQueryEditor/utils.js +36 -0
  9. package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +3 -6
  10. package/dist/cjs/components/PluginRegistry/PluginRegistry.js +11 -15
  11. package/dist/cjs/components/PluginRegistry/getPluginSearchHelper.js +92 -0
  12. package/dist/cjs/components/PluginRegistry/plugin-indexes.js +16 -13
  13. package/dist/cjs/components/Variables/variable-model.js +115 -29
  14. package/dist/cjs/components/index.js +1 -0
  15. package/dist/cjs/context/ValidationProvider.js +10 -4
  16. package/dist/cjs/model/alerts-queries.js +16 -0
  17. package/dist/cjs/model/annotations.js +16 -0
  18. package/dist/cjs/model/index.js +3 -0
  19. package/dist/cjs/model/log-volume-utils.js +10 -10
  20. package/dist/cjs/model/plugin-loading.js +24 -8
  21. package/dist/cjs/model/plugins.js +10 -0
  22. package/dist/cjs/model/silences-queries.js +16 -0
  23. package/dist/cjs/remote/PluginRuntime.js +46 -10
  24. package/dist/cjs/remote/remotePluginLoader.js +28 -5
  25. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +33 -24
  26. package/dist/cjs/runtime/DataQueriesProvider/model.js +3 -93
  27. package/dist/cjs/runtime/UsageMetricsProvider.js +2 -2
  28. package/dist/cjs/runtime/alerts-queries.js +101 -0
  29. package/dist/cjs/runtime/annotations.js +148 -0
  30. package/dist/cjs/runtime/index.js +3 -1
  31. package/dist/cjs/runtime/item-actions.js +3 -3
  32. package/dist/cjs/runtime/log-queries.js +4 -1
  33. package/dist/cjs/runtime/plugin-registry.js +12 -3
  34. package/dist/cjs/runtime/profile-queries.js +4 -1
  35. package/dist/cjs/runtime/silences-queries.js +101 -0
  36. package/dist/cjs/runtime/time-series-queries.js +4 -1
  37. package/dist/cjs/runtime/trace-queries.js +4 -1
  38. package/dist/cjs/test/mock-data.js +51 -0
  39. package/dist/cjs/test/test-plugins/bert/index.js +9 -12
  40. package/dist/cjs/test/test-plugins/ernie/index.js +9 -12
  41. package/dist/cjs/test/test-plugins/index.js +2 -2
  42. package/dist/cjs/test-utils/mock-plugin-registry.js +8 -2
  43. package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.d.ts +16 -0
  44. package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.d.ts.map +1 -0
  45. package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.js +270 -0
  46. package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.js.map +1 -0
  47. package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.d.ts +8 -0
  48. package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.d.ts.map +1 -0
  49. package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.js +184 -0
  50. package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.js.map +1 -0
  51. package/dist/components/Annotations/AnnotationEditorForm/index.d.ts +2 -0
  52. package/dist/components/Annotations/AnnotationEditorForm/index.d.ts.map +1 -0
  53. package/dist/{runtime/QueryCountProvider.js → components/Annotations/AnnotationEditorForm/index.js} +2 -13
  54. package/dist/components/Annotations/AnnotationEditorForm/index.js.map +1 -0
  55. package/dist/components/Annotations/constants.d.ts +2 -0
  56. package/dist/components/Annotations/constants.d.ts.map +1 -0
  57. package/dist/components/Annotations/constants.js +15 -0
  58. package/dist/components/Annotations/constants.js.map +1 -0
  59. package/dist/components/Annotations/index.d.ts +3 -0
  60. package/dist/components/Annotations/index.d.ts.map +1 -0
  61. package/dist/components/Annotations/index.js +16 -0
  62. package/dist/components/Annotations/index.js.map +1 -0
  63. package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
  64. package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
  65. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +1 -2
  66. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
  67. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +1 -1
  68. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
  69. package/dist/components/DatasourceSelect/DatasourceSelect.js +2 -2
  70. package/dist/components/DatasourceSelect/DatasourceSelect.js.map +1 -1
  71. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts +1 -1
  72. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts.map +1 -1
  73. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +2 -2
  74. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -1
  75. package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +1 -1
  76. package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js.map +1 -1
  77. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
  78. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  79. package/dist/components/MetricLabelInput/MetricLabelInput.js +1 -1
  80. package/dist/components/MetricLabelInput/MetricLabelInput.js.map +1 -1
  81. package/dist/components/MultiQueryEditor/MultiQueryEditor.js +1 -1
  82. package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -1
  83. package/dist/components/MultiQueryEditor/QueryEditorContainer.d.ts.map +1 -1
  84. package/dist/components/MultiQueryEditor/QueryEditorContainer.js +100 -15
  85. package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -1
  86. package/dist/components/MultiQueryEditor/index.d.ts +1 -0
  87. package/dist/components/MultiQueryEditor/index.d.ts.map +1 -1
  88. package/dist/components/MultiQueryEditor/index.js +1 -0
  89. package/dist/components/MultiQueryEditor/index.js.map +1 -1
  90. package/dist/components/MultiQueryEditor/utils.d.ts +8 -0
  91. package/dist/components/MultiQueryEditor/utils.d.ts.map +1 -0
  92. package/dist/components/MultiQueryEditor/utils.js +23 -0
  93. package/dist/components/MultiQueryEditor/utils.js.map +1 -0
  94. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +1 -1
  95. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
  96. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
  97. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
  98. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +1 -1
  99. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  100. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
  101. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +5 -8
  102. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  103. package/dist/components/PluginEditor/PluginEditor.js +1 -1
  104. package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
  105. package/dist/components/PluginKindSelect/PluginKindSelect.js +1 -1
  106. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  107. package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
  108. package/dist/components/PluginRegistry/PluginRegistry.js +12 -16
  109. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  110. package/dist/components/PluginRegistry/getPluginSearchHelper.d.ts +12 -0
  111. package/dist/components/PluginRegistry/getPluginSearchHelper.d.ts.map +1 -0
  112. package/dist/components/PluginRegistry/getPluginSearchHelper.js +88 -0
  113. package/dist/components/PluginRegistry/getPluginSearchHelper.js.map +1 -0
  114. package/dist/components/PluginRegistry/plugin-indexes.d.ts +4 -6
  115. package/dist/components/PluginRegistry/plugin-indexes.d.ts.map +1 -1
  116. package/dist/components/PluginRegistry/plugin-indexes.js +15 -13
  117. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  118. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
  119. package/dist/components/PluginSpecEditor/PluginSpecEditor.js +1 -1
  120. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  121. package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js +1 -1
  122. package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js.map +1 -1
  123. package/dist/components/TimeRangeControls/TimeRangeControls.js +1 -1
  124. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
  125. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +1 -1
  126. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  127. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +1 -1
  128. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  129. package/dist/components/Variables/VariableEditorForm/VariablePreview.js +1 -1
  130. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  131. package/dist/components/Variables/variable-model.d.ts +9 -1
  132. package/dist/components/Variables/variable-model.d.ts.map +1 -1
  133. package/dist/components/Variables/variable-model.js +117 -31
  134. package/dist/components/Variables/variable-model.js.map +1 -1
  135. package/dist/components/index.d.ts +1 -0
  136. package/dist/components/index.d.ts.map +1 -1
  137. package/dist/components/index.js +1 -0
  138. package/dist/components/index.js.map +1 -1
  139. package/dist/context/ValidationProvider.d.ts +4 -2
  140. package/dist/context/ValidationProvider.d.ts.map +1 -1
  141. package/dist/context/ValidationProvider.js +10 -4
  142. package/dist/context/ValidationProvider.js.map +1 -1
  143. package/dist/model/alerts-queries.d.ts +33 -0
  144. package/dist/model/alerts-queries.d.ts.map +1 -0
  145. package/dist/model/alerts-queries.js +15 -0
  146. package/dist/model/alerts-queries.js.map +1 -0
  147. package/dist/model/annotations.d.ts +28 -0
  148. package/dist/model/annotations.d.ts.map +1 -0
  149. package/dist/model/annotations.js +17 -0
  150. package/dist/model/annotations.js.map +1 -0
  151. package/dist/model/datasource.d.ts +1 -8
  152. package/dist/model/datasource.d.ts.map +1 -1
  153. package/dist/model/datasource.js +1 -1
  154. package/dist/model/datasource.js.map +1 -1
  155. package/dist/model/index.d.ts +3 -0
  156. package/dist/model/index.d.ts.map +1 -1
  157. package/dist/model/index.js +3 -0
  158. package/dist/model/index.js.map +1 -1
  159. package/dist/model/log-queries.d.ts +2 -1
  160. package/dist/model/log-queries.d.ts.map +1 -1
  161. package/dist/model/log-queries.js.map +1 -1
  162. package/dist/model/plugin-loading.d.ts.map +1 -1
  163. package/dist/model/plugin-loading.js +24 -8
  164. package/dist/model/plugin-loading.js.map +1 -1
  165. package/dist/model/plugins.d.ts +23 -0
  166. package/dist/model/plugins.d.ts.map +1 -1
  167. package/dist/model/plugins.js +4 -1
  168. package/dist/model/plugins.js.map +1 -1
  169. package/dist/model/silences-queries.d.ts +33 -0
  170. package/dist/model/silences-queries.d.ts.map +1 -0
  171. package/dist/model/silences-queries.js +15 -0
  172. package/dist/model/silences-queries.js.map +1 -0
  173. package/dist/model/trace-queries.d.ts +2 -3
  174. package/dist/model/trace-queries.d.ts.map +1 -1
  175. package/dist/model/trace-queries.js.map +1 -1
  176. package/dist/remote/PersesPlugin.types.d.ts +2 -0
  177. package/dist/remote/PersesPlugin.types.d.ts.map +1 -1
  178. package/dist/remote/PersesPlugin.types.js.map +1 -1
  179. package/dist/remote/PluginLoaderComponent.js +1 -1
  180. package/dist/remote/PluginLoaderComponent.js.map +1 -1
  181. package/dist/remote/PluginRuntime.d.ts +7 -1
  182. package/dist/remote/PluginRuntime.d.ts.map +1 -1
  183. package/dist/remote/PluginRuntime.js +46 -10
  184. package/dist/remote/PluginRuntime.js.map +1 -1
  185. package/dist/remote/remotePluginLoader.d.ts.map +1 -1
  186. package/dist/remote/remotePluginLoader.js +28 -5
  187. package/dist/remote/remotePluginLoader.js.map +1 -1
  188. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
  189. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +35 -26
  190. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  191. package/dist/runtime/DataQueriesProvider/model.d.ts +4 -4
  192. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  193. package/dist/runtime/DataQueriesProvider/model.js +0 -82
  194. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  195. package/dist/runtime/RouterProvider.js +1 -1
  196. package/dist/runtime/RouterProvider.js.map +1 -1
  197. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +1 -1
  198. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  199. package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +1 -1
  200. package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -1
  201. package/dist/runtime/UsageMetricsProvider.js +2 -2
  202. package/dist/runtime/UsageMetricsProvider.js.map +1 -1
  203. package/dist/runtime/alerts-queries.d.ts +11 -0
  204. package/dist/runtime/alerts-queries.d.ts.map +1 -0
  205. package/dist/runtime/alerts-queries.js +89 -0
  206. package/dist/runtime/alerts-queries.js.map +1 -0
  207. package/dist/runtime/annotations.d.ts +6 -0
  208. package/dist/runtime/annotations.d.ts.map +1 -0
  209. package/dist/runtime/annotations.js +129 -0
  210. package/dist/runtime/annotations.js.map +1 -0
  211. package/dist/runtime/datasources.d.ts +6 -0
  212. package/dist/runtime/datasources.d.ts.map +1 -1
  213. package/dist/runtime/datasources.js.map +1 -1
  214. package/dist/runtime/index.d.ts +3 -1
  215. package/dist/runtime/index.d.ts.map +1 -1
  216. package/dist/runtime/index.js +3 -1
  217. package/dist/runtime/index.js.map +1 -1
  218. package/dist/runtime/item-actions.js +1 -1
  219. package/dist/runtime/item-actions.js.map +1 -1
  220. package/dist/runtime/log-queries.js +4 -1
  221. package/dist/runtime/log-queries.js.map +1 -1
  222. package/dist/runtime/plugin-registry.d.ts +2 -2
  223. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  224. package/dist/runtime/plugin-registry.js +12 -3
  225. package/dist/runtime/plugin-registry.js.map +1 -1
  226. package/dist/runtime/profile-queries.js +4 -1
  227. package/dist/runtime/profile-queries.js.map +1 -1
  228. package/dist/runtime/silences-queries.d.ts +11 -0
  229. package/dist/runtime/silences-queries.d.ts.map +1 -0
  230. package/dist/runtime/silences-queries.js +89 -0
  231. package/dist/runtime/silences-queries.js.map +1 -0
  232. package/dist/runtime/time-series-queries.js +4 -1
  233. package/dist/runtime/time-series-queries.js.map +1 -1
  234. package/dist/runtime/trace-queries.js +4 -1
  235. package/dist/runtime/trace-queries.js.map +1 -1
  236. package/dist/test/mock-data.d.ts +3 -1
  237. package/dist/test/mock-data.d.ts.map +1 -1
  238. package/dist/test/mock-data.js +45 -0
  239. package/dist/test/mock-data.js.map +1 -1
  240. package/dist/test/render.js +1 -1
  241. package/dist/test/render.js.map +1 -1
  242. package/dist/test/test-plugins/bert/index.d.ts +12 -6
  243. package/dist/test/test-plugins/bert/index.d.ts.map +1 -1
  244. package/dist/test/test-plugins/bert/index.js +6 -2
  245. package/dist/test/test-plugins/bert/index.js.map +1 -1
  246. package/dist/test/test-plugins/ernie/index.d.ts +8 -6
  247. package/dist/test/test-plugins/ernie/index.d.ts.map +1 -1
  248. package/dist/test/test-plugins/ernie/index.js +6 -2
  249. package/dist/test/test-plugins/ernie/index.js.map +1 -1
  250. package/dist/test/test-plugins/index.js +2 -2
  251. package/dist/test/test-plugins/index.js.map +1 -1
  252. package/dist/test/utils.js +1 -1
  253. package/dist/test/utils.js.map +1 -1
  254. package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
  255. package/dist/test-utils/mock-plugin-registry.js +8 -2
  256. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  257. package/package.json +7 -6
  258. package/dist/cjs/runtime/QueryCountProvider.js +0 -83
  259. package/dist/runtime/QueryCountProvider.d.ts +0 -9
  260. package/dist/runtime/QueryCountProvider.d.ts.map +0 -1
  261. package/dist/runtime/QueryCountProvider.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/context/ValidationProvider.tsx"],"sourcesContent":["// Copyright 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, ReactElement, ReactNode, useContext, useState } from 'react';\nimport {\n PanelEditorValues,\n VariableDefinition,\n PluginSchema,\n panelEditorSchema as defaultPanelEditorSchema,\n variableDefinitionSchema,\n buildPanelEditorSchema,\n buildVariableDefinitionSchema,\n} from '@perses-dev/spec';\nimport { DatasourceDefinition, datasourceDefinitionSchema, buildDatasourceDefinitionSchema } from '@perses-dev/core'; // Todo these things should not be part of the plugin system. Only the spec should be used\nimport { z } from 'zod';\n\nexport interface ValidationSchemas {\n datasourceEditorSchema: z.Schema<DatasourceDefinition>;\n panelEditorSchema: z.Schema<PanelEditorValues>;\n variableEditorSchema: z.Schema<VariableDefinition>;\n setDatasourceEditorSchemaPlugin: (pluginSchema: PluginSchema) => void;\n setPanelEditorSchemaPlugin: (pluginSchema: PluginSchema) => void;\n setVariableEditorSchemaPlugin: (pluginSchema: PluginSchema) => void;\n}\n\nexport const ValidationSchemasContext = createContext<ValidationSchemas | undefined>(undefined);\n\nexport function useValidationSchemas(): ValidationSchemas {\n const ctx = useContext(ValidationSchemasContext);\n if (ctx === undefined) {\n throw new Error('No ValidationSchemasContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\ninterface ValidationProviderProps {\n children: ReactNode;\n}\n\n/*\n * Provide validation schemas for forms handling plugins (datasources, variables, panels).\n */\nexport function ValidationProvider({ children }: ValidationProviderProps): ReactElement {\n const [datasourceEditorSchema, setDatasourceEditorSchema] =\n useState<z.Schema<DatasourceDefinition>>(datasourceDefinitionSchema);\n const [panelEditorSchema, setPanelEditorSchema] = useState<z.Schema<PanelEditorValues>>(defaultPanelEditorSchema); // TODO I don't get why this does not compile\n const [variableEditorSchema, setVariableEditorSchema] =\n useState<z.Schema<VariableDefinition>>(variableDefinitionSchema);\n\n function setDatasourceEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setDatasourceEditorSchema(buildDatasourceDefinitionSchema(pluginSchema));\n }\n\n function setPanelEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setPanelEditorSchema(buildPanelEditorSchema(pluginSchema));\n }\n\n function setVariableEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setVariableEditorSchema(buildVariableDefinitionSchema(pluginSchema));\n }\n\n return (\n <ValidationSchemasContext.Provider\n value={{\n datasourceEditorSchema,\n panelEditorSchema,\n variableEditorSchema,\n setDatasourceEditorSchemaPlugin,\n setPanelEditorSchemaPlugin,\n setVariableEditorSchemaPlugin,\n }}\n >\n {children}\n </ValidationSchemasContext.Provider>\n );\n}\n"],"names":["createContext","useContext","useState","panelEditorSchema","defaultPanelEditorSchema","variableDefinitionSchema","buildPanelEditorSchema","buildVariableDefinitionSchema","datasourceDefinitionSchema","buildDatasourceDefinitionSchema","ValidationSchemasContext","undefined","useValidationSchemas","ctx","Error","ValidationProvider","children","datasourceEditorSchema","setDatasourceEditorSchema","setPanelEditorSchema","variableEditorSchema","setVariableEditorSchema","setDatasourceEditorSchemaPlugin","pluginSchema","setPanelEditorSchemaPlugin","setVariableEditorSchemaPlugin","Provider","value"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,aAAa,EAA2BC,UAAU,EAAEC,QAAQ,QAAQ,QAAQ;AACrF,SAIEC,qBAAqBC,wBAAwB,EAC7CC,wBAAwB,EACxBC,sBAAsB,EACtBC,6BAA6B,QACxB,mBAAmB;AAC1B,SAA+BC,0BAA0B,EAAEC,+BAA+B,QAAQ,mBAAmB,CAAC,0FAA0F;AAYhN,OAAO,MAAMC,yCAA2BV,cAA6CW,WAAW;AAEhG,OAAO,SAASC;IACd,MAAMC,MAAMZ,WAAWS;IACvB,IAAIG,QAAQF,WAAW;QACrB,MAAM,IAAIG,MAAM;IAClB;IACA,OAAOD;AACT;AAMA;;CAEC,GACD,OAAO,SAASE,mBAAmB,EAAEC,QAAQ,EAA2B;IACtE,MAAM,CAACC,wBAAwBC,0BAA0B,GACvDhB,SAAyCM;IAC3C,MAAM,CAACL,mBAAmBgB,qBAAqB,GAAGjB,SAAsCE,2BAA2B,6CAA6C;IAChK,MAAM,CAACgB,sBAAsBC,wBAAwB,GACnDnB,SAAuCG;IAEzC,SAASiB,gCAAgCC,YAA0B;QACjEL,0BAA0BT,gCAAgCc;IAC5D;IAEA,SAASC,2BAA2BD,YAA0B;QAC5DJ,qBAAqBb,uBAAuBiB;IAC9C;IAEA,SAASE,8BAA8BF,YAA0B;QAC/DF,wBAAwBd,8BAA8BgB;IACxD;IAEA,qBACE,KAACb,yBAAyBgB,QAAQ;QAChCC,OAAO;YACLV;YACAd;YACAiB;YACAE;YACAE;YACAC;QACF;kBAECT;;AAGP"}
1
+ {"version":3,"sources":["../../src/context/ValidationProvider.tsx"],"sourcesContent":["// Copyright 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, ReactElement, ReactNode, useContext, useState } from 'react';\nimport {\n PanelEditorValues,\n VariableDefinition,\n PluginSchema,\n panelEditorSchema as defaultPanelEditorSchema,\n variableDefinitionSchema,\n buildPanelEditorSchema,\n buildVariableDefinitionSchema,\n AnnotationSpec,\n annotationSpecSchema,\n buildAnnotationSpecSchema,\n} from '@perses-dev/spec';\n\nimport { z } from 'zod';\nimport { buildDatasourceDefinitionSchema, DatasourceDefinition, datasourceDefinitionSchema } from '@perses-dev/client';\n\nexport interface ValidationSchemas {\n datasourceEditorSchema: z.Schema<DatasourceDefinition>;\n panelEditorSchema: z.Schema<PanelEditorValues>;\n variableEditorSchema: z.Schema<VariableDefinition>;\n annotationEditorSchema: z.Schema<AnnotationSpec>;\n setDatasourceEditorSchemaPlugin: (pluginSchema: PluginSchema) => void;\n setPanelEditorSchemaPlugin: (pluginSchema: PluginSchema) => void;\n setVariableEditorSchemaPlugin: (pluginSchema: PluginSchema) => void;\n setAnnotationEditorSchemaPlugin?: (pluginSchema: PluginSchema) => void;\n}\n\nexport const ValidationSchemasContext = createContext<ValidationSchemas | undefined>(undefined);\n\nexport function useValidationSchemas(): ValidationSchemas {\n const ctx = useContext(ValidationSchemasContext);\n if (ctx === undefined) {\n throw new Error('No ValidationSchemasContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\ninterface ValidationProviderProps {\n children: ReactNode;\n}\n\n/*\n * Provide validation schemas for forms handling plugins (datasources, variables, panels).\n */\nexport function ValidationProvider({ children }: ValidationProviderProps): ReactElement {\n const [datasourceEditorSchema, setDatasourceEditorSchema] =\n useState<z.Schema<DatasourceDefinition>>(datasourceDefinitionSchema);\n const [panelEditorSchema, setPanelEditorSchema] = useState<z.Schema<PanelEditorValues>>(defaultPanelEditorSchema); // TODO I don't get why this does not compile\n const [variableEditorSchema, setVariableEditorSchema] =\n useState<z.Schema<VariableDefinition>>(variableDefinitionSchema);\n const [annotationEditorSchema, setAnnotationEditorSchema] = useState<z.Schema<AnnotationSpec>>(annotationSpecSchema);\n\n function setDatasourceEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setDatasourceEditorSchema(buildDatasourceDefinitionSchema(pluginSchema));\n }\n\n function setPanelEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setPanelEditorSchema(buildPanelEditorSchema(pluginSchema));\n }\n\n function setVariableEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setVariableEditorSchema(buildVariableDefinitionSchema(pluginSchema));\n }\n\n function setAnnotationEditorSchemaPlugin(pluginSchema: PluginSchema): void {\n setAnnotationEditorSchema(buildAnnotationSpecSchema(pluginSchema));\n }\n\n return (\n <ValidationSchemasContext.Provider\n value={{\n datasourceEditorSchema,\n panelEditorSchema,\n variableEditorSchema,\n annotationEditorSchema,\n setDatasourceEditorSchemaPlugin,\n setPanelEditorSchemaPlugin,\n setVariableEditorSchemaPlugin,\n setAnnotationEditorSchemaPlugin,\n }}\n >\n {children}\n </ValidationSchemasContext.Provider>\n );\n}\n"],"names":["createContext","useContext","useState","panelEditorSchema","defaultPanelEditorSchema","variableDefinitionSchema","buildPanelEditorSchema","buildVariableDefinitionSchema","annotationSpecSchema","buildAnnotationSpecSchema","buildDatasourceDefinitionSchema","datasourceDefinitionSchema","ValidationSchemasContext","undefined","useValidationSchemas","ctx","Error","ValidationProvider","children","datasourceEditorSchema","setDatasourceEditorSchema","setPanelEditorSchema","variableEditorSchema","setVariableEditorSchema","annotationEditorSchema","setAnnotationEditorSchema","setDatasourceEditorSchemaPlugin","pluginSchema","setPanelEditorSchemaPlugin","setVariableEditorSchemaPlugin","setAnnotationEditorSchemaPlugin","Provider","value"],"mappings":";AAAA,+BAA+B;AAC/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GP"}
@@ -0,0 +1,33 @@
1
+ import { Query, QueryKey } from '@tanstack/react-query';
2
+ import { AlertsData, UnknownSpec } from '@perses-dev/spec';
3
+ import { DatasourceStore, VariableStateMap } from '../runtime';
4
+ import { Plugin } from './plugin-base';
5
+ /**
6
+ * An object containing all the dependencies of an AlertsQuery.
7
+ */
8
+ type AlertsQueryPluginDependencies = {
9
+ /**
10
+ * Returns a list of variables name this alerts query depends on.
11
+ */
12
+ variables?: string[];
13
+ };
14
+ /**
15
+ * A plugin for running alerts queries.
16
+ * Alerts represent current state, not historical data, so the context
17
+ * does NOT include absoluteTimeRange.
18
+ */
19
+ export interface AlertsQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {
20
+ getAlertsData: (spec: Spec, ctx: AlertsQueryContext, abortSignal?: AbortSignal) => Promise<AlertsData>;
21
+ dependsOn?: (spec: Spec, ctx: AlertsQueryContext) => AlertsQueryPluginDependencies;
22
+ }
23
+ /**
24
+ * Context available to AlertsQuery plugins at runtime.
25
+ * Note: No absoluteTimeRange since alerts represent current state.
26
+ */
27
+ export interface AlertsQueryContext {
28
+ datasourceStore: DatasourceStore;
29
+ variableState: VariableStateMap;
30
+ }
31
+ export type AlertsDataQuery = Query<AlertsData, unknown, AlertsData, QueryKey>;
32
+ export {};
33
+ //# sourceMappingURL=alerts-queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alerts-queries.d.ts","sourceRoot":"","sources":["../../src/model/alerts-queries.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,KAAK,6BAA6B,GAAG;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,kBAAkB,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACvG,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,kBAAkB,KAAK,6BAA6B,CAAC;CACpF;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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=alerts-queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/alerts-queries.ts"],"sourcesContent":["// Copyright 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 { AlertsData, UnknownSpec } from '@perses-dev/spec';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of an AlertsQuery.\n */\ntype AlertsQueryPluginDependencies = {\n /**\n * Returns a list of variables name this alerts query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running alerts queries.\n * Alerts represent current state, not historical data, so the context\n * does NOT include absoluteTimeRange.\n */\nexport interface AlertsQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getAlertsData: (spec: Spec, ctx: AlertsQueryContext, abortSignal?: AbortSignal) => Promise<AlertsData>;\n dependsOn?: (spec: Spec, ctx: AlertsQueryContext) => AlertsQueryPluginDependencies;\n}\n\n/**\n * Context available to AlertsQuery plugins at runtime.\n * Note: No absoluteTimeRange since alerts represent current state.\n */\nexport interface AlertsQueryContext {\n datasourceStore: DatasourceStore;\n variableState: VariableStateMap;\n}\n\nexport type AlertsDataQuery = Query<AlertsData, unknown, AlertsData, QueryKey>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAoCjC,WAA+E"}
@@ -0,0 +1,28 @@
1
+ import { AbsoluteTimeRange, AnnotationData, UnknownSpec } from '@perses-dev/spec';
2
+ import { DatasourceStore, VariableStateMap } from '../runtime';
3
+ import { Plugin } from './plugin-base';
4
+ /**
5
+ * An object containing all the dependencies of a AnnotationQuery.
6
+ */
7
+ export type AnnotationQueryPluginDependencies = {
8
+ /**
9
+ * Returns a list of variables name this annotation query depends on.
10
+ */
11
+ variables?: string[];
12
+ };
13
+ /**
14
+ * A plugin for running annotation queries.
15
+ */
16
+ export interface AnnotationPlugin<Spec = UnknownSpec> extends Plugin<Spec> {
17
+ getAnnotationData: (spec: Spec, ctx: AnnotationContext, abortSignal?: AbortSignal) => Promise<AnnotationData[]>;
18
+ dependsOn?: (spec: Spec, ctx: AnnotationContext) => AnnotationQueryPluginDependencies;
19
+ }
20
+ /**
21
+ * Context available to AnnotationQuery plugins at runtime.
22
+ */
23
+ export interface AnnotationContext {
24
+ datasourceStore: DatasourceStore;
25
+ absoluteTimeRange: AbsoluteTimeRange;
26
+ variableState: VariableStateMap;
27
+ }
28
+ //# sourceMappingURL=annotations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/model/annotations.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACxE,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAChH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,KAAK,iCAAiC,CAAC;CACvF;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,aAAa,EAAE,gBAAgB,CAAC;CACjC"}
@@ -0,0 +1,17 @@
1
+ // Copyright 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
+ /**
14
+ * Context available to AnnotationQuery plugins at runtime.
15
+ */ export { };
16
+
17
+ //# sourceMappingURL=annotations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/annotations.ts"],"sourcesContent":["// Copyright 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 { AbsoluteTimeRange, AnnotationData, UnknownSpec } from '@perses-dev/spec';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of a AnnotationQuery.\n */\nexport type AnnotationQueryPluginDependencies = {\n /**\n * Returns a list of variables name this annotation query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running annotation queries.\n */\nexport interface AnnotationPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getAnnotationData: (spec: Spec, ctx: AnnotationContext, abortSignal?: AbortSignal) => Promise<AnnotationData[]>;\n dependsOn?: (spec: Spec, ctx: AnnotationContext) => AnnotationQueryPluginDependencies;\n}\n\n/**\n * Context available to AnnotationQuery plugins at runtime.\n */\nexport interface AnnotationContext {\n datasourceStore: DatasourceStore;\n absoluteTimeRange: AbsoluteTimeRange;\n variableState: VariableStateMap;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAwBjC;;CAEC,GACD,WAIC"}
@@ -1,4 +1,4 @@
1
- import { BuiltinVariableDefinition, DatasourceSpec, UnknownSpec } from '@perses-dev/spec';
1
+ import { BuiltinVariableDefinition, UnknownSpec } from '@perses-dev/spec';
2
2
  import { Plugin } from './plugin-base';
3
3
  /**
4
4
  * Plugin that defines options for an external system that Perses talks to for data.
@@ -17,11 +17,4 @@ export interface DatasourceClient {
17
17
  kind?: string;
18
18
  healthCheck?: () => Promise<boolean>;
19
19
  }
20
- /**
21
- * An intermediary type to regroup the name and the spec of a datasource.
22
- */
23
- export interface DatasourceDefinition {
24
- name: string;
25
- spec: DatasourceSpec;
26
- }
27
20
  //# sourceMappingURL=datasource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/model/datasource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,WAAW,EAAE,MAAM,GAAG,OAAO,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IAC1F,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,uBAAuB,KAAK,MAAM,CAAC;IAEvE,6BAA6B,CAAC,EAAE,MAAM,yBAAyB,EAAE,CAAC;CACnE;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAE/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;CACtB"}
1
+ {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/model/datasource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,WAAW,EAAE,MAAM,GAAG,OAAO,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IAC1F,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,uBAAuB,KAAK,MAAM,CAAC;IAEvE,6BAA6B,CAAC,EAAE,MAAM,yBAAyB,EAAE,CAAC;CACnE;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAE/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC"}
@@ -11,7 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  /**
14
- * An intermediary type to regroup the name and the spec of a datasource.
14
+ * Common properties for all clients
15
15
  */ export { };
16
16
 
17
17
  //# sourceMappingURL=datasource.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/datasource.ts"],"sourcesContent":["// Copyright 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 { BuiltinVariableDefinition, DatasourceSpec, UnknownSpec } from '@perses-dev/spec';\nimport { Plugin } from './plugin-base';\n\n/**\n * Plugin that defines options for an external system that Perses talks to for data.\n */\nexport interface DatasourcePlugin<Spec = UnknownSpec, Client = unknown> extends Plugin<Spec> {\n createClient: (spec: Spec, options: DatasourceClientOptions) => Client;\n // Provide builtin variable definitions available on the datasource. Optional\n getBuiltinVariableDefinitions?: () => BuiltinVariableDefinition[];\n}\n\nexport interface DatasourceClientOptions {\n proxyUrl?: string;\n}\n\n/**\n * Common properties for all clients\n */\nexport interface DatasourceClient {\n // TODO: set kind and define healthCheck function\n kind?: string;\n healthCheck?: () => Promise<boolean>;\n}\n\n/**\n * An intermediary type to regroup the name and the spec of a datasource.\n */\nexport interface DatasourceDefinition {\n name: string;\n spec: DatasourceSpec;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA2BjC;;CAEC,GACD,WAGC"}
1
+ {"version":3,"sources":["../../src/model/datasource.ts"],"sourcesContent":["// Copyright 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 { BuiltinVariableDefinition, UnknownSpec } from '@perses-dev/spec';\nimport { Plugin } from './plugin-base';\n\n/**\n * Plugin that defines options for an external system that Perses talks to for data.\n */\nexport interface DatasourcePlugin<Spec = UnknownSpec, Client = unknown> extends Plugin<Spec> {\n createClient: (spec: Spec, options: DatasourceClientOptions) => Client;\n // Provide builtin variable definitions available on the datasource. Optional\n getBuiltinVariableDefinitions?: () => BuiltinVariableDefinition[];\n}\n\nexport interface DatasourceClientOptions {\n proxyUrl?: string;\n}\n\n/**\n * Common properties for all clients\n */\nexport interface DatasourceClient {\n // TODO: set kind and define healthCheck function\n kind?: string;\n healthCheck?: () => Promise<boolean>;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAkBjC;;CAEC,GACD,WAIC"}
@@ -1,3 +1,4 @@
1
+ export * from './annotations';
1
2
  export * from './datasource';
2
3
  export * from './legend';
3
4
  export * from './log-queries';
@@ -11,4 +12,6 @@ export * from './trace-queries';
11
12
  export * from './profile-queries';
12
13
  export * from './variables';
13
14
  export * from './calculations';
15
+ export * from './alerts-queries';
16
+ export * from './silences-queries';
14
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -10,6 +10,7 @@
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 * from './annotations';
13
14
  export * from './datasource';
14
15
  export * from './legend';
15
16
  export * from './log-queries';
@@ -23,5 +24,7 @@ export * from './trace-queries';
23
24
  export * from './profile-queries';
24
25
  export * from './variables';
25
26
  export * from './calculations';
27
+ export * from './alerts-queries';
28
+ export * from './silences-queries';
26
29
 
27
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/index.ts"],"sourcesContent":["// Copyright 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 './datasource';\nexport * from './legend';\nexport * from './log-queries';\nexport * from './log-volume-utils';\nexport * from './panels';\nexport * from './plugins';\nexport * from './plugin-base';\nexport * from './plugin-loading';\nexport * from './time-series-queries';\nexport * from './trace-queries';\nexport * from './profile-queries';\nexport * from './variables';\nexport * from './calculations';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,qBAAqB;AACnC,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,gBAAgB;AAC9B,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,cAAc;AAC5B,cAAc,iBAAiB"}
1
+ {"version":3,"sources":["../../src/model/index.ts"],"sourcesContent":["// Copyright 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 './annotations';\nexport * from './datasource';\nexport * from './legend';\nexport * from './log-queries';\nexport * from './log-volume-utils';\nexport * from './panels';\nexport * from './plugins';\nexport * from './plugin-base';\nexport * from './plugin-loading';\nexport * from './time-series-queries';\nexport * from './trace-queries';\nexport * from './profile-queries';\nexport * from './variables';\nexport * from './calculations';\nexport * from './alerts-queries';\nexport * from './silences-queries';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,qBAAqB;AACnC,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,gBAAgB;AAC9B,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,cAAc;AAC5B,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,qBAAqB"}
@@ -1,5 +1,6 @@
1
1
  import { AbsoluteTimeRange, UnknownSpec, LogData, QueryDefinition } from '@perses-dev/spec';
2
- import { DatasourceStore, Plugin, VariableStateMap } from '@perses-dev/plugin-system';
2
+ import { DatasourceStore, VariableStateMap } from '../runtime';
3
+ import { Plugin } from './plugin-base';
3
4
  export interface LogQueryResult {
4
5
  logs: LogData;
5
6
  timeRange: AbsoluteTimeRange;
@@ -1 +1 @@
1
- {"version":3,"file":"log-queries.d.ts","sourceRoot":"","sources":["../../src/model/log-queries.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEtF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE;QACT,mBAAmB,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,a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AAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,cAAc,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACtE,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACrG,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,KAAK,0BAA0B,CAAC;IAC7E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,KAAK,eAAe,GAAG,IAAI,CAAC;CAClF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/log-queries.ts"],"sourcesContent":["// Copyright 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 { AbsoluteTimeRange, UnknownSpec, LogData, QueryDefinition } from '@perses-dev/spec';\nimport { DatasourceStore, Plugin, VariableStateMap } from '@perses-dev/plugin-system';\n\nexport interface LogQueryResult {\n logs: LogData;\n timeRange: AbsoluteTimeRange;\n metadata?: {\n executedQueryString: string;\n };\n}\n\nexport interface LogQueryContext {\n timeRange: AbsoluteTimeRange;\n variableState: VariableStateMap;\n datasourceStore: DatasourceStore;\n refreshKey: string;\n}\n\ntype LogQueryPluginDependencies = {\n variables?: string[];\n};\n\nexport interface LogQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getLogData: (spec: Spec, ctx: LogQueryContext, abortSignal?: AbortSignal) => Promise<LogQueryResult>;\n dependsOn?: (spec: Spec, ctx: LogQueryContext) => LogQueryPluginDependencies;\n createVolumeQuery?: (spec: Spec, ctx: LogQueryContext) => QueryDefinition | null;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAwBjC,WAIC"}
1
+ {"version":3,"sources":["../../src/model/log-queries.ts"],"sourcesContent":["// Copyright 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 { AbsoluteTimeRange, UnknownSpec, LogData, QueryDefinition } from '@perses-dev/spec';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\nexport interface LogQueryResult {\n logs: LogData;\n timeRange: AbsoluteTimeRange;\n metadata?: {\n executedQueryString: string;\n };\n}\n\nexport interface LogQueryContext {\n timeRange: AbsoluteTimeRange;\n variableState: VariableStateMap;\n datasourceStore: DatasourceStore;\n refreshKey: string;\n}\n\ntype LogQueryPluginDependencies = {\n variables?: string[];\n};\n\nexport interface LogQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getLogData: (spec: Spec, ctx: LogQueryContext, abortSignal?: AbortSignal) => Promise<LogQueryResult>;\n dependsOn?: (spec: Spec, ctx: LogQueryContext) => LogQueryPluginDependencies;\n createVolumeQuery?: (spec: Spec, ctx: LogQueryContext) => QueryDefinition | null;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAyBjC,WAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-loading.d.ts","sourceRoot":"","sources":["../../src/model/plugin-loading.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,mBAAmB,EAAE,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3D,kBAAkB,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,YAAY,CAiBtF"}
1
+ {"version":3,"file":"plugin-loading.d.ts","sourceRoot":"","sources":["../../src/model/plugin-loading.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAA8B,MAAM,WAAW,CAAC;AAE7E;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,mBAAmB,EAAE,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3D,kBAAkB,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,YAAY,CA8BtF"}
@@ -10,24 +10,40 @@
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
+ import { getPluginModuleCompoundKey } from './plugins';
13
14
  /**
14
15
  * A PluginLoader for the common pattern in Perses where we eagerly import a plugin's resource file, and then lazy load
15
16
  * the plugin itself via a dynamic `import()` statement.
16
17
  */ export function dynamicImportPluginLoader(plugins) {
17
- const importMap = new Map(plugins.map((plugin)=>[
18
- plugin.resource,
19
- plugin.importPlugin
20
- ]));
18
+ const importMap = new Map();
19
+ for (const p of plugins){
20
+ const { resource, resource: { kind, metadata: { name, registry, version } }, importPlugin } = p;
21
+ importMap.set(getPluginModuleCompoundKey({
22
+ kind,
23
+ name,
24
+ registry,
25
+ version
26
+ }), {
27
+ resource,
28
+ importPlugin
29
+ });
30
+ }
21
31
  return {
22
32
  async getInstalledPlugins () {
23
- return Promise.resolve(Array.from(importMap.keys()));
33
+ return Promise.resolve(Array.from(importMap.values()).map((v)=>v.resource));
24
34
  },
25
35
  importPluginModule (resource) {
26
- const importFn = importMap.get(resource);
27
- if (importFn === undefined) {
36
+ const { kind, metadata: { name, version, registry } } = resource;
37
+ const { importPlugin } = importMap.get(getPluginModuleCompoundKey({
38
+ kind,
39
+ name,
40
+ registry,
41
+ version
42
+ })) || {};
43
+ if (importPlugin === undefined) {
28
44
  throw new Error('Plugin not found');
29
45
  }
30
- return importFn();
46
+ return importPlugin();
31
47
  }
32
48
  };
33
49
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/plugin-loading.ts"],"sourcesContent":["// Copyright 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 { PluginModuleResource } from './plugins';\n\n/**\n * A component capable of loading the resource/metadata for all available plugins, then loading individual plugins for\n * those resources on-demand.\n */\nexport interface PluginLoader {\n getInstalledPlugins: () => Promise<PluginModuleResource[]>;\n importPluginModule: (resource: PluginModuleResource) => Promise<unknown>;\n}\n\n/**\n * The dynamic import for a single plugin resource.\n */\nexport interface DynamicImportPlugin {\n resource: PluginModuleResource;\n importPlugin(): Promise<unknown>;\n}\n\n/**\n * A PluginLoader for the common pattern in Perses where we eagerly import a plugin's resource file, and then lazy load\n * the plugin itself via a dynamic `import()` statement.\n */\nexport function dynamicImportPluginLoader(plugins: DynamicImportPlugin[]): PluginLoader {\n const importMap: Map<PluginModuleResource, DynamicImportPlugin['importPlugin']> = new Map(\n plugins.map((plugin) => [plugin.resource, plugin.importPlugin])\n );\n\n return {\n async getInstalledPlugins(): Promise<PluginModuleResource[]> {\n return Promise.resolve(Array.from(importMap.keys()));\n },\n importPluginModule(resource): Promise<unknown> {\n const importFn = importMap.get(resource);\n if (importFn === undefined) {\n throw new Error('Plugin not found');\n }\n return importFn();\n },\n };\n}\n"],"names":["dynamicImportPluginLoader","plugins","importMap","Map","map","plugin","resource","importPlugin","getInstalledPlugins","Promise","resolve","Array","from","keys","importPluginModule","importFn","get","undefined","Error"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAqBjC;;;CAGC,GACD,OAAO,SAASA,0BAA0BC,OAA8B;IACtE,MAAMC,YAA4E,IAAIC,IACpFF,QAAQG,GAAG,CAAC,CAACC,SAAW;YAACA,OAAOC,QAAQ;YAAED,OAAOE,YAAY;SAAC;IAGhE,OAAO;QACL,MAAMC;YACJ,OAAOC,QAAQC,OAAO,CAACC,MAAMC,IAAI,CAACV,UAAUW,IAAI;QAClD;QACAC,oBAAmBR,QAAQ;YACzB,MAAMS,WAAWb,UAAUc,GAAG,CAACV;YAC/B,IAAIS,aAAaE,WAAW;gBAC1B,MAAM,IAAIC,MAAM;YAClB;YACA,OAAOH;QACT;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/model/plugin-loading.ts"],"sourcesContent":["// Copyright 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 { PluginModuleResource, getPluginModuleCompoundKey } from './plugins';\n\n/**\n * A component capable of loading the resource/metadata for all available plugins, then loading individual plugins for\n * those resources on-demand.\n */\nexport interface PluginLoader {\n getInstalledPlugins: () => Promise<PluginModuleResource[]>;\n importPluginModule: (resource: PluginModuleResource) => Promise<unknown>;\n}\n\n/**\n * The dynamic import for a single plugin resource.\n */\nexport interface DynamicImportPlugin {\n resource: PluginModuleResource;\n importPlugin(): Promise<unknown>;\n}\n\n/**\n * A PluginLoader for the common pattern in Perses where we eagerly import a plugin's resource file, and then lazy load\n * the plugin itself via a dynamic `import()` statement.\n */\nexport function dynamicImportPluginLoader(plugins: DynamicImportPlugin[]): PluginLoader {\n const importMap: Map<string, { resource: PluginModuleResource; importPlugin: DynamicImportPlugin['importPlugin'] }> =\n new Map();\n for (const p of plugins) {\n const {\n resource,\n resource: {\n kind,\n metadata: { name, registry, version },\n },\n importPlugin,\n } = p;\n importMap.set(getPluginModuleCompoundKey({ kind, name, registry, version }), { resource, importPlugin });\n }\n return {\n async getInstalledPlugins(): Promise<PluginModuleResource[]> {\n return Promise.resolve(Array.from(importMap.values()).map((v) => v.resource));\n },\n importPluginModule(resource): Promise<unknown> {\n const {\n kind,\n metadata: { name, version, registry },\n } = resource;\n const { importPlugin } = importMap.get(getPluginModuleCompoundKey({ kind, name, registry, version })) || {};\n if (importPlugin === undefined) {\n throw new Error('Plugin not found');\n }\n return importPlugin();\n },\n };\n}\n"],"names":["getPluginModuleCompoundKey","dynamicImportPluginLoader","plugins","importMap","Map","p","resource","kind","metadata","name","registry","version","importPlugin","set","getInstalledPlugins","Promise","resolve","Array","from","values","map","v","importPluginModule","get","undefined","Error"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAA+BA,0BAA0B,QAAQ,YAAY;AAmB7E;;;CAGC,GACD,OAAO,SAASC,0BAA0BC,OAA8B;IACtE,MAAMC,YACJ,IAAIC;IACN,KAAK,MAAMC,KAAKH,QAAS;QACvB,MAAM,EACJI,QAAQ,EACRA,UAAU,EACRC,IAAI,EACJC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAE,EACtC,EACDC,YAAY,EACb,GAAGP;QACJF,UAAUU,GAAG,CAACb,2BAA2B;YAAEO;YAAME;YAAMC;YAAUC;QAAQ,IAAI;YAAEL;YAAUM;QAAa;IACxG;IACA,OAAO;QACL,MAAME;YACJ,OAAOC,QAAQC,OAAO,CAACC,MAAMC,IAAI,CAACf,UAAUgB,MAAM,IAAIC,GAAG,CAAC,CAACC,IAAMA,EAAEf,QAAQ;QAC7E;QACAgB,oBAAmBhB,QAAQ;YACzB,MAAM,EACJC,IAAI,EACJC,UAAU,EAAEC,IAAI,EAAEE,OAAO,EAAED,QAAQ,EAAE,EACtC,GAAGJ;YACJ,MAAM,EAAEM,YAAY,EAAE,GAAGT,UAAUoB,GAAG,CAACvB,2BAA2B;gBAAEO;gBAAME;gBAAMC;gBAAUC;YAAQ,OAAO,CAAC;YAC1G,IAAIC,iBAAiBY,WAAW;gBAC9B,MAAM,IAAIC,MAAM;YAClB;YACA,OAAOb;QACT;IACF;AACF"}
@@ -8,6 +8,9 @@ import { ProfileQueryPlugin } from './profile-queries';
8
8
  import { VariablePlugin } from './variables';
9
9
  import { ExplorePlugin } from './explore';
10
10
  import { LogQueryPlugin } from './log-queries';
11
+ import { AnnotationPlugin } from './annotations';
12
+ import { AlertsQueryPlugin } from './alerts-queries';
13
+ import { SilencesQueryPlugin } from './silences-queries';
11
14
  export interface PluginModuleSpec {
12
15
  plugins: PluginMetadata[];
13
16
  }
@@ -19,6 +22,10 @@ export interface PluginMetadataWithModule extends PluginMetadata {
19
22
  */
20
23
  export interface PluginMetadata {
21
24
  kind: PluginType;
25
+ metadata?: {
26
+ version?: string;
27
+ registry?: string;
28
+ };
22
29
  spec: {
23
30
  name: string;
24
31
  display: {
@@ -33,6 +40,7 @@ export interface PluginMetadata {
33
40
  export interface PluginModuleMetadata {
34
41
  name: string;
35
42
  version: string;
43
+ registry?: string;
36
44
  }
37
45
  /**
38
46
  * Information about a module/package that contains plugins.
@@ -55,11 +63,14 @@ export type PluginType = {
55
63
  */
56
64
  export interface SupportedPlugins {
57
65
  Variable: VariablePlugin;
66
+ Annotation: AnnotationPlugin;
58
67
  Panel: PanelPlugin;
59
68
  TimeSeriesQuery: TimeSeriesQueryPlugin;
60
69
  TraceQuery: TraceQueryPlugin;
61
70
  ProfileQuery: ProfileQueryPlugin;
62
71
  LogQuery: LogQueryPlugin;
72
+ AlertsQuery: AlertsQueryPlugin;
73
+ SilencesQuery: SilencesQueryPlugin;
63
74
  Datasource: DatasourcePlugin;
64
75
  Explore: ExplorePlugin;
65
76
  }
@@ -72,5 +83,17 @@ export type PluginImplementation<Type extends PluginType> = SupportedPlugins[Typ
72
83
  */
73
84
  type PluginKinds = Partial<Record<PluginType, string>>;
74
85
  export type DefaultPluginKinds = Required<Pick<PluginKinds, 'TimeSeriesQuery'>> & Omit<PluginKinds, 'TimeSeriesQuery'>;
86
+ export type PluginCompoundKey<T extends PluginType> = {
87
+ kind: T;
88
+ name: string;
89
+ registry?: string;
90
+ version?: string;
91
+ };
92
+ export declare function getPluginModuleCompoundKey(compoundKey: {
93
+ kind: string;
94
+ name: string;
95
+ registry?: string;
96
+ version?: string;
97
+ }): string;
75
98
  export {};
76
99
  //# sourceMappingURL=plugins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/model/plugins.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC9D,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MA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,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,WAAW,EAAE;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAGT"}
@@ -10,6 +10,9 @@
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
+ export function getPluginModuleCompoundKey(compoundKey) {
14
+ const { kind, name, registry, version } = compoundKey;
15
+ return `${kind}:${name}:${registry ?? ''}:${version ?? ''}`;
16
+ }
14
17
 
15
18
  //# sourceMappingURL=plugins.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/plugins.ts"],"sourcesContent":["// Copyright 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 } from '@perses-dev/spec';\nimport { DatasourcePlugin } from './datasource';\nimport { PanelPlugin } from './panels';\nimport { Plugin } from './plugin-base';\nimport { TimeSeriesQueryPlugin } from './time-series-queries';\nimport { TraceQueryPlugin } from './trace-queries';\nimport { ProfileQueryPlugin } from './profile-queries';\nimport { VariablePlugin } from './variables';\nimport { ExplorePlugin } from './explore';\nimport { LogQueryPlugin } from './log-queries';\n\nexport interface PluginModuleSpec {\n plugins: PluginMetadata[];\n}\n\nexport interface PluginMetadataWithModule extends PluginMetadata {\n module: PluginModuleMetadata;\n}\n\n/**\n * Metadata about an individual plugin that's part of a PluginModule.\n */\nexport interface PluginMetadata {\n kind: PluginType;\n spec: {\n name: string;\n display: {\n name: string;\n description?: string;\n };\n };\n}\n\n/**\n * Metadata about a module/package that contains plugins.\n */\nexport interface PluginModuleMetadata {\n name: string;\n version: string;\n}\n\n/**\n * Information about a module/package that contains plugins.\n */\nexport interface PluginModuleResource {\n kind: 'PluginModule';\n metadata: PluginModuleMetadata;\n spec: PluginModuleSpec;\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 ProfileQuery: ProfileQueryPlugin;\n LogQuery: LogQueryPlugin;\n Datasource: DatasourcePlugin;\n Explore: ExplorePlugin;\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,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAqFjC,WAAuH"}
1
+ {"version":3,"sources":["../../src/model/plugins.ts"],"sourcesContent":["// Copyright 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 } from '@perses-dev/spec';\nimport { DatasourcePlugin } from './datasource';\nimport { PanelPlugin } from './panels';\nimport { Plugin } from './plugin-base';\nimport { TimeSeriesQueryPlugin } from './time-series-queries';\nimport { TraceQueryPlugin } from './trace-queries';\nimport { ProfileQueryPlugin } from './profile-queries';\nimport { VariablePlugin } from './variables';\nimport { ExplorePlugin } from './explore';\nimport { LogQueryPlugin } from './log-queries';\nimport { AnnotationPlugin } from './annotations';\nimport { AlertsQueryPlugin } from './alerts-queries';\nimport { SilencesQueryPlugin } from './silences-queries';\n\nexport interface PluginModuleSpec {\n plugins: PluginMetadata[];\n}\n\nexport interface PluginMetadataWithModule extends PluginMetadata {\n module: PluginModuleMetadata;\n}\n\n/**\n * Metadata about an individual plugin that's part of a PluginModule.\n */\nexport interface PluginMetadata {\n kind: PluginType;\n metadata?: {\n version?: string;\n registry?: string;\n };\n spec: {\n name: string;\n display: {\n name: string;\n description?: string;\n };\n };\n}\n\n/**\n * Metadata about a module/package that contains plugins.\n */\nexport interface PluginModuleMetadata {\n name: string;\n version: string;\n registry?: string;\n}\n\n/**\n * Information about a module/package that contains plugins.\n */\nexport interface PluginModuleResource {\n kind: 'PluginModule';\n metadata: PluginModuleMetadata;\n spec: PluginModuleSpec;\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 Annotation: AnnotationPlugin;\n Panel: PanelPlugin;\n TimeSeriesQuery: TimeSeriesQueryPlugin;\n TraceQuery: TraceQueryPlugin;\n ProfileQuery: ProfileQueryPlugin;\n LogQuery: LogQueryPlugin;\n AlertsQuery: AlertsQueryPlugin;\n SilencesQuery: SilencesQueryPlugin;\n Datasource: DatasourcePlugin;\n Explore: ExplorePlugin;\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\nexport type PluginCompoundKey<T extends PluginType> = {\n kind: T;\n name: string;\n registry?: string;\n version?: string;\n};\n\nexport function getPluginModuleCompoundKey(compoundKey: {\n kind: string;\n name: string;\n registry?: string;\n version?: string;\n}): string {\n const { kind, name, registry, version } = compoundKey;\n return `${kind}:${name}:${registry ?? ''}:${version ?? ''}`;\n}\n"],"names":["getPluginModuleCompoundKey","compoundKey","kind","name","registry","version"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAyGjC,OAAO,SAASA,2BAA2BC,WAK1C;IACC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGJ;IAC1C,OAAO,GAAGC,KAAK,CAAC,EAAEC,KAAK,CAAC,EAAEC,YAAY,GAAG,CAAC,EAAEC,WAAW,IAAI;AAC7D"}
@@ -0,0 +1,33 @@
1
+ import { Query, QueryKey } from '@tanstack/react-query';
2
+ import { SilencesData, UnknownSpec } from '@perses-dev/spec';
3
+ import { DatasourceStore, VariableStateMap } from '../runtime';
4
+ import { Plugin } from './plugin-base';
5
+ /**
6
+ * An object containing all the dependencies of a SilencesQuery.
7
+ */
8
+ type SilencesQueryPluginDependencies = {
9
+ /**
10
+ * Returns a list of variables name this silences query depends on.
11
+ */
12
+ variables?: string[];
13
+ };
14
+ /**
15
+ * A plugin for running silences queries.
16
+ * Silences represent current state, not historical data, so the context
17
+ * does NOT include absoluteTimeRange.
18
+ */
19
+ export interface SilencesQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {
20
+ getSilencesData: (spec: Spec, ctx: SilencesQueryContext, abortSignal?: AbortSignal) => Promise<SilencesData>;
21
+ dependsOn?: (spec: Spec, ctx: SilencesQueryContext) => SilencesQueryPluginDependencies;
22
+ }
23
+ /**
24
+ * Context available to SilencesQuery plugins at runtime.
25
+ * Note: No absoluteTimeRange since silences represent current state.
26
+ */
27
+ export interface SilencesQueryContext {
28
+ datasourceStore: DatasourceStore;
29
+ variableState: VariableStateMap;
30
+ }
31
+ export type SilencesDataQuery = Query<SilencesData, unknown, SilencesData, QueryKey>;
32
+ export {};
33
+ //# sourceMappingURL=silences-queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"silences-queries.d.ts","sourceRoot":"","sources":["../../src/model/silences-queries.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,KAAK,+BAA+B,GAAG;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,mBAAmB,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IAC3E,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7G,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,KAAK,+BAA+B,CAAC;CACxF;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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=silences-queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/silences-queries.ts"],"sourcesContent":["// Copyright 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 { SilencesData, UnknownSpec } from '@perses-dev/spec';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of a SilencesQuery.\n */\ntype SilencesQueryPluginDependencies = {\n /**\n * Returns a list of variables name this silences query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running silences queries.\n * Silences represent current state, not historical data, so the context\n * does NOT include absoluteTimeRange.\n */\nexport interface SilencesQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getSilencesData: (spec: Spec, ctx: SilencesQueryContext, abortSignal?: AbortSignal) => Promise<SilencesData>;\n dependsOn?: (spec: Spec, ctx: SilencesQueryContext) => SilencesQueryPluginDependencies;\n}\n\n/**\n * Context available to SilencesQuery plugins at runtime.\n * Note: No absoluteTimeRange since silences represent current state.\n */\nexport interface SilencesQueryContext {\n datasourceStore: DatasourceStore;\n variableState: VariableStateMap;\n}\n\nexport type SilencesDataQuery = Query<SilencesData, unknown, SilencesData, QueryKey>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAoCjC,WAAqF"}
@@ -5,7 +5,7 @@ import { Plugin } from './plugin-base';
5
5
  /**
6
6
  * An object containing all the dependencies of a TraceQuery.
7
7
  */
8
- type TraceQueryQueryPluginDependencies = {
8
+ export type TraceQueryPluginDependencies = {
9
9
  /**
10
10
  * Returns a list of variables name this trace query depends on.
11
11
  */
@@ -16,7 +16,7 @@ type TraceQueryQueryPluginDependencies = {
16
16
  */
17
17
  export interface TraceQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {
18
18
  getTraceData: (spec: Spec, ctx: TraceQueryContext, abortSignal?: AbortSignal) => Promise<TraceData>;
19
- dependsOn?: (spec: Spec, ctx: TraceQueryContext) => TraceQueryQueryPluginDependencies;
19
+ dependsOn?: (spec: Spec, ctx: TraceQueryContext) => TraceQueryPluginDependencies;
20
20
  }
21
21
  /**
22
22
  * Context available to TraceQuery plugins at runtime.
@@ -27,5 +27,4 @@ export interface TraceQueryContext {
27
27
  variableState: VariableStateMap;
28
28
  }
29
29
  export type TraceDataQuery = Query<TraceData, unknown, TraceData, QueryKey>;
30
- export {};
31
30
  //# sourceMappingURL=trace-queries.d.ts.map
@@ -1 +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,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,MAAM,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,gBAAgB,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACxE,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACpG,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,KAAK,iCAAiC,CAAC;CACvF;AAED;;GAEG;AAC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E,QAAQ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/trace-queries.ts"],"sourcesContent":["// Copyright 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/spec';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of a TraceQuery.\n */\ntype TraceQueryQueryPluginDependencies = {\n /**\n * Returns a list of variables name this trace query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running trace queries.\n */\nexport interface TraceQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getTraceData: (spec: Spec, ctx: TraceQueryContext, abortSignal?: AbortSignal) => Promise<TraceData>;\n dependsOn?: (spec: Spec, ctx: TraceQueryContext) => TraceQueryQueryPluginDependencies;\n}\n\n/**\n * Context available to TraceQuery plugins at runtime.\n */\nexport interface TraceQueryContext {\n datasourceStore: DatasourceStore;\n absoluteTimeRange?: AbsoluteTimeRange;\n variableState: VariableStateMap;\n}\n\nexport type TraceDataQuery = Query<TraceData, unknown, TraceData, QueryKey>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAkCjC,WAA4E"}
1
+ {"version":3,"sources":["../../src/model/trace-queries.ts"],"sourcesContent":["// Copyright 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/spec';\nimport { DatasourceStore, VariableStateMap } from '../runtime';\nimport { Plugin } from './plugin-base';\n\n/**\n * An object containing all the dependencies of a TraceQuery.\n */\nexport type TraceQueryPluginDependencies = {\n /**\n * Returns a list of variables name this trace query depends on.\n */\n variables?: string[];\n};\n\n/**\n * A plugin for running trace queries.\n */\nexport interface TraceQueryPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n getTraceData: (spec: Spec, ctx: TraceQueryContext, abortSignal?: AbortSignal) => Promise<TraceData>;\n dependsOn?: (spec: Spec, ctx: TraceQueryContext) => TraceQueryPluginDependencies;\n}\n\n/**\n * Context available to TraceQuery plugins at runtime.\n */\nexport interface TraceQueryContext {\n datasourceStore: DatasourceStore;\n absoluteTimeRange?: AbsoluteTimeRange;\n variableState: VariableStateMap;\n}\n\nexport type TraceDataQuery = Query<TraceData, unknown, TraceData, QueryKey>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAkCjC,WAA4E"}
@@ -1,5 +1,7 @@
1
1
  export interface PersesPlugin {
2
2
  name: string;
3
+ version?: string;
4
+ registry?: string;
3
5
  moduleName: string;
4
6
  baseURL?: string;
5
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PersesPlugin.types.d.ts","sourceRoot":"","sources":["../../src/remote/PersesPlugin.types.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"PersesPlugin.types.d.ts","sourceRoot":"","sources":["../../src/remote/PersesPlugin.types.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/remote/PersesPlugin.types.ts"],"sourcesContent":["// Copyright 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 interface PersesPlugin {\n name: string;\n moduleName: string;\n baseURL?: string;\n}\n\nexport type RemotePluginModule = Record<string, unknown>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAQjC,WAAyD"}
1
+ {"version":3,"sources":["../../src/remote/PersesPlugin.types.ts"],"sourcesContent":["// Copyright 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 interface PersesPlugin {\n name: string;\n version?: string;\n registry?: string;\n moduleName: string;\n baseURL?: string;\n}\n\nexport type RemotePluginModule = Record<string, unknown>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAUjC,WAAyD"}