@perses-dev/dashboards 0.0.0-snapshot-panel-extra-content-2-2767e21 → 0.0.0-snapshot-scatter-chart-embed-8efdfab
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/AddGroupButton/AddGroupButton.js +10 -7
- package/dist/cjs/components/AddGroupButton/index.js +10 -8
- package/dist/cjs/components/AddPanelButton/AddPanelButton.js +10 -11
- package/dist/cjs/components/AddPanelButton/index.js +10 -8
- package/dist/cjs/components/Dashboard/Dashboard.js +11 -9
- package/dist/cjs/components/Dashboard/index.js +10 -8
- package/dist/cjs/components/DashboardStickyToolbar/DashboardStickyToolbar.js +53 -22
- package/dist/cjs/components/DashboardStickyToolbar/index.js +10 -8
- package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +81 -102
- package/dist/cjs/components/DashboardToolbar/index.js +10 -8
- package/dist/cjs/components/Datasources/DatasourceEditor.js +237 -0
- package/dist/cjs/components/Datasources/EditDatasourcesButton.js +106 -0
- package/dist/cjs/components/Datasources/index.js +31 -0
- package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +12 -10
- package/dist/cjs/components/DeletePanelDialog/index.js +10 -8
- package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +17 -15
- package/dist/cjs/components/DeletePanelGroupDialog/index.js +10 -8
- package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +5 -3
- package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +10 -8
- package/dist/cjs/components/DownloadButton/DownloadButton.js +12 -10
- package/dist/cjs/components/DownloadButton/index.js +10 -8
- package/dist/cjs/components/EditButton/EditButton.js +8 -6
- package/dist/cjs/components/EditButton/index.js +10 -8
- package/dist/cjs/components/EditJsonButton/EditJsonButton.js +15 -11
- package/dist/cjs/components/EditJsonButton/index.js +10 -8
- package/dist/cjs/components/EditJsonDialog/EditJsonDialog.js +46 -24
- package/dist/cjs/components/EditJsonDialog/index.js +10 -8
- package/dist/cjs/components/EmptyDashboard/EmptyDashboard.js +18 -16
- package/dist/cjs/components/EmptyDashboard/index.js +10 -8
- package/dist/cjs/components/GridLayout/GridContainer.js +5 -3
- package/dist/cjs/components/GridLayout/GridItemContent.js +33 -13
- package/dist/cjs/components/GridLayout/GridLayout.js +18 -16
- package/dist/cjs/components/GridLayout/GridTitle.js +35 -33
- package/dist/cjs/components/GridLayout/index.js +13 -11
- package/dist/cjs/components/Panel/Panel.js +22 -23
- package/dist/cjs/components/Panel/PanelContent.js +11 -8
- package/dist/cjs/components/Panel/PanelHeader.js +33 -31
- package/dist/cjs/components/Panel/index.js +10 -8
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +25 -77
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +231 -141
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +11 -9
- package/dist/cjs/components/PanelDrawer/index.js +11 -8
- package/dist/cjs/components/PanelDrawer/usePanelEditor.js +3 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +18 -16
- package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +15 -11
- package/dist/cjs/components/PanelGroupDialog/index.js +10 -8
- package/dist/cjs/components/QuerySummaryTable/QuerySummaryTable.js +47 -45
- package/dist/cjs/components/QuerySummaryTable/index.js +10 -8
- package/dist/cjs/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +23 -21
- package/dist/cjs/components/SaveChangesConfirmationDialog/index.js +10 -8
- package/dist/cjs/components/SaveDashboardButton/SaveDashboardButton.js +11 -9
- package/dist/cjs/components/SaveDashboardButton/index.js +10 -8
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +46 -19
- package/dist/cjs/components/TimeRangeControls/index.js +10 -8
- package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +5 -3
- package/dist/cjs/components/ToolbarIconButton/index.js +10 -8
- package/dist/cjs/components/Variables/BuiltinVariableAccordions.js +140 -0
- package/dist/cjs/components/Variables/EditVariablesButton.js +19 -15
- package/dist/cjs/components/Variables/TemplateVariable.js +259 -110
- package/dist/cjs/components/Variables/VariableEditor.js +354 -117
- package/dist/cjs/components/Variables/VariableList.js +44 -22
- package/dist/cjs/components/Variables/index.js +14 -11
- package/dist/cjs/components/index.js +32 -29
- package/dist/cjs/constants/grid-layout-config.js +6 -2
- package/dist/cjs/constants/index.js +12 -9
- package/dist/cjs/constants/styles.js +42 -0
- package/dist/cjs/constants/user-interface-text.js +9 -2
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +43 -35
- package/dist/cjs/context/DashboardProvider/common.js +6 -2
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +70 -38
- package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +5 -3
- package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/duplicate-panel-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/edit-json-dialog-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/index.js +12 -10
- package/dist/cjs/context/DashboardProvider/panel-editor-slice.js +13 -11
- package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +8 -6
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +15 -7
- package/dist/cjs/context/DashboardProvider/panel-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/save-changes-dialog-slice.js +3 -1
- package/dist/cjs/context/DatasourceStoreProvider.js +167 -46
- package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +205 -51
- package/dist/cjs/context/TemplateVariableProvider/hydrationUtils.js +65 -13
- package/dist/cjs/context/TemplateVariableProvider/index.js +10 -8
- package/dist/cjs/context/TemplateVariableProvider/query-params.js +17 -7
- package/dist/cjs/context/TemplateVariableProvider/utils.js +49 -9
- package/dist/cjs/context/index.js +13 -11
- package/dist/cjs/context/useDashboard.js +12 -8
- package/dist/cjs/index.js +12 -10
- package/dist/cjs/stories/decorators/WithDashboard.js +6 -4
- package/dist/cjs/stories/decorators/WithDatasourceStore.js +6 -4
- package/dist/cjs/stories/decorators/WithTemplateVariables.js +6 -4
- package/dist/cjs/stories/decorators/constants.js +5 -3
- package/dist/cjs/stories/decorators/index.js +13 -11
- package/dist/cjs/test/dashboard-provider.js +8 -4
- package/dist/cjs/test/datasource-provider.js +16 -12
- package/dist/cjs/test/index.js +13 -11
- package/dist/cjs/test/plugin-registry.js +6 -4
- package/dist/cjs/test/render.js +27 -20
- package/dist/cjs/test/setup-tests.js +2 -2
- package/dist/cjs/test/testDashboard.js +13 -11
- package/dist/cjs/utils/index.js +11 -9
- package/dist/cjs/utils/panelUtils.js +9 -3
- package/dist/cjs/utils/time.js +5 -3
- package/dist/cjs/validation/index.js +30 -0
- package/dist/cjs/validation/panel.js +29 -0
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +30 -16
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +64 -20
- package/dist/cjs/views/ViewDashboard/index.js +10 -8
- package/dist/cjs/views/index.js +10 -8
- package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -1
- package/dist/components/AddGroupButton/AddGroupButton.js +2 -1
- package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -1
- package/dist/components/AddGroupButton/index.js.map +1 -1
- package/dist/components/AddPanelButton/AddPanelButton.js +2 -5
- package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -1
- package/dist/components/AddPanelButton/index.js.map +1 -1
- package/dist/components/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Dashboard/index.js.map +1 -1
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.d.ts.map +1 -1
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js +37 -8
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js.map +1 -1
- package/dist/components/DashboardStickyToolbar/index.js.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +61 -84
- package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
- package/dist/components/DashboardToolbar/index.js.map +1 -1
- package/dist/components/Datasources/DatasourceEditor.d.ts +8 -0
- package/dist/components/Datasources/DatasourceEditor.d.ts.map +1 -0
- package/dist/components/Datasources/DatasourceEditor.js +224 -0
- package/dist/components/Datasources/DatasourceEditor.js.map +1 -0
- package/dist/components/Datasources/EditDatasourcesButton.d.ts +3 -0
- package/dist/components/Datasources/EditDatasourcesButton.d.ts.map +1 -0
- package/dist/components/Datasources/EditDatasourcesButton.js +93 -0
- package/dist/components/Datasources/EditDatasourcesButton.js.map +1 -0
- package/dist/components/Datasources/index.d.ts +3 -0
- package/dist/components/Datasources/index.d.ts.map +1 -0
- package/dist/components/Datasources/index.js +16 -0
- package/dist/components/Datasources/index.js.map +1 -0
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
- package/dist/components/DeletePanelDialog/index.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -2
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
- package/dist/components/DownloadButton/index.js.map +1 -1
- package/dist/components/EditButton/EditButton.js.map +1 -1
- package/dist/components/EditButton/index.js.map +1 -1
- package/dist/components/EditJsonButton/EditJsonButton.d.ts +4 -1
- package/dist/components/EditJsonButton/EditJsonButton.d.ts.map +1 -1
- package/dist/components/EditJsonButton/EditJsonButton.js +5 -3
- package/dist/components/EditJsonButton/EditJsonButton.js.map +1 -1
- package/dist/components/EditJsonButton/index.js.map +1 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.d.ts +5 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.d.ts.map +1 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.js +32 -12
- package/dist/components/EditJsonDialog/EditJsonDialog.js.map +1 -1
- package/dist/components/EditJsonDialog/index.js.map +1 -1
- package/dist/components/EmptyDashboard/EmptyDashboard.js.map +1 -1
- package/dist/components/EmptyDashboard/index.js.map +1 -1
- package/dist/components/GridLayout/GridContainer.js.map +1 -1
- package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
- package/dist/components/GridLayout/GridItemContent.js +27 -9
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +2 -2
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.js.map +1 -1
- package/dist/components/GridLayout/index.js.map +1 -1
- package/dist/components/Panel/Panel.d.ts +13 -1
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +9 -12
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/Panel/PanelContent.d.ts +2 -1
- package/dist/components/Panel/PanelContent.d.ts.map +1 -1
- package/dist/components/Panel/PanelContent.js +3 -2
- package/dist/components/Panel/PanelContent.js.map +1 -1
- package/dist/components/Panel/PanelHeader.js.map +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js +22 -76
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts +4 -1
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js +225 -139
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js +2 -2
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
- package/dist/components/PanelDrawer/index.d.ts +1 -0
- package/dist/components/PanelDrawer/index.d.ts.map +1 -1
- package/dist/components/PanelDrawer/index.js +1 -0
- package/dist/components/PanelDrawer/index.js.map +1 -1
- package/dist/components/PanelDrawer/usePanelEditor.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js.map +1 -1
- package/dist/components/PanelGroupDialog/index.js.map +1 -1
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js +6 -6
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js.map +1 -1
- package/dist/components/QuerySummaryTable/index.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +4 -4
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js +4 -4
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
- package/dist/components/SaveDashboardButton/index.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +26 -5
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/components/ToolbarIconButton/index.js.map +1 -1
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts +8 -0
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts.map +1 -0
- package/dist/components/Variables/BuiltinVariableAccordions.js +127 -0
- package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -0
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -1
- package/dist/components/Variables/EditVariablesButton.js +8 -6
- package/dist/components/Variables/EditVariablesButton.js.map +1 -1
- package/dist/components/Variables/TemplateVariable.d.ts +12 -2
- package/dist/components/Variables/TemplateVariable.d.ts.map +1 -1
- package/dist/components/Variables/TemplateVariable.js +242 -103
- package/dist/components/Variables/TemplateVariable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts +9 -1
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js +324 -97
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts +5 -0
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +31 -19
- package/dist/components/Variables/VariableList.js.map +1 -1
- package/dist/components/Variables/index.d.ts +1 -0
- package/dist/components/Variables/index.d.ts.map +1 -1
- package/dist/components/Variables/index.js +1 -0
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/constants/grid-layout-config.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 +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/styles.d.ts +5 -0
- package/dist/constants/styles.d.ts.map +1 -0
- package/dist/constants/styles.js +23 -0
- package/dist/constants/styles.js.map +1 -0
- package/dist/constants/user-interface-text.d.ts +3 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -1
- package/dist/constants/user-interface-text.js +3 -0
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +2 -1
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js +8 -6
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +2 -2
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js +2 -2
- package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/edit-json-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/index.js.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts +2 -2
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js +7 -7
- package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js +2 -2
- package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +3 -3
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/save-changes-dialog-slice.js.map +1 -1
- package/dist/context/DatasourceStoreProvider.d.ts +15 -10
- package/dist/context/DatasourceStoreProvider.d.ts.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +161 -42
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts +49 -13
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +178 -41
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/hydrationUtils.d.ts +9 -2
- package/dist/context/TemplateVariableProvider/hydrationUtils.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/hydrationUtils.js +67 -12
- package/dist/context/TemplateVariableProvider/hydrationUtils.js.map +1 -1
- package/dist/context/TemplateVariableProvider/index.js.map +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
- package/dist/context/TemplateVariableProvider/utils.d.ts +27 -2
- package/dist/context/TemplateVariableProvider/utils.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/utils.js +48 -6
- package/dist/context/TemplateVariableProvider/utils.js.map +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/useDashboard.d.ts.map +1 -1
- package/dist/context/useDashboard.js +5 -3
- package/dist/context/useDashboard.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stories/decorators/WithDashboard.js.map +1 -1
- package/dist/stories/decorators/WithDatasourceStore.js.map +1 -1
- package/dist/stories/decorators/WithTemplateVariables.js.map +1 -1
- package/dist/stories/decorators/constants.js +2 -2
- package/dist/stories/decorators/constants.js.map +1 -1
- package/dist/stories/decorators/index.js.map +1 -1
- package/dist/test/dashboard-provider.js.map +1 -1
- package/dist/test/datasource-provider.d.ts.map +1 -1
- package/dist/test/datasource-provider.js +5 -7
- package/dist/test/datasource-provider.js.map +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/plugin-registry.js.map +1 -1
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +8 -3
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/testDashboard.js +10 -10
- package/dist/test/testDashboard.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/panelUtils.js.map +1 -1
- package/dist/utils/time.js.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +15 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/panel.d.ts +19 -0
- package/dist/validation/panel.d.ts.map +1 -0
- package/dist/validation/panel.js +21 -0
- package/dist/validation/panel.js.map +1 -0
- package/dist/views/ViewDashboard/DashboardApp.d.ts +1 -0
- package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
- package/dist/views/ViewDashboard/DashboardApp.js +17 -5
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts +3 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +54 -12
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
- package/dist/views/ViewDashboard/index.js.map +1 -1
- package/dist/views/index.js.map +1 -1
- package/package.json +8 -7
|
@@ -14,18 +14,20 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
17
|
+
_export_star(require("./DashboardProvider"), exports);
|
|
18
|
+
_export_star(require("./DatasourceStoreProvider"), exports);
|
|
19
|
+
_export_star(require("./TemplateVariableProvider"), exports);
|
|
20
|
+
_export_star(require("./useDashboard"), exports);
|
|
21
|
+
function _export_star(from, to) {
|
|
22
22
|
Object.keys(from).forEach(function(k) {
|
|
23
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
24
|
+
Object.defineProperty(to, k, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return from[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
29
31
|
});
|
|
30
32
|
return from;
|
|
31
33
|
}
|
|
@@ -16,13 +16,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "useDashboard", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return useDashboard;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const _core = require("@perses-dev/core");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
+
const _DashboardProvider = require("./DashboardProvider");
|
|
25
|
+
const _TemplateVariableProvider = require("./TemplateVariableProvider");
|
|
24
26
|
function useDashboard() {
|
|
25
|
-
const { panels , panelGroups , panelGroupOrder , setDashboard: setDashboardResource , metadata , display , duration , refreshInterval , } = (0,
|
|
27
|
+
const { panels , panelGroups , panelGroupOrder , setDashboard: setDashboardResource , metadata , display , duration , refreshInterval , datasources } = (0, _DashboardProvider.useDashboardStore)(({ panels , panelGroups , panelGroupOrder , setDashboard , metadata , display , duration , refreshInterval , datasources })=>({
|
|
26
28
|
panels,
|
|
27
29
|
panelGroups,
|
|
28
30
|
panelGroupOrder,
|
|
@@ -30,10 +32,11 @@ function useDashboard() {
|
|
|
30
32
|
metadata,
|
|
31
33
|
display,
|
|
32
34
|
duration,
|
|
33
|
-
refreshInterval
|
|
35
|
+
refreshInterval,
|
|
36
|
+
datasources
|
|
34
37
|
}));
|
|
35
|
-
const { setVariableDefinitions } = (0,
|
|
36
|
-
const variables = (0,
|
|
38
|
+
const { setVariableDefinitions } = (0, _TemplateVariableProvider.useTemplateVariableActions)();
|
|
39
|
+
const variables = (0, _TemplateVariableProvider.useTemplateVariableDefinitions)();
|
|
37
40
|
const layouts = convertPanelGroupsToLayouts(panelGroups, panelGroupOrder);
|
|
38
41
|
const dashboard = {
|
|
39
42
|
kind: 'Dashboard',
|
|
@@ -44,7 +47,8 @@ function useDashboard() {
|
|
|
44
47
|
layouts,
|
|
45
48
|
variables,
|
|
46
49
|
duration,
|
|
47
|
-
refreshInterval
|
|
50
|
+
refreshInterval,
|
|
51
|
+
datasources
|
|
48
52
|
}
|
|
49
53
|
};
|
|
50
54
|
const setDashboard = (dashboardResource)=>{
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function
|
|
17
|
+
_export_star(require("./components"), exports);
|
|
18
|
+
_export_star(require("./context"), exports);
|
|
19
|
+
_export_star(require("./views"), exports);
|
|
20
|
+
function _export_star(from, to) {
|
|
21
21
|
Object.keys(from).forEach(function(k) {
|
|
22
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
23
|
+
Object.defineProperty(to, k, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return from[k];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
});
|
|
29
31
|
return from;
|
|
30
32
|
}
|
|
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "WithDashboard", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return WithDashboard;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _dashboards = require("@perses-dev/dashboards");
|
|
23
25
|
const _constants = require("./constants");
|
|
24
26
|
// Type guard because storybook types parameters as `any`
|
|
@@ -29,11 +31,11 @@ const WithDashboard = (Story, context)=>{
|
|
|
29
31
|
const initParameter = context.parameters.withDashboard;
|
|
30
32
|
const parameter = isWithDashboardParameter(initParameter) ? initParameter : undefined;
|
|
31
33
|
const props = parameter === null || parameter === void 0 ? void 0 : parameter.props;
|
|
32
|
-
return /*#__PURE__*/ (0,
|
|
34
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_dashboards.DashboardProvider, {
|
|
33
35
|
initialState: {
|
|
34
36
|
dashboardResource: _constants.EMPTY_DASHBOARD_RESOURCE
|
|
35
37
|
},
|
|
36
38
|
...props,
|
|
37
|
-
children: /*#__PURE__*/ (0,
|
|
39
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Story, {})
|
|
38
40
|
});
|
|
39
41
|
};
|
|
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "WithDatasourceStore", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return WithDatasourceStore;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _dashboards = require("@perses-dev/dashboards");
|
|
23
25
|
const _test = require("../../test");
|
|
24
26
|
// Type guard because storybook types parameters as `any`
|
|
@@ -29,9 +31,9 @@ const WithDatasourceStore = (Story, context)=>{
|
|
|
29
31
|
const initParameter = context.parameters.withDatasourceStore;
|
|
30
32
|
const parameter = isWithDatasourceStoreParameter(initParameter) ? initParameter : undefined;
|
|
31
33
|
const props = parameter === null || parameter === void 0 ? void 0 : parameter.props;
|
|
32
|
-
return /*#__PURE__*/ (0,
|
|
34
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_dashboards.DatasourceStoreProvider, {
|
|
33
35
|
..._test.defaultDatasourceProps,
|
|
34
36
|
...props,
|
|
35
|
-
children: /*#__PURE__*/ (0,
|
|
37
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Story, {})
|
|
36
38
|
});
|
|
37
39
|
};
|
|
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "WithTemplateVariables", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return WithTemplateVariables;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _dashboards = require("@perses-dev/dashboards");
|
|
23
25
|
// Type guard because storybook types parameters as `any`
|
|
24
26
|
function isWithTemplateVariableParameter(parameter) {
|
|
@@ -28,8 +30,8 @@ const WithTemplateVariables = (Story, context)=>{
|
|
|
28
30
|
const initParameter = context.parameters.withTemplateVariables;
|
|
29
31
|
const parameter = isWithTemplateVariableParameter(initParameter) ? initParameter : undefined;
|
|
30
32
|
const props = parameter === null || parameter === void 0 ? void 0 : parameter.props;
|
|
31
|
-
return /*#__PURE__*/ (0,
|
|
33
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_dashboards.TemplateVariableProvider, {
|
|
32
34
|
...props,
|
|
33
|
-
children: /*#__PURE__*/ (0,
|
|
35
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Story, {})
|
|
34
36
|
});
|
|
35
37
|
};
|
|
@@ -16,15 +16,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "EMPTY_DASHBOARD_RESOURCE", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return EMPTY_DASHBOARD_RESOURCE;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const EMPTY_DASHBOARD_RESOURCE = {
|
|
22
24
|
kind: 'Dashboard',
|
|
23
25
|
metadata: {
|
|
24
26
|
name: 'My Dashboard',
|
|
25
27
|
project: 'Storybook',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
createdAt: '2021-11-09T00:00:00Z',
|
|
29
|
+
updatedAt: '2021-11-09T00:00:00Z',
|
|
28
30
|
version: 0
|
|
29
31
|
},
|
|
30
32
|
spec: {
|
|
@@ -14,18 +14,20 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
17
|
+
_export_star(require("./constants"), exports);
|
|
18
|
+
_export_star(require("./WithDashboard"), exports);
|
|
19
|
+
_export_star(require("./WithDatasourceStore"), exports);
|
|
20
|
+
_export_star(require("./WithTemplateVariables"), exports);
|
|
21
|
+
function _export_star(from, to) {
|
|
22
22
|
Object.keys(from).forEach(function(k) {
|
|
23
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
24
|
+
Object.defineProperty(to, k, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return from[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
29
31
|
});
|
|
30
32
|
return from;
|
|
31
33
|
}
|
|
@@ -21,13 +21,17 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
getTestDashboard: ()
|
|
25
|
-
|
|
24
|
+
getTestDashboard: function() {
|
|
25
|
+
return getTestDashboard;
|
|
26
|
+
},
|
|
27
|
+
createDashboardProviderSpy: function() {
|
|
28
|
+
return createDashboardProviderSpy;
|
|
29
|
+
}
|
|
26
30
|
});
|
|
27
31
|
const _react = require("react");
|
|
28
32
|
const _context = require("../context");
|
|
29
|
-
const _testDashboard = /*#__PURE__*/
|
|
30
|
-
function
|
|
33
|
+
const _testDashboard = /*#__PURE__*/ _interop_require_default(require("./testDashboard"));
|
|
34
|
+
function _interop_require_default(obj) {
|
|
31
35
|
return obj && obj.__esModule ? obj : {
|
|
32
36
|
default: obj
|
|
33
37
|
};
|
|
@@ -21,18 +21,24 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
prometheusDemoUrl: ()
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
prometheusDemoUrl: function() {
|
|
25
|
+
return prometheusDemoUrl;
|
|
26
|
+
},
|
|
27
|
+
prometheusDemo: function() {
|
|
28
|
+
return prometheusDemo;
|
|
29
|
+
},
|
|
30
|
+
defaultDatasourceProps: function() {
|
|
31
|
+
return defaultDatasourceProps;
|
|
32
|
+
}
|
|
27
33
|
});
|
|
28
|
-
const
|
|
34
|
+
const _dashboardprovider = require("./dashboard-provider");
|
|
29
35
|
const prometheusDemoUrl = 'https://prometheus.demo.do.prometheus.io';
|
|
30
36
|
const prometheusDemo = {
|
|
31
37
|
kind: 'GlobalDatasource',
|
|
32
38
|
metadata: {
|
|
33
39
|
name: 'PrometheusDemo',
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
createdAt: '0001-01-01T00:00:00Z',
|
|
41
|
+
updatedAt: '0001-01-01T00:00:00Z',
|
|
36
42
|
version: 0
|
|
37
43
|
},
|
|
38
44
|
spec: {
|
|
@@ -40,23 +46,21 @@ const prometheusDemo = {
|
|
|
40
46
|
plugin: {
|
|
41
47
|
kind: 'PrometheusDatasource',
|
|
42
48
|
spec: {
|
|
43
|
-
|
|
49
|
+
directUrl: prometheusDemoUrl
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
};
|
|
48
54
|
const defaultDatasourceProps = {
|
|
49
|
-
dashboardResource: (0,
|
|
55
|
+
dashboardResource: (0, _dashboardprovider.getTestDashboard)(),
|
|
50
56
|
datasourceApi: {
|
|
57
|
+
buildProxyUrl: ()=>'',
|
|
51
58
|
getDatasource: ()=>{
|
|
52
59
|
return Promise.resolve(undefined);
|
|
53
60
|
},
|
|
54
61
|
getGlobalDatasource: (selector)=>{
|
|
55
62
|
if (selector.kind === 'PrometheusDatasource') {
|
|
56
|
-
return Promise.resolve(
|
|
57
|
-
resource: prometheusDemo,
|
|
58
|
-
proxyUrl: prometheusDemoUrl
|
|
59
|
-
});
|
|
63
|
+
return Promise.resolve(prometheusDemo);
|
|
60
64
|
}
|
|
61
65
|
return Promise.resolve(undefined);
|
|
62
66
|
},
|
package/dist/cjs/test/index.js
CHANGED
|
@@ -14,18 +14,20 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
17
|
+
_export_star(require("./dashboard-provider"), exports);
|
|
18
|
+
_export_star(require("./datasource-provider"), exports);
|
|
19
|
+
_export_star(require("./plugin-registry"), exports);
|
|
20
|
+
_export_star(require("./render"), exports);
|
|
21
|
+
function _export_star(from, to) {
|
|
22
22
|
Object.keys(from).forEach(function(k) {
|
|
23
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
24
|
+
Object.defineProperty(to, k, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return from[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
29
31
|
});
|
|
30
32
|
return from;
|
|
31
33
|
}
|
|
@@ -16,17 +16,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "MOCK_PLUGINS", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return MOCK_PLUGINS;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const FakeTimeSeriesChartOptionEditor = ()=>{
|
|
23
|
-
return /*#__PURE__*/ (0,
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
24
26
|
children: "TimeSeriesChart options"
|
|
25
27
|
});
|
|
26
28
|
};
|
|
27
29
|
const FakeTimeSeriesPlugin = {
|
|
28
30
|
PanelComponent: ()=>{
|
|
29
|
-
return /*#__PURE__*/ (0,
|
|
31
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
30
32
|
children: "TimeSeriesChart panel"
|
|
31
33
|
});
|
|
32
34
|
},
|
package/dist/cjs/test/render.js
CHANGED
|
@@ -16,19 +16,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "renderWithContext", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return renderWithContext;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _react = require("react");
|
|
23
25
|
const _react1 = require("@testing-library/react");
|
|
24
|
-
const
|
|
26
|
+
const _reactrouterdom = require("react-router-dom");
|
|
25
27
|
const _history = require("history");
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
28
|
+
const _usequeryparams = require("use-query-params");
|
|
29
|
+
const _reactrouter6 = require("use-query-params/adapters/react-router-6");
|
|
30
|
+
const _reactquery = require("@tanstack/react-query");
|
|
29
31
|
const _components = require("@perses-dev/components");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
33
|
+
const _context = require("../context");
|
|
34
|
+
const _test = require("../test");
|
|
35
|
+
const _pluginregistry = require("./plugin-registry");
|
|
32
36
|
/*
|
|
33
37
|
* Workaround for React router upgrade type errors.
|
|
34
38
|
* More details: https://stackoverflow.com/a/69948457/17575201
|
|
@@ -40,7 +44,7 @@ const _pluginRegistry = require("./plugin-registry");
|
|
|
40
44
|
(0, _react.useLayoutEffect)(()=>history.listen(setState), [
|
|
41
45
|
history
|
|
42
46
|
]);
|
|
43
|
-
return /*#__PURE__*/ (0,
|
|
47
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactrouterdom.Router, {
|
|
44
48
|
location: state.location,
|
|
45
49
|
navigationType: state.action,
|
|
46
50
|
navigator: history,
|
|
@@ -49,7 +53,7 @@ const _pluginRegistry = require("./plugin-registry");
|
|
|
49
53
|
};
|
|
50
54
|
function renderWithContext(ui, options, history) {
|
|
51
55
|
// Create a new QueryClient for each test to avoid caching issues
|
|
52
|
-
const queryClient = new
|
|
56
|
+
const queryClient = new _reactquery.QueryClient({
|
|
53
57
|
defaultOptions: {
|
|
54
58
|
queries: {
|
|
55
59
|
refetchOnWindowFocus: false,
|
|
@@ -58,27 +62,30 @@ function renderWithContext(ui, options, history) {
|
|
|
58
62
|
}
|
|
59
63
|
});
|
|
60
64
|
const customHistory = history !== null && history !== void 0 ? history : (0, _history.createMemoryHistory)();
|
|
61
|
-
const BaseRender = ()=>/*#__PURE__*/ (0,
|
|
65
|
+
const BaseRender = ()=>/*#__PURE__*/ (0, _jsxruntime.jsx)(CustomRouter, {
|
|
62
66
|
history: customHistory,
|
|
63
|
-
children: /*#__PURE__*/ (0,
|
|
67
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactquery.QueryClientProvider, {
|
|
64
68
|
client: queryClient,
|
|
65
|
-
children: /*#__PURE__*/ (0,
|
|
66
|
-
adapter:
|
|
67
|
-
children: /*#__PURE__*/ (0,
|
|
69
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_usequeryparams.QueryParamProvider, {
|
|
70
|
+
adapter: _reactrouter6.ReactRouter6Adapter,
|
|
71
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SnackbarProvider, {
|
|
68
72
|
anchorOrigin: {
|
|
69
73
|
vertical: 'bottom',
|
|
70
74
|
horizontal: 'right'
|
|
71
75
|
},
|
|
72
|
-
children: /*#__PURE__*/ (0,
|
|
76
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ChartsProvider, {
|
|
73
77
|
chartsTheme: _components.testChartsTheme,
|
|
74
|
-
children: /*#__PURE__*/ (0,
|
|
75
|
-
...(0,
|
|
76
|
-
children:
|
|
78
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.PluginRegistry, {
|
|
79
|
+
...(0, _pluginsystem.mockPluginRegistry)(..._pluginregistry.MOCK_PLUGINS),
|
|
80
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_context.DatasourceStoreProvider, {
|
|
81
|
+
..._test.defaultDatasourceProps,
|
|
82
|
+
children: ui
|
|
83
|
+
})
|
|
77
84
|
})
|
|
78
85
|
})
|
|
79
86
|
})
|
|
80
87
|
})
|
|
81
88
|
})
|
|
82
89
|
});
|
|
83
|
-
return (0, _react1.render)(/*#__PURE__*/ (0,
|
|
90
|
+
return (0, _react1.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(BaseRender, {}), options);
|
|
84
91
|
}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const _reactintersectionobserver = require("react-intersection-observer");
|
|
18
18
|
require("@testing-library/jest-dom/extend-expect");
|
|
19
19
|
// Always mock e-charts during tests since we don't have a proper canvas in jsdom
|
|
20
20
|
jest.mock('echarts/core');
|
|
21
21
|
// Tell react-intersection-observer that everything should be considered in-view for tests (see package documentation
|
|
22
22
|
// for other options)
|
|
23
|
-
(0,
|
|
23
|
+
(0, _reactintersectionobserver.defaultFallbackInView)(true);
|
|
@@ -16,15 +16,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "default", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return _default;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const testDashboard = {
|
|
22
24
|
kind: 'Dashboard',
|
|
23
25
|
metadata: {
|
|
24
26
|
name: 'Node Stats',
|
|
25
27
|
project: 'perses',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
createdAt: '2021-11-09',
|
|
29
|
+
updatedAt: '2021-11-09',
|
|
28
30
|
version: 0
|
|
29
31
|
},
|
|
30
32
|
spec: {
|
|
@@ -63,8 +65,8 @@ const testDashboard = {
|
|
|
63
65
|
plugin: {
|
|
64
66
|
kind: 'TimeSeriesChart',
|
|
65
67
|
spec: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
format: {
|
|
69
|
+
unit: '%'
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
},
|
|
@@ -92,8 +94,8 @@ const testDashboard = {
|
|
|
92
94
|
plugin: {
|
|
93
95
|
kind: 'TimeSeriesChart',
|
|
94
96
|
spec: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
format: {
|
|
98
|
+
unit: 'bytes'
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
},
|
|
@@ -155,8 +157,8 @@ const testDashboard = {
|
|
|
155
157
|
plugin: {
|
|
156
158
|
kind: 'TimeSeriesChart',
|
|
157
159
|
spec: {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
format: {
|
|
161
|
+
unit: 'percent'
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
},
|
|
@@ -184,8 +186,8 @@ const testDashboard = {
|
|
|
184
186
|
plugin: {
|
|
185
187
|
kind: 'TimeSeriesChart',
|
|
186
188
|
spec: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
format: {
|
|
190
|
+
unit: 'percent'
|
|
189
191
|
}
|
|
190
192
|
}
|
|
191
193
|
},
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
17
|
+
_export_star(require("./panelUtils"), exports);
|
|
18
|
+
_export_star(require("./time"), 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
|
}
|
|
@@ -21,9 +21,15 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
getYForNewRow: ()
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
getYForNewRow: function() {
|
|
25
|
+
return getYForNewRow;
|
|
26
|
+
},
|
|
27
|
+
insertPanelInLayout: function() {
|
|
28
|
+
return insertPanelInLayout;
|
|
29
|
+
},
|
|
30
|
+
getValidPanelKey: function() {
|
|
31
|
+
return getValidPanelKey;
|
|
32
|
+
}
|
|
27
33
|
});
|
|
28
34
|
const _constants = require("../constants");
|
|
29
35
|
function getYForNewRow(group) {
|
package/dist/cjs/utils/time.js
CHANGED
|
@@ -16,12 +16,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "useSuggestedStepMs", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return useSuggestedStepMs;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const _core = require("@perses-dev/core");
|
|
22
|
-
const
|
|
24
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
23
25
|
function useSuggestedStepMs(width) {
|
|
24
|
-
const { absoluteTimeRange } = (0,
|
|
26
|
+
const { absoluteTimeRange } = (0, _pluginsystem.useTimeRange)();
|
|
25
27
|
if (width === undefined) return 0;
|
|
26
28
|
return (0, _core.getSuggestedStepMs)(absoluteTimeRange, width);
|
|
27
29
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright 2023 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("./panel"), 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
|
+
}
|