@perses-dev/dashboards 0.0.0-snapshot-embed-import-errors-8906900 → 0.0.0-snapshot-test-internal-dep-dd238ac
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 +43 -0
- package/dist/cjs/components/AddGroupButton/index.js +28 -0
- package/dist/cjs/components/AddPanelButton/AddPanelButton.js +43 -0
- package/dist/cjs/components/AddPanelButton/index.js +28 -0
- package/dist/cjs/components/Dashboard/Dashboard.js +1 -1
- package/dist/cjs/components/Dashboard/index.js +1 -1
- package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +49 -22
- package/dist/cjs/components/DashboardToolbar/index.js +1 -1
- package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +9 -31
- package/dist/cjs/components/DeletePanelDialog/index.js +1 -1
- package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -1
- package/dist/cjs/components/DeletePanelGroupDialog/index.js +1 -1
- package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +2 -1
- package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +1 -1
- package/dist/cjs/components/DownloadButton/DownloadButton.js +16 -46
- package/dist/cjs/components/DownloadButton/index.js +1 -1
- package/dist/cjs/components/GridLayout/GridContainer.js +2 -1
- package/dist/cjs/components/GridLayout/GridItemContent.js +3 -2
- package/dist/cjs/components/GridLayout/GridLayout.js +6 -8
- package/dist/cjs/components/GridLayout/GridTitle.js +14 -11
- package/dist/cjs/components/GridLayout/index.js +1 -1
- package/dist/cjs/components/Panel/Panel.js +6 -6
- package/dist/cjs/components/Panel/PanelContent.js +3 -2
- package/dist/cjs/components/Panel/PanelHeader.js +26 -8
- package/dist/cjs/components/Panel/index.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +2 -1
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +1 -1
- package/dist/cjs/components/PanelDrawer/index.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +4 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/index.js +1 -1
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +19 -11
- package/dist/cjs/components/TimeRangeControls/index.js +1 -1
- package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +1 -1
- package/dist/cjs/components/ToolbarIconButton/index.js +1 -1
- package/dist/cjs/components/Variables/EditVariablesButton.js +75 -0
- package/dist/cjs/components/Variables/Variable.js +1 -1
- package/dist/cjs/components/Variables/VariableEditor.js +10 -6
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +6 -7
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/cjs/components/Variables/VariableList.js +45 -111
- package/dist/cjs/components/Variables/index.js +4 -2
- package/dist/cjs/components/Variables/variable-model.js +1 -1
- package/dist/cjs/components/index.js +3 -1
- package/dist/cjs/{utils/functions.js → constants/grid-layout-config.js} +14 -6
- package/dist/cjs/constants/index.js +29 -0
- package/dist/cjs/constants/user-interface-text.js +61 -0
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +38 -14
- package/dist/cjs/context/DashboardProvider/common.js +1 -1
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +7 -5
- package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/duplicate-panel-slice.js +62 -0
- package/dist/cjs/context/DashboardProvider/index.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-editor-slice.js +9 -38
- package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-slice.js +1 -1
- package/dist/cjs/context/DatasourceStoreProvider.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/index.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/query-params.js +1 -1
- package/dist/cjs/context/index.js +1 -1
- package/dist/cjs/context/useDashboard.js +5 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/test/dashboard-provider.js +1 -1
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/test/plugin-registry.js +1 -1
- package/dist/cjs/test/render.js +1 -1
- package/dist/cjs/test/setup-tests.js +1 -1
- package/dist/cjs/test/testDashboard.js +1 -1
- package/dist/cjs/utils/index.js +28 -0
- package/dist/cjs/utils/panelUtils.js +168 -0
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +5 -2
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +5 -3
- package/dist/cjs/views/ViewDashboard/index.js +1 -1
- package/dist/cjs/views/index.js +1 -1
- package/dist/components/AddGroupButton/AddGroupButton.d.ts +3 -0
- package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -0
- package/dist/components/AddGroupButton/AddGroupButton.js +32 -0
- package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -0
- package/dist/components/AddGroupButton/index.d.ts +2 -0
- package/dist/components/AddGroupButton/index.d.ts.map +1 -0
- package/dist/{utils/functions.js → components/AddGroupButton/index.js} +3 -5
- package/dist/components/AddGroupButton/index.js.map +1 -0
- package/dist/components/AddPanelButton/AddPanelButton.d.ts +3 -0
- package/dist/components/AddPanelButton/AddPanelButton.d.ts.map +1 -0
- package/dist/components/AddPanelButton/AddPanelButton.js +32 -0
- package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -0
- package/dist/components/AddPanelButton/index.d.ts +2 -0
- package/dist/components/AddPanelButton/index.d.ts.map +1 -0
- package/dist/components/AddPanelButton/index.js +15 -0
- package/dist/components/AddPanelButton/index.js.map +1 -0
- package/dist/components/Dashboard/Dashboard.js +1 -1
- package/dist/components/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Dashboard/index.js +1 -1
- package/dist/components/Dashboard/index.js.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +50 -23
- package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
- package/dist/components/DashboardToolbar/index.js +1 -1
- package/dist/components/DashboardToolbar/index.js.map +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.d.ts.map +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js +8 -25
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
- package/dist/components/DeletePanelDialog/index.js +1 -1
- package/dist/components/DeletePanelDialog/index.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +2 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.d.ts +5 -1
- package/dist/components/DownloadButton/DownloadButton.d.ts.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.js +17 -8
- package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
- package/dist/components/DownloadButton/index.js +1 -1
- package/dist/components/DownloadButton/index.js.map +1 -1
- package/dist/components/GridLayout/GridContainer.d.ts.map +1 -1
- package/dist/components/GridLayout/GridContainer.js +2 -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 +3 -2
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +6 -8
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.d.ts.map +1 -1
- package/dist/components/GridLayout/GridTitle.js +14 -11
- package/dist/components/GridLayout/GridTitle.js.map +1 -1
- package/dist/components/GridLayout/index.js +1 -1
- package/dist/components/GridLayout/index.js.map +1 -1
- package/dist/components/Panel/Panel.js +7 -7
- package/dist/components/Panel/Panel.js.map +1 -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.d.ts +1 -0
- package/dist/components/Panel/PanelHeader.d.ts.map +1 -1
- package/dist/components/Panel/PanelHeader.js +26 -8
- package/dist/components/Panel/PanelHeader.js.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js +2 -1
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
- package/dist/components/PanelDrawer/index.js +1 -1
- package/dist/components/PanelDrawer/index.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js +4 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js.map +1 -1
- package/dist/components/PanelGroupDialog/index.js +1 -1
- package/dist/components/PanelGroupDialog/index.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +2 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +21 -13
- 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/ToolbarIconButton/ToolbarIconButton.js +1 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/components/ToolbarIconButton/index.js +1 -1
- package/dist/components/ToolbarIconButton/index.js.map +1 -1
- package/dist/components/Variables/EditVariablesButton.d.ts +3 -0
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -0
- package/dist/components/Variables/EditVariablesButton.js +64 -0
- package/dist/components/Variables/EditVariablesButton.js.map +1 -0
- package/dist/components/Variables/Variable.js +1 -1
- package/dist/components/Variables/Variable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js +10 -6
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +8 -9
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +47 -74
- package/dist/components/Variables/VariableList.js.map +1 -1
- package/dist/components/Variables/index.d.ts +3 -1
- package/dist/components/Variables/index.d.ts.map +1 -1
- package/dist/components/Variables/index.js +4 -2
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/Variables/variable-model.js +1 -1
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/constants/grid-layout-config.d.ts +6 -0
- package/dist/constants/grid-layout-config.d.ts.map +1 -0
- package/dist/constants/grid-layout-config.js +19 -0
- package/dist/constants/grid-layout-config.js.map +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +16 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/user-interface-text.d.ts +30 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -0
- package/dist/constants/user-interface-text.js +49 -0
- package/dist/constants/user-interface-text.js.map +1 -0
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +6 -4
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js +38 -9
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.js +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts +1 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +7 -5
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/duplicate-panel-slice.d.ts +19 -0
- package/dist/context/DashboardProvider/duplicate-panel-slice.d.ts.map +1 -0
- package/dist/context/DashboardProvider/duplicate-panel-slice.js +58 -0
- package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -0
- package/dist/context/DashboardProvider/index.d.ts +1 -1
- package/dist/context/DashboardProvider/index.d.ts.map +1 -1
- package/dist/context/DashboardProvider/index.js +1 -1
- package/dist/context/DashboardProvider/index.js.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts +4 -0
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js +7 -36
- package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +1 -1
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/index.js +1 -1
- package/dist/context/TemplateVariableProvider/index.js.map +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
- package/dist/context/index.js +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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/test/dashboard-provider.js +1 -1
- package/dist/test/dashboard-provider.js.map +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/plugin-registry.js +1 -1
- package/dist/test/plugin-registry.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/testDashboard.js +1 -1
- package/dist/test/testDashboard.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/panelUtils.d.ts +27 -0
- package/dist/utils/panelUtils.d.ts.map +1 -0
- package/dist/utils/panelUtils.js +174 -0
- package/dist/utils/panelUtils.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 +5 -2
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts +2 -0
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +5 -3
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
- package/dist/views/ViewDashboard/index.js +1 -1
- package/dist/views/ViewDashboard/index.js.map +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/cjs/components/Panel/Panel.test.js +0 -129
- package/dist/cjs/components/PanelDrawer/PanelDrawer.test.js +0 -131
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.test.js +0 -87
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.test.js +0 -95
- package/dist/cjs/components/Variables/variable-model.test.js +0 -106
- package/dist/cjs/context/TemplateVariableProvider/query-params.test.js +0 -82
- package/dist/cjs/views/ViewDashboard/tests/panelGroups.test.js +0 -110
- package/dist/components/Panel/Panel.test.d.ts +0 -2
- package/dist/components/Panel/Panel.test.d.ts.map +0 -1
- package/dist/components/Panel/Panel.test.js +0 -122
- package/dist/components/Panel/Panel.test.js.map +0 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.d.ts +0 -2
- package/dist/components/PanelDrawer/PanelDrawer.test.d.ts.map +0 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.js +0 -124
- package/dist/components/PanelDrawer/PanelDrawer.test.js.map +0 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.d.ts +0 -2
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.d.ts.map +0 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js +0 -80
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js.map +0 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.d.ts +0 -2
- package/dist/components/TimeRangeControls/TimeRangeControls.test.d.ts.map +0 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js +0 -88
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js.map +0 -1
- package/dist/components/Variables/variable-model.test.d.ts +0 -2
- package/dist/components/Variables/variable-model.test.d.ts.map +0 -1
- package/dist/components/Variables/variable-model.test.js +0 -104
- package/dist/components/Variables/variable-model.test.js.map +0 -1
- package/dist/context/TemplateVariableProvider/query-params.test.d.ts +0 -2
- package/dist/context/TemplateVariableProvider/query-params.test.d.ts.map +0 -1
- package/dist/context/TemplateVariableProvider/query-params.test.js +0 -80
- package/dist/context/TemplateVariableProvider/query-params.test.js.map +0 -1
- package/dist/utils/functions.d.ts +0 -2
- package/dist/utils/functions.d.ts.map +0 -1
- package/dist/utils/functions.js.map +0 -1
- package/dist/views/ViewDashboard/tests/panelGroups.test.d.ts +0 -2
- package/dist/views/ViewDashboard/tests/panelGroups.test.d.ts.map +0 -1
- package/dist/views/ViewDashboard/tests/panelGroups.test.js +0 -103
- package/dist/views/ViewDashboard/tests/panelGroups.test.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "createPanelEditorSlice", {
|
|
|
18
18
|
enumerable: true,
|
|
19
19
|
get: ()=>createPanelEditorSlice
|
|
20
20
|
});
|
|
21
|
-
const
|
|
21
|
+
const _panelUtils = require("../../utils/panelUtils");
|
|
22
22
|
const _common = require("./common");
|
|
23
23
|
const _panelGroupSlice = require("./panel-group-slice");
|
|
24
24
|
function createPanelEditorSlice() {
|
|
@@ -80,7 +80,7 @@ function createPanelEditorSlice() {
|
|
|
80
80
|
newGroup.itemLayouts.push({
|
|
81
81
|
i: existingLayout.i,
|
|
82
82
|
x: 0,
|
|
83
|
-
y: getYForNewRow(newGroup),
|
|
83
|
+
y: (0, _panelUtils.getYForNewRow)(newGroup),
|
|
84
84
|
w: existingLayout.w,
|
|
85
85
|
h: existingLayout.h
|
|
86
86
|
});
|
|
@@ -99,6 +99,7 @@ function createPanelEditorSlice() {
|
|
|
99
99
|
});
|
|
100
100
|
},
|
|
101
101
|
openAddPanel (panelGroupId) {
|
|
102
|
+
var ref, ref1;
|
|
102
103
|
// If a panel group isn't supplied, add to the first group or create a group if there aren't any
|
|
103
104
|
let newGroup = undefined;
|
|
104
105
|
panelGroupId !== null && panelGroupId !== void 0 ? panelGroupId : panelGroupId = get().panelGroupOrder[0];
|
|
@@ -107,23 +108,19 @@ function createPanelEditorSlice() {
|
|
|
107
108
|
newGroup.title = 'Panel Group';
|
|
108
109
|
panelGroupId = newGroup.id;
|
|
109
110
|
}
|
|
111
|
+
var ref2, ref3;
|
|
110
112
|
const editorState = {
|
|
111
113
|
mode: 'Add',
|
|
112
114
|
initialValues: {
|
|
113
115
|
name: '',
|
|
114
116
|
description: '',
|
|
115
117
|
groupId: panelGroupId,
|
|
116
|
-
kind: '',
|
|
117
|
-
spec: {}
|
|
118
|
+
kind: (ref2 = (ref = get().initialValues) === null || ref === void 0 ? void 0 : ref.kind) !== null && ref2 !== void 0 ? ref2 : '',
|
|
119
|
+
spec: (ref3 = (ref1 = get().initialValues) === null || ref1 === void 0 ? void 0 : ref1.spec) !== null && ref3 !== void 0 ? ref3 : {}
|
|
118
120
|
},
|
|
119
121
|
applyChanges: (next)=>{
|
|
120
122
|
const panelDef = createPanelDefinitionFromEditorValues(next);
|
|
121
|
-
const
|
|
122
|
-
let panelKey = (0, _functions.removeWhiteSpacesAndSpecialCharacters)(next.name);
|
|
123
|
-
// append count if panel key already exists
|
|
124
|
-
if (uniquePanelKeys[panelKey]) {
|
|
125
|
-
panelKey += `-${uniquePanelKeys[panelKey]}`;
|
|
126
|
-
}
|
|
123
|
+
const panelKey = (0, _panelUtils.getValidPanelKey)(next.name, get().panels);
|
|
127
124
|
set((state)=>{
|
|
128
125
|
// Add a panel
|
|
129
126
|
state.panels[panelKey] = panelDef;
|
|
@@ -135,7 +132,7 @@ function createPanelEditorSlice() {
|
|
|
135
132
|
const layout = {
|
|
136
133
|
i: (0, _common.generateId)().toString(),
|
|
137
134
|
x: 0,
|
|
138
|
-
y: getYForNewRow(group),
|
|
135
|
+
y: (0, _panelUtils.getYForNewRow)(group),
|
|
139
136
|
w: 12,
|
|
140
137
|
h: 6
|
|
141
138
|
};
|
|
@@ -177,29 +174,3 @@ function createPanelDefinitionFromEditorValues(editorValues) {
|
|
|
177
174
|
}
|
|
178
175
|
};
|
|
179
176
|
}
|
|
180
|
-
// Given a PanelGroup, will find the Y coordinate for adding a new row to the grid, taking into account the items present
|
|
181
|
-
function getYForNewRow(group) {
|
|
182
|
-
let newRowY = 0;
|
|
183
|
-
for (const layout of group.itemLayouts){
|
|
184
|
-
const itemMaxY = layout.y + layout.h;
|
|
185
|
-
if (itemMaxY > newRowY) {
|
|
186
|
-
newRowY = itemMaxY;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return newRowY;
|
|
190
|
-
}
|
|
191
|
-
// Find all the unique panel keys
|
|
192
|
-
// ex: cpu, cpu-1, cpu-2 count as the same panel key since these panels have the same name
|
|
193
|
-
function getUniquePanelKeys(panels) {
|
|
194
|
-
const uniquePanelKeys = {};
|
|
195
|
-
Object.keys(panels).forEach((panelKey)=>{
|
|
196
|
-
const key = panelKey.replace(/-([0-9]+)/, '');
|
|
197
|
-
const count = uniquePanelKeys[key];
|
|
198
|
-
if (count) {
|
|
199
|
-
uniquePanelKeys[key] = count + 1;
|
|
200
|
-
} else {
|
|
201
|
-
uniquePanelKeys[key] = 1;
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
return uniquePanelKeys;
|
|
205
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -22,13 +22,14 @@ const _core = require("@perses-dev/core");
|
|
|
22
22
|
const _dashboardProvider = require("./DashboardProvider");
|
|
23
23
|
const _templateVariableProvider = require("./TemplateVariableProvider");
|
|
24
24
|
function useDashboard() {
|
|
25
|
-
const { panels , panelGroups , panelGroupOrder , defaultTimeRange ,
|
|
25
|
+
const { panels , panelGroups , panelGroupOrder , defaultTimeRange , setDashboard: setDashboardResource , metadata , display , } = (0, _dashboardProvider.useDashboardStore)(({ panels , panelGroups , panelGroupOrder , defaultTimeRange , setDashboard , metadata , display })=>({
|
|
26
26
|
panels,
|
|
27
27
|
panelGroups,
|
|
28
28
|
panelGroupOrder,
|
|
29
29
|
defaultTimeRange,
|
|
30
30
|
setDashboard,
|
|
31
|
-
metadata
|
|
31
|
+
metadata,
|
|
32
|
+
display
|
|
32
33
|
}));
|
|
33
34
|
const { setVariableDefinitions } = (0, _templateVariableProvider.useTemplateVariableActions)();
|
|
34
35
|
const variables = (0, _templateVariableProvider.useTemplateVariableDefinitions)();
|
|
@@ -37,6 +38,7 @@ function useDashboard() {
|
|
|
37
38
|
kind: 'Dashboard',
|
|
38
39
|
metadata,
|
|
39
40
|
spec: {
|
|
41
|
+
display,
|
|
40
42
|
panels,
|
|
41
43
|
layouts,
|
|
42
44
|
variables,
|
package/dist/cjs/index.js
CHANGED
package/dist/cjs/test/index.js
CHANGED
package/dist/cjs/test/render.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
_exportStar(require("./panelUtils"), exports);
|
|
18
|
+
function _exportStar(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function() {
|
|
23
|
+
return from[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return from;
|
|
28
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
function _export(target, all) {
|
|
18
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: all[name]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
getYForNewRow: ()=>getYForNewRow,
|
|
25
|
+
insertPanelInLayout: ()=>insertPanelInLayout,
|
|
26
|
+
getValidPanelKey: ()=>getValidPanelKey
|
|
27
|
+
});
|
|
28
|
+
const _constants = require("../constants");
|
|
29
|
+
function getYForNewRow(group) {
|
|
30
|
+
let newRowY = 0;
|
|
31
|
+
for (const layout of group.itemLayouts){
|
|
32
|
+
const itemMaxY = layout.y + layout.h;
|
|
33
|
+
if (itemMaxY > newRowY) {
|
|
34
|
+
newRowY = itemMaxY;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return newRowY;
|
|
38
|
+
}
|
|
39
|
+
function getPanelBounds({ x , y , w , h }) {
|
|
40
|
+
return {
|
|
41
|
+
x1: x,
|
|
42
|
+
x2: x + w,
|
|
43
|
+
y1: y,
|
|
44
|
+
y2: y + h
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function insertPanelInLayout(newLayout, referenceLayout, itemLayouts) {
|
|
48
|
+
const MAX_LAYOUT_WIDTH = _constants.GRID_LAYOUT_COLS[_constants.GRID_LAYOUT_SMALL_BREAKPOINT];
|
|
49
|
+
const referenceBounds = getPanelBounds(referenceLayout);
|
|
50
|
+
// Organize layouts based on vertical relation to the item being inserted
|
|
51
|
+
// after.
|
|
52
|
+
const aboveInsertRow = [];
|
|
53
|
+
const insertRow = [];
|
|
54
|
+
const belowInsertRow = [];
|
|
55
|
+
itemLayouts.forEach((itemLayout)=>{
|
|
56
|
+
const itemBounds = getPanelBounds(itemLayout);
|
|
57
|
+
if (itemBounds.y2 <= referenceBounds.y1) {
|
|
58
|
+
aboveInsertRow.push(itemLayout);
|
|
59
|
+
} else if (itemBounds.y1 >= referenceBounds.y2) {
|
|
60
|
+
belowInsertRow.push(itemLayout);
|
|
61
|
+
} else {
|
|
62
|
+
insertRow.push(itemLayout);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
// Cannot safely assume that the order of item layouts array is strictly
|
|
66
|
+
// left to right. Sorting the row by horizontal position to more easily find
|
|
67
|
+
// gaps.
|
|
68
|
+
insertRow.sort((a, b)=>a.x - b.x);
|
|
69
|
+
const insertAfterIndex = insertRow.findIndex((item)=>item.i === referenceLayout.i);
|
|
70
|
+
if (insertAfterIndex === insertRow.length - 1) {
|
|
71
|
+
// Insert to the right when space is available and the reference is the last
|
|
72
|
+
// item in the row.
|
|
73
|
+
if (referenceBounds.x2 + newLayout.w <= MAX_LAYOUT_WIDTH) {
|
|
74
|
+
return [
|
|
75
|
+
...aboveInsertRow,
|
|
76
|
+
...insertRow,
|
|
77
|
+
{
|
|
78
|
+
...newLayout,
|
|
79
|
+
x: referenceBounds.x2,
|
|
80
|
+
y: referenceBounds.y1
|
|
81
|
+
},
|
|
82
|
+
...belowInsertRow
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
} else if (insertAfterIndex >= 0) {
|
|
86
|
+
const nextItem = insertRow[insertAfterIndex + 1];
|
|
87
|
+
if (nextItem && getPanelBounds(nextItem).x1 - referenceBounds.x2 >= newLayout.w) {
|
|
88
|
+
// Insert to the right when space is available between the reference and
|
|
89
|
+
// the next item in the row.
|
|
90
|
+
insertRow.splice(insertAfterIndex + 1, 0, {
|
|
91
|
+
...newLayout,
|
|
92
|
+
x: referenceBounds.x2,
|
|
93
|
+
y: referenceBounds.y1
|
|
94
|
+
});
|
|
95
|
+
return [
|
|
96
|
+
...aboveInsertRow,
|
|
97
|
+
...insertRow,
|
|
98
|
+
...belowInsertRow
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Insert the new item below the original and shift the items below the
|
|
103
|
+
// row where the reference is located.
|
|
104
|
+
return [
|
|
105
|
+
...aboveInsertRow,
|
|
106
|
+
...insertRow,
|
|
107
|
+
{
|
|
108
|
+
x: referenceBounds.x1,
|
|
109
|
+
y: referenceBounds.y2,
|
|
110
|
+
...newLayout
|
|
111
|
+
},
|
|
112
|
+
...belowInsertRow.map((itemLayout)=>{
|
|
113
|
+
// Note: the grid will not necessarily display all of these items shifted
|
|
114
|
+
// all the way down because of vertical compacting, but shifing their
|
|
115
|
+
// y position ensures the new item gets vertical precedence over items
|
|
116
|
+
// below it in that compacting.
|
|
117
|
+
return {
|
|
118
|
+
...itemLayout,
|
|
119
|
+
y: itemLayout.y + newLayout.h
|
|
120
|
+
};
|
|
121
|
+
})
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
function getValidPanelKey(panelKey, panels) {
|
|
125
|
+
const uniquePanelKeys = getUniquePanelKeys(panels);
|
|
126
|
+
let normalizedPanelKey = getPanelKeyParts(removeWhiteSpaces(panelKey)).name;
|
|
127
|
+
const matchingKey = uniquePanelKeys[normalizedPanelKey];
|
|
128
|
+
if (typeof matchingKey === 'number') {
|
|
129
|
+
normalizedPanelKey += `-${matchingKey + 1}`;
|
|
130
|
+
}
|
|
131
|
+
return normalizedPanelKey;
|
|
132
|
+
}
|
|
133
|
+
const removeWhiteSpaces = (str)=>{
|
|
134
|
+
return str.replace(/\s+/g, '');
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Breaks the specified panel key into the name and the optional `-number` used
|
|
138
|
+
* for deduping panels with the same name.
|
|
139
|
+
*/ function getPanelKeyParts(panelKey) {
|
|
140
|
+
const parts = panelKey.match(/(.+)-([0-9]+)/);
|
|
141
|
+
if (parts && parts[1] && parts[2]) {
|
|
142
|
+
return {
|
|
143
|
+
name: parts[1],
|
|
144
|
+
number: parseInt(parts[2], 10)
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
name: panelKey
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
// Find all the unique panel keys and the largest number used for each.
|
|
152
|
+
// ex: cpu, cpu-1, cpu-2 count as the same panel key since these panels have the same name
|
|
153
|
+
function getUniquePanelKeys(panels) {
|
|
154
|
+
const uniquePanelKeys = {};
|
|
155
|
+
Object.keys(panels).forEach((panelKey)=>{
|
|
156
|
+
const { name , number } = getPanelKeyParts(panelKey);
|
|
157
|
+
if (uniquePanelKeys[name] === undefined) {
|
|
158
|
+
uniquePanelKeys[name] = 0;
|
|
159
|
+
}
|
|
160
|
+
const currentValue = uniquePanelKeys[name];
|
|
161
|
+
if (typeof currentValue === 'number' && number) {
|
|
162
|
+
// Check for the maximum value because we cannot rely on a sequential
|
|
163
|
+
// set of numbers when panels are modified.
|
|
164
|
+
uniquePanelKeys[name] = Math.max(currentValue, number);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
return uniquePanelKeys;
|
|
168
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -25,7 +25,7 @@ const _components = require("@perses-dev/components");
|
|
|
25
25
|
const _components1 = require("../../components");
|
|
26
26
|
const _context = require("../../context");
|
|
27
27
|
const DashboardApp = (props)=>{
|
|
28
|
-
const { dashboardResource , dashboardTitleComponent , onSave , initialVariableIsSticky , isReadonly } = props;
|
|
28
|
+
const { dashboardResource , dashboardTitleComponent , onSave , onDiscard , initialVariableIsSticky , isReadonly } = props;
|
|
29
29
|
const { setEditMode } = (0, _context.useEditMode)();
|
|
30
30
|
const { dashboard , setDashboard } = (0, _context.useDashboard)();
|
|
31
31
|
const [originalDashboard, setOriginalDashboard] = (0, _react.useState)(undefined);
|
|
@@ -37,6 +37,9 @@ const DashboardApp = (props)=>{
|
|
|
37
37
|
}
|
|
38
38
|
setEditMode(false);
|
|
39
39
|
closeDiscardChangesConfirmationDialog();
|
|
40
|
+
if (onDiscard) {
|
|
41
|
+
onDiscard(dashboard);
|
|
42
|
+
}
|
|
40
43
|
};
|
|
41
44
|
const onEditButtonClick = ()=>{
|
|
42
45
|
setEditMode(true);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -25,7 +25,7 @@ const _pluginSystem = require("@perses-dev/plugin-system");
|
|
|
25
25
|
const _context = require("../../context");
|
|
26
26
|
const _dashboardApp = require("./DashboardApp");
|
|
27
27
|
function ViewDashboard(props) {
|
|
28
|
-
const { dashboardResource , datasourceApi , dashboardTitleComponent , onSave , initialVariableIsSticky , isReadonly , sx , ...others } = props;
|
|
28
|
+
const { dashboardResource , datasourceApi , dashboardTitleComponent , onSave , onDiscard , initialVariableIsSticky , isReadonly , isEditing , sx , ...others } = props;
|
|
29
29
|
const { spec } = dashboardResource;
|
|
30
30
|
var _duration;
|
|
31
31
|
const dashboardDuration = (_duration = spec.duration) !== null && _duration !== void 0 ? _duration : '1h';
|
|
@@ -35,7 +35,8 @@ function ViewDashboard(props) {
|
|
|
35
35
|
datasourceApi: datasourceApi,
|
|
36
36
|
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_context.DashboardProvider, {
|
|
37
37
|
initialState: {
|
|
38
|
-
dashboardResource
|
|
38
|
+
dashboardResource,
|
|
39
|
+
isEditMode: !!isEditing
|
|
39
40
|
},
|
|
40
41
|
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginSystem.TimeRangeProvider, {
|
|
41
42
|
initialTimeRange: initialTimeRange,
|
|
@@ -57,6 +58,7 @@ function ViewDashboard(props) {
|
|
|
57
58
|
dashboardResource: dashboardResource,
|
|
58
59
|
dashboardTitleComponent: dashboardTitleComponent,
|
|
59
60
|
onSave: onSave,
|
|
61
|
+
onDiscard: onDiscard,
|
|
60
62
|
initialVariableIsSticky: initialVariableIsSticky,
|
|
61
63
|
isReadonly: isReadonly
|
|
62
64
|
})
|
package/dist/cjs/views/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddGroupButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddGroupButton/AddGroupButton.tsx"],"names":[],"mappings":";AAmBA,eAAO,MAAM,cAAc,mBAU1B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Button } from '@mui/material';
|
|
15
|
+
import AddGroupIcon from 'mdi-material-ui/PlusBoxOutline';
|
|
16
|
+
import { InfoTooltip } from '@perses-dev/components';
|
|
17
|
+
import { TOOLTIP_TEXT } from '../../constants';
|
|
18
|
+
import { useDashboardActions } from '../../context';
|
|
19
|
+
export const AddGroupButton = ()=>{
|
|
20
|
+
const { openAddPanelGroup } = useDashboardActions();
|
|
21
|
+
return /*#__PURE__*/ _jsx(InfoTooltip, {
|
|
22
|
+
description: TOOLTIP_TEXT.addGroup,
|
|
23
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
24
|
+
startIcon: /*#__PURE__*/ _jsx(AddGroupIcon, {}),
|
|
25
|
+
onClick: openAddPanelGroup,
|
|
26
|
+
"aria-label": TOOLTIP_TEXT.addGroup,
|
|
27
|
+
children: "Panel Group"
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=AddGroupButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddGroupButton/AddGroupButton.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport AddGroupIcon from 'mdi-material-ui/PlusBoxOutline';\nimport { InfoTooltip } from '@perses-dev/components';\nimport { TOOLTIP_TEXT } from '../../constants';\nimport { useDashboardActions } from '../../context';\n\nexport const AddGroupButton = () => {\n const { openAddPanelGroup } = useDashboardActions();\n\n return (\n <InfoTooltip description={TOOLTIP_TEXT.addGroup}>\n <Button startIcon={<AddGroupIcon />} onClick={openAddPanelGroup} aria-label={TOOLTIP_TEXT.addGroup}>\n Panel Group\n </Button>\n </InfoTooltip>\n );\n};\n"],"names":["Button","AddGroupIcon","InfoTooltip","TOOLTIP_TEXT","useDashboardActions","AddGroupButton","openAddPanelGroup","description","addGroup","startIcon","onClick","aria-label"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,MAAM,QAAQ,eAAe,CAAC;AACvC,OAAOC,YAAY,MAAM,gCAAgC,CAAC;AAC1D,SAASC,WAAW,QAAQ,wBAAwB,CAAC;AACrD,SAASC,YAAY,QAAQ,iBAAiB,CAAC;AAC/C,SAASC,mBAAmB,QAAQ,eAAe,CAAC;AAEpD,OAAO,MAAMC,cAAc,GAAG,IAAM;IAClC,MAAM,EAAEC,iBAAiB,CAAA,EAAE,GAAGF,mBAAmB,EAAE,AAAC;IAEpD,qBACE,KAACF,WAAW;QAACK,WAAW,EAAEJ,YAAY,CAACK,QAAQ;kBAC7C,cAAA,KAACR,MAAM;YAACS,SAAS,gBAAE,KAACR,YAAY,KAAG;YAAES,OAAO,EAAEJ,iBAAiB;YAAEK,YAAU,EAAER,YAAY,CAACK,QAAQ;sBAAE,aAEpG;UAAS;MACG,CACd;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddGroupButton/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export
|
|
14
|
-
return str.replace(/\s+/g, '');
|
|
15
|
-
};
|
|
13
|
+
export * from './AddGroupButton';
|
|
16
14
|
|
|
17
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddGroupButton/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './AddGroupButton';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddPanelButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddPanelButton/AddPanelButton.tsx"],"names":[],"mappings":";AAmBA,eAAO,MAAM,cAAc,mBAU1B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Button } from '@mui/material';
|
|
15
|
+
import AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';
|
|
16
|
+
import { InfoTooltip } from '@perses-dev/components';
|
|
17
|
+
import { TOOLTIP_TEXT } from '../../constants';
|
|
18
|
+
import { useDashboardActions } from '../../context';
|
|
19
|
+
export const AddPanelButton = ()=>{
|
|
20
|
+
const { openAddPanel } = useDashboardActions();
|
|
21
|
+
return /*#__PURE__*/ _jsx(InfoTooltip, {
|
|
22
|
+
description: TOOLTIP_TEXT.addPanel,
|
|
23
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
24
|
+
startIcon: /*#__PURE__*/ _jsx(AddPanelIcon, {}),
|
|
25
|
+
onClick: openAddPanel,
|
|
26
|
+
"aria-label": TOOLTIP_TEXT.addPanel,
|
|
27
|
+
children: "Panel"
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=AddPanelButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddPanelButton/AddPanelButton.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';\nimport { InfoTooltip } from '@perses-dev/components';\nimport { TOOLTIP_TEXT } from '../../constants';\nimport { useDashboardActions } from '../../context';\n\nexport const AddPanelButton = () => {\n const { openAddPanel } = useDashboardActions();\n\n return (\n <InfoTooltip description={TOOLTIP_TEXT.addPanel}>\n <Button startIcon={<AddPanelIcon />} onClick={openAddPanel} aria-label={TOOLTIP_TEXT.addPanel}>\n Panel\n </Button>\n </InfoTooltip>\n );\n};\n"],"names":["Button","AddPanelIcon","InfoTooltip","TOOLTIP_TEXT","useDashboardActions","AddPanelButton","openAddPanel","description","addPanel","startIcon","onClick","aria-label"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,MAAM,QAAQ,eAAe,CAAC;AACvC,OAAOC,YAAY,MAAM,qCAAqC,CAAC;AAC/D,SAASC,WAAW,QAAQ,wBAAwB,CAAC;AACrD,SAASC,YAAY,QAAQ,iBAAiB,CAAC;AAC/C,SAASC,mBAAmB,QAAQ,eAAe,CAAC;AAEpD,OAAO,MAAMC,cAAc,GAAG,IAAM;IAClC,MAAM,EAAEC,YAAY,CAAA,EAAE,GAAGF,mBAAmB,EAAE,AAAC;IAE/C,qBACE,KAACF,WAAW;QAACK,WAAW,EAAEJ,YAAY,CAACK,QAAQ;kBAC7C,cAAA,KAACR,MAAM;YAACS,SAAS,gBAAE,KAACR,YAAY,KAAG;YAAES,OAAO,EAAEJ,YAAY;YAAEK,YAAU,EAAER,YAAY,CAACK,QAAQ;sBAAE,OAE/F;UAAS;MACG,CACd;AACJ,CAAC,CAAC"}
|