@perses-dev/plugin-system 0.53.0-rc.1 → 0.53.0-rc.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/cjs/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/cjs/components/CalculationSelector/index.js +1 -1
- package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +1 -1
- package/dist/cjs/components/DatasourceEditorForm/index.js +1 -1
- package/dist/cjs/components/DatasourceSelect/DatasourceSelect.js +1 -1
- package/dist/cjs/components/DatasourceSelect/index.js +1 -1
- package/dist/cjs/components/HTTPSettingsEditor/HTTPSettingsEditor.js +1 -1
- package/dist/cjs/components/HTTPSettingsEditor/index.js +1 -1
- package/dist/cjs/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +1175 -0
- package/dist/cjs/components/ItemSelectionActionsOptionsEditor/index.js +30 -0
- package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
- package/dist/cjs/components/LegendOptionsEditor/index.js +1 -1
- package/dist/cjs/components/MetricLabelInput/MetricLabelInput.js +1 -1
- package/dist/cjs/components/MetricLabelInput/index.js +1 -1
- package/dist/cjs/components/MultiQueryEditor/MultiQueryEditor.js +1 -1
- package/dist/cjs/components/MultiQueryEditor/QueryEditorContainer.js +1 -1
- package/dist/cjs/components/MultiQueryEditor/index.js +1 -1
- package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +1 -1
- package/dist/cjs/components/OptionsEditorRadios/index.js +1 -1
- package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/cjs/components/OptionsEditorTabPanel/index.js +1 -1
- package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +1 -1
- package/dist/cjs/components/OptionsEditorTabs/index.js +1 -1
- package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +1 -1
- package/dist/cjs/components/PanelSpecEditor/index.js +1 -1
- package/dist/cjs/components/PluginEditor/PluginEditor.js +1 -1
- package/dist/cjs/components/PluginEditor/index.js +1 -1
- package/dist/cjs/components/PluginEditor/plugin-editor-api.js +1 -1
- package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +1 -1
- package/dist/cjs/components/PluginKindSelect/index.js +1 -1
- package/dist/cjs/components/PluginRegistry/PluginRegistry.js +1 -1
- package/dist/cjs/components/PluginRegistry/index.js +1 -1
- package/dist/cjs/components/PluginRegistry/plugin-indexes.js +1 -1
- package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +1 -1
- package/dist/cjs/components/PluginSpecEditor/index.js +1 -1
- package/dist/cjs/components/SelectionOptionsEditor/SelectionOptionsEditor.js +43 -0
- package/dist/cjs/components/SelectionOptionsEditor/index.js +30 -0
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +11 -3
- package/dist/cjs/components/TimeRangeControls/index.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/cjs/components/Variables/index.js +1 -1
- package/dist/cjs/components/Variables/variable-model.js +1 -1
- package/dist/cjs/components/index.js +2 -1
- package/dist/cjs/constants/index.js +1 -1
- package/dist/cjs/constants/user-interface-text.js +1 -1
- package/dist/cjs/context/ValidationProvider.js +1 -1
- package/dist/cjs/context/index.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/model/datasource.js +1 -1
- package/dist/cjs/model/explore.js +1 -1
- package/dist/cjs/model/index.js +1 -1
- package/dist/cjs/model/legend.js +1 -1
- package/dist/cjs/model/log-queries.js +1 -1
- package/dist/cjs/model/panels.js +1 -1
- package/dist/cjs/model/plugin-base.js +1 -1
- package/dist/cjs/model/plugin-loading.js +1 -1
- package/dist/cjs/model/plugins.js +1 -1
- package/dist/cjs/model/profile-queries.js +1 -1
- package/dist/cjs/model/time-series-queries.js +1 -1
- package/dist/cjs/model/trace-queries.js +1 -1
- package/dist/cjs/model/variables.js +1 -1
- package/dist/cjs/remote/PersesPlugin.types.js +1 -1
- package/dist/cjs/remote/PluginLoaderComponent.js +13 -1
- package/dist/cjs/remote/PluginRuntime.js +13 -1
- package/dist/cjs/remote/index.js +1 -1
- package/dist/cjs/remote/remotePluginLoader.js +1 -1
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +1 -1
- package/dist/cjs/runtime/DataQueriesProvider/index.js +1 -1
- package/dist/cjs/runtime/DataQueriesProvider/model.js +1 -1
- package/dist/cjs/runtime/QueryCountProvider.js +1 -1
- package/dist/cjs/runtime/RouterProvider.js +1 -1
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +1 -1
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviders.js +7 -2
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +1 -1
- package/dist/cjs/runtime/TimeRangeProvider/index.js +1 -1
- package/dist/cjs/runtime/TimeRangeProvider/query-params.js +28 -1
- package/dist/cjs/runtime/TimeRangeProvider/refresh-interval.js +1 -1
- package/dist/cjs/runtime/UsageMetricsProvider.js +1 -1
- package/dist/cjs/runtime/builtin-variables.js +1 -1
- package/dist/cjs/runtime/datasources.js +1 -1
- package/dist/cjs/runtime/index.js +2 -1
- package/dist/cjs/runtime/item-actions.js +303 -0
- package/dist/cjs/runtime/log-queries.js +1 -1
- package/dist/cjs/runtime/plugin-registry.js +1 -1
- package/dist/cjs/runtime/profile-queries.js +1 -1
- package/dist/cjs/runtime/time-series-queries.js +1 -1
- package/dist/cjs/runtime/trace-queries.js +1 -1
- package/dist/cjs/runtime/utils.js +1 -1
- package/dist/cjs/runtime/variables.js +6 -6
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/test/mock-data.js +1 -1
- package/dist/cjs/test/render-hook.js +1 -1
- package/dist/cjs/test/render.js +1 -1
- package/dist/cjs/test/setup-tests.js +1 -1
- package/dist/cjs/test/test-plugins/bert/index.js +1 -1
- package/dist/cjs/test/test-plugins/ernie/index.js +1 -1
- package/dist/cjs/test/test-plugins/index.js +1 -1
- package/dist/cjs/test/utils.js +1 -1
- package/dist/cjs/test-utils/index.js +1 -1
- package/dist/cjs/test-utils/mock-plugin-registry.js +1 -1
- package/dist/cjs/utils/action.js +1 -1
- package/dist/cjs/utils/event.js +1 -1
- package/dist/cjs/utils/index.js +1 -1
- package/dist/cjs/utils/variables.js +9 -146
- package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
- package/dist/components/CalculationSelector/index.js +1 -1
- package/dist/components/CalculationSelector/index.js.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
- package/dist/components/DatasourceEditorForm/index.js +1 -1
- package/dist/components/DatasourceEditorForm/index.js.map +1 -1
- package/dist/components/DatasourceSelect/DatasourceSelect.js +1 -1
- package/dist/components/DatasourceSelect/DatasourceSelect.js.map +1 -1
- package/dist/components/DatasourceSelect/index.js +1 -1
- package/dist/components/DatasourceSelect/index.js.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -1
- package/dist/components/HTTPSettingsEditor/index.js +1 -1
- package/dist/components/HTTPSettingsEditor/index.js.map +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.d.ts +49 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.d.ts.map +1 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +1154 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js.map +1 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/index.d.ts +2 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/index.d.ts.map +1 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/index.js +15 -0
- package/dist/components/ItemSelectionActionsOptionsEditor/index.js.map +1 -0
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
- package/dist/components/LegendOptionsEditor/index.js +1 -1
- package/dist/components/LegendOptionsEditor/index.js.map +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.js +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.js.map +1 -1
- package/dist/components/MetricLabelInput/index.js +1 -1
- package/dist/components/MetricLabelInput/index.js.map +1 -1
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js +1 -1
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -1
- package/dist/components/MultiQueryEditor/index.js +1 -1
- package/dist/components/MultiQueryEditor/index.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
- package/dist/components/OptionsEditorRadios/index.js +1 -1
- package/dist/components/OptionsEditorRadios/index.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/index.js +1 -1
- package/dist/components/OptionsEditorTabPanel/index.js.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
- package/dist/components/OptionsEditorTabs/index.js +1 -1
- package/dist/components/OptionsEditorTabs/index.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
- package/dist/components/PanelSpecEditor/index.js +1 -1
- package/dist/components/PanelSpecEditor/index.js.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +1 -1
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginEditor/index.js +1 -1
- package/dist/components/PluginEditor/index.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
- package/dist/components/PluginKindSelect/index.js +1 -1
- package/dist/components/PluginKindSelect/index.js.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/PluginRegistry/index.js +1 -1
- package/dist/components/PluginRegistry/index.js.map +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
- package/dist/components/PluginSpecEditor/index.js +1 -1
- package/dist/components/PluginSpecEditor/index.js.map +1 -1
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.d.ts +10 -0
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.d.ts.map +1 -0
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js +35 -0
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js.map +1 -0
- package/dist/components/SelectionOptionsEditor/index.d.ts +2 -0
- package/dist/components/SelectionOptionsEditor/index.d.ts.map +1 -0
- package/dist/components/SelectionOptionsEditor/index.js +15 -0
- package/dist/components/SelectionOptionsEditor/index.js.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +4 -2
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +12 -4
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/TimeRangeControls/index.js +1 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/index.js +1 -1
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/Variables/variable-model.js +1 -1
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/user-interface-text.js +1 -1
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/ValidationProvider.js +1 -1
- package/dist/context/ValidationProvider.js.map +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/datasource.js +1 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/explore.js +1 -1
- package/dist/model/explore.js.map +1 -1
- package/dist/model/index.js +1 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/legend.js +1 -1
- package/dist/model/legend.js.map +1 -1
- package/dist/model/log-queries.js +1 -1
- package/dist/model/log-queries.js.map +1 -1
- package/dist/model/panels.js +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/plugin-base.js +1 -1
- package/dist/model/plugin-base.js.map +1 -1
- package/dist/model/plugin-loading.js +1 -1
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/model/plugins.js +1 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/model/profile-queries.js +1 -1
- package/dist/model/profile-queries.js.map +1 -1
- package/dist/model/time-series-queries.js +1 -1
- package/dist/model/time-series-queries.js.map +1 -1
- package/dist/model/trace-queries.js +1 -1
- package/dist/model/trace-queries.js.map +1 -1
- package/dist/model/variables.d.ts +4 -7
- package/dist/model/variables.d.ts.map +1 -1
- package/dist/model/variables.js +1 -1
- package/dist/model/variables.js.map +1 -1
- package/dist/remote/PersesPlugin.types.js +1 -1
- package/dist/remote/PersesPlugin.types.js.map +1 -1
- package/dist/remote/PluginLoaderComponent.d.ts.map +1 -1
- package/dist/remote/PluginLoaderComponent.js +13 -1
- package/dist/remote/PluginLoaderComponent.js.map +1 -1
- package/dist/remote/PluginRuntime.d.ts.map +1 -1
- package/dist/remote/PluginRuntime.js +13 -1
- package/dist/remote/PluginRuntime.js.map +1 -1
- package/dist/remote/index.js +1 -1
- package/dist/remote/index.js.map +1 -1
- package/dist/remote/remotePluginLoader.js +1 -1
- package/dist/remote/remotePluginLoader.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/index.js +1 -1
- package/dist/runtime/DataQueriesProvider/index.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js +1 -1
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/QueryCountProvider.js +1 -1
- package/dist/runtime/QueryCountProvider.js.map +1 -1
- package/dist/runtime/RouterProvider.js +1 -1
- package/dist/runtime/RouterProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.js +8 -3
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/index.js +1 -1
- package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts +11 -0
- package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.js +26 -2
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.js +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -1
- package/dist/runtime/UsageMetricsProvider.js +1 -1
- package/dist/runtime/UsageMetricsProvider.js.map +1 -1
- package/dist/runtime/builtin-variables.js +1 -1
- package/dist/runtime/builtin-variables.js.map +1 -1
- package/dist/runtime/datasources.js +1 -1
- package/dist/runtime/datasources.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/item-actions.d.ts +35 -0
- package/dist/runtime/item-actions.d.ts.map +1 -0
- package/dist/runtime/item-actions.js +300 -0
- package/dist/runtime/item-actions.js.map +1 -0
- package/dist/runtime/log-queries.js +1 -1
- package/dist/runtime/log-queries.js.map +1 -1
- package/dist/runtime/plugin-registry.js +1 -1
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/runtime/profile-queries.js +1 -1
- package/dist/runtime/profile-queries.js.map +1 -1
- package/dist/runtime/time-series-queries.js +1 -1
- package/dist/runtime/time-series-queries.js.map +1 -1
- package/dist/runtime/trace-queries.js +1 -1
- package/dist/runtime/trace-queries.js.map +1 -1
- package/dist/runtime/utils.js +1 -1
- package/dist/runtime/utils.js.map +1 -1
- package/dist/runtime/variables.d.ts +2 -18
- package/dist/runtime/variables.d.ts.map +1 -1
- package/dist/runtime/variables.js +3 -3
- package/dist/runtime/variables.js.map +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/mock-data.js +1 -1
- package/dist/test/mock-data.js.map +1 -1
- package/dist/test/render-hook.js +1 -1
- package/dist/test/render-hook.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/test-plugins/bert/index.js +1 -1
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +1 -1
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test/test-plugins/index.js +1 -1
- package/dist/test/test-plugins/index.js.map +1 -1
- package/dist/test/utils.js +1 -1
- package/dist/test/utils.js.map +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js +1 -1
- package/dist/test-utils/mock-plugin-registry.js.map +1 -1
- package/dist/utils/action.js +1 -1
- package/dist/utils/action.js.map +1 -1
- package/dist/utils/event.js +1 -1
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/variables.d.ts +2 -30
- package/dist/utils/variables.d.ts.map +1 -1
- package/dist/utils/variables.js +3 -144
- package/dist/utils/variables.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -30,6 +30,7 @@ _export(exports, {
|
|
|
30
30
|
});
|
|
31
31
|
const _jsxruntime = require("react/jsx-runtime");
|
|
32
32
|
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
33
|
+
const _components = require("@perses-dev/components");
|
|
33
34
|
const _TimeRangeProvider = require("./TimeRangeProvider");
|
|
34
35
|
const _queryparams = require("./query-params");
|
|
35
36
|
function _interop_require_default(obj) {
|
|
@@ -40,12 +41,16 @@ function _interop_require_default(obj) {
|
|
|
40
41
|
function TimeRangeProviderWithQueryParams({ initialTimeRange, initialRefreshInterval, children }) {
|
|
41
42
|
const { timeRange, setTimeRange } = (0, _queryparams.useTimeRangeParams)(initialTimeRange);
|
|
42
43
|
const { refreshInterval, setRefreshInterval } = (0, _queryparams.useSetRefreshIntervalParams)(initialRefreshInterval);
|
|
44
|
+
const { timeZone } = (0, _queryparams.useTimeZoneParams)('local');
|
|
43
45
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeRangeProvider.TimeRangeProvider, {
|
|
44
46
|
timeRange: timeRange,
|
|
45
47
|
refreshInterval: refreshInterval,
|
|
46
48
|
setTimeRange: setTimeRange,
|
|
47
49
|
setRefreshInterval: setRefreshInterval,
|
|
48
|
-
children:
|
|
50
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.TimeZoneProvider, {
|
|
51
|
+
timeZone: timeZone,
|
|
52
|
+
children: children
|
|
53
|
+
})
|
|
49
54
|
});
|
|
50
55
|
}
|
|
51
56
|
function TimeRangeProviderBasic({ initialTimeRange, initialRefreshInterval, children }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -36,6 +36,9 @@ _export(exports, {
|
|
|
36
36
|
get timeRangeQueryConfig () {
|
|
37
37
|
return timeRangeQueryConfig;
|
|
38
38
|
},
|
|
39
|
+
get timeZoneQueryConfig () {
|
|
40
|
+
return timeZoneQueryConfig;
|
|
41
|
+
},
|
|
39
42
|
get useInitialRefreshInterval () {
|
|
40
43
|
return useInitialRefreshInterval;
|
|
41
44
|
},
|
|
@@ -47,6 +50,9 @@ _export(exports, {
|
|
|
47
50
|
},
|
|
48
51
|
get useTimeRangeParams () {
|
|
49
52
|
return useTimeRangeParams;
|
|
53
|
+
},
|
|
54
|
+
get useTimeZoneParams () {
|
|
55
|
+
return useTimeZoneParams;
|
|
50
56
|
}
|
|
51
57
|
});
|
|
52
58
|
const _react = require("react");
|
|
@@ -99,6 +105,9 @@ const timeRangeQueryConfig = {
|
|
|
99
105
|
const refreshIntervalQueryConfig = {
|
|
100
106
|
refresh: TimeRangeParam
|
|
101
107
|
};
|
|
108
|
+
const timeZoneQueryConfig = {
|
|
109
|
+
tz: _usequeryparams.StringParam
|
|
110
|
+
};
|
|
102
111
|
function useInitialTimeRange(dashboardDuration) {
|
|
103
112
|
const [query] = (0, _usequeryparams.useQueryParams)(timeRangeQueryConfig, {
|
|
104
113
|
updateType: 'replaceIn'
|
|
@@ -221,3 +230,21 @@ function useSetRefreshIntervalParams(initialRefreshInterval) {
|
|
|
221
230
|
setRefreshInterval: setRefreshInterval
|
|
222
231
|
};
|
|
223
232
|
}
|
|
233
|
+
function useTimeZoneParams(initialTimeZone) {
|
|
234
|
+
const [query, setQuery] = (0, _usequeryparams.useQueryParams)(timeZoneQueryConfig, {
|
|
235
|
+
updateType: 'replaceIn'
|
|
236
|
+
});
|
|
237
|
+
const { tz } = query;
|
|
238
|
+
const timeZone = tz ?? initialTimeZone ?? 'local';
|
|
239
|
+
const setTimeZone = (0, _react.useCallback)((newTz)=>{
|
|
240
|
+
setQuery({
|
|
241
|
+
tz: newTz
|
|
242
|
+
});
|
|
243
|
+
}, [
|
|
244
|
+
setQuery
|
|
245
|
+
]);
|
|
246
|
+
return {
|
|
247
|
+
timeZone,
|
|
248
|
+
setTimeZone
|
|
249
|
+
};
|
|
250
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -22,6 +22,7 @@ _export_star(require("./TimeRangeProvider"), exports);
|
|
|
22
22
|
_export_star(require("./time-series-queries"), exports);
|
|
23
23
|
_export_star(require("./trace-queries"), exports);
|
|
24
24
|
_export_star(require("./profile-queries"), exports);
|
|
25
|
+
_export_star(require("./item-actions"), exports);
|
|
25
26
|
_export_star(require("./DataQueriesProvider"), exports);
|
|
26
27
|
_export_star(require("./QueryCountProvider"), exports);
|
|
27
28
|
_export_star(require("./RouterProvider"), exports);
|
|
@@ -0,0 +1,303 @@
|
|
|
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
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "executeAction", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return executeAction;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _components = require("@perses-dev/components");
|
|
24
|
+
const _core = require("@perses-dev/core");
|
|
25
|
+
const BODY_METHODS = new Set([
|
|
26
|
+
'POST',
|
|
27
|
+
'PUT',
|
|
28
|
+
'PATCH'
|
|
29
|
+
]);
|
|
30
|
+
function buildWebhookHeaders(action) {
|
|
31
|
+
const headers = {
|
|
32
|
+
...action.headers ?? {}
|
|
33
|
+
};
|
|
34
|
+
const contentType = action.contentType ?? 'none';
|
|
35
|
+
const supportsBody = BODY_METHODS.has(action.method);
|
|
36
|
+
if (supportsBody && contentType === 'json') {
|
|
37
|
+
headers['Content-Type'] = 'application/json';
|
|
38
|
+
} else if (supportsBody && contentType === 'text') {
|
|
39
|
+
headers['Content-Type'] = 'text/plain; charset=utf-8';
|
|
40
|
+
}
|
|
41
|
+
return headers;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Execute an event action by dispatching a single CustomEvent with batch data
|
|
45
|
+
*/ function executeEventBatch(action, selectionMap, variableState, setActionStatus) {
|
|
46
|
+
try {
|
|
47
|
+
setActionStatus(action.name, {
|
|
48
|
+
loading: true
|
|
49
|
+
});
|
|
50
|
+
const items = Array.from(selectionMap.values());
|
|
51
|
+
// Interpolate body template if provided
|
|
52
|
+
let body;
|
|
53
|
+
if (action.bodyTemplate) {
|
|
54
|
+
const bodyResult = (0, _components.interpolateSelectionBatch)(action.bodyTemplate, items, variableState);
|
|
55
|
+
body = bodyResult.text;
|
|
56
|
+
} else {
|
|
57
|
+
body = JSON.stringify({
|
|
58
|
+
items
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const event = new CustomEvent(action.eventName, {
|
|
62
|
+
detail: body,
|
|
63
|
+
bubbles: true,
|
|
64
|
+
cancelable: true
|
|
65
|
+
});
|
|
66
|
+
window.dispatchEvent(event);
|
|
67
|
+
setActionStatus(action.name, {
|
|
68
|
+
loading: false,
|
|
69
|
+
success: true
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
success: true
|
|
73
|
+
};
|
|
74
|
+
} catch (error) {
|
|
75
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
76
|
+
setActionStatus(action.name, {
|
|
77
|
+
loading: false,
|
|
78
|
+
error: err
|
|
79
|
+
});
|
|
80
|
+
return {
|
|
81
|
+
success: false,
|
|
82
|
+
error: err
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Execute events actions by dispatching one CustomEvent per selection
|
|
88
|
+
*/ function executeEventIndividual(action, selectionMap, variableState, setActionStatus) {
|
|
89
|
+
const entries = Array.from(selectionMap.entries());
|
|
90
|
+
const count = entries.length;
|
|
91
|
+
const itemResults = new Map();
|
|
92
|
+
// Initialize all items as loading
|
|
93
|
+
setActionStatus(action.name, {
|
|
94
|
+
loading: true,
|
|
95
|
+
itemStatuses: new Map()
|
|
96
|
+
});
|
|
97
|
+
for(let index = 0; index < entries.length; index++){
|
|
98
|
+
const [id, item] = entries[index];
|
|
99
|
+
setActionStatus(action.name, {
|
|
100
|
+
loading: true
|
|
101
|
+
}, id);
|
|
102
|
+
try {
|
|
103
|
+
// Interpolate body template if provided
|
|
104
|
+
let body;
|
|
105
|
+
if (action.bodyTemplate) {
|
|
106
|
+
const bodyResult = (0, _components.interpolateSelectionIndividual)(action.bodyTemplate, item, index, count, variableState);
|
|
107
|
+
body = bodyResult.text;
|
|
108
|
+
} else {
|
|
109
|
+
body = JSON.stringify({
|
|
110
|
+
id,
|
|
111
|
+
data: item
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
const event = new CustomEvent(action.eventName, {
|
|
115
|
+
detail: body,
|
|
116
|
+
bubbles: true,
|
|
117
|
+
cancelable: true
|
|
118
|
+
});
|
|
119
|
+
window.dispatchEvent(event);
|
|
120
|
+
itemResults.set(id, {
|
|
121
|
+
success: true
|
|
122
|
+
});
|
|
123
|
+
setActionStatus(action.name, {
|
|
124
|
+
loading: false,
|
|
125
|
+
success: true
|
|
126
|
+
}, id);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
129
|
+
setActionStatus(action.name, {
|
|
130
|
+
loading: false,
|
|
131
|
+
error: err
|
|
132
|
+
}, id);
|
|
133
|
+
itemResults.set(id, {
|
|
134
|
+
success: false,
|
|
135
|
+
error: err
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
setActionStatus(action.name, {
|
|
140
|
+
loading: false,
|
|
141
|
+
success: true
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
success: true,
|
|
145
|
+
itemResults
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Execute a webhook action in individual mode (one request per selection)
|
|
150
|
+
*/ async function executeWebhookIndividual(action, selectionMap, variableState, setActionStatus) {
|
|
151
|
+
const entries = Array.from(selectionMap.entries());
|
|
152
|
+
const count = entries.length;
|
|
153
|
+
const itemResults = new Map();
|
|
154
|
+
// Initialize all items as loading
|
|
155
|
+
setActionStatus(action.name, {
|
|
156
|
+
loading: true,
|
|
157
|
+
itemStatuses: new Map()
|
|
158
|
+
});
|
|
159
|
+
// Execute requests sequentially to avoid overwhelming the server
|
|
160
|
+
for(let index = 0; index < entries.length; index++){
|
|
161
|
+
const [id, item] = entries[index];
|
|
162
|
+
setActionStatus(action.name, {
|
|
163
|
+
loading: true
|
|
164
|
+
}, id);
|
|
165
|
+
try {
|
|
166
|
+
// Interpolate URL
|
|
167
|
+
const urlResult = (0, _components.interpolateSelectionIndividual)(action.url, item, index, count, variableState);
|
|
168
|
+
// Interpolate body template if provided
|
|
169
|
+
const contentType = action.contentType ?? 'none';
|
|
170
|
+
const supportsBody = BODY_METHODS.has(action.method) && contentType !== 'none';
|
|
171
|
+
let body;
|
|
172
|
+
if (supportsBody && action.bodyTemplate) {
|
|
173
|
+
const bodyResult = (0, _components.interpolateSelectionIndividual)(action.bodyTemplate, item, index, count, variableState);
|
|
174
|
+
body = bodyResult.text;
|
|
175
|
+
}
|
|
176
|
+
// Make the request
|
|
177
|
+
const response = await (0, _core.fetch)(urlResult.text, {
|
|
178
|
+
method: action.method,
|
|
179
|
+
headers: buildWebhookHeaders(action),
|
|
180
|
+
body: body
|
|
181
|
+
});
|
|
182
|
+
if (!response.ok) {
|
|
183
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
184
|
+
}
|
|
185
|
+
setActionStatus(action.name, {
|
|
186
|
+
loading: false,
|
|
187
|
+
success: true
|
|
188
|
+
}, id);
|
|
189
|
+
itemResults.set(id, {
|
|
190
|
+
success: true
|
|
191
|
+
});
|
|
192
|
+
} catch (error) {
|
|
193
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
194
|
+
setActionStatus(action.name, {
|
|
195
|
+
loading: false,
|
|
196
|
+
error: err
|
|
197
|
+
}, id);
|
|
198
|
+
itemResults.set(id, {
|
|
199
|
+
success: false,
|
|
200
|
+
error: err
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// Update overall action status
|
|
205
|
+
const allSucceeded = Array.from(itemResults.values()).every((r)=>r.success);
|
|
206
|
+
const anyFailed = Array.from(itemResults.values()).some((r)=>!r.success);
|
|
207
|
+
if (allSucceeded) {
|
|
208
|
+
setActionStatus(action.name, {
|
|
209
|
+
loading: false,
|
|
210
|
+
success: true
|
|
211
|
+
});
|
|
212
|
+
} else if (anyFailed) {
|
|
213
|
+
setActionStatus(action.name, {
|
|
214
|
+
loading: false,
|
|
215
|
+
error: new Error('Some requests failed')
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
success: allSucceeded,
|
|
220
|
+
itemResults
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Execute a webhook action in batch mode (single request with all selections)
|
|
225
|
+
*/ async function executeWebhookBatch(action, selectionMap, variableState, setActionStatus) {
|
|
226
|
+
const items = Array.from(selectionMap.values());
|
|
227
|
+
setActionStatus(action.name, {
|
|
228
|
+
loading: true
|
|
229
|
+
});
|
|
230
|
+
try {
|
|
231
|
+
// Interpolate URL
|
|
232
|
+
const urlResult = (0, _components.interpolateSelectionBatch)(action.url, items, variableState);
|
|
233
|
+
// Interpolate body template if provided
|
|
234
|
+
const contentType = action.contentType ?? 'none';
|
|
235
|
+
const supportsBody = BODY_METHODS.has(action.method) && contentType !== 'none';
|
|
236
|
+
let body;
|
|
237
|
+
if (supportsBody && action.bodyTemplate) {
|
|
238
|
+
const bodyResult = (0, _components.interpolateSelectionBatch)(action.bodyTemplate, items, variableState);
|
|
239
|
+
body = bodyResult.text;
|
|
240
|
+
}
|
|
241
|
+
// Make the request
|
|
242
|
+
const response = await (0, _core.fetch)(urlResult.text, {
|
|
243
|
+
method: action.method,
|
|
244
|
+
headers: buildWebhookHeaders(action),
|
|
245
|
+
body: body
|
|
246
|
+
});
|
|
247
|
+
if (!response.ok) {
|
|
248
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
249
|
+
}
|
|
250
|
+
setActionStatus(action.name, {
|
|
251
|
+
loading: false,
|
|
252
|
+
success: true
|
|
253
|
+
});
|
|
254
|
+
return {
|
|
255
|
+
success: true
|
|
256
|
+
};
|
|
257
|
+
} catch (error) {
|
|
258
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
259
|
+
setActionStatus(action.name, {
|
|
260
|
+
loading: false,
|
|
261
|
+
error: err
|
|
262
|
+
});
|
|
263
|
+
return {
|
|
264
|
+
success: false,
|
|
265
|
+
error: err
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Execute a webhook action
|
|
271
|
+
*/ async function executeWebhookAction(action, selectionMap, variableState, setActionStatus) {
|
|
272
|
+
if (action.batchMode === 'batch') {
|
|
273
|
+
return executeWebhookBatch(action, selectionMap, variableState, setActionStatus);
|
|
274
|
+
} else {
|
|
275
|
+
return executeWebhookIndividual(action, selectionMap, variableState, setActionStatus);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Execute an event action
|
|
280
|
+
*/ async function executeEventAction(action, selectionMap, variableState, setActionStatus) {
|
|
281
|
+
if (action.batchMode === 'batch') {
|
|
282
|
+
return executeEventBatch(action, selectionMap, variableState, setActionStatus);
|
|
283
|
+
} else {
|
|
284
|
+
return executeEventIndividual(action, selectionMap, variableState, setActionStatus);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
async function executeAction(params) {
|
|
288
|
+
const { action, selectionMap, variableState, setActionStatus } = params;
|
|
289
|
+
if (selectionMap.size === 0) {
|
|
290
|
+
return {
|
|
291
|
+
success: true
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (action.type === 'event') {
|
|
295
|
+
return executeEventAction(action, selectionMap, variableState, setActionStatus);
|
|
296
|
+
} else if (action.type === 'webhook') {
|
|
297
|
+
return executeWebhookAction(action, selectionMap, variableState, setActionStatus);
|
|
298
|
+
}
|
|
299
|
+
return {
|
|
300
|
+
success: false,
|
|
301
|
+
error: new Error(`Unknown action type`)
|
|
302
|
+
};
|
|
303
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -40,9 +40,9 @@ _export(exports, {
|
|
|
40
40
|
return useVariableValues;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
const
|
|
43
|
+
const _components = require("@perses-dev/components");
|
|
44
44
|
const _immer = require("immer");
|
|
45
|
-
const
|
|
45
|
+
const _react = require("react");
|
|
46
46
|
const _builtinvariables = require("./builtin-variables");
|
|
47
47
|
class VariableStoreStateMap {
|
|
48
48
|
/**
|
|
@@ -150,11 +150,11 @@ function replaceVariablesInString(text, variableValues, extraVariables) {
|
|
|
150
150
|
loading: false
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
return (0,
|
|
153
|
+
return (0, _components.replaceVariables)(text, vars);
|
|
154
154
|
}
|
|
155
155
|
function useReplaceVariablesInString(str) {
|
|
156
|
-
const variablesInString = str ? (0,
|
|
156
|
+
const variablesInString = str ? (0, _components.parseVariables)(str) : [];
|
|
157
157
|
const variableValues = useAllVariableValues(variablesInString);
|
|
158
158
|
if (!str) return undefined;
|
|
159
|
-
return (0,
|
|
159
|
+
return (0, _components.replaceVariables)(str, variableValues);
|
|
160
160
|
}
|
package/dist/cjs/test/index.js
CHANGED
package/dist/cjs/test/render.js
CHANGED
package/dist/cjs/test/utils.js
CHANGED
package/dist/cjs/utils/action.js
CHANGED
package/dist/cjs/utils/event.js
CHANGED
package/dist/cjs/utils/index.js
CHANGED