@perses-dev/plugin-system 0.55.0-beta.2 → 0.55.0-beta.6
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/Annotations/AnnotationEditorForm/AnnotationEditorForm.d.ts +3 -3
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.d.ts.map +1 -1
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.js +11 -11
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.js.map +1 -1
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.d.ts +3 -3
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.d.ts.map +1 -1
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.js +6 -6
- package/dist/components/Annotations/AnnotationEditorForm/AnnotationPreview.js.map +1 -1
- package/dist/components/Annotations/AnnotationEditorForm/index.js +1 -1
- package/dist/components/Annotations/AnnotationEditorForm/index.js.map +1 -1
- package/dist/components/Annotations/index.js +2 -2
- package/dist/components/Annotations/index.js.map +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.d.ts +2 -2
- package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js +2 -2
- 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.d.ts +3 -2
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +10 -9
- 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.d.ts +4 -4
- package/dist/components/DatasourceSelect/DatasourceSelect.d.ts.map +1 -1
- package/dist/components/DatasourceSelect/DatasourceSelect.js +7 -7
- 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/DatasourceTestConnectionButton/DatasourceTestConnectionButton.d.ts +8 -0
- package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.d.ts.map +1 -0
- package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.js +45 -0
- package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.js.map +1 -0
- package/dist/components/DatasourceTestConnectionButton/index.d.ts +2 -0
- package/dist/components/DatasourceTestConnectionButton/index.d.ts.map +1 -0
- package/dist/{cjs/model/alerts-queries.js → components/DatasourceTestConnectionButton/index.js} +3 -4
- package/dist/components/DatasourceTestConnectionButton/index.js.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts +3 -2
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +54 -29
- 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 +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.d.ts.map +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +24 -24
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js.map +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/index.js +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/index.js.map +1 -1
- package/dist/components/LayoutEditor/LayoutEditor.d.ts +16 -0
- package/dist/components/LayoutEditor/LayoutEditor.d.ts.map +1 -0
- package/dist/components/LayoutEditor/LayoutEditor.js +115 -0
- package/dist/components/LayoutEditor/LayoutEditor.js.map +1 -0
- package/dist/components/LayoutEditor/RepeatLayoutPreview.d.ts +7 -0
- package/dist/components/LayoutEditor/RepeatLayoutPreview.d.ts.map +1 -0
- package/dist/components/LayoutEditor/RepeatLayoutPreview.js +92 -0
- package/dist/components/LayoutEditor/RepeatLayoutPreview.js.map +1 -0
- package/dist/components/LayoutEditor/RepeatVariableEditor.d.ts +18 -0
- package/dist/components/LayoutEditor/RepeatVariableEditor.d.ts.map +1 -0
- package/dist/components/LayoutEditor/RepeatVariableEditor.js +168 -0
- package/dist/components/LayoutEditor/RepeatVariableEditor.js.map +1 -0
- package/dist/components/LayoutEditor/index.d.ts +4 -0
- package/dist/components/LayoutEditor/index.d.ts.map +1 -0
- package/dist/{cjs/model/explore.js → components/LayoutEditor/index.js} +5 -4
- package/dist/components/LayoutEditor/index.js.map +1 -0
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +2 -2
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +5 -5
- 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/LinksEditor/LinksEditor.d.ts +3 -3
- package/dist/components/LinksEditor/LinksEditor.d.ts.map +1 -1
- package/dist/components/LinksEditor/LinksEditor.js +6 -6
- package/dist/components/LinksEditor/LinksEditor.js.map +1 -1
- package/dist/components/LinksEditor/index.js +1 -1
- package/dist/components/LinksEditor/index.js.map +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.d.ts +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.d.ts.map +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.js +2 -2
- 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.d.ts +3 -4
- package/dist/components/MultiQueryEditor/MultiQueryEditor.d.ts.map +1 -1
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js +12 -9
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.d.ts +3 -4
- package/dist/components/MultiQueryEditor/QueryEditorContainer.d.ts.map +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js +14 -14
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -1
- package/dist/components/MultiQueryEditor/index.js +2 -2
- package/dist/components/MultiQueryEditor/index.js.map +1 -1
- package/dist/components/MultiQueryEditor/utils.d.ts +1 -1
- package/dist/components/MultiQueryEditor/utils.d.ts.map +1 -1
- package/dist/components/MultiQueryEditor/utils.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +4 -4
- 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.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 +1 -1
- package/dist/components/OptionsEditorTabPanel/index.js.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +4 -4
- 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/PanelAnnotationsEditor.d.ts +2 -2
- package/dist/components/PanelSpecEditor/PanelAnnotationsEditor.d.ts.map +1 -1
- package/dist/components/PanelSpecEditor/PanelAnnotationsEditor.js +9 -9
- package/dist/components/PanelSpecEditor/PanelAnnotationsEditor.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +7 -5
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +19 -10
- 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.d.ts +2 -2
- package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +10 -9
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginEditor/index.js +2 -2
- package/dist/components/PluginEditor/index.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts +4 -3
- package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +4 -4
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +3 -4
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js +4 -4
- 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.d.ts +2 -2
- package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +5 -5
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/PluginRegistry/getPluginSearchHelper.d.ts +2 -2
- package/dist/components/PluginRegistry/getPluginSearchHelper.d.ts.map +1 -1
- package/dist/components/PluginRegistry/getPluginSearchHelper.js +2 -2
- package/dist/components/PluginRegistry/getPluginSearchHelper.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.d.ts +2 -1
- package/dist/components/PluginRegistry/plugin-indexes.d.ts.map +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js +3 -3
- package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
- package/dist/components/PluginSpecEditor/DatasourceSpecEditor.d.ts +10 -0
- package/dist/components/PluginSpecEditor/DatasourceSpecEditor.d.ts.map +1 -0
- package/dist/components/PluginSpecEditor/DatasourceSpecEditor.js +62 -0
- package/dist/components/PluginSpecEditor/DatasourceSpecEditor.js.map +1 -0
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +5 -4
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js +19 -5
- 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 +1 -1
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.d.ts.map +1 -1
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js +3 -3
- package/dist/components/SelectionOptionsEditor/SelectionOptionsEditor.js.map +1 -1
- package/dist/components/SelectionOptionsEditor/index.js +1 -1
- package/dist/components/SelectionOptionsEditor/index.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +2 -2
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +13 -14
- 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.d.ts +3 -3
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +11 -11
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +2 -2
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +7 -7
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js +3 -3
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +2 -2
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/index.js +2 -2
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/Variables/variable-model.d.ts +4 -4
- package/dist/components/Variables/variable-model.d.ts.map +1 -1
- package/dist/components/Variables/variable-model.js +3 -3
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +21 -19
- package/dist/components/index.js.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +2 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/repeat.d.ts +3 -0
- package/dist/constants/repeat.d.ts.map +1 -0
- package/dist/{cjs/model/datasource.js → constants/repeat.js} +4 -4
- package/dist/constants/repeat.js.map +1 -0
- package/dist/context/ValidationProvider.d.ts +5 -5
- package/dist/context/ValidationProvider.d.ts.map +1 -1
- package/dist/context/ValidationProvider.js +5 -5
- 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 +9 -9
- package/dist/index.js.map +1 -1
- package/dist/model/alerts-queries.d.ts +4 -4
- package/dist/model/alerts-queries.d.ts.map +1 -1
- package/dist/model/alerts-queries.js.map +1 -1
- package/dist/model/annotations.d.ts +3 -3
- package/dist/model/annotations.d.ts.map +1 -1
- package/dist/model/annotations.js.map +1 -1
- package/dist/model/calculations.d.ts +1 -1
- package/dist/model/calculations.d.ts.map +1 -1
- package/dist/model/calculations.js.map +1 -1
- package/dist/model/datasource.d.ts +10 -3
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js +1 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/explore.d.ts +2 -3
- package/dist/model/explore.d.ts.map +1 -1
- package/dist/model/explore.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 +17 -16
- package/dist/model/index.js.map +1 -1
- package/dist/model/json-queries.d.ts +29 -0
- package/dist/model/json-queries.d.ts.map +1 -0
- package/dist/{cjs/model/annotations.js → model/json-queries.js} +5 -4
- package/dist/model/json-queries.js.map +1 -0
- package/dist/model/legend.d.ts +2 -2
- package/dist/model/legend.d.ts.map +1 -1
- package/dist/model/legend.js +2 -2
- package/dist/model/legend.js.map +1 -1
- package/dist/model/log-queries.d.ts +3 -3
- package/dist/model/log-queries.d.ts.map +1 -1
- package/dist/model/log-queries.js.map +1 -1
- package/dist/model/panels.d.ts +13 -4
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/plugin-base.d.ts +3 -3
- package/dist/model/plugin-base.d.ts.map +1 -1
- package/dist/model/plugin-base.js.map +1 -1
- package/dist/model/plugin-loading.d.ts +1 -1
- package/dist/model/plugin-loading.d.ts.map +1 -1
- package/dist/model/plugin-loading.js +1 -1
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/model/plugins.d.ts +15 -13
- package/dist/model/plugins.d.ts.map +1 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/model/profile-queries.d.ts +4 -4
- package/dist/model/profile-queries.d.ts.map +1 -1
- package/dist/model/profile-queries.js.map +1 -1
- package/dist/model/silences-queries.d.ts +4 -4
- package/dist/model/silences-queries.d.ts.map +1 -1
- package/dist/model/silences-queries.js.map +1 -1
- package/dist/model/time-series-queries.d.ts +4 -4
- 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 +4 -4
- package/dist/model/trace-queries.d.ts.map +1 -1
- package/dist/model/trace-queries.js.map +1 -1
- package/dist/model/variables.d.ts +7 -3
- package/dist/model/variables.d.ts.map +1 -1
- package/dist/model/variables.js +1 -3
- package/dist/model/variables.js.map +1 -1
- package/dist/remote/PluginLoaderComponent.d.ts +1 -2
- package/dist/remote/PluginLoaderComponent.d.ts.map +1 -1
- package/dist/remote/PluginLoaderComponent.js +2 -2
- package/dist/remote/PluginLoaderComponent.js.map +1 -1
- package/dist/remote/PluginRuntime.d.ts +2 -2
- package/dist/remote/PluginRuntime.d.ts.map +1 -1
- package/dist/remote/PluginRuntime.js +18 -26
- package/dist/remote/PluginRuntime.js.map +1 -1
- package/dist/remote/index.js +2 -2
- package/dist/remote/index.js.map +1 -1
- package/dist/remote/remotePluginLoader.d.ts +2 -2
- package/dist/remote/remotePluginLoader.d.ts.map +1 -1
- package/dist/remote/remotePluginLoader.js +3 -3
- package/dist/remote/remotePluginLoader.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +3 -3
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +20 -12
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/index.js +2 -2
- package/dist/runtime/DataQueriesProvider/index.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.d.ts +3 -3
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/RouterProvider.d.ts +2 -1
- package/dist/runtime/RouterProvider.d.ts.map +1 -1
- package/dist/runtime/RouterProvider.js +3 -3
- package/dist/runtime/RouterProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +3 -2
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +22 -8
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.d.ts +3 -2
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.js +5 -5
- package/dist/runtime/TimeRangeProvider/TimeRangeProviders.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.d.ts +9 -2
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +16 -3
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/index.js +4 -4
- package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts +3 -3
- package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.js +4 -4
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.js +2 -2
- package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -1
- package/dist/runtime/UsageMetricsProvider.d.ts +3 -3
- package/dist/runtime/UsageMetricsProvider.d.ts.map +1 -1
- package/dist/runtime/UsageMetricsProvider.js +3 -3
- package/dist/runtime/UsageMetricsProvider.js.map +1 -1
- package/dist/runtime/alerts-queries.d.ts +2 -2
- package/dist/runtime/alerts-queries.d.ts.map +1 -1
- package/dist/runtime/alerts-queries.js +5 -5
- package/dist/runtime/alerts-queries.js.map +1 -1
- package/dist/runtime/annotations.d.ts +2 -2
- package/dist/runtime/annotations.d.ts.map +1 -1
- package/dist/runtime/annotations.js +6 -6
- package/dist/runtime/annotations.js.map +1 -1
- package/dist/runtime/builtin-variables.d.ts +2 -3
- package/dist/runtime/builtin-variables.d.ts.map +1 -1
- package/dist/runtime/builtin-variables.js +1 -1
- package/dist/runtime/builtin-variables.js.map +1 -1
- package/dist/runtime/datasources.d.ts +2 -3
- package/dist/runtime/datasources.d.ts.map +1 -1
- package/dist/runtime/datasources.js +2 -2
- 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 +16 -15
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/item-actions.d.ts +3 -3
- package/dist/runtime/item-actions.d.ts.map +1 -1
- package/dist/runtime/item-actions.js +2 -2
- package/dist/runtime/item-actions.js.map +1 -1
- package/dist/runtime/json-queries.d.ts +11 -0
- package/dist/runtime/json-queries.d.ts.map +1 -0
- package/dist/runtime/json-queries.js +58 -0
- package/dist/runtime/json-queries.js.map +1 -0
- package/dist/runtime/log-queries.d.ts +3 -3
- package/dist/runtime/log-queries.d.ts.map +1 -1
- package/dist/runtime/log-queries.js +5 -5
- package/dist/runtime/log-queries.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +3 -4
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js +2 -2
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/runtime/profile-queries.d.ts +2 -2
- package/dist/runtime/profile-queries.d.ts.map +1 -1
- package/dist/runtime/profile-queries.js +4 -4
- package/dist/runtime/profile-queries.js.map +1 -1
- package/dist/runtime/silences-queries.d.ts +2 -2
- package/dist/runtime/silences-queries.d.ts.map +1 -1
- package/dist/runtime/silences-queries.js +5 -5
- package/dist/runtime/silences-queries.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 +6 -6
- package/dist/runtime/time-series-queries.js.map +1 -1
- package/dist/runtime/trace-queries.d.ts +2 -2
- package/dist/runtime/trace-queries.d.ts.map +1 -1
- package/dist/runtime/trace-queries.js +6 -6
- package/dist/runtime/trace-queries.js.map +1 -1
- package/dist/runtime/utils.d.ts +1 -1
- package/dist/runtime/utils.d.ts.map +1 -1
- package/dist/runtime/utils.js.map +1 -1
- package/dist/runtime/variables.d.ts +1 -2
- package/dist/runtime/variables.d.ts.map +1 -1
- package/dist/runtime/variables.js +4 -4
- package/dist/runtime/variables.js.map +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/panel.d.ts +2 -2
- package/dist/schema/panel.d.ts.map +1 -1
- package/dist/schema/panel.js +18 -4
- package/dist/schema/panel.js.map +1 -1
- package/dist/test/index.js +2 -2
- package/dist/test/index.js.map +1 -1
- package/dist/test/mock-data.d.ts +2 -1
- package/dist/test/mock-data.d.ts.map +1 -1
- package/dist/test/mock-data.js +6 -0
- package/dist/test/mock-data.js.map +1 -1
- package/dist/test/render-hook.d.ts +2 -2
- package/dist/test/render-hook.d.ts.map +1 -1
- package/dist/test/render-hook.js +2 -2
- package/dist/test/render-hook.js.map +1 -1
- package/dist/test/render.d.ts +3 -3
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +3 -3
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.d.ts +1 -1
- package/dist/test/setup-tests.d.ts.map +1 -1
- package/dist/test/setup-tests.js +3 -2
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/test-plugins/bert/index.d.ts +3 -3
- package/dist/test/test-plugins/bert/index.d.ts.map +1 -1
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.d.ts +7 -1
- package/dist/test/test-plugins/ernie/index.d.ts.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +58 -1
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test/test-plugins/index.d.ts +1 -1
- package/dist/test/test-plugins/index.d.ts.map +1 -1
- package/dist/test/test-plugins/index.js +5 -5
- package/dist/test/test-plugins/index.js.map +1 -1
- package/dist/test/utils.d.ts +2 -2
- package/dist/test/utils.d.ts.map +1 -1
- package/dist/test/utils.js +5 -5
- 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.d.ts +2 -2
- package/dist/test-utils/mock-plugin-registry.d.ts.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/csv-export.d.ts.map +1 -1
- package/dist/utils/csv-export.js +1 -1
- package/dist/utils/csv-export.js.map +1 -1
- package/dist/utils/event.js +1 -1
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/variables.js +1 -1
- package/package.json +11 -11
- package/dist/cjs/components/Annotations/AnnotationEditorForm/AnnotationEditorForm.js +0 -283
- package/dist/cjs/components/Annotations/AnnotationEditorForm/AnnotationPreview.js +0 -197
- package/dist/cjs/components/Annotations/AnnotationEditorForm/index.js +0 -30
- package/dist/cjs/components/Annotations/constants.js +0 -23
- package/dist/cjs/components/Annotations/index.js +0 -31
- package/dist/cjs/components/CalculationSelector/CalculationSelector.js +0 -49
- package/dist/cjs/components/CalculationSelector/index.js +0 -30
- package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +0 -270
- package/dist/cjs/components/DatasourceEditorForm/index.js +0 -30
- package/dist/cjs/components/DatasourceSelect/DatasourceSelect.js +0 -266
- package/dist/cjs/components/DatasourceSelect/index.js +0 -30
- package/dist/cjs/components/HTTPSettingsEditor/HTTPSettingsEditor.js +0 -568
- package/dist/cjs/components/HTTPSettingsEditor/index.js +0 -30
- package/dist/cjs/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +0 -1175
- package/dist/cjs/components/ItemSelectionActionsOptionsEditor/index.js +0 -30
- package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +0 -211
- package/dist/cjs/components/LegendOptionsEditor/index.js +0 -30
- package/dist/cjs/components/LinksEditor/LinksEditor.js +0 -162
- package/dist/cjs/components/LinksEditor/index.js +0 -30
- package/dist/cjs/components/MetricLabelInput/MetricLabelInput.js +0 -41
- package/dist/cjs/components/MetricLabelInput/index.js +0 -30
- package/dist/cjs/components/MultiQueryEditor/MultiQueryEditor.js +0 -159
- package/dist/cjs/components/MultiQueryEditor/QueryEditorContainer.js +0 -250
- package/dist/cjs/components/MultiQueryEditor/index.js +0 -31
- package/dist/cjs/components/MultiQueryEditor/utils.js +0 -36
- package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +0 -69
- package/dist/cjs/components/OptionsEditorRadios/index.js +0 -30
- package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +0 -39
- package/dist/cjs/components/OptionsEditorTabPanel/index.js +0 -30
- package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +0 -61
- package/dist/cjs/components/OptionsEditorTabs/index.js +0 -30
- package/dist/cjs/components/PanelSpecEditor/PanelAnnotationsEditor.js +0 -246
- package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +0 -135
- package/dist/cjs/components/PanelSpecEditor/index.js +0 -30
- package/dist/cjs/components/PluginEditor/PluginEditor.js +0 -98
- package/dist/cjs/components/PluginEditor/index.js +0 -31
- package/dist/cjs/components/PluginEditor/plugin-editor-api.js +0 -136
- package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +0 -109
- package/dist/cjs/components/PluginKindSelect/index.js +0 -30
- package/dist/cjs/components/PluginRegistry/PluginRegistry.js +0 -86
- package/dist/cjs/components/PluginRegistry/getPluginSearchHelper.js +0 -92
- package/dist/cjs/components/PluginRegistry/index.js +0 -30
- package/dist/cjs/components/PluginRegistry/plugin-indexes.js +0 -88
- package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +0 -55
- package/dist/cjs/components/PluginSpecEditor/index.js +0 -30
- package/dist/cjs/components/SelectionOptionsEditor/SelectionOptionsEditor.js +0 -43
- package/dist/cjs/components/SelectionOptionsEditor/index.js +0 -30
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +0 -236
- package/dist/cjs/components/TimeRangeControls/index.js +0 -30
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +0 -613
- package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +0 -193
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +0 -32
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +0 -143
- package/dist/cjs/components/Variables/index.js +0 -31
- package/dist/cjs/components/Variables/variable-model.js +0 -211
- package/dist/cjs/components/index.js +0 -48
- package/dist/cjs/constants/index.js +0 -30
- package/dist/cjs/constants/user-interface-text.js +0 -32
- package/dist/cjs/context/ValidationProvider.js +0 -77
- package/dist/cjs/context/index.js +0 -30
- package/dist/cjs/index.js +0 -38
- package/dist/cjs/model/calculations.js +0 -178
- package/dist/cjs/model/index.js +0 -45
- package/dist/cjs/model/legend.js +0 -111
- package/dist/cjs/model/log-queries.js +0 -16
- package/dist/cjs/model/log-volume-utils.js +0 -124
- package/dist/cjs/model/panels.js +0 -16
- package/dist/cjs/model/plugin-base.js +0 -16
- package/dist/cjs/model/plugin-loading.js +0 -56
- package/dist/cjs/model/plugins.js +0 -26
- package/dist/cjs/model/profile-queries.js +0 -16
- package/dist/cjs/model/silences-queries.js +0 -16
- package/dist/cjs/model/time-series-queries.js +0 -26
- package/dist/cjs/model/trace-queries.js +0 -16
- package/dist/cjs/model/variables.js +0 -16
- package/dist/cjs/remote/PersesPlugin.types.js +0 -16
- package/dist/cjs/remote/PluginLoaderComponent.js +0 -87
- package/dist/cjs/remote/PluginRuntime.js +0 -331
- package/dist/cjs/remote/index.js +0 -31
- package/dist/cjs/remote/remotePluginLoader.js +0 -101
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +0 -154
- package/dist/cjs/runtime/DataQueriesProvider/index.js +0 -31
- package/dist/cjs/runtime/DataQueriesProvider/model.js +0 -34
- package/dist/cjs/runtime/RouterProvider.js +0 -114
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +0 -201
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviders.js +0 -66
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +0 -113
- package/dist/cjs/runtime/TimeRangeProvider/index.js +0 -33
- package/dist/cjs/runtime/TimeRangeProvider/query-params.js +0 -250
- package/dist/cjs/runtime/TimeRangeProvider/refresh-interval.js +0 -30
- package/dist/cjs/runtime/UsageMetricsProvider.js +0 -102
- package/dist/cjs/runtime/alerts-queries.js +0 -101
- package/dist/cjs/runtime/annotations.js +0 -148
- package/dist/cjs/runtime/builtin-variables.js +0 -81
- package/dist/cjs/runtime/datasources.js +0 -80
- package/dist/cjs/runtime/index.js +0 -44
- package/dist/cjs/runtime/item-actions.js +0 -302
- package/dist/cjs/runtime/log-queries.js +0 -76
- package/dist/cjs/runtime/plugin-registry.js +0 -135
- package/dist/cjs/runtime/profile-queries.js +0 -73
- package/dist/cjs/runtime/silences-queries.js +0 -101
- package/dist/cjs/runtime/time-series-queries.js +0 -165
- package/dist/cjs/runtime/trace-queries.js +0 -106
- package/dist/cjs/runtime/utils.js +0 -39
- package/dist/cjs/runtime/variables.js +0 -160
- package/dist/cjs/schema/index.js +0 -30
- package/dist/cjs/schema/panel.js +0 -42
- package/dist/cjs/test/index.js +0 -31
- package/dist/cjs/test/mock-data.js +0 -357
- package/dist/cjs/test/render-hook.js +0 -31
- package/dist/cjs/test/render.js +0 -31
- package/dist/cjs/test/setup-tests.js +0 -20
- package/dist/cjs/test/test-plugins/bert/index.js +0 -99
- package/dist/cjs/test/test-plugins/ernie/index.js +0 -92
- package/dist/cjs/test/test-plugins/index.js +0 -81
- package/dist/cjs/test/utils.js +0 -58
- package/dist/cjs/test-utils/index.js +0 -30
- package/dist/cjs/test-utils/mock-plugin-registry.js +0 -81
- package/dist/cjs/utils/csv-export.js +0 -248
- package/dist/cjs/utils/event.js +0 -30
- package/dist/cjs/utils/index.js +0 -32
- package/dist/cjs/utils/variables.js +0 -44
|
@@ -1,32 +0,0 @@
|
|
|
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, "TOOLTIP_TEXT", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return TOOLTIP_TEXT;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const TOOLTIP_TEXT = {
|
|
24
|
-
// Variable editor buttons
|
|
25
|
-
refreshVariableValues: 'Refresh values',
|
|
26
|
-
copyVariableValues: 'Copy values to clipboard',
|
|
27
|
-
// Time range controls buttons
|
|
28
|
-
refresh: 'Refresh',
|
|
29
|
-
refreshInterval: 'Auto refresh interval',
|
|
30
|
-
zoomIn: 'Zoom in',
|
|
31
|
-
zoomOut: 'Zoom out'
|
|
32
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get ValidationProvider () {
|
|
25
|
-
return ValidationProvider;
|
|
26
|
-
},
|
|
27
|
-
get ValidationSchemasContext () {
|
|
28
|
-
return ValidationSchemasContext;
|
|
29
|
-
},
|
|
30
|
-
get useValidationSchemas () {
|
|
31
|
-
return useValidationSchemas;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
35
|
-
const _react = require("react");
|
|
36
|
-
const _spec = require("@perses-dev/spec");
|
|
37
|
-
const _client = require("@perses-dev/client");
|
|
38
|
-
const _schema = require("../schema");
|
|
39
|
-
const ValidationSchemasContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
|
|
40
|
-
function useValidationSchemas() {
|
|
41
|
-
const ctx = (0, _react.useContext)(ValidationSchemasContext);
|
|
42
|
-
if (ctx === undefined) {
|
|
43
|
-
throw new Error('No ValidationSchemasContext found. Did you forget a Provider?');
|
|
44
|
-
}
|
|
45
|
-
return ctx;
|
|
46
|
-
}
|
|
47
|
-
function ValidationProvider({ children }) {
|
|
48
|
-
const [datasourceEditorSchema, setDatasourceEditorSchema] = (0, _react.useState)(_client.datasourceDefinitionSchema);
|
|
49
|
-
const [panelEditorSchema, setPanelEditorSchema] = (0, _react.useState)(_schema.panelEditorSchema); // TODO I don't get why this does not compile
|
|
50
|
-
const [variableEditorSchema, setVariableEditorSchema] = (0, _react.useState)(_spec.variableDefinitionSchema);
|
|
51
|
-
const [annotationEditorSchema, setAnnotationEditorSchema] = (0, _react.useState)(_spec.annotationSpecSchema);
|
|
52
|
-
function setDatasourceEditorSchemaPlugin(pluginSchema) {
|
|
53
|
-
setDatasourceEditorSchema((0, _client.buildDatasourceDefinitionSchema)(pluginSchema));
|
|
54
|
-
}
|
|
55
|
-
function setPanelEditorSchemaPlugin(pluginSchema) {
|
|
56
|
-
setPanelEditorSchema((0, _schema.buildPanelEditorSchema)(pluginSchema));
|
|
57
|
-
}
|
|
58
|
-
function setVariableEditorSchemaPlugin(pluginSchema) {
|
|
59
|
-
setVariableEditorSchema((0, _spec.buildVariableDefinitionSchema)(pluginSchema));
|
|
60
|
-
}
|
|
61
|
-
function setAnnotationEditorSchemaPlugin(pluginSchema) {
|
|
62
|
-
setAnnotationEditorSchema((0, _spec.buildAnnotationSpecSchema)(pluginSchema));
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ValidationSchemasContext.Provider, {
|
|
65
|
-
value: {
|
|
66
|
-
datasourceEditorSchema,
|
|
67
|
-
panelEditorSchema,
|
|
68
|
-
variableEditorSchema,
|
|
69
|
-
annotationEditorSchema,
|
|
70
|
-
setDatasourceEditorSchemaPlugin,
|
|
71
|
-
setPanelEditorSchemaPlugin,
|
|
72
|
-
setVariableEditorSchemaPlugin,
|
|
73
|
-
setAnnotationEditorSchemaPlugin
|
|
74
|
-
},
|
|
75
|
-
children: children
|
|
76
|
-
});
|
|
77
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
_export_star(require("./ValidationProvider"), exports);
|
|
18
|
-
function _export_star(from, to) {
|
|
19
|
-
Object.keys(from).forEach(function(k) {
|
|
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
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return from;
|
|
30
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
_export_star(require("./components"), exports);
|
|
18
|
-
_export_star(require("./constants"), exports);
|
|
19
|
-
_export_star(require("./model"), exports);
|
|
20
|
-
_export_star(require("./runtime"), exports);
|
|
21
|
-
_export_star(require("./schema"), exports);
|
|
22
|
-
_export_star(require("./test-utils"), exports);
|
|
23
|
-
_export_star(require("./utils"), exports);
|
|
24
|
-
_export_star(require("./context"), exports);
|
|
25
|
-
_export_star(require("./remote"), exports);
|
|
26
|
-
function _export_star(from, to) {
|
|
27
|
-
Object.keys(from).forEach(function(k) {
|
|
28
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
29
|
-
Object.defineProperty(to, k, {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function() {
|
|
32
|
-
return from[k];
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return from;
|
|
38
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
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
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get CALCULATIONS_CONFIG () {
|
|
25
|
-
return CALCULATIONS_CONFIG;
|
|
26
|
-
},
|
|
27
|
-
get CalculationsMap () {
|
|
28
|
-
return CalculationsMap;
|
|
29
|
-
},
|
|
30
|
-
get DEFAULT_CALCULATION () {
|
|
31
|
-
return DEFAULT_CALCULATION;
|
|
32
|
-
},
|
|
33
|
-
get getCalculation () {
|
|
34
|
-
return getCalculation;
|
|
35
|
-
},
|
|
36
|
-
get getCalculations () {
|
|
37
|
-
return getCalculations;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const DEFAULT_CALCULATION = 'last'; // aligned with cue
|
|
41
|
-
const CalculationsMap = {
|
|
42
|
-
first: first,
|
|
43
|
-
last: last,
|
|
44
|
-
'first-number': firstNumber,
|
|
45
|
-
'last-number': lastNumber,
|
|
46
|
-
mean: mean,
|
|
47
|
-
sum: sum,
|
|
48
|
-
min: min,
|
|
49
|
-
max: max
|
|
50
|
-
};
|
|
51
|
-
const CALCULATIONS_CONFIG = {
|
|
52
|
-
first: {
|
|
53
|
-
label: 'First',
|
|
54
|
-
description: 'First value'
|
|
55
|
-
},
|
|
56
|
-
last: {
|
|
57
|
-
label: 'Last',
|
|
58
|
-
description: 'Last value'
|
|
59
|
-
},
|
|
60
|
-
'first-number': {
|
|
61
|
-
label: 'First *',
|
|
62
|
-
description: 'First numeric value'
|
|
63
|
-
},
|
|
64
|
-
'last-number': {
|
|
65
|
-
label: 'Last *',
|
|
66
|
-
description: 'Last numeric value'
|
|
67
|
-
},
|
|
68
|
-
mean: {
|
|
69
|
-
label: 'Avg',
|
|
70
|
-
description: 'Average value excluding nulls'
|
|
71
|
-
},
|
|
72
|
-
sum: {
|
|
73
|
-
label: 'Sum',
|
|
74
|
-
description: 'The sum of all values'
|
|
75
|
-
},
|
|
76
|
-
min: {
|
|
77
|
-
label: 'Min',
|
|
78
|
-
description: 'Minimum value'
|
|
79
|
-
},
|
|
80
|
-
max: {
|
|
81
|
-
label: 'Max',
|
|
82
|
-
description: 'Maximum value'
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
function getCalculations(values, includeCalculations) {
|
|
86
|
-
const calculations = includeCalculations.reduce((initResult, calculation)=>{
|
|
87
|
-
initResult[calculation] = undefined;
|
|
88
|
-
return initResult;
|
|
89
|
-
}, {});
|
|
90
|
-
// We save these values as separate values instead of directly setting them
|
|
91
|
-
// in the calculations because they are needed by multiple calculations.
|
|
92
|
-
let nonNullCount = 0;
|
|
93
|
-
let sum = 0;
|
|
94
|
-
// We use this large function capable of performing one or more calculations
|
|
95
|
-
// in a single iteration of the data to minimize the performance impact of
|
|
96
|
-
// generating multiple calculations for large timeseries values. This is
|
|
97
|
-
// less optimized for certain single calculations when done in isolation (e.g.
|
|
98
|
-
// `last`), but will be more performant in the more expensive cases where
|
|
99
|
-
// multiple values are being used (e.g. table legend).
|
|
100
|
-
values.forEach((tuple, i)=>{
|
|
101
|
-
const value = tuple[1];
|
|
102
|
-
if (i === 0 && 'first' in calculations) {
|
|
103
|
-
calculations.first = value;
|
|
104
|
-
}
|
|
105
|
-
if (i === values.length - 1 && 'last' in calculations) {
|
|
106
|
-
calculations.last = value;
|
|
107
|
-
}
|
|
108
|
-
// Handling specific to non-null values.
|
|
109
|
-
if (typeof value === 'number') {
|
|
110
|
-
nonNullCount += 1;
|
|
111
|
-
sum += value;
|
|
112
|
-
if ('first-number' in calculations && calculations['first-number'] === undefined) {
|
|
113
|
-
// Save the first number we see.
|
|
114
|
-
calculations['first-number'] = value;
|
|
115
|
-
}
|
|
116
|
-
if ('last-number' in calculations) {
|
|
117
|
-
// Keep setting the numbers we see, which will eventually be set to the
|
|
118
|
-
// last number when finished iterating.
|
|
119
|
-
calculations['last-number'] = value;
|
|
120
|
-
}
|
|
121
|
-
if ('min' in calculations) {
|
|
122
|
-
if (typeof calculations.min !== 'number') {
|
|
123
|
-
// Init the first time we see a number
|
|
124
|
-
calculations.min = value;
|
|
125
|
-
} else {
|
|
126
|
-
// Use lowest value once initialized
|
|
127
|
-
calculations.min = Math.min(calculations.min, value);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if ('max' in calculations) {
|
|
131
|
-
if (typeof calculations.max !== 'number') {
|
|
132
|
-
// Init the first time we see a number
|
|
133
|
-
calculations.max = value;
|
|
134
|
-
} else {
|
|
135
|
-
// Use highest value once initialized
|
|
136
|
-
calculations.max = Math.max(calculations.max, value);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
// Set calculations that require iterating over all values.
|
|
142
|
-
if (nonNullCount > 0 && 'sum' in calculations) {
|
|
143
|
-
calculations.sum = sum;
|
|
144
|
-
}
|
|
145
|
-
if (nonNullCount > 0 && 'mean' in calculations) {
|
|
146
|
-
calculations.mean = sum / nonNullCount;
|
|
147
|
-
}
|
|
148
|
-
return calculations;
|
|
149
|
-
}
|
|
150
|
-
function getCalculation(values, calculation) {
|
|
151
|
-
return getCalculations(values, [
|
|
152
|
-
calculation
|
|
153
|
-
])[calculation];
|
|
154
|
-
}
|
|
155
|
-
function first(values) {
|
|
156
|
-
return getCalculation(values, 'first');
|
|
157
|
-
}
|
|
158
|
-
function last(values) {
|
|
159
|
-
return getCalculation(values, 'last');
|
|
160
|
-
}
|
|
161
|
-
function firstNumber(values) {
|
|
162
|
-
return getCalculation(values, 'first-number');
|
|
163
|
-
}
|
|
164
|
-
function lastNumber(values) {
|
|
165
|
-
return getCalculation(values, 'last-number');
|
|
166
|
-
}
|
|
167
|
-
function mean(values) {
|
|
168
|
-
return getCalculation(values, 'mean');
|
|
169
|
-
}
|
|
170
|
-
function sum(values) {
|
|
171
|
-
return getCalculation(values, 'sum');
|
|
172
|
-
}
|
|
173
|
-
function min(values) {
|
|
174
|
-
return getCalculation(values, 'min');
|
|
175
|
-
}
|
|
176
|
-
function max(values) {
|
|
177
|
-
return getCalculation(values, 'max');
|
|
178
|
-
}
|
package/dist/cjs/model/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
_export_star(require("./annotations"), exports);
|
|
18
|
-
_export_star(require("./datasource"), exports);
|
|
19
|
-
_export_star(require("./legend"), exports);
|
|
20
|
-
_export_star(require("./log-queries"), exports);
|
|
21
|
-
_export_star(require("./log-volume-utils"), exports);
|
|
22
|
-
_export_star(require("./panels"), exports);
|
|
23
|
-
_export_star(require("./plugins"), exports);
|
|
24
|
-
_export_star(require("./plugin-base"), exports);
|
|
25
|
-
_export_star(require("./plugin-loading"), exports);
|
|
26
|
-
_export_star(require("./time-series-queries"), exports);
|
|
27
|
-
_export_star(require("./trace-queries"), exports);
|
|
28
|
-
_export_star(require("./profile-queries"), exports);
|
|
29
|
-
_export_star(require("./variables"), exports);
|
|
30
|
-
_export_star(require("./calculations"), exports);
|
|
31
|
-
_export_star(require("./alerts-queries"), exports);
|
|
32
|
-
_export_star(require("./silences-queries"), exports);
|
|
33
|
-
function _export_star(from, to) {
|
|
34
|
-
Object.keys(from).forEach(function(k) {
|
|
35
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
36
|
-
Object.defineProperty(to, k, {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function() {
|
|
39
|
-
return from[k];
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
return from;
|
|
45
|
-
}
|
package/dist/cjs/model/legend.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
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
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get LEGEND_MODE_CONFIG () {
|
|
25
|
-
return LEGEND_MODE_CONFIG;
|
|
26
|
-
},
|
|
27
|
-
get LEGEND_POSITIONS_CONFIG () {
|
|
28
|
-
return LEGEND_POSITIONS_CONFIG;
|
|
29
|
-
},
|
|
30
|
-
get LEGEND_SIZE_CONFIG () {
|
|
31
|
-
return LEGEND_SIZE_CONFIG;
|
|
32
|
-
},
|
|
33
|
-
get LEGEND_VALUE_CONFIG () {
|
|
34
|
-
return LEGEND_VALUE_CONFIG;
|
|
35
|
-
},
|
|
36
|
-
get comparisonLegends () {
|
|
37
|
-
return comparisonLegends;
|
|
38
|
-
},
|
|
39
|
-
get legendValues () {
|
|
40
|
-
return legendValues;
|
|
41
|
-
},
|
|
42
|
-
get validateLegendSpec () {
|
|
43
|
-
return validateLegendSpec;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
const _components = require("@perses-dev/components");
|
|
47
|
-
const _calculations = require("./calculations");
|
|
48
|
-
const legendValues = [
|
|
49
|
-
'mean',
|
|
50
|
-
'first',
|
|
51
|
-
'first-number',
|
|
52
|
-
'last',
|
|
53
|
-
'last-number',
|
|
54
|
-
'min',
|
|
55
|
-
'max',
|
|
56
|
-
'sum'
|
|
57
|
-
];
|
|
58
|
-
const comparisonLegends = {
|
|
59
|
-
abs: {
|
|
60
|
-
label: 'Absolute',
|
|
61
|
-
description: 'Absolute value'
|
|
62
|
-
},
|
|
63
|
-
relative: {
|
|
64
|
-
label: 'Relative',
|
|
65
|
-
description: 'Relative value'
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const LEGEND_POSITIONS_CONFIG = {
|
|
69
|
-
bottom: {
|
|
70
|
-
label: 'Bottom'
|
|
71
|
-
},
|
|
72
|
-
right: {
|
|
73
|
-
label: 'Right'
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const LEGEND_MODE_CONFIG = {
|
|
77
|
-
list: {
|
|
78
|
-
label: 'List'
|
|
79
|
-
},
|
|
80
|
-
table: {
|
|
81
|
-
label: 'Table'
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const LEGEND_SIZE_CONFIG = {
|
|
85
|
-
small: {
|
|
86
|
-
label: 'Small'
|
|
87
|
-
},
|
|
88
|
-
medium: {
|
|
89
|
-
label: 'Medium'
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const LEGEND_VALUE_CONFIG = legendValues.reduce((config, value)=>{
|
|
93
|
-
config[value] = _calculations.CALCULATIONS_CONFIG[value];
|
|
94
|
-
return config;
|
|
95
|
-
}, {});
|
|
96
|
-
function validateLegendSpec(legend) {
|
|
97
|
-
if (legend === undefined) {
|
|
98
|
-
// undefined is valid since this is how legend is hidden by default
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
if (!(0, _components.isValidLegendPosition)(legend.position)) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
if (legend.mode && !(0, _components.isValidLegendMode)(legend.mode)) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
if (legend.size && !(0, _components.isValidLegendSize)(legend.size)) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "calculateVolumeInterval", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return calculateVolumeInterval;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
// Copyright The Perses Authors
|
|
12
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
// you may not use this file except in compliance with the License.
|
|
14
|
-
// You may obtain a copy of the License at
|
|
15
|
-
//
|
|
16
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
//
|
|
18
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
-
// See the License for the specific language governing permissions and
|
|
22
|
-
// limitations under the License.
|
|
23
|
-
// Target number of bars for log volume histogram
|
|
24
|
-
const TARGET_HISTOGRAM_BARS = 40;
|
|
25
|
-
// Standard intervals for histogram calculations (in milliseconds)
|
|
26
|
-
const STANDARD_INTERVALS = [
|
|
27
|
-
{
|
|
28
|
-
ms: 1000,
|
|
29
|
-
label: '1s'
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
ms: 2000,
|
|
33
|
-
label: '2s'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
ms: 5000,
|
|
37
|
-
label: '5s'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
ms: 10000,
|
|
41
|
-
label: '10s'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
ms: 15000,
|
|
45
|
-
label: '15s'
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
ms: 30000,
|
|
49
|
-
label: '30s'
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
ms: 60000,
|
|
53
|
-
label: '1m'
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
ms: 120000,
|
|
57
|
-
label: '2m'
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
ms: 300000,
|
|
61
|
-
label: '5m'
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
ms: 600000,
|
|
65
|
-
label: '10m'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
ms: 900000,
|
|
69
|
-
label: '15m'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
ms: 1800000,
|
|
73
|
-
label: '30m'
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
ms: 3600000,
|
|
77
|
-
label: '1h'
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
ms: 7200000,
|
|
81
|
-
label: '2h'
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
ms: 21600000,
|
|
85
|
-
label: '6h'
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
ms: 43200000,
|
|
89
|
-
label: '12h'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
ms: 86400000,
|
|
93
|
-
label: '1d'
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
ms: 604800000,
|
|
97
|
-
label: '7d'
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
ms: 2592000000,
|
|
101
|
-
label: '30d'
|
|
102
|
-
}
|
|
103
|
-
];
|
|
104
|
-
function calculateVolumeInterval(timeRangeMs) {
|
|
105
|
-
// Prefer smallest interval that produces 20-100 bars (optimal range)
|
|
106
|
-
for (const interval of STANDARD_INTERVALS){
|
|
107
|
-
const barCount = timeRangeMs / interval.ms;
|
|
108
|
-
if (barCount >= 20 && barCount <= 100) {
|
|
109
|
-
return interval.label;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
// Fallback: find closest to target if no interval fits optimal range
|
|
113
|
-
let bestInterval = STANDARD_INTERVALS[STANDARD_INTERVALS.length - 1];
|
|
114
|
-
let bestDistance = Infinity;
|
|
115
|
-
for (const interval of STANDARD_INTERVALS){
|
|
116
|
-
const barCount = timeRangeMs / interval.ms;
|
|
117
|
-
const distance = Math.abs(barCount - TARGET_HISTOGRAM_BARS);
|
|
118
|
-
if (distance < bestDistance) {
|
|
119
|
-
bestDistance = distance;
|
|
120
|
-
bestInterval = interval;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return bestInterval.label;
|
|
124
|
-
}
|
package/dist/cjs/model/panels.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
});
|