@perses-dev/plugin-system 0.52.0-beta.2 → 0.52.0-beta.3
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.
- package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -0
- package/dist/{src/components/MetricLabelInput → components/CalculationSelector}/index.js.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -0
- package/dist/{src/components/MultiQueryEditor → components/DatasourceEditorForm}/index.js.map +1 -1
- package/dist/components/DatasourceSelect.js.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -0
- package/dist/components/HTTPSettingsEditor/index.js.map +1 -0
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -0
- package/dist/{src/components/PanelSpecEditor → components/LegendOptionsEditor}/index.js.map +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.js.map +1 -0
- package/dist/components/MetricLabelInput/index.js.map +1 -0
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -0
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -0
- package/dist/{src/components/PluginRegistry → components/MultiQueryEditor}/index.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -0
- package/dist/{src/runtime/DataQueriesProvider → components/OptionsEditorRadios}/index.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -0
- package/dist/{src/components/HTTPSettingsEditor → components/OptionsEditorTabPanel}/index.js.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -0
- package/dist/{src/runtime/TimeRangeProvider → components/OptionsEditorTabs}/index.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -0
- package/dist/components/PanelSpecEditor/index.js.map +1 -0
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -0
- package/dist/{src/components/Variables → components/PluginEditor}/index.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -0
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -0
- package/dist/components/PluginKindSelect/index.js.map +1 -0
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -0
- package/dist/components/PluginRegistry/index.js.map +1 -0
- package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -0
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -0
- package/dist/components/PluginSpecEditor/index.js.map +1 -0
- package/dist/components/ProjectSelect.js.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -0
- package/dist/components/TimeRangeControls/index.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -0
- package/dist/components/Variables/index.js.map +1 -0
- package/dist/components/Variables/variable-model.js.map +1 -0
- package/dist/components/index.js.map +1 -0
- package/dist/{src/remote → constants}/index.js.map +1 -1
- package/dist/constants/user-interface-text.js.map +1 -0
- package/dist/context/ProjectStoreProvider.js.map +1 -0
- package/dist/context/ValidationProvider.js.map +1 -0
- package/dist/{src/test → context}/index.js.map +1 -1
- package/dist/context/query-params.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/model/datasource.js.map +1 -0
- package/dist/model/explore.js.map +1 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/legend.js.map +1 -0
- package/dist/model/panels.js.map +1 -0
- package/dist/model/plugin-base.js.map +1 -0
- package/dist/model/plugin-loading.js.map +1 -0
- package/dist/model/plugins.js.map +1 -0
- package/dist/model/profile-queries.js.map +1 -0
- package/dist/model/time-series-queries.js.map +1 -0
- package/dist/model/trace-queries.js.map +1 -0
- package/dist/model/variables.js.map +1 -0
- package/dist/remote/PersesPlugin.types.js.map +1 -0
- package/dist/remote/PluginLoaderComponent.js.map +1 -0
- package/dist/remote/PluginRuntime.js.map +1 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/remotePluginLoader.js.map +1 -0
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -0
- package/dist/runtime/DataQueriesProvider/index.js.map +1 -0
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -0
- package/dist/runtime/QueryCountProvider.js.map +1 -0
- package/dist/runtime/RouterProvider.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/index.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -0
- package/dist/runtime/UsageMetricsProvider.js.map +1 -0
- package/dist/runtime/builtin-variables.js.map +1 -0
- package/dist/runtime/datasources.js.map +1 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/plugin-registry.js.map +1 -0
- package/dist/runtime/profile-queries.js.map +1 -0
- package/dist/runtime/time-series-queries.js.map +1 -0
- package/dist/runtime/trace-queries.js.map +1 -0
- package/dist/runtime/utils.js.map +1 -0
- package/dist/runtime/variables.js.map +1 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/mock-data.js.map +1 -0
- package/dist/test/render-hook.js.map +1 -0
- package/dist/test/render.js.map +1 -0
- package/dist/test/setup-tests.js.map +1 -0
- package/dist/test/test-plugins/bert/index.js.map +1 -0
- package/dist/test/test-plugins/ernie/index.js.map +1 -0
- package/dist/test/test-plugins/index.js.map +1 -0
- package/dist/test/utils.js.map +1 -0
- package/dist/{src/context → test-utils}/index.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js.map +1 -0
- package/dist/utils/action.js.map +1 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/variables.js.map +1 -0
- package/package.json +5 -5
- package/dist/src/components/CalculationSelector/CalculationSelector.js.map +0 -1
- package/dist/src/components/CalculationSelector/index.js.map +0 -1
- package/dist/src/components/DatasourceEditorForm/DatasourceEditorForm.js.map +0 -1
- package/dist/src/components/DatasourceEditorForm/index.js.map +0 -1
- package/dist/src/components/DatasourceSelect.js.map +0 -1
- package/dist/src/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +0 -1
- package/dist/src/components/LegendOptionsEditor/LegendOptionsEditor.js.map +0 -1
- package/dist/src/components/LegendOptionsEditor/index.js.map +0 -1
- package/dist/src/components/MetricLabelInput/MetricLabelInput.js.map +0 -1
- package/dist/src/components/MultiQueryEditor/MultiQueryEditor.js.map +0 -1
- package/dist/src/components/MultiQueryEditor/QueryEditorContainer.js.map +0 -1
- package/dist/src/components/OptionsEditorRadios/OptionsEditorRadios.js.map +0 -1
- package/dist/src/components/OptionsEditorRadios/index.js.map +0 -1
- package/dist/src/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +0 -1
- package/dist/src/components/OptionsEditorTabPanel/index.js.map +0 -1
- package/dist/src/components/OptionsEditorTabs/OptionsEditorTabs.js.map +0 -1
- package/dist/src/components/OptionsEditorTabs/index.js.map +0 -1
- package/dist/src/components/PanelSpecEditor/PanelSpecEditor.js.map +0 -1
- package/dist/src/components/PluginEditor/PluginEditor.js.map +0 -1
- package/dist/src/components/PluginEditor/index.js.map +0 -1
- package/dist/src/components/PluginEditor/plugin-editor-api.js.map +0 -1
- package/dist/src/components/PluginKindSelect/PluginKindSelect.js.map +0 -1
- package/dist/src/components/PluginKindSelect/index.js.map +0 -1
- package/dist/src/components/PluginRegistry/PluginRegistry.js.map +0 -1
- package/dist/src/components/PluginRegistry/plugin-indexes.js.map +0 -1
- package/dist/src/components/PluginSpecEditor/PluginSpecEditor.js.map +0 -1
- package/dist/src/components/PluginSpecEditor/index.js.map +0 -1
- package/dist/src/components/ProjectSelect.js.map +0 -1
- package/dist/src/components/TimeRangeControls/TimeRangeControls.js.map +0 -1
- package/dist/src/components/TimeRangeControls/index.js.map +0 -1
- package/dist/src/components/Variables/VariableEditorForm/VariableEditorForm.js.map +0 -1
- package/dist/src/components/Variables/VariableEditorForm/VariablePreview.js.map +0 -1
- package/dist/src/components/Variables/VariableEditorForm/index.js.map +0 -1
- package/dist/src/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +0 -1
- package/dist/src/components/Variables/variable-model.js.map +0 -1
- package/dist/src/components/index.js.map +0 -1
- package/dist/src/constants/index.js.map +0 -1
- package/dist/src/constants/user-interface-text.js.map +0 -1
- package/dist/src/context/ProjectStoreProvider.js.map +0 -1
- package/dist/src/context/ValidationProvider.js.map +0 -1
- package/dist/src/context/query-params.js.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/model/datasource.js.map +0 -1
- package/dist/src/model/explore.js.map +0 -1
- package/dist/src/model/index.js.map +0 -1
- package/dist/src/model/legend.js.map +0 -1
- package/dist/src/model/panels.js.map +0 -1
- package/dist/src/model/plugin-base.js.map +0 -1
- package/dist/src/model/plugin-loading.js.map +0 -1
- package/dist/src/model/plugins.js.map +0 -1
- package/dist/src/model/profile-queries.js.map +0 -1
- package/dist/src/model/time-series-queries.js.map +0 -1
- package/dist/src/model/trace-queries.js.map +0 -1
- package/dist/src/model/variables.js.map +0 -1
- package/dist/src/remote/PersesPlugin.types.js.map +0 -1
- package/dist/src/remote/PluginLoaderComponent.js.map +0 -1
- package/dist/src/remote/PluginRuntime.js.map +0 -1
- package/dist/src/remote/remotePluginLoader.js.map +0 -1
- package/dist/src/runtime/DataQueriesProvider/DataQueriesProvider.js.map +0 -1
- package/dist/src/runtime/DataQueriesProvider/model.js.map +0 -1
- package/dist/src/runtime/QueryCountProvider.js.map +0 -1
- package/dist/src/runtime/RouterProvider.js.map +0 -1
- package/dist/src/runtime/TimeRangeProvider/TimeRangeProvider.js.map +0 -1
- package/dist/src/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +0 -1
- package/dist/src/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +0 -1
- package/dist/src/runtime/TimeRangeProvider/query-params.js.map +0 -1
- package/dist/src/runtime/TimeRangeProvider/refresh-interval.js.map +0 -1
- package/dist/src/runtime/UsageMetricsProvider.js.map +0 -1
- package/dist/src/runtime/builtin-variables.js.map +0 -1
- package/dist/src/runtime/datasources.js.map +0 -1
- package/dist/src/runtime/index.js.map +0 -1
- package/dist/src/runtime/plugin-registry.js.map +0 -1
- package/dist/src/runtime/profile-queries.js.map +0 -1
- package/dist/src/runtime/time-series-queries.js.map +0 -1
- package/dist/src/runtime/trace-queries.js.map +0 -1
- package/dist/src/runtime/utils.js.map +0 -1
- package/dist/src/runtime/variables.js.map +0 -1
- package/dist/src/test/mock-data.js.map +0 -1
- package/dist/src/test/render-hook.js.map +0 -1
- package/dist/src/test/render.js.map +0 -1
- package/dist/src/test/setup-tests.js.map +0 -1
- package/dist/src/test/test-plugins/bert/index.js.map +0 -1
- package/dist/src/test/test-plugins/ernie/index.js.map +0 -1
- package/dist/src/test/test-plugins/index.js.map +0 -1
- package/dist/src/test/utils.js.map +0 -1
- package/dist/src/test-utils/index.js.map +0 -1
- package/dist/src/test-utils/mock-plugin-registry.js.map +0 -1
- package/dist/src/utils/action.js.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/variables.js.map +0 -1
- /package/dist/cjs/{src/components → components}/CalculationSelector/CalculationSelector.js +0 -0
- /package/dist/cjs/{src/components → components}/CalculationSelector/index.js +0 -0
- /package/dist/cjs/{src/components → components}/DatasourceEditorForm/DatasourceEditorForm.js +0 -0
- /package/dist/cjs/{src/components → components}/DatasourceEditorForm/index.js +0 -0
- /package/dist/cjs/{src/components → components}/DatasourceSelect.js +0 -0
- /package/dist/cjs/{src/components → components}/HTTPSettingsEditor/HTTPSettingsEditor.js +0 -0
- /package/dist/cjs/{src/components → components}/HTTPSettingsEditor/index.js +0 -0
- /package/dist/cjs/{src/components → components}/LegendOptionsEditor/LegendOptionsEditor.js +0 -0
- /package/dist/cjs/{src/components → components}/LegendOptionsEditor/index.js +0 -0
- /package/dist/cjs/{src/components → components}/MetricLabelInput/MetricLabelInput.js +0 -0
- /package/dist/cjs/{src/components → components}/MetricLabelInput/index.js +0 -0
- /package/dist/cjs/{src/components → components}/MultiQueryEditor/MultiQueryEditor.js +0 -0
- /package/dist/cjs/{src/components → components}/MultiQueryEditor/QueryEditorContainer.js +0 -0
- /package/dist/cjs/{src/components → components}/MultiQueryEditor/index.js +0 -0
- /package/dist/cjs/{src/components → components}/OptionsEditorRadios/OptionsEditorRadios.js +0 -0
- /package/dist/cjs/{src/components → components}/OptionsEditorRadios/index.js +0 -0
- /package/dist/cjs/{src/components → components}/OptionsEditorTabPanel/OptionsEditorTabPanel.js +0 -0
- /package/dist/cjs/{src/components → components}/OptionsEditorTabPanel/index.js +0 -0
- /package/dist/cjs/{src/components → components}/OptionsEditorTabs/OptionsEditorTabs.js +0 -0
- /package/dist/cjs/{src/components → components}/OptionsEditorTabs/index.js +0 -0
- /package/dist/cjs/{src/components → components}/PanelSpecEditor/PanelSpecEditor.js +0 -0
- /package/dist/cjs/{src/components → components}/PanelSpecEditor/index.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginEditor/PluginEditor.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginEditor/index.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginEditor/plugin-editor-api.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginKindSelect/PluginKindSelect.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginKindSelect/index.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginRegistry/PluginRegistry.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginRegistry/index.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginRegistry/plugin-indexes.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginSpecEditor/PluginSpecEditor.js +0 -0
- /package/dist/cjs/{src/components → components}/PluginSpecEditor/index.js +0 -0
- /package/dist/cjs/{src/components → components}/ProjectSelect.js +0 -0
- /package/dist/cjs/{src/components → components}/TimeRangeControls/TimeRangeControls.js +0 -0
- /package/dist/cjs/{src/components → components}/TimeRangeControls/index.js +0 -0
- /package/dist/cjs/{src/components → components}/Variables/VariableEditorForm/VariableEditorForm.js +0 -0
- /package/dist/cjs/{src/components → components}/Variables/VariableEditorForm/VariablePreview.js +0 -0
- /package/dist/cjs/{src/components → components}/Variables/VariableEditorForm/index.js +0 -0
- /package/dist/cjs/{src/components → components}/Variables/VariableEditorForm/variable-editor-form-model.js +0 -0
- /package/dist/cjs/{src/components → components}/Variables/index.js +0 -0
- /package/dist/cjs/{src/components → components}/Variables/variable-model.js +0 -0
- /package/dist/cjs/{src/components → components}/index.js +0 -0
- /package/dist/cjs/{src/constants → constants}/index.js +0 -0
- /package/dist/cjs/{src/constants → constants}/user-interface-text.js +0 -0
- /package/dist/cjs/{src/context → context}/ProjectStoreProvider.js +0 -0
- /package/dist/cjs/{src/context → context}/ValidationProvider.js +0 -0
- /package/dist/cjs/{src/context → context}/index.js +0 -0
- /package/dist/cjs/{src/context → context}/query-params.js +0 -0
- /package/dist/cjs/{src/index.js → index.js} +0 -0
- /package/dist/cjs/{src/model → model}/datasource.js +0 -0
- /package/dist/cjs/{src/model → model}/explore.js +0 -0
- /package/dist/cjs/{src/model → model}/index.js +0 -0
- /package/dist/cjs/{src/model → model}/legend.js +0 -0
- /package/dist/cjs/{src/model → model}/panels.js +0 -0
- /package/dist/cjs/{src/model → model}/plugin-base.js +0 -0
- /package/dist/cjs/{src/model → model}/plugin-loading.js +0 -0
- /package/dist/cjs/{src/model → model}/plugins.js +0 -0
- /package/dist/cjs/{src/model → model}/profile-queries.js +0 -0
- /package/dist/cjs/{src/model → model}/time-series-queries.js +0 -0
- /package/dist/cjs/{src/model → model}/trace-queries.js +0 -0
- /package/dist/cjs/{src/model → model}/variables.js +0 -0
- /package/dist/cjs/{src/remote → remote}/PersesPlugin.types.js +0 -0
- /package/dist/cjs/{src/remote → remote}/PluginLoaderComponent.js +0 -0
- /package/dist/cjs/{src/remote → remote}/PluginRuntime.js +0 -0
- /package/dist/cjs/{src/remote → remote}/index.js +0 -0
- /package/dist/cjs/{src/remote → remote}/remotePluginLoader.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/DataQueriesProvider/DataQueriesProvider.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/DataQueriesProvider/index.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/DataQueriesProvider/model.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/QueryCountProvider.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/RouterProvider.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/TimeRangeProvider.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/TimeRangeSettingsProvider.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/index.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/query-params.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/refresh-interval.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/UsageMetricsProvider.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/builtin-variables.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/datasources.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/index.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/plugin-registry.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/profile-queries.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/time-series-queries.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/trace-queries.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/utils.js +0 -0
- /package/dist/cjs/{src/runtime → runtime}/variables.js +0 -0
- /package/dist/cjs/{src/test → test}/index.js +0 -0
- /package/dist/cjs/{src/test → test}/mock-data.js +0 -0
- /package/dist/cjs/{src/test → test}/render-hook.js +0 -0
- /package/dist/cjs/{src/test → test}/render.js +0 -0
- /package/dist/cjs/{src/test → test}/setup-tests.js +0 -0
- /package/dist/cjs/{src/test → test}/test-plugins/bert/index.js +0 -0
- /package/dist/cjs/{src/test → test}/test-plugins/ernie/index.js +0 -0
- /package/dist/cjs/{src/test → test}/test-plugins/index.js +0 -0
- /package/dist/cjs/{src/test → test}/utils.js +0 -0
- /package/dist/cjs/{src/test-utils → test-utils}/index.js +0 -0
- /package/dist/cjs/{src/test-utils → test-utils}/mock-plugin-registry.js +0 -0
- /package/dist/cjs/{src/utils → utils}/action.js +0 -0
- /package/dist/cjs/{src/utils → utils}/index.js +0 -0
- /package/dist/cjs/{src/utils → utils}/variables.js +0 -0
- /package/dist/{src/components → components}/CalculationSelector/CalculationSelector.js +0 -0
- /package/dist/{src/components → components}/CalculationSelector/index.js +0 -0
- /package/dist/{src/components → components}/DatasourceEditorForm/DatasourceEditorForm.js +0 -0
- /package/dist/{src/components → components}/DatasourceEditorForm/index.js +0 -0
- /package/dist/{src/components → components}/DatasourceSelect.js +0 -0
- /package/dist/{src/components → components}/HTTPSettingsEditor/HTTPSettingsEditor.js +0 -0
- /package/dist/{src/components → components}/HTTPSettingsEditor/index.js +0 -0
- /package/dist/{src/components → components}/LegendOptionsEditor/LegendOptionsEditor.js +0 -0
- /package/dist/{src/components → components}/LegendOptionsEditor/index.js +0 -0
- /package/dist/{src/components → components}/MetricLabelInput/MetricLabelInput.js +0 -0
- /package/dist/{src/components → components}/MetricLabelInput/index.js +0 -0
- /package/dist/{src/components → components}/MultiQueryEditor/MultiQueryEditor.js +0 -0
- /package/dist/{src/components → components}/MultiQueryEditor/QueryEditorContainer.js +0 -0
- /package/dist/{src/components → components}/MultiQueryEditor/index.js +0 -0
- /package/dist/{src/components → components}/OptionsEditorRadios/OptionsEditorRadios.js +0 -0
- /package/dist/{src/components → components}/OptionsEditorRadios/index.js +0 -0
- /package/dist/{src/components → components}/OptionsEditorTabPanel/OptionsEditorTabPanel.js +0 -0
- /package/dist/{src/components → components}/OptionsEditorTabPanel/index.js +0 -0
- /package/dist/{src/components → components}/OptionsEditorTabs/OptionsEditorTabs.js +0 -0
- /package/dist/{src/components → components}/OptionsEditorTabs/index.js +0 -0
- /package/dist/{src/components → components}/PanelSpecEditor/PanelSpecEditor.js +0 -0
- /package/dist/{src/components → components}/PanelSpecEditor/index.js +0 -0
- /package/dist/{src/components → components}/PluginEditor/PluginEditor.js +0 -0
- /package/dist/{src/components → components}/PluginEditor/index.js +0 -0
- /package/dist/{src/components → components}/PluginEditor/plugin-editor-api.js +0 -0
- /package/dist/{src/components → components}/PluginKindSelect/PluginKindSelect.js +0 -0
- /package/dist/{src/components → components}/PluginKindSelect/index.js +0 -0
- /package/dist/{src/components → components}/PluginRegistry/PluginRegistry.js +0 -0
- /package/dist/{src/components → components}/PluginRegistry/index.js +0 -0
- /package/dist/{src/components → components}/PluginRegistry/plugin-indexes.js +0 -0
- /package/dist/{src/components → components}/PluginSpecEditor/PluginSpecEditor.js +0 -0
- /package/dist/{src/components → components}/PluginSpecEditor/index.js +0 -0
- /package/dist/{src/components → components}/ProjectSelect.js +0 -0
- /package/dist/{src/components → components}/TimeRangeControls/TimeRangeControls.js +0 -0
- /package/dist/{src/components → components}/TimeRangeControls/index.js +0 -0
- /package/dist/{src/components → components}/Variables/VariableEditorForm/VariableEditorForm.js +0 -0
- /package/dist/{src/components → components}/Variables/VariableEditorForm/VariablePreview.js +0 -0
- /package/dist/{src/components → components}/Variables/VariableEditorForm/index.js +0 -0
- /package/dist/{src/components → components}/Variables/VariableEditorForm/variable-editor-form-model.js +0 -0
- /package/dist/{src/components → components}/Variables/index.js +0 -0
- /package/dist/{src/components → components}/Variables/variable-model.js +0 -0
- /package/dist/{src/components → components}/index.js +0 -0
- /package/dist/{src/constants → constants}/index.js +0 -0
- /package/dist/{src/constants → constants}/user-interface-text.js +0 -0
- /package/dist/{src/context → context}/ProjectStoreProvider.js +0 -0
- /package/dist/{src/context → context}/ValidationProvider.js +0 -0
- /package/dist/{src/context → context}/index.js +0 -0
- /package/dist/{src/context → context}/query-params.js +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/model → model}/datasource.js +0 -0
- /package/dist/{src/model → model}/explore.js +0 -0
- /package/dist/{src/model → model}/index.js +0 -0
- /package/dist/{src/model → model}/legend.js +0 -0
- /package/dist/{src/model → model}/panels.js +0 -0
- /package/dist/{src/model → model}/plugin-base.js +0 -0
- /package/dist/{src/model → model}/plugin-loading.js +0 -0
- /package/dist/{src/model → model}/plugins.js +0 -0
- /package/dist/{src/model → model}/profile-queries.js +0 -0
- /package/dist/{src/model → model}/time-series-queries.js +0 -0
- /package/dist/{src/model → model}/trace-queries.js +0 -0
- /package/dist/{src/model → model}/variables.js +0 -0
- /package/dist/{src/remote → remote}/PersesPlugin.types.js +0 -0
- /package/dist/{src/remote → remote}/PluginLoaderComponent.js +0 -0
- /package/dist/{src/remote → remote}/PluginRuntime.js +0 -0
- /package/dist/{src/remote → remote}/index.js +0 -0
- /package/dist/{src/remote → remote}/remotePluginLoader.js +0 -0
- /package/dist/{src/runtime → runtime}/DataQueriesProvider/DataQueriesProvider.js +0 -0
- /package/dist/{src/runtime → runtime}/DataQueriesProvider/index.js +0 -0
- /package/dist/{src/runtime → runtime}/DataQueriesProvider/model.js +0 -0
- /package/dist/{src/runtime → runtime}/QueryCountProvider.js +0 -0
- /package/dist/{src/runtime → runtime}/RouterProvider.js +0 -0
- /package/dist/{src/runtime → runtime}/TimeRangeProvider/TimeRangeProvider.js +0 -0
- /package/dist/{src/runtime → runtime}/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +0 -0
- /package/dist/{src/runtime → runtime}/TimeRangeProvider/TimeRangeSettingsProvider.js +0 -0
- /package/dist/{src/runtime → runtime}/TimeRangeProvider/index.js +0 -0
- /package/dist/{src/runtime → runtime}/TimeRangeProvider/query-params.js +0 -0
- /package/dist/{src/runtime → runtime}/TimeRangeProvider/refresh-interval.js +0 -0
- /package/dist/{src/runtime → runtime}/UsageMetricsProvider.js +0 -0
- /package/dist/{src/runtime → runtime}/builtin-variables.js +0 -0
- /package/dist/{src/runtime → runtime}/datasources.js +0 -0
- /package/dist/{src/runtime → runtime}/index.js +0 -0
- /package/dist/{src/runtime → runtime}/plugin-registry.js +0 -0
- /package/dist/{src/runtime → runtime}/profile-queries.js +0 -0
- /package/dist/{src/runtime → runtime}/time-series-queries.js +0 -0
- /package/dist/{src/runtime → runtime}/trace-queries.js +0 -0
- /package/dist/{src/runtime → runtime}/utils.js +0 -0
- /package/dist/{src/runtime → runtime}/variables.js +0 -0
- /package/dist/{src/test → test}/index.js +0 -0
- /package/dist/{src/test → test}/mock-data.js +0 -0
- /package/dist/{src/test → test}/render-hook.js +0 -0
- /package/dist/{src/test → test}/render.js +0 -0
- /package/dist/{src/test → test}/setup-tests.js +0 -0
- /package/dist/{src/test → test}/test-plugins/bert/index.js +0 -0
- /package/dist/{src/test → test}/test-plugins/ernie/index.js +0 -0
- /package/dist/{src/test → test}/test-plugins/index.js +0 -0
- /package/dist/{src/test → test}/utils.js +0 -0
- /package/dist/{src/test-utils → test-utils}/index.js +0 -0
- /package/dist/{src/test-utils → test-utils}/mock-plugin-registry.js +0 -0
- /package/dist/{src/utils → utils}/action.js +0 -0
- /package/dist/{src/utils → utils}/index.js +0 -0
- /package/dist/{src/utils → utils}/variables.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/runtime/variables.ts"],"sourcesContent":["// Copyright 2024 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, useContext, useMemo } from 'react';\nimport { VariableValue } from '@perses-dev/core';\nimport { immerable } from 'immer';\nimport { VariableOption } from '../model';\nimport { parseVariables, replaceVariables } from '../utils';\nimport { useBuiltinVariableValues } from './builtin-variables';\n\nexport type VariableState = {\n value: VariableValue;\n options?: VariableOption[];\n loading: boolean;\n error?: Error;\n /**\n * If a local variable is overriding an external variable, local var will have the flag ``overriding=true``.\n */\n overriding?: boolean;\n /**\n * If a local variable is overriding an external variable, external var will have the flag ``overridden=true``.\n */\n overridden?: boolean;\n defaultValue?: VariableValue;\n};\n\nexport type VariableStateMap = Record<string, VariableState>;\n\n/**\n * Structure used as key in the {@link VariableStoreStateMap}.\n */\nexport type VariableStateKey = {\n /**\n * name of the variable we want to access in the state.\n */\n name: string;\n /**\n * source of the variable we want to access in the state.\n * Defined only for external variables.\n */\n source?: string;\n};\n\n/**\n * A state map with two entry keys, materialized by {@link VariableStateKey} structure.\n */\nexport class VariableStoreStateMap {\n /**\n * \"Immerable\" is mandatory to be able to use this class in an immer context.\n * Ref: https://docs.pmnd.rs/zustand/integrations/immer-middleware#gotchas\n */\n [immerable] = true;\n\n private readonly DEFAULT_LOCAL_SOURCE_NAME = '';\n private readonly _state: Record<string, Record<string, VariableState>> = {};\n\n /**\n * Get variable state by key.\n * @param key\n */\n get(key: VariableStateKey): VariableState | undefined {\n return this._sourceStatesOrEmpty(key.source)[key.name];\n }\n\n /**\n * Set variable state by key.\n * @param key\n * @param value\n */\n set(key: VariableStateKey, value: VariableState): VariableState | undefined {\n const sourceName = this._sourceName(key.source);\n if (!this._state[sourceName]) {\n this._state[sourceName] = {};\n }\n this._sourceStatesOrEmpty(key.source)[key.name] = value;\n return value;\n }\n\n /**\n * Check presence of variable state by key.\n * @param key\n */\n has(key: VariableStateKey): boolean {\n return this._sourceStatesOrEmpty(key.source)[key.name] !== undefined;\n }\n\n /**\n * Delete variable state by key.\n * @param key\n */\n delete(key: VariableStateKey): boolean {\n const result = this.has(key);\n const sourceName = this._sourceName(key.source);\n const sourceStates = this._state[sourceName];\n\n // Delete var from source state\n if (sourceStates) {\n delete sourceStates[key.name];\n }\n\n // Delete source state from state if empty\n if (Object.keys(sourceStates ?? {})?.length === 0) {\n delete this._state[sourceName];\n }\n return result;\n }\n\n private _sourceName(source: string | undefined): string {\n return source ?? this.DEFAULT_LOCAL_SOURCE_NAME;\n }\n\n private _sourceStatesOrEmpty(source: string | undefined): Record<string, VariableState> {\n return this._state[this._sourceName(source)] ?? {};\n }\n}\n\nexport type VariableSrv = {\n state: VariableStateMap;\n};\n\nexport const VariableContext = createContext<VariableSrv | undefined>(undefined);\n\nfunction useVariableContext(): VariableSrv {\n const ctx = useContext(VariableContext);\n if (ctx === undefined) {\n throw new Error('No VariableContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useVariableValues(names?: string[]): VariableStateMap {\n const { state } = useVariableContext();\n\n const values = useMemo(() => {\n const values: VariableStateMap = {};\n names?.forEach((name) => {\n const s = state[name];\n if (s) {\n values[name] = s;\n }\n });\n return values;\n }, [state, names]);\n\n if (names === undefined) {\n return state;\n }\n\n return values;\n}\n\n// useAllVariableValues wraps user-defined variables with built-in variables\nexport function useAllVariableValues(names?: string[]): VariableStateMap {\n const variableValues = useVariableValues(names);\n const builtinVariableValues = useBuiltinVariableValues(names);\n\n return useMemo(() => {\n return { ...variableValues, ...builtinVariableValues } as VariableStateMap;\n }, [variableValues, builtinVariableValues]);\n}\n\n// Convenience hook for replacing variables in a string\nexport function useReplaceVariablesInString(str: string | undefined): string | undefined {\n const variablesInString = str ? parseVariables(str) : [];\n const variableValues = useAllVariableValues(variablesInString);\n if (!str) return undefined;\n return replaceVariables(str, variableValues);\n}\n"],"names":["createContext","useContext","useMemo","immerable","parseVariables","replaceVariables","useBuiltinVariableValues","VariableStoreStateMap","DEFAULT_LOCAL_SOURCE_NAME","_state","get","key","_sourceStatesOrEmpty","source","name","set","value","sourceName","_sourceName","has","undefined","delete","result","sourceStates","Object","keys","length","VariableContext","useVariableContext","ctx","Error","useVariableValues","names","state","values","forEach","s","useAllVariableValues","variableValues","builtinVariableValues","useReplaceVariablesInString","str","variablesInString"],"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,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAE3D,SAASC,SAAS,QAAQ,QAAQ;AAElC,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,WAAW;AAC5D,SAASC,wBAAwB,QAAQ,sBAAsB;AAmC/D;;CAEC,GACD,OAAO,MAAMC;IACX;;;GAGC,GACD,CAACJ,UAAU,GAAG,KAAK;IAEFK,4BAA4B,GAAG;IAC/BC,SAAwD,CAAC,EAAE;IAE5E;;;GAGC,GACDC,IAAIC,GAAqB,EAA6B;QACpD,OAAO,IAAI,CAACC,oBAAoB,CAACD,IAAIE,MAAM,CAAC,CAACF,IAAIG,IAAI,CAAC;IACxD;IAEA;;;;GAIC,GACDC,IAAIJ,GAAqB,EAAEK,KAAoB,EAA6B;QAC1E,MAAMC,aAAa,IAAI,CAACC,WAAW,CAACP,IAAIE,MAAM;QAC9C,IAAI,CAAC,IAAI,CAACJ,MAAM,CAACQ,WAAW,EAAE;YAC5B,IAAI,CAACR,MAAM,CAACQ,WAAW,GAAG,CAAC;QAC7B;QACA,IAAI,CAACL,oBAAoB,CAACD,IAAIE,MAAM,CAAC,CAACF,IAAIG,IAAI,CAAC,GAAGE;QAClD,OAAOA;IACT;IAEA;;;GAGC,GACDG,IAAIR,GAAqB,EAAW;QAClC,OAAO,IAAI,CAACC,oBAAoB,CAACD,IAAIE,MAAM,CAAC,CAACF,IAAIG,IAAI,CAAC,KAAKM;IAC7D;IAEA;;;GAGC,GACDC,OAAOV,GAAqB,EAAW;QACrC,MAAMW,SAAS,IAAI,CAACH,GAAG,CAACR;QACxB,MAAMM,aAAa,IAAI,CAACC,WAAW,CAACP,IAAIE,MAAM;QAC9C,MAAMU,eAAe,IAAI,CAACd,MAAM,CAACQ,WAAW;QAE5C,+BAA+B;QAC/B,IAAIM,cAAc;YAChB,OAAOA,YAAY,CAACZ,IAAIG,IAAI,CAAC;QAC/B;QAEA,0CAA0C;QAC1C,IAAIU,OAAOC,IAAI,CAACF,gBAAgB,CAAC,IAAIG,WAAW,GAAG;YACjD,OAAO,IAAI,CAACjB,MAAM,CAACQ,WAAW;QAChC;QACA,OAAOK;IACT;IAEQJ,YAAYL,MAA0B,EAAU;QACtD,OAAOA,UAAU,IAAI,CAACL,yBAAyB;IACjD;IAEQI,qBAAqBC,MAA0B,EAAiC;QACtF,OAAO,IAAI,CAACJ,MAAM,CAAC,IAAI,CAACS,WAAW,CAACL,QAAQ,IAAI,CAAC;IACnD;AACF;AAMA,OAAO,MAAMc,kBAAkB3B,cAAuCoB,WAAW;AAEjF,SAASQ;IACP,MAAMC,MAAM5B,WAAW0B;IACvB,IAAIE,QAAQT,WAAW;QACrB,MAAM,IAAIU,MAAM;IAClB;IACA,OAAOD;AACT;AAEA,OAAO,SAASE,kBAAkBC,KAAgB;IAChD,MAAM,EAAEC,KAAK,EAAE,GAAGL;IAElB,MAAMM,SAAShC,QAAQ;QACrB,MAAMgC,SAA2B,CAAC;QAClCF,OAAOG,QAAQ,CAACrB;YACd,MAAMsB,IAAIH,KAAK,CAACnB,KAAK;YACrB,IAAIsB,GAAG;gBACLF,MAAM,CAACpB,KAAK,GAAGsB;YACjB;QACF;QACA,OAAOF;IACT,GAAG;QAACD;QAAOD;KAAM;IAEjB,IAAIA,UAAUZ,WAAW;QACvB,OAAOa;IACT;IAEA,OAAOC;AACT;AAEA,4EAA4E;AAC5E,OAAO,SAASG,qBAAqBL,KAAgB;IACnD,MAAMM,iBAAiBP,kBAAkBC;IACzC,MAAMO,wBAAwBjC,yBAAyB0B;IAEvD,OAAO9B,QAAQ;QACb,OAAO;YAAE,GAAGoC,cAAc;YAAE,GAAGC,qBAAqB;QAAC;IACvD,GAAG;QAACD;QAAgBC;KAAsB;AAC5C;AAEA,uDAAuD;AACvD,OAAO,SAASC,4BAA4BC,GAAuB;IACjE,MAAMC,oBAAoBD,MAAMrC,eAAeqC,OAAO,EAAE;IACxD,MAAMH,iBAAiBD,qBAAqBK;IAC5C,IAAI,CAACD,KAAK,OAAOrB;IACjB,OAAOf,iBAAiBoC,KAAKH;AAC/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/mock-data.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 { ProfileData, TimeSeriesData, TraceData } from '@perses-dev/core';\n\nexport const MOCK_TIME_SERIES_DATA: TimeSeriesData = {\n timeRange: {\n start: new Date(1666625490000),\n end: new Date(1666625535000),\n },\n stepMs: 24379,\n series: [\n {\n name: 'device=\"/dev/vda1\", env=\"demo\", fstype=\"ext4\", instance=\"demo.do.prometheus.io:9100\", job=\"node\", mountpoint=\"/\"',\n values: [\n [1666479357903, 0.27700745551584494],\n [1666479382282, 0.27701284657366565],\n ],\n },\n {\n name: 'device=\"/dev/vda15\", env=\"demo\", fstype=\"vfat\", instance=\"demo.do.prometheus.io:9100\", job=\"node\", mountpoint=\"/boot/efi\"',\n values: [\n [1666479357903, 0.08486496097624885],\n [1666479382282, 0.08486496097624885],\n ],\n },\n ],\n};\n\nexport const MOCK_TRACE_DATA: TraceData = {\n searchResult: [\n {\n durationMs: 1120,\n serviceStats: {\n 'shop-backend': {\n spanCount: 4,\n errorCount: 0,\n },\n 'cart-service': {\n spanCount: 2,\n errorCount: 0,\n },\n 'article-service': {\n spanCount: 2,\n errorCount: 0,\n },\n 'auth-service': {\n spanCount: 1,\n errorCount: 0,\n },\n postgres: {\n spanCount: 1,\n errorCount: 0,\n },\n },\n startTimeUnixMs: 1699916103945861,\n traceId: '95ba9202315c29c801b5aa41452aa775',\n rootServiceName: 'shop-backend',\n rootTraceName: 'article-to-cart',\n },\n ],\n metadata: {\n executedQueryString: '{ duration > 1000ms }',\n },\n};\n\nexport const MOCK_PROFILE_DATA: ProfileData = {\n profile: {\n stackTrace: {\n id: 0,\n name: 'root',\n level: 0,\n start: 1699916103945861,\n end: 1699916105065861,\n total: 1000,\n self: 500,\n children: [],\n },\n },\n metadata: {\n spyName: '',\n sampleRate: 1000000000,\n units: 'samples',\n name: 'cpu',\n },\n};\n"],"names":["MOCK_TIME_SERIES_DATA","timeRange","start","Date","end","stepMs","series","name","values","MOCK_TRACE_DATA","searchResult","durationMs","serviceStats","spanCount","errorCount","postgres","startTimeUnixMs","traceId","rootServiceName","rootTraceName","metadata","executedQueryString","MOCK_PROFILE_DATA","profile","stackTrace","id","level","total","self","children","spyName","sampleRate","units"],"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,OAAO,MAAMA,wBAAwC;IACnDC,WAAW;QACTC,OAAO,IAAIC,KAAK;QAChBC,KAAK,IAAID,KAAK;IAChB;IACAE,QAAQ;IACRC,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;gBACN;oBAAC;oBAAe;iBAAoB;gBACpC;oBAAC;oBAAe;iBAAoB;aACrC;QACH;QACA;YACED,MAAM;YACNC,QAAQ;gBACN;oBAAC;oBAAe;iBAAoB;gBACpC;oBAAC;oBAAe;iBAAoB;aACrC;QACH;KACD;AACH,EAAE;AAEF,OAAO,MAAMC,kBAA6B;IACxCC,cAAc;QACZ;YACEC,YAAY;YACZC,cAAc;gBACZ,gBAAgB;oBACdC,WAAW;oBACXC,YAAY;gBACd;gBACA,gBAAgB;oBACdD,WAAW;oBACXC,YAAY;gBACd;gBACA,mBAAmB;oBACjBD,WAAW;oBACXC,YAAY;gBACd;gBACA,gBAAgB;oBACdD,WAAW;oBACXC,YAAY;gBACd;gBACAC,UAAU;oBACRF,WAAW;oBACXC,YAAY;gBACd;YACF;YACAE,iBAAiB;YACjBC,SAAS;YACTC,iBAAiB;YACjBC,eAAe;QACjB;KACD;IACDC,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF,OAAO,MAAMC,oBAAiC;IAC5CC,SAAS;QACPC,YAAY;YACVC,IAAI;YACJlB,MAAM;YACNmB,OAAO;YACPxB,OAAO;YACPE,KAAK;YACLuB,OAAO;YACPC,MAAM;YACNC,UAAU,EAAE;QACd;IACF;IACAT,UAAU;QACRU,SAAS;QACTC,YAAY;QACZC,OAAO;QACPzB,MAAM;IACR;AACF,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/render-hook.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 { renderHook, RenderHookOptions, RenderHookResult } from '@testing-library/react';\nimport { ContextOptions, getTestContextWrapper } from './utils';\n\n/**\n * Test helper to render a React hook with common app-level providers, including the PluginRegistry,\n * wrapped around it. Useful for testing hooks that rely on context such as QueryClientProvider or PluginRegistry.\n */\nexport function renderHookWithContext<TProps, TResult>(\n callback: (props: TProps) => TResult,\n contextOptions?: ContextOptions,\n renderHookOptions?: Omit<RenderHookOptions<TProps>, 'wrapper'>\n): RenderHookResult<TResult, TProps> {\n const wrapper = getTestContextWrapper(contextOptions);\n return renderHook(callback, { wrapper, ...renderHookOptions });\n}\n"],"names":["renderHook","getTestContextWrapper","renderHookWithContext","callback","contextOptions","renderHookOptions","wrapper"],"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,UAAU,QAA6C,yBAAyB;AACzF,SAAyBC,qBAAqB,QAAQ,UAAU;AAEhE;;;CAGC,GACD,OAAO,SAASC,sBACdC,QAAoC,EACpCC,cAA+B,EAC/BC,iBAA8D;IAE9D,MAAMC,UAAUL,sBAAsBG;IACtC,OAAOJ,WAAWG,UAAU;QAAEG;QAAS,GAAGD,iBAAiB;IAAC;AAC9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/render.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 { render, RenderOptions, RenderResult } from '@testing-library/react';\nimport { ReactNode } from 'react';\nimport { ContextOptions, getTestContextWrapper } from './utils';\n\n/**\n * Test helper to render a React component with some common app-level providers, as well as the PluginRegistry\n * wrapped around it.\n */\nexport function renderWithContext(\n ui: ReactNode,\n renderOptions?: Omit<RenderOptions, 'queries'>,\n contextOptions?: ContextOptions\n): RenderResult {\n const Wrapper = getTestContextWrapper(contextOptions);\n return render(<Wrapper>{ui}</Wrapper>, renderOptions);\n}\n"],"names":["render","getTestContextWrapper","renderWithContext","ui","renderOptions","contextOptions","Wrapper"],"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,MAAM,QAAqC,yBAAyB;AAE7E,SAAyBC,qBAAqB,QAAQ,UAAU;AAEhE;;;CAGC,GACD,OAAO,SAASC,kBACdC,EAAa,EACbC,aAA8C,EAC9CC,cAA+B;IAE/B,MAAMC,UAAUL,sBAAsBI;IACtC,OAAOL,qBAAO,KAACM;kBAASH;QAAeC;AACzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/setup-tests.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\n// Add testing library assertions\nimport '@testing-library/jest-dom/extend-expect';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,iCAAiC;AACjC,OAAO,0CAA0C;AAEjD,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/test/test-plugins/bert/index.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 { ReactElement } from 'react';\nimport { OptionsEditorProps, PanelPlugin } from '../../../model';\n\nfunction BertPanel1Editor({ value, onChange }: OptionsEditorProps<{ option1: string }>): ReactElement {\n return (\n <div>\n <label htmlFor=\"editor-input\">BertPanel1 editor</label>\n <input\n type=\"text\"\n id=\"editor-input\"\n value={value.option1}\n onChange={(e) => onChange({ ...value, option1: e.target.value })}\n />\n </div>\n );\n}\n\n// Dummy plugins to test loading\nexport const BertPanel1: PanelPlugin<{ option1: string }> = {\n PanelComponent: () => null,\n panelOptionsEditorComponents: [\n {\n label: 'Editor',\n content: BertPanel1Editor,\n },\n ],\n createInitialOptions: () => ({ option1: '' }),\n};\n\nfunction BertPanel2Editor({ value, onChange }: OptionsEditorProps<{ option2: string }>): ReactElement {\n return (\n <div>\n <label htmlFor=\"editor-input\">BertPanel2 editor</label>\n <input\n type=\"text\"\n id=\"editor-input\"\n value={value.option2}\n onChange={(e) => onChange({ ...value, option2: e.target.value })}\n />\n </div>\n );\n}\n\nexport const BertPanel2: PanelPlugin<{ option2: string }> = {\n PanelComponent: () => null,\n panelOptionsEditorComponents: [\n {\n label: 'Settings',\n content: BertPanel2Editor,\n },\n {\n label: 'Custom Tab',\n content: function Editor(): ReactElement {\n return <div>custom content</div>;\n },\n },\n ],\n createInitialOptions: () => ({ option2: '' }),\n hideQueryEditor: true,\n};\n"],"names":["BertPanel1Editor","value","onChange","div","label","htmlFor","input","type","id","option1","e","target","BertPanel1","PanelComponent","panelOptionsEditorComponents","content","createInitialOptions","BertPanel2Editor","option2","BertPanel2","Editor","hideQueryEditor"],"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;;AAKjC,SAASA,iBAAiB,EAAEC,KAAK,EAAEC,QAAQ,EAA2C;IACpF,qBACE,MAACC;;0BACC,KAACC;gBAAMC,SAAQ;0BAAe;;0BAC9B,KAACC;gBACCC,MAAK;gBACLC,IAAG;gBACHP,OAAOA,MAAMQ,OAAO;gBACpBP,UAAU,CAACQ,IAAMR,SAAS;wBAAE,GAAGD,KAAK;wBAAEQ,SAASC,EAAEC,MAAM,CAACV,KAAK;oBAAC;;;;AAItE;AAEA,gCAAgC;AAChC,OAAO,MAAMW,aAA+C;IAC1DC,gBAAgB,IAAM;IACtBC,8BAA8B;QAC5B;YACEV,OAAO;YACPW,SAASf;QACX;KACD;IACDgB,sBAAsB,IAAO,CAAA;YAAEP,SAAS;QAAG,CAAA;AAC7C,EAAE;AAEF,SAASQ,iBAAiB,EAAEhB,KAAK,EAAEC,QAAQ,EAA2C;IACpF,qBACE,MAACC;;0BACC,KAACC;gBAAMC,SAAQ;0BAAe;;0BAC9B,KAACC;gBACCC,MAAK;gBACLC,IAAG;gBACHP,OAAOA,MAAMiB,OAAO;gBACpBhB,UAAU,CAACQ,IAAMR,SAAS;wBAAE,GAAGD,KAAK;wBAAEiB,SAASR,EAAEC,MAAM,CAACV,KAAK;oBAAC;;;;AAItE;AAEA,OAAO,MAAMkB,aAA+C;IAC1DN,gBAAgB,IAAM;IACtBC,8BAA8B;QAC5B;YACEV,OAAO;YACPW,SAASE;QACX;QACA;YACEb,OAAO;YACPW,SAAS,SAASK;gBAChB,qBAAO,KAACjB;8BAAI;;YACd;QACF;KACD;IACDa,sBAAsB,IAAO,CAAA;YAAEE,SAAS;QAAG,CAAA;IAC3CG,iBAAiB;AACnB,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/test/test-plugins/ernie/index.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 { VariablePlugin, VariableOption } from '../../../model';\n\nconst data: VariableOption[] = [\n { label: 'Grover', value: 'Grover' },\n { label: 'Snuffleupagus', value: 'Snuffleupagus' },\n];\n\n// Dummy plugin to test loading\nexport const ErnieVariable1: VariablePlugin<{ variableOption: string }> = {\n getVariableOptions: async () => ({ data }),\n OptionsEditorComponent: function ErnieVariableEditor({ value, onChange }) {\n return (\n <div>\n <label htmlFor=\"editor-input\">ErnieVariable editor</label>\n <input\n type=\"text\"\n id=\"editor-input\"\n value={value.variableOption}\n onChange={(e) => onChange({ ...value, variableOption: e.target.value })}\n />\n </div>\n );\n },\n createInitialOptions: () => ({ variableOption: '' }),\n};\n\nexport const ErnieVariable2: VariablePlugin<{ variableOption2: string }> = {\n getVariableOptions: async () => ({ data }),\n OptionsEditorComponent: function ErnieVariableEditor({ value, onChange }) {\n return (\n <div>\n <label htmlFor=\"editor-input\">ErnieVariable2 editor</label>\n <input\n type=\"text\"\n id=\"editor-input\"\n value={value.variableOption2}\n onChange={(e) => onChange({ ...value, variableOption2: e.target.value })}\n />\n </div>\n );\n },\n createInitialOptions: () => ({ variableOption2: '' }),\n};\n"],"names":["data","label","value","ErnieVariable1","getVariableOptions","OptionsEditorComponent","ErnieVariableEditor","onChange","div","htmlFor","input","type","id","variableOption","e","target","createInitialOptions","ErnieVariable2","variableOption2"],"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,MAAMA,OAAyB;IAC7B;QAAEC,OAAO;QAAUC,OAAO;IAAS;IACnC;QAAED,OAAO;QAAiBC,OAAO;IAAgB;CAClD;AAED,+BAA+B;AAC/B,OAAO,MAAMC,iBAA6D;IACxEC,oBAAoB,UAAa,CAAA;YAAEJ;QAAK,CAAA;IACxCK,wBAAwB,SAASC,oBAAoB,EAAEJ,KAAK,EAAEK,QAAQ,EAAE;QACtE,qBACE,MAACC;;8BACC,KAACP;oBAAMQ,SAAQ;8BAAe;;8BAC9B,KAACC;oBACCC,MAAK;oBACLC,IAAG;oBACHV,OAAOA,MAAMW,cAAc;oBAC3BN,UAAU,CAACO,IAAMP,SAAS;4BAAE,GAAGL,KAAK;4BAAEW,gBAAgBC,EAAEC,MAAM,CAACb,KAAK;wBAAC;;;;IAI7E;IACAc,sBAAsB,IAAO,CAAA;YAAEH,gBAAgB;QAAG,CAAA;AACpD,EAAE;AAEF,OAAO,MAAMI,iBAA8D;IACzEb,oBAAoB,UAAa,CAAA;YAAEJ;QAAK,CAAA;IACxCK,wBAAwB,SAASC,oBAAoB,EAAEJ,KAAK,EAAEK,QAAQ,EAAE;QACtE,qBACE,MAACC;;8BACC,KAACP;oBAAMQ,SAAQ;8BAAe;;8BAC9B,KAACC;oBACCC,MAAK;oBACLC,IAAG;oBACHV,OAAOA,MAAMgB,eAAe;oBAC5BX,UAAU,CAACO,IAAMP,SAAS;4BAAE,GAAGL,KAAK;4BAAEgB,iBAAiBJ,EAAEC,MAAM,CAACb,KAAK;wBAAC;;;;IAI9E;IACAc,sBAAsB,IAAO,CAAA;YAAEE,iBAAiB;QAAG,CAAA;AACrD,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/test/test-plugins/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\nimport { dynamicImportPluginLoader, PluginLoader, PluginModuleResource } from '../../model';\nimport bertResource from './bert/plugin.json';\nimport ernieResource from './ernie/plugin.json';\n\n/**\n * A PluginLoader for tests that will dynamically load the plugins in this folder.\n */\nexport const testPluginLoader: PluginLoader = dynamicImportPluginLoader([\n { resource: bertResource as PluginModuleResource, importPlugin: () => import('./bert') },\n { resource: ernieResource as PluginModuleResource, importPlugin: () => import('./ernie') },\n]);\n"],"names":["dynamicImportPluginLoader","bertResource","ernieResource","testPluginLoader","resource","importPlugin"],"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,yBAAyB,QAA4C,cAAc;AAC5F,OAAOC,kBAAkB,qBAAqB;AAC9C,OAAOC,mBAAmB,sBAAsB;AAEhD;;CAEC,GACD,OAAO,MAAMC,mBAAiCH,0BAA0B;IACtE;QAAEI,UAAUH;QAAsCI,cAAc,IAAM,MAAM,CAAC;IAAU;IACvF;QAAED,UAAUF;QAAuCG,cAAc,IAAM,MAAM,CAAC;IAAW;CAC1F,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/utils.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 { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { ReactNode } from 'react';\nimport { PluginRegistry } from '../components';\nimport { DefaultPluginKinds } from '../model';\nimport { testPluginLoader } from './test-plugins';\n\nexport type ContextOptions = {\n defaultPluginKinds?: DefaultPluginKinds;\n};\n\nexport function getTestContextWrapper(contextOptions?: ContextOptions) {\n // Create a new QueryClient for each test to avoid caching issues\n const queryClient = new QueryClient({\n defaultOptions: { queries: { refetchOnWindowFocus: false, retry: false } },\n });\n\n return function Wrapper({ children }: { children: ReactNode }): ReactNode {\n return (\n <QueryClientProvider client={queryClient}>\n <PluginRegistry\n pluginLoader={testPluginLoader}\n defaultPluginKinds={\n contextOptions?.defaultPluginKinds ?? {\n TimeSeriesQuery: 'PrometheusTimeSeriesQuery',\n }\n }\n >\n {children}\n </PluginRegistry>\n </QueryClientProvider>\n );\n };\n}\n"],"names":["QueryClient","QueryClientProvider","PluginRegistry","testPluginLoader","getTestContextWrapper","contextOptions","queryClient","defaultOptions","queries","refetchOnWindowFocus","retry","Wrapper","children","client","pluginLoader","defaultPluginKinds","TimeSeriesQuery"],"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,WAAW,EAAEC,mBAAmB,QAAQ,wBAAwB;AAEzE,SAASC,cAAc,QAAQ,gBAAgB;AAE/C,SAASC,gBAAgB,QAAQ,iBAAiB;AAMlD,OAAO,SAASC,sBAAsBC,cAA+B;IACnE,iEAAiE;IACjE,MAAMC,cAAc,IAAIN,YAAY;QAClCO,gBAAgB;YAAEC,SAAS;gBAAEC,sBAAsB;gBAAOC,OAAO;YAAM;QAAE;IAC3E;IAEA,OAAO,SAASC,QAAQ,EAAEC,QAAQ,EAA2B;QAC3D,qBACE,KAACX;YAAoBY,QAAQP;sBAC3B,cAAA,KAACJ;gBACCY,cAAcX;gBACdY,oBACEV,gBAAgBU,sBAAsB;oBACpCC,iBAAiB;gBACnB;0BAGDJ;;;IAIT;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test-utils/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 './mock-plugin-registry';\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,yBAAyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test-utils/mock-plugin-registry.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 { UnknownSpec } from '@perses-dev/core';\nimport { PluginRegistryProps } from '../components';\nimport { PluginModuleResource, Plugin, PluginLoader, PluginImplementation, PluginType } from '../model';\n\nexport type MockPlugin = {\n [T in PluginType]: {\n kind: T;\n spec: { name: string };\n plugin: PluginImplementation<T>;\n };\n}[PluginType];\n\n/**\n * Helper for mocking `PluginRegistry` data during tests. Returns props that can be spread on the `PluginRegistry`\n * component so that it will load the mock plugins you provide.\n */\nexport function mockPluginRegistry(...mockPlugins: MockPlugin[]): Omit<PluginRegistryProps, 'children'> {\n const mockPluginResource: PluginModuleResource = {\n kind: 'PluginModule',\n metadata: {\n name: 'Fake Plugin Module for Tests',\n version: '0',\n },\n spec: {\n // Add metadata for all mock plugins\n plugins: mockPlugins.map(({ kind, spec: { name } }) => ({\n kind,\n spec: {\n name,\n display: {\n name: getMockPluginName(kind, name),\n },\n },\n })),\n },\n };\n\n const mockPluginModule: Record<string, Plugin<UnknownSpec>> = {};\n for (const mockPlugin of mockPlugins) {\n // \"Export\" on the module under the same name as the kind the plugin handles\n mockPluginModule[mockPlugin.spec.name] = mockPlugin.plugin;\n }\n\n const pluginLoader: PluginLoader = {\n getInstalledPlugins() {\n return Promise.resolve([mockPluginResource]);\n },\n importPluginModule(/* resource */) {\n return Promise.resolve(mockPluginModule);\n },\n };\n\n return {\n pluginLoader,\n defaultPluginKinds: {\n TimeSeriesQuery: 'PrometheusTimeSeriesQuery',\n },\n };\n}\n\n/**\n * The function that's used to generate the display name of mocked plugins in mockPluginRegistry. Can be useful if you\n * need to interact with some UI component that's displaying it.\n */\nexport function getMockPluginName(kind: PluginType, name: string): string {\n return `${kind} Plugin for ${name}`;\n}\n"],"names":["mockPluginRegistry","mockPlugins","mockPluginResource","kind","metadata","name","version","spec","plugins","map","display","getMockPluginName","mockPluginModule","mockPlugin","plugin","pluginLoader","getInstalledPlugins","Promise","resolve","importPluginModule","defaultPluginKinds","TimeSeriesQuery"],"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;AAcjC;;;CAGC,GACD,OAAO,SAASA,mBAAmB,GAAGC,WAAyB;IAC7D,MAAMC,qBAA2C;QAC/CC,MAAM;QACNC,UAAU;YACRC,MAAM;YACNC,SAAS;QACX;QACAC,MAAM;YACJ,oCAAoC;YACpCC,SAASP,YAAYQ,GAAG,CAAC,CAAC,EAAEN,IAAI,EAAEI,MAAM,EAAEF,IAAI,EAAE,EAAE,GAAM,CAAA;oBACtDF;oBACAI,MAAM;wBACJF;wBACAK,SAAS;4BACPL,MAAMM,kBAAkBR,MAAME;wBAChC;oBACF;gBACF,CAAA;QACF;IACF;IAEA,MAAMO,mBAAwD,CAAC;IAC/D,KAAK,MAAMC,cAAcZ,YAAa;QACpC,4EAA4E;QAC5EW,gBAAgB,CAACC,WAAWN,IAAI,CAACF,IAAI,CAAC,GAAGQ,WAAWC,MAAM;IAC5D;IAEA,MAAMC,eAA6B;QACjCC;YACE,OAAOC,QAAQC,OAAO,CAAC;gBAAChB;aAAmB;QAC7C;QACAiB;YACE,OAAOF,QAAQC,OAAO,CAACN;QACzB;IACF;IAEA,OAAO;QACLG;QACAK,oBAAoB;YAClBC,iBAAiB;QACnB;IACF;AACF;AAEA;;;CAGC,GACD,OAAO,SAASV,kBAAkBR,IAAgB,EAAEE,IAAY;IAC9D,OAAO,GAAGF,KAAK,YAAY,EAAEE,MAAM;AACrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/action.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 { Action } from '@perses-dev/core';\n\nexport function getTitleAction(action: Action, isDraft: boolean): string {\n if (action === 'read') return 'View';\n if (isDraft && action === 'create') return 'Add';\n if (!isDraft && action === 'create') return 'Create';\n if (action === 'update') return 'Edit';\n return '';\n}\n\nexport function getSubmitText(action: Action, isDraft: boolean): string {\n if (isDraft && action === 'create') return 'Add';\n if (isDraft && action === 'update') return 'Apply';\n if (!isDraft) return 'Save';\n return '';\n}\n"],"names":["getTitleAction","action","isDraft","getSubmitText"],"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,OAAO,SAASA,eAAeC,MAAc,EAAEC,OAAgB;IAC7D,IAAID,WAAW,QAAQ,OAAO;IAC9B,IAAIC,WAAWD,WAAW,UAAU,OAAO;IAC3C,IAAI,CAACC,WAAWD,WAAW,UAAU,OAAO;IAC5C,IAAIA,WAAW,UAAU,OAAO;IAChC,OAAO;AACT;AAEA,OAAO,SAASE,cAAcF,MAAc,EAAEC,OAAgB;IAC5D,IAAIA,WAAWD,WAAW,UAAU,OAAO;IAC3C,IAAIC,WAAWD,WAAW,UAAU,OAAO;IAC3C,IAAI,CAACC,SAAS,OAAO;IACrB,OAAO;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/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 './action';\nexport * from './variables';\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,WAAW;AACzB,cAAc,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/variables.ts"],"sourcesContent":["// Copyright 2024 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 { VariableValue } from '@perses-dev/core';\nimport { VariableStateMap } from '@perses-dev/plugin-system';\n\nexport function replaceVariables(text: string, variableState: VariableStateMap): string {\n const variables = parseVariables(text);\n let finalText = text;\n variables\n // Sorting variables by their length.\n // In order to not have a variable name have contained in another variable name.\n // i.e.: $__range replacing $__range_ms => '3600_ms' instead of '3600000'\n .sort((a, b) => b.length - a.length)\n .forEach((v) => {\n const variable = variableState[v];\n if (variable && variable.value !== undefined) {\n finalText = replaceVariable(finalText, v, variable?.value);\n }\n });\n\n return finalText;\n}\n\nexport function replaceVariable(text: string, varName: string, variableValue: VariableValue): string {\n const variableSyntax = '$' + varName;\n const alternativeVariableSyntax = '${' + varName + '}';\n\n let replaceString = '';\n if (Array.isArray(variableValue)) {\n replaceString = `(${variableValue.join('|')})`; // regex style\n }\n if (typeof variableValue === 'string') {\n replaceString = variableValue;\n }\n\n text = text.replaceAll(variableSyntax, replaceString);\n return text.replaceAll(alternativeVariableSyntax, replaceString);\n}\n\n// This regular expression is designed to identify variable references in a string.\n// It supports two formats for referencing variables:\n// 1. $variableName - This is a simpler format, and the regular expression captures the variable name (\\w+ matches one or more word characters).\n// 2. ${variableName} - This is a more complex format and the regular expression captures the variable name (\\w+ matches one or more word characters) in the curly braces.\n// 3. [COMING SOON] ${variableName:value} - This is a more complex format that allows specifying a format function as well.\n// TODO: Fix this lint error\n// eslint-disable-next-line no-useless-escape\nconst VARIABLE_REGEX = /\\$(\\w+)|\\${(\\w+)(?:\\.([^:^\\}]+))?(?::([^\\}]+))?}/gm;\n\n/**\n * Returns a list of variables\n */\nexport const parseVariables = (text: string): string[] => {\n const regex = VARIABLE_REGEX;\n const matches = new Set<string>();\n let match;\n\n while ((match = regex.exec(text)) !== null) {\n if (match) {\n if (match[1]) {\n // \\$(\\w+)\\\n matches.add(match[1]);\n } else if (match[2]) {\n // \\${(\\w+)}\\\n matches.add(match[2]);\n }\n }\n }\n // return unique matches\n return Array.from(matches.values());\n};\n"],"names":["replaceVariables","text","variableState","variables","parseVariables","finalText","sort","a","b","length","forEach","v","variable","value","undefined","replaceVariable","varName","variableValue","variableSyntax","alternativeVariableSyntax","replaceString","Array","isArray","join","replaceAll","VARIABLE_REGEX","regex","matches","Set","match","exec","add","from","values"],"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;AAKjC,OAAO,SAASA,iBAAiBC,IAAY,EAAEC,aAA+B;IAC5E,MAAMC,YAAYC,eAAeH;IACjC,IAAII,YAAYJ;IAChBE,SACE,qCAAqC;IACrC,gFAAgF;IAChF,yEAAyE;KACxEG,IAAI,CAAC,CAACC,GAAGC,IAAMA,EAAEC,MAAM,GAAGF,EAAEE,MAAM,EAClCC,OAAO,CAAC,CAACC;QACR,MAAMC,WAAWV,aAAa,CAACS,EAAE;QACjC,IAAIC,YAAYA,SAASC,KAAK,KAAKC,WAAW;YAC5CT,YAAYU,gBAAgBV,WAAWM,GAAGC,UAAUC;QACtD;IACF;IAEF,OAAOR;AACT;AAEA,OAAO,SAASU,gBAAgBd,IAAY,EAAEe,OAAe,EAAEC,aAA4B;IACzF,MAAMC,iBAAiB,MAAMF;IAC7B,MAAMG,4BAA4B,OAAOH,UAAU;IAEnD,IAAII,gBAAgB;IACpB,IAAIC,MAAMC,OAAO,CAACL,gBAAgB;QAChCG,gBAAgB,CAAC,CAAC,EAAEH,cAAcM,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc;IAChE;IACA,IAAI,OAAON,kBAAkB,UAAU;QACrCG,gBAAgBH;IAClB;IAEAhB,OAAOA,KAAKuB,UAAU,CAACN,gBAAgBE;IACvC,OAAOnB,KAAKuB,UAAU,CAACL,2BAA2BC;AACpD;AAEA,mFAAmF;AACnF,qDAAqD;AACrD,gJAAgJ;AAChJ,0KAA0K;AAC1K,2HAA2H;AAC3H,4BAA4B;AAC5B,6CAA6C;AAC7C,MAAMK,iBAAiB;AAEvB;;CAEC,GACD,OAAO,MAAMrB,iBAAiB,CAACH;IAC7B,MAAMyB,QAAQD;IACd,MAAME,UAAU,IAAIC;IACpB,IAAIC;IAEJ,MAAO,AAACA,CAAAA,QAAQH,MAAMI,IAAI,CAAC7B,KAAI,MAAO,KAAM;QAC1C,IAAI4B,OAAO;YACT,IAAIA,KAAK,CAAC,EAAE,EAAE;gBACZ,WAAW;gBACXF,QAAQI,GAAG,CAACF,KAAK,CAAC,EAAE;YACtB,OAAO,IAAIA,KAAK,CAAC,EAAE,EAAE;gBACnB,aAAa;gBACbF,QAAQI,GAAG,CAACF,KAAK,CAAC,EAAE;YACtB;QACF;IACF;IACA,wBAAwB;IACxB,OAAOR,MAAMW,IAAI,CAACL,QAAQM,MAAM;AAClC,EAAE"}
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/{src/components → components}/DatasourceEditorForm/DatasourceEditorForm.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/{src/components → components}/OptionsEditorTabPanel/OptionsEditorTabPanel.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/{src/components → components}/Variables/VariableEditorForm/VariableEditorForm.js
RENAMED
|
File without changes
|
/package/dist/cjs/{src/components → components}/Variables/VariableEditorForm/VariablePreview.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/{src/runtime → runtime}/TimeRangeProvider/TimeRangeProviderWithQueryParams.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{src/components → components}/Variables/VariableEditorForm/VariableEditorForm.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|