@perses-dev/plugin-system 0.0.0-snapshot-panel-extra-content-3-17f9c42 → 0.0.0-snapshot-scatterplot-fix-imports-95e1b59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/CalculationSelector/CalculationSelector.js +7 -5
- package/dist/cjs/components/CalculationSelector/index.js +10 -8
- package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +350 -0
- package/dist/cjs/components/DatasourceEditorForm/index.js +30 -0
- package/dist/cjs/components/DatasourceSelect.js +137 -25
- package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +19 -17
- package/dist/cjs/components/LegendOptionsEditor/index.js +10 -8
- package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +25 -30
- package/dist/cjs/components/OptionsEditorRadios/index.js +10 -8
- package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +7 -5
- package/dist/cjs/components/OptionsEditorTabPanel/index.js +10 -8
- package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +13 -11
- package/dist/cjs/components/OptionsEditorTabs/index.js +10 -8
- package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +60 -19
- package/dist/cjs/components/PanelSpecEditor/index.js +10 -8
- package/dist/cjs/components/PluginEditor/PluginEditor.js +25 -32
- package/dist/cjs/components/PluginEditor/index.js +11 -9
- package/dist/cjs/components/PluginEditor/plugin-editor-api.js +8 -6
- package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +25 -14
- package/dist/cjs/components/PluginKindSelect/index.js +10 -8
- package/dist/cjs/components/PluginRegistry/PluginRegistry.js +11 -9
- package/dist/cjs/components/PluginRegistry/index.js +10 -8
- package/dist/cjs/components/PluginRegistry/plugin-indexes.js +7 -3
- package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +9 -7
- package/dist/cjs/components/PluginSpecEditor/index.js +10 -8
- package/dist/cjs/components/ProjectSelect.js +96 -0
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +192 -0
- package/dist/cjs/components/TimeRangeControls/index.js +30 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +45 -49
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +23 -21
- package/dist/cjs/components/TimeSeriesQueryEditor/index.js +10 -8
- package/dist/cjs/components/TraceQueryEditor/TraceQueryEditor.js +143 -0
- package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +96 -0
- package/dist/cjs/components/TraceQueryEditor/index.js +30 -0
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +445 -230
- package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +38 -32
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +11 -9
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +36 -37
- package/dist/cjs/components/Variables/index.js +11 -9
- package/dist/cjs/components/Variables/variable-model.js +24 -17
- package/dist/cjs/components/index.js +24 -19
- package/dist/cjs/constants/index.js +10 -8
- package/dist/cjs/constants/user-interface-text.js +7 -2
- package/dist/cjs/context/ProjectStoreProvider.js +78 -0
- package/dist/cjs/context/index.js +30 -0
- package/dist/cjs/context/query-params.js +49 -0
- package/dist/cjs/index.js +17 -13
- package/dist/cjs/model/index.js +18 -15
- package/dist/cjs/model/legend.js +32 -20
- package/dist/cjs/model/panels.js +2 -2
- package/dist/cjs/model/plugin-base.js +2 -2
- package/dist/cjs/model/plugin-loading.js +3 -1
- package/dist/cjs/model/trace-queries.js +16 -0
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +67 -35
- package/dist/cjs/runtime/DataQueriesProvider/index.js +11 -9
- package/dist/cjs/runtime/DataQueriesProvider/model.js +81 -0
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +55 -27
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +43 -0
- package/dist/cjs/runtime/TimeRangeProvider/index.js +12 -9
- package/dist/cjs/runtime/TimeRangeProvider/query-params.js +45 -59
- package/dist/cjs/runtime/TimeRangeProvider/refresh-interval.js +30 -0
- package/dist/cjs/runtime/builtin-variables.js +81 -0
- package/dist/cjs/runtime/datasources.js +31 -12
- package/dist/cjs/runtime/index.js +17 -13
- package/dist/cjs/runtime/plugin-registry.js +44 -14
- package/dist/cjs/runtime/template-variables.js +51 -13
- package/dist/cjs/runtime/time-series-queries.js +43 -31
- package/dist/cjs/runtime/trace-queries.js +76 -0
- package/dist/cjs/stories/shared-utils/decorators/WithDataQueries.js +7 -5
- package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +21 -16
- package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +42 -0
- package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +31 -13
- package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js +6 -4
- package/dist/cjs/stories/shared-utils/decorators/WithTimeRange.js +9 -7
- package/dist/cjs/stories/shared-utils/decorators/index.js +15 -12
- package/dist/cjs/stories/shared-utils/index.js +10 -8
- package/dist/cjs/test/index.js +11 -8
- package/dist/cjs/test/mock-data.js +80 -0
- package/dist/cjs/test/render.js +13 -11
- package/dist/cjs/test/test-plugins/bert/index.js +16 -12
- package/dist/cjs/test/test-plugins/ernie/index.js +15 -11
- package/dist/cjs/test/test-plugins/index.js +14 -10
- package/dist/cjs/test-utils/index.js +10 -8
- package/dist/cjs/test-utils/mock-plugin-registry.js +9 -5
- package/dist/cjs/utils/action.js +43 -0
- package/dist/cjs/utils/index.js +11 -8
- package/dist/cjs/utils/variables.js +26 -8
- package/dist/cjs/validation/datasource.js +30 -0
- package/dist/cjs/validation/duration.js +25 -0
- package/dist/cjs/validation/index.js +34 -0
- package/dist/cjs/validation/resource.js +24 -0
- package/dist/cjs/validation/role.js +86 -0
- package/dist/cjs/validation/rolebinding.js +55 -0
- package/dist/cjs/validation/secret.js +176 -0
- package/dist/cjs/validation/user.js +46 -0
- package/dist/cjs/validation/variable.js +48 -0
- package/dist/components/CalculationSelector/CalculationSelector.d.ts +1 -2
- package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
- package/dist/components/CalculationSelector/index.js.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +14 -0
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -0
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +342 -0
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -0
- package/dist/components/DatasourceEditorForm/index.d.ts +2 -0
- package/dist/components/DatasourceEditorForm/index.d.ts.map +1 -0
- package/dist/components/DatasourceEditorForm/index.js +15 -0
- package/dist/components/DatasourceEditorForm/index.js.map +1 -0
- package/dist/components/DatasourceSelect.d.ts +8 -3
- package/dist/components/DatasourceSelect.d.ts.map +1 -1
- package/dist/components/DatasourceSelect.js +120 -23
- package/dist/components/DatasourceSelect.js.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +1 -2
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +3 -3
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
- package/dist/components/LegendOptionsEditor/index.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +5 -5
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +18 -25
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
- package/dist/components/OptionsEditorRadios/index.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.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.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +3 -3
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
- package/dist/components/OptionsEditorTabs/index.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +2 -3
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +50 -11
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
- package/dist/components/PanelSpecEditor/index.js.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.d.ts +1 -2
- package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +17 -26
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginEditor/index.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts +3 -3
- package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +5 -5
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +3 -3
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js +23 -14
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
- package/dist/components/PluginKindSelect/index.js.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.d.ts +4 -4
- package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +3 -3
- package/dist/components/PluginRegistry/PluginRegistry.js.map +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.d.ts +2 -2
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
- package/dist/components/PluginSpecEditor/index.js.map +1 -1
- package/dist/components/ProjectSelect.d.ts +14 -0
- package/dist/components/ProjectSelect.d.ts.map +1 -0
- package/dist/components/ProjectSelect.js +91 -0
- package/dist/components/ProjectSelect.js.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +13 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.js +168 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -0
- package/dist/components/TimeRangeControls/index.d.ts +2 -0
- package/dist/components/TimeRangeControls/index.d.ts.map +1 -0
- package/dist/components/TimeRangeControls/index.js +15 -0
- package/dist/components/TimeRangeControls/index.js.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +1 -2
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +38 -44
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +1 -2
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/index.js.map +1 -1
- package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +8 -0
- package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +1 -0
- package/dist/components/TraceQueryEditor/TraceQueryEditor.js +130 -0
- package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +1 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +12 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +1 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.js +83 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +1 -0
- package/dist/components/TraceQueryEditor/index.d.ts +2 -0
- package/dist/components/TraceQueryEditor/index.d.ts.map +1 -0
- package/dist/components/TraceQueryEditor/index.js +15 -0
- package/dist/components/TraceQueryEditor/index.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +10 -8
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +395 -184
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +2 -3
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +4 -4
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +8 -19
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +30 -35
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/Variables/variable-model.d.ts.map +1 -1
- package/dist/components/Variables/variable-model.js +9 -10
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/user-interface-text.d.ts +2 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -1
- package/dist/constants/user-interface-text.js +4 -1
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/ProjectStoreProvider.d.ts +16 -0
- package/dist/context/ProjectStoreProvider.d.ts.map +1 -0
- package/dist/context/ProjectStoreProvider.js +56 -0
- package/dist/context/ProjectStoreProvider.js.map +1 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +15 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/query-params.d.ts +5 -0
- package/dist/context/query-params.d.ts.map +1 -0
- package/dist/context/query-params.js +41 -0
- package/dist/context/query-params.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/model/datasource.d.ts +2 -1
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js +3 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/index.d.ts +1 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +1 -0
- package/dist/model/index.js.map +1 -1
- package/dist/model/legend.d.ts +3 -3
- package/dist/model/legend.d.ts.map +1 -1
- package/dist/model/legend.js +14 -14
- package/dist/model/legend.js.map +1 -1
- package/dist/model/panels.d.ts +3 -2
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/plugin-base.js.map +1 -1
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/model/plugins.d.ts +6 -4
- package/dist/model/plugins.d.ts.map +1 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/model/time-series-queries.d.ts +2 -2
- package/dist/model/time-series-queries.d.ts.map +1 -1
- package/dist/model/time-series-queries.js.map +1 -1
- package/dist/model/trace-queries.d.ts +19 -0
- package/dist/model/trace-queries.d.ts.map +1 -0
- package/dist/model/trace-queries.js +15 -0
- package/dist/model/trace-queries.js.map +1 -0
- package/dist/model/variables.d.ts +2 -2
- package/dist/model/variables.d.ts.map +1 -1
- package/dist/model/variables.js +3 -1
- package/dist/model/variables.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +6 -6
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +52 -28
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/index.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.d.ts +18 -13
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js +67 -1
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +9 -4
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +37 -20
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +9 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +30 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/index.d.ts +1 -0
- package/dist/runtime/TimeRangeProvider/index.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/index.js +1 -0
- package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts +5 -5
- package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.js +13 -45
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts +7 -0
- package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts.map +1 -0
- package/dist/runtime/TimeRangeProvider/refresh-interval.js +25 -0
- package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -0
- package/dist/runtime/builtin-variables.d.ts +11 -0
- package/dist/runtime/builtin-variables.d.ts.map +1 -0
- package/dist/runtime/builtin-variables.js +59 -0
- package/dist/runtime/builtin-variables.js.map +1 -0
- package/dist/runtime/datasources.d.ts +42 -7
- package/dist/runtime/datasources.d.ts.map +1 -1
- package/dist/runtime/datasources.js +15 -7
- package/dist/runtime/datasources.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +5 -3
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js +22 -5
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/runtime/template-variables.d.ts +6 -5
- package/dist/runtime/template-variables.d.ts.map +1 -1
- package/dist/runtime/template-variables.js +36 -9
- package/dist/runtime/template-variables.js.map +1 -1
- package/dist/runtime/time-series-queries.d.ts +3 -3
- package/dist/runtime/time-series-queries.d.ts.map +1 -1
- package/dist/runtime/time-series-queries.js +21 -19
- package/dist/runtime/time-series-queries.js.map +1 -1
- package/dist/runtime/trace-queries.d.ts +14 -0
- package/dist/runtime/trace-queries.d.ts.map +1 -0
- package/dist/runtime/trace-queries.js +61 -0
- package/dist/runtime/trace-queries.js.map +1 -0
- package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +1 -2
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.js +2 -1
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +12 -0
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -0
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +39 -0
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -0
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +24 -8
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +4 -5
- package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithTimeRange.js +2 -2
- package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
- package/dist/stories/shared-utils/decorators/index.d.ts +1 -0
- package/dist/stories/shared-utils/decorators/index.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/index.js +1 -0
- package/dist/stories/shared-utils/decorators/index.js.map +1 -1
- package/dist/stories/shared-utils/index.js.map +1 -1
- package/dist/test/index.d.ts +1 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +1 -0
- package/dist/test/index.js.map +1 -1
- package/dist/test/mock-data.d.ts +4 -0
- package/dist/test/mock-data.d.ts.map +1 -0
- package/dist/test/mock-data.js +64 -0
- package/dist/test/mock-data.js.map +1 -0
- package/dist/test/render.d.ts +1 -1
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +2 -2
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/test-plugins/bert/index.js +2 -2
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +2 -2
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test/test-plugins/index.js.map +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js +3 -3
- package/dist/test-utils/mock-plugin-registry.js.map +1 -1
- package/dist/utils/action.d.ts +4 -0
- package/dist/utils/action.d.ts.map +1 -0
- package/dist/utils/action.js +27 -0
- package/dist/utils/action.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/variables.d.ts.map +1 -1
- package/dist/utils/variables.js +17 -5
- package/dist/utils/variables.js.map +1 -1
- package/dist/validation/datasource.d.ts +19 -0
- package/dist/validation/datasource.d.ts.map +1 -0
- package/dist/validation/datasource.js +22 -0
- package/dist/validation/datasource.js.map +1 -0
- package/dist/validation/duration.d.ts +3 -0
- package/dist/validation/duration.d.ts.map +1 -0
- package/dist/validation/duration.js +17 -0
- package/dist/validation/duration.js.map +1 -0
- package/dist/validation/index.d.ts +6 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +19 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/resource.d.ts +3 -0
- package/dist/validation/resource.d.ts.map +1 -0
- package/dist/validation/resource.js +16 -0
- package/dist/validation/resource.js.map +1 -0
- package/dist/validation/role.d.ts +228 -0
- package/dist/validation/role.d.ts.map +1 -0
- package/dist/validation/role.js +67 -0
- package/dist/validation/role.js.map +1 -0
- package/dist/validation/rolebinding.d.ts +137 -0
- package/dist/validation/rolebinding.d.ts.map +1 -0
- package/dist/validation/rolebinding.js +47 -0
- package/dist/validation/rolebinding.js.map +1 -0
- package/dist/validation/secret.d.ts +964 -0
- package/dist/validation/secret.d.ts.map +1 -0
- package/dist/validation/secret.js +157 -0
- package/dist/validation/secret.js.map +1 -0
- package/dist/validation/user.d.ts +93 -0
- package/dist/validation/user.d.ts.map +1 -0
- package/dist/validation/user.js +38 -0
- package/dist/validation/user.js.map +1 -0
- package/dist/validation/variable.d.ts +96 -0
- package/dist/validation/variable.d.ts.map +1 -0
- package/dist/validation/variable.js +40 -0
- package/dist/validation/variable.js.map +1 -0
- package/package.json +9 -6
|
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "LegendOptionsEditor", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return LegendOptionsEditor;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
const _core = require("@perses-dev/core");
|
|
24
26
|
const _components = require("@perses-dev/components");
|
|
@@ -47,7 +49,7 @@ const VALUE_OPTIONS = Object.entries(_model.LEGEND_VALUE_CONFIG).map(([id, confi
|
|
|
47
49
|
...config
|
|
48
50
|
};
|
|
49
51
|
});
|
|
50
|
-
function LegendOptionsEditor({ value
|
|
52
|
+
function LegendOptionsEditor({ value, onChange }) {
|
|
51
53
|
const handleLegendShowChange = (_, checked)=>{
|
|
52
54
|
// legend is hidden when legend obj is undefined
|
|
53
55
|
const legendValue = checked === true ? {
|
|
@@ -102,24 +104,24 @@ function LegendOptionsEditor({ value , onChange }) {
|
|
|
102
104
|
}
|
|
103
105
|
return result;
|
|
104
106
|
}, []);
|
|
105
|
-
return /*#__PURE__*/ (0,
|
|
107
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
106
108
|
children: [
|
|
107
|
-
!isValidLegend && /*#__PURE__*/ (0,
|
|
109
|
+
!isValidLegend && /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorAlert, {
|
|
108
110
|
error: {
|
|
109
111
|
name: 'invalid-legend',
|
|
110
112
|
message: 'Invalid legend spec'
|
|
111
113
|
}
|
|
112
114
|
}),
|
|
113
|
-
/*#__PURE__*/ (0,
|
|
115
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
|
|
114
116
|
label: "Show",
|
|
115
|
-
control: /*#__PURE__*/ (0,
|
|
117
|
+
control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Switch, {
|
|
116
118
|
checked: value !== undefined,
|
|
117
119
|
onChange: handleLegendShowChange
|
|
118
120
|
})
|
|
119
121
|
}),
|
|
120
|
-
/*#__PURE__*/ (0,
|
|
122
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
|
|
121
123
|
label: "Position",
|
|
122
|
-
control: /*#__PURE__*/ (0,
|
|
124
|
+
control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
|
|
123
125
|
value: {
|
|
124
126
|
...legendPositionConfig,
|
|
125
127
|
id: currentPosition
|
|
@@ -130,9 +132,9 @@ function LegendOptionsEditor({ value , onChange }) {
|
|
|
130
132
|
disableClearable: true
|
|
131
133
|
})
|
|
132
134
|
}),
|
|
133
|
-
/*#__PURE__*/ (0,
|
|
135
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
|
|
134
136
|
label: "Mode",
|
|
135
|
-
control: /*#__PURE__*/ (0,
|
|
137
|
+
control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
|
|
136
138
|
value: {
|
|
137
139
|
...legendModeConfig,
|
|
138
140
|
id: currentMode
|
|
@@ -143,9 +145,9 @@ function LegendOptionsEditor({ value , onChange }) {
|
|
|
143
145
|
disableClearable: true
|
|
144
146
|
})
|
|
145
147
|
}),
|
|
146
|
-
/*#__PURE__*/ (0,
|
|
148
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
|
|
147
149
|
label: "Size",
|
|
148
|
-
control: /*#__PURE__*/ (0,
|
|
150
|
+
control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
|
|
149
151
|
value: {
|
|
150
152
|
...legendSizeConfig,
|
|
151
153
|
id: currentSize
|
|
@@ -154,23 +156,23 @@ function LegendOptionsEditor({ value , onChange }) {
|
|
|
154
156
|
onChange: handleLegendSizeChange,
|
|
155
157
|
// TODO: enable sizes for list mode when we normalize the layout of
|
|
156
158
|
// lists to more closely match tables.
|
|
157
|
-
disabled: value === undefined || currentMode !== '
|
|
159
|
+
disabled: value === undefined || currentMode !== 'table',
|
|
158
160
|
disableClearable: true
|
|
159
161
|
})
|
|
160
162
|
}),
|
|
161
|
-
/*#__PURE__*/ (0,
|
|
163
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
|
|
162
164
|
label: "Values",
|
|
163
165
|
control: // For some reason, the inferred option type doesn't always seem to work
|
|
164
166
|
// quite right when `multiple` is true. Explicitly setting the generics
|
|
165
167
|
// to work around this.
|
|
166
|
-
/*#__PURE__*/ (0,
|
|
168
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
|
|
167
169
|
multiple: true,
|
|
168
170
|
disableCloseOnSelect: true,
|
|
169
171
|
disableClearable: true,
|
|
170
172
|
value: legendValuesConfig,
|
|
171
173
|
options: VALUE_OPTIONS,
|
|
172
174
|
onChange: handleLegendValueChange,
|
|
173
|
-
disabled: value === undefined || currentMode !== '
|
|
175
|
+
disabled: value === undefined || currentMode !== 'table',
|
|
174
176
|
limitTags: 1,
|
|
175
177
|
ChipProps: {
|
|
176
178
|
size: 'small'
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./LegendOptionsEditor"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,54 +16,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "OptionsEditorRadios", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return OptionsEditorRadios;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
const _react = require("react");
|
|
24
|
-
const
|
|
26
|
+
const _OptionsEditorTabPanel = require("../OptionsEditorTabPanel");
|
|
25
27
|
const OptionsEditorRadios = (props)=>{
|
|
26
|
-
const { tabs
|
|
28
|
+
const { tabs, defaultTab, onModeChange, isReadonly } = props;
|
|
27
29
|
const [activeTab, setActiveTab] = (0, _react.useState)(defaultTab);
|
|
28
30
|
const handleChange = (_, value)=>{
|
|
29
31
|
const v = parseInt(value);
|
|
30
32
|
setActiveTab(v);
|
|
31
33
|
onModeChange(v);
|
|
32
34
|
};
|
|
33
|
-
return /*#__PURE__*/ (0,
|
|
35
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
34
36
|
children: [
|
|
35
|
-
/*#__PURE__*/ (0,
|
|
37
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
36
38
|
sx: {
|
|
37
39
|
borderBottom: 1,
|
|
38
40
|
borderColor: (theme)=>theme.palette.divider
|
|
39
41
|
},
|
|
40
|
-
children: /*#__PURE__*/ (0,
|
|
41
|
-
children:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.FormControlLabel, {
|
|
55
|
-
disabled: isReadonly,
|
|
56
|
-
value: i,
|
|
57
|
-
control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Radio, {}),
|
|
58
|
-
label: label
|
|
59
|
-
}, label);
|
|
60
|
-
})
|
|
42
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControl, {
|
|
43
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.RadioGroup, {
|
|
44
|
+
row: true,
|
|
45
|
+
defaultValue: defaultTab,
|
|
46
|
+
value: activeTab,
|
|
47
|
+
onChange: handleChange,
|
|
48
|
+
"aria-labelledby": "Configuration radio",
|
|
49
|
+
children: tabs.map(({ label }, i)=>{
|
|
50
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControlLabel, {
|
|
51
|
+
disabled: isReadonly,
|
|
52
|
+
value: i,
|
|
53
|
+
control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Radio, {}),
|
|
54
|
+
label: label
|
|
55
|
+
}, label);
|
|
61
56
|
})
|
|
62
|
-
|
|
57
|
+
})
|
|
63
58
|
})
|
|
64
59
|
}),
|
|
65
|
-
tabs.map(({ label
|
|
66
|
-
return /*#__PURE__*/ (0,
|
|
60
|
+
tabs.map(({ label, content }, i)=>{
|
|
61
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabPanel.OptionsEditorTabPanel, {
|
|
67
62
|
value: activeTab,
|
|
68
63
|
index: i,
|
|
69
64
|
children: content
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./OptionsEditorRadios"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,20 +16,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "OptionsEditorTabPanel", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return OptionsEditorTabPanel;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
function OptionsEditorTabPanel(props) {
|
|
24
|
-
const { children
|
|
26
|
+
const { children, value, index, ...other } = props;
|
|
25
27
|
const isActive = value === index;
|
|
26
|
-
return /*#__PURE__*/ (0,
|
|
28
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
27
29
|
role: "tabpanel",
|
|
28
30
|
hidden: !isActive,
|
|
29
31
|
id: `options-editor-tabpanel-${index}`,
|
|
30
32
|
"aria-labelledby": `options-editor-tab-${index}`,
|
|
31
33
|
...other,
|
|
32
|
-
children: isActive && /*#__PURE__*/ (0,
|
|
34
|
+
children: isActive && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
33
35
|
mt: 2,
|
|
34
36
|
children: children
|
|
35
37
|
})
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./OptionsEditorTabPanel"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,30 +16,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "OptionsEditorTabs", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return OptionsEditorTabs;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
const _react = require("react");
|
|
24
|
-
const
|
|
25
|
-
const OptionsEditorTabs = ({ tabs
|
|
26
|
+
const _OptionsEditorTabPanel = require("../OptionsEditorTabPanel");
|
|
27
|
+
const OptionsEditorTabs = ({ tabs })=>{
|
|
26
28
|
const [activeTab, setActiveTab] = (0, _react.useState)(0);
|
|
27
29
|
const handleChange = (_, newValue)=>{
|
|
28
30
|
setActiveTab(newValue);
|
|
29
31
|
};
|
|
30
|
-
return /*#__PURE__*/ (0,
|
|
32
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
31
33
|
children: [
|
|
32
|
-
/*#__PURE__*/ (0,
|
|
34
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
33
35
|
sx: {
|
|
34
36
|
borderBottom: 1,
|
|
35
37
|
borderColor: (theme)=>theme.palette.divider
|
|
36
38
|
},
|
|
37
|
-
children: /*#__PURE__*/ (0,
|
|
39
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tabs, {
|
|
38
40
|
value: activeTab,
|
|
39
41
|
onChange: handleChange,
|
|
40
42
|
"aria-label": "Panel configuration tabs",
|
|
41
|
-
children: tabs.map(({ label
|
|
42
|
-
return /*#__PURE__*/ (0,
|
|
43
|
+
children: tabs.map(({ label }, i)=>{
|
|
44
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tab, {
|
|
43
45
|
label: label,
|
|
44
46
|
id: `options-editor-tab-${i}`,
|
|
45
47
|
"aria-controls": `options-editor-tabpanel-${i}`
|
|
@@ -47,8 +49,8 @@ const OptionsEditorTabs = ({ tabs })=>{
|
|
|
47
49
|
})
|
|
48
50
|
})
|
|
49
51
|
}),
|
|
50
|
-
tabs.map(({ label
|
|
51
|
-
return /*#__PURE__*/ (0,
|
|
52
|
+
tabs.map(({ label, content }, i)=>{
|
|
53
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabPanel.OptionsEditorTabPanel, {
|
|
52
54
|
value: activeTab,
|
|
53
55
|
index: i,
|
|
54
56
|
children: content
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./OptionsEditorTabs"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,19 +16,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "PanelSpecEditor", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return PanelSpecEditor;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _components = require("@perses-dev/components");
|
|
23
25
|
const _runtime = require("../../runtime");
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
+
const _OptionsEditorTabs = require("../OptionsEditorTabs");
|
|
27
|
+
const _TimeSeriesQueryEditor = require("../TimeSeriesQueryEditor");
|
|
28
|
+
const _TraceQueryEditor = require("../TraceQueryEditor");
|
|
26
29
|
function PanelSpecEditor(props) {
|
|
27
|
-
const { panelDefinition
|
|
28
|
-
const { kind
|
|
29
|
-
const { data: plugin
|
|
30
|
+
const { panelDefinition, onJSONChange, onQueriesChange, onPluginSpecChange } = props;
|
|
31
|
+
const { kind } = panelDefinition.spec.plugin;
|
|
32
|
+
const { data: plugin, isLoading, error } = (0, _runtime.usePlugin)('Panel', kind);
|
|
30
33
|
if (error) {
|
|
31
|
-
return /*#__PURE__*/ (0,
|
|
34
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorAlert, {
|
|
32
35
|
error: error
|
|
33
36
|
});
|
|
34
37
|
}
|
|
@@ -39,23 +42,60 @@ function PanelSpecEditor(props) {
|
|
|
39
42
|
if (plugin === undefined) {
|
|
40
43
|
throw new Error(`Missing implementation for panel plugin with kind '${kind}'`);
|
|
41
44
|
}
|
|
42
|
-
const
|
|
45
|
+
const getQueryType = ()=>{
|
|
46
|
+
var _panelDefinition_spec, _queriesList_;
|
|
47
|
+
const queriesList = panelDefinition === null || panelDefinition === void 0 ? void 0 : (_panelDefinition_spec = panelDefinition.spec) === null || _panelDefinition_spec === void 0 ? void 0 : _panelDefinition_spec.queries;
|
|
48
|
+
if (queriesList === undefined) {
|
|
49
|
+
return '';
|
|
50
|
+
}
|
|
51
|
+
const queryType = (_queriesList_ = queriesList[0]) === null || _queriesList_ === void 0 ? void 0 : _queriesList_.kind;
|
|
52
|
+
return queryType;
|
|
53
|
+
};
|
|
54
|
+
// Get the corresponding queryEditor depending on the queryType
|
|
55
|
+
const getQueryEditorComponent = ()=>{
|
|
56
|
+
const queryType = getQueryType();
|
|
57
|
+
// default case handles cause where there is no queryType yet (e.g. UI > 'editing' mode > 'Add Panel')
|
|
58
|
+
switch(queryType){
|
|
59
|
+
case 'TimeSeriesQuery':
|
|
60
|
+
var _panelDefinition_spec_queries;
|
|
61
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesQueryEditor.TimeSeriesQueryEditor, {
|
|
62
|
+
queries: (_panelDefinition_spec_queries = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries !== void 0 ? _panelDefinition_spec_queries : [],
|
|
63
|
+
onChange: onQueriesChange
|
|
64
|
+
});
|
|
65
|
+
case 'TraceQuery':
|
|
66
|
+
var _panelDefinition_spec_queries1;
|
|
67
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TraceQueryEditor.TraceQueryEditor, {
|
|
68
|
+
queries: (_panelDefinition_spec_queries1 = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries1 !== void 0 ? _panelDefinition_spec_queries1 : [],
|
|
69
|
+
onChange: onQueriesChange
|
|
70
|
+
});
|
|
71
|
+
default:
|
|
72
|
+
// ScatterChart only handles trace queries for now
|
|
73
|
+
if (kind === 'ScatterChart') {
|
|
74
|
+
var _panelDefinition_spec_queries2;
|
|
75
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TraceQueryEditor.TraceQueryEditor, {
|
|
76
|
+
queries: (_panelDefinition_spec_queries2 = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries2 !== void 0 ? _panelDefinition_spec_queries2 : [],
|
|
77
|
+
onChange: onQueriesChange
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
var _panelDefinition_spec_queries3;
|
|
81
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesQueryEditor.TimeSeriesQueryEditor, {
|
|
82
|
+
queries: (_panelDefinition_spec_queries3 = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries3 !== void 0 ? _panelDefinition_spec_queries3 : [],
|
|
83
|
+
onChange: onQueriesChange
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const { panelOptionsEditorComponents, hideQueryEditor } = plugin;
|
|
43
88
|
let tabs = [];
|
|
44
89
|
if (!hideQueryEditor) {
|
|
45
|
-
var _queries;
|
|
46
|
-
// Since we only support TimeSeriesQuery for now, we will always show a TimeSeriesQueryEditor
|
|
47
90
|
tabs.push({
|
|
48
91
|
label: 'Query',
|
|
49
|
-
content:
|
|
50
|
-
queries: (_queries = panelDefinition.spec.queries) !== null && _queries !== void 0 ? _queries : [],
|
|
51
|
-
onChange: onQueriesChange
|
|
52
|
-
})
|
|
92
|
+
content: getQueryEditorComponent()
|
|
53
93
|
});
|
|
54
94
|
}
|
|
55
95
|
if (panelOptionsEditorComponents !== undefined) {
|
|
56
|
-
tabs = tabs.concat(panelOptionsEditorComponents.map(({ label
|
|
96
|
+
tabs = tabs.concat(panelOptionsEditorComponents.map(({ label, content: OptionsEditorComponent })=>({
|
|
57
97
|
label,
|
|
58
|
-
content: /*#__PURE__*/ (0,
|
|
98
|
+
content: /*#__PURE__*/ (0, _jsxruntime.jsx)(OptionsEditorComponent, {
|
|
59
99
|
value: panelDefinition.spec.plugin.spec,
|
|
60
100
|
onChange: onPluginSpecChange
|
|
61
101
|
})
|
|
@@ -64,12 +104,13 @@ function PanelSpecEditor(props) {
|
|
|
64
104
|
// always show json editor by default
|
|
65
105
|
tabs.push({
|
|
66
106
|
label: 'JSON',
|
|
67
|
-
content: /*#__PURE__*/ (0,
|
|
107
|
+
content: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.JSONEditor, {
|
|
108
|
+
maxHeight: "80vh",
|
|
68
109
|
value: panelDefinition,
|
|
69
110
|
onChange: onJSONChange
|
|
70
111
|
})
|
|
71
112
|
});
|
|
72
|
-
return /*#__PURE__*/ (0,
|
|
113
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabs.OptionsEditorTabs, {
|
|
73
114
|
tabs: tabs
|
|
74
115
|
}, tabs.length);
|
|
75
116
|
}
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./PanelSpecEditor"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,48 +16,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "PluginEditor", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return PluginEditor;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
25
|
+
const _PluginKindSelect = require("../PluginKindSelect");
|
|
26
|
+
const _PluginSpecEditor = require("../PluginSpecEditor");
|
|
27
|
+
const _plugineditorapi = require("./plugin-editor-api");
|
|
26
28
|
function PluginEditor(props) {
|
|
27
29
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28
|
-
const { value
|
|
29
|
-
const { pendingKind
|
|
30
|
-
|
|
31
|
-
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
30
|
+
const { value, pluginType, pluginKindLabel, onChange: _, isReadonly, ...others } = props;
|
|
31
|
+
const { pendingKind, isLoading, error, onKindChange, onSpecChange } = (0, _plugineditorapi.usePluginEditor)(props);
|
|
32
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
32
33
|
...others,
|
|
33
34
|
children: [
|
|
34
|
-
/*#__PURE__*/ (0,
|
|
35
|
-
margin: "dense",
|
|
35
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_PluginKindSelect.PluginKindSelect, {
|
|
36
36
|
fullWidth: false,
|
|
37
|
-
disabled: isLoading,
|
|
38
|
-
error: error !== null,
|
|
39
37
|
sx: {
|
|
40
|
-
mb: 1
|
|
38
|
+
mb: 1,
|
|
39
|
+
minWidth: 120
|
|
40
|
+
},
|
|
41
|
+
margin: "dense",
|
|
42
|
+
label: pluginKindLabel,
|
|
43
|
+
pluginType: pluginType,
|
|
44
|
+
disabled: isLoading,
|
|
45
|
+
value: pendingKind !== '' ? pendingKind : value.kind,
|
|
46
|
+
InputProps: {
|
|
47
|
+
readOnly: isReadonly
|
|
41
48
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: pluginKindLabel
|
|
46
|
-
}),
|
|
47
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginKindSelect.PluginKindSelect, {
|
|
48
|
-
labelId: "plugin-kind-label",
|
|
49
|
-
label: pluginKindLabel,
|
|
50
|
-
pluginType: pluginType,
|
|
51
|
-
value: pendingKind !== '' ? pendingKind : value.kind,
|
|
52
|
-
readOnly: isReadonly,
|
|
53
|
-
onChange: onKindChange
|
|
54
|
-
}),
|
|
55
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.FormHelperText, {
|
|
56
|
-
children: (ref = error === null || error === void 0 ? void 0 : error.message) !== null && ref !== void 0 ? ref : ''
|
|
57
|
-
})
|
|
58
|
-
]
|
|
49
|
+
error: !!error,
|
|
50
|
+
helperText: error === null || error === void 0 ? void 0 : error.message,
|
|
51
|
+
onChange: onKindChange
|
|
59
52
|
}),
|
|
60
|
-
/*#__PURE__*/ (0,
|
|
53
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_PluginSpecEditor.PluginSpecEditor, {
|
|
61
54
|
pluginType: pluginType,
|
|
62
55
|
pluginKind: value.kind,
|
|
63
56
|
value: value.spec,
|
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
17
|
+
_export_star(require("./PluginEditor"), exports);
|
|
18
|
+
_export_star(require("./plugin-editor-api"), exports);
|
|
19
|
+
function _export_star(from, to) {
|
|
20
20
|
Object.keys(from).forEach(function(k) {
|
|
21
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
22
|
+
Object.defineProperty(to, k, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return from[k];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
27
29
|
});
|
|
28
30
|
return from;
|
|
29
31
|
}
|