@perses-dev/dashboards 0.0.0-snapshot-panel-extra-content-3-17f9c42 → 0.0.0-snapshot-scatterplot-fix-imports-95e1b59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AddGroupButton/AddGroupButton.js +11 -8
- package/dist/cjs/components/AddGroupButton/index.js +10 -8
- package/dist/cjs/components/AddPanelButton/AddPanelButton.js +12 -13
- package/dist/cjs/components/AddPanelButton/index.js +10 -8
- package/dist/cjs/components/Dashboard/Dashboard.js +12 -10
- 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 +82 -103
- package/dist/cjs/components/DashboardToolbar/index.js +10 -8
- package/dist/cjs/components/Datasources/DatasourceEditor.js +236 -0
- package/dist/cjs/components/Datasources/EditDatasourcesButton.js +112 -0
- package/dist/cjs/components/{ToolbarIconButton → Datasources}/index.js +11 -8
- package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +16 -14
- package/dist/cjs/components/DeletePanelDialog/index.js +10 -8
- package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +18 -16
- package/dist/cjs/components/DeletePanelGroupDialog/index.js +10 -8
- package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +6 -4
- package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +10 -8
- package/dist/cjs/components/DownloadButton/DownloadButton.js +13 -12
- package/dist/cjs/components/DownloadButton/index.js +10 -8
- package/dist/cjs/components/EditButton/EditButton.js +9 -7
- package/dist/cjs/components/EditButton/index.js +10 -8
- package/dist/cjs/components/EditJsonButton/EditJsonButton.js +15 -12
- package/dist/cjs/components/EditJsonButton/index.js +10 -8
- package/dist/cjs/components/EditJsonDialog/EditJsonDialog.js +54 -25
- package/dist/cjs/components/EditJsonDialog/index.js +10 -8
- package/dist/cjs/components/EmptyDashboard/EmptyDashboard.js +21 -19
- package/dist/cjs/components/EmptyDashboard/index.js +10 -8
- package/dist/cjs/components/GridLayout/GridContainer.js +6 -4
- package/dist/cjs/components/GridLayout/GridItemContent.js +37 -19
- package/dist/cjs/components/GridLayout/GridLayout.js +21 -19
- package/dist/cjs/components/GridLayout/GridTitle.js +40 -39
- package/dist/cjs/components/GridLayout/index.js +13 -11
- package/dist/cjs/components/Panel/Panel.js +19 -23
- package/dist/cjs/components/Panel/PanelContent.js +11 -8
- package/dist/cjs/components/Panel/PanelHeader.js +35 -33
- 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 +237 -144
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +13 -12
- package/dist/cjs/components/PanelDrawer/index.js +11 -8
- package/dist/cjs/components/PanelDrawer/usePanelEditor.js +5 -3
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +18 -16
- package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +16 -12
- package/dist/cjs/components/PanelGroupDialog/index.js +10 -8
- package/dist/cjs/components/QuerySummaryTable/QuerySummaryTable.js +48 -46
- package/dist/cjs/components/QuerySummaryTable/index.js +10 -8
- package/dist/cjs/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +26 -24
- package/dist/cjs/components/SaveChangesConfirmationDialog/index.js +10 -8
- package/dist/cjs/components/SaveDashboardButton/SaveDashboardButton.js +14 -14
- package/dist/cjs/components/SaveDashboardButton/index.js +10 -8
- package/dist/cjs/components/Variables/BuiltinVariableAccordions.js +141 -0
- package/dist/cjs/components/Variables/EditVariablesButton.js +19 -17
- package/dist/cjs/components/Variables/TemplateVariable.js +261 -107
- package/dist/cjs/components/Variables/VariableEditor.js +282 -207
- package/dist/cjs/components/Variables/VariableList.js +24 -22
- package/dist/cjs/components/Variables/index.js +14 -11
- package/dist/cjs/components/index.js +30 -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 +8 -3
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +48 -35
- package/dist/cjs/context/DashboardProvider/common.js +6 -2
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +81 -49
- package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +4 -2
- package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +8 -6
- package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/duplicate-panel-slice.js +4 -2
- 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 +17 -17
- package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +8 -6
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +16 -8
- 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 +177 -50
- package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +150 -39
- package/dist/cjs/context/TemplateVariableProvider/hydrationUtils.js +12 -10
- 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 +15 -7
- package/dist/cjs/context/index.js +13 -11
- package/dist/cjs/context/useDashboard.js +30 -11
- 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 +28 -21
- package/dist/cjs/test/setup-tests.js +2 -2
- package/dist/cjs/test/testDashboard.js +13 -11
- package/dist/cjs/utils/index.js +10 -9
- package/dist/cjs/utils/panelUtils.js +11 -5
- package/dist/cjs/{components/TimeRangeControls → validation}/index.js +10 -8
- package/dist/cjs/{utils/time.js → validation/panel.js} +11 -9
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +32 -18
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +64 -21
- package/dist/cjs/views/ViewDashboard/index.js +10 -8
- package/dist/cjs/views/index.js +10 -8
- package/dist/components/AddGroupButton/AddGroupButton.d.ts +1 -2
- package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -1
- package/dist/components/AddGroupButton/AddGroupButton.js +3 -2
- package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -1
- package/dist/components/AddGroupButton/index.js.map +1 -1
- package/dist/components/AddPanelButton/AddPanelButton.d.ts +1 -2
- package/dist/components/AddPanelButton/AddPanelButton.d.ts.map +1 -1
- package/dist/components/AddPanelButton/AddPanelButton.js +4 -7
- package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -1
- package/dist/components/AddPanelButton/index.js.map +1 -1
- package/dist/components/Dashboard/Dashboard.d.ts +2 -3
- package/dist/components/Dashboard/Dashboard.d.ts.map +1 -1
- package/dist/components/Dashboard/Dashboard.js +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 +1 -2
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.d.ts.map +1 -1
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js +38 -9
- 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 +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +63 -86
- 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 +7 -0
- package/dist/components/Datasources/DatasourceEditor.d.ts.map +1 -0
- package/dist/components/Datasources/DatasourceEditor.js +223 -0
- package/dist/components/Datasources/DatasourceEditor.js.map +1 -0
- package/dist/components/Datasources/EditDatasourcesButton.d.ts +2 -0
- package/dist/components/Datasources/EditDatasourcesButton.d.ts.map +1 -0
- package/dist/components/Datasources/EditDatasourcesButton.js +99 -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/{TimeRangeControls → Datasources}/index.js +2 -1
- package/dist/components/Datasources/index.js.map +1 -0
- package/dist/components/DeletePanelDialog/DeletePanelDialog.d.ts +1 -2
- package/dist/components/DeletePanelDialog/DeletePanelDialog.d.ts.map +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js +4 -4
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
- package/dist/components/DeletePanelDialog/index.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.d.ts +1 -2
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.d.ts.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +3 -3
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.d.ts +1 -2
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +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.d.ts +1 -2
- package/dist/components/DownloadButton/DownloadButton.d.ts.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.js +3 -4
- package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
- package/dist/components/DownloadButton/index.js.map +1 -1
- package/dist/components/EditButton/EditButton.d.ts +1 -2
- package/dist/components/EditButton/EditButton.d.ts.map +1 -1
- package/dist/components/EditButton/EditButton.js +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 -2
- package/dist/components/EditJsonButton/EditJsonButton.d.ts.map +1 -1
- package/dist/components/EditJsonButton/EditJsonButton.js +7 -6
- 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 -2
- package/dist/components/EditJsonDialog/EditJsonDialog.d.ts.map +1 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.js +43 -16
- package/dist/components/EditJsonDialog/EditJsonDialog.js.map +1 -1
- package/dist/components/EditJsonDialog/index.js.map +1 -1
- package/dist/components/EmptyDashboard/EmptyDashboard.d.ts +1 -1
- package/dist/components/EmptyDashboard/EmptyDashboard.d.ts.map +1 -1
- package/dist/components/EmptyDashboard/EmptyDashboard.js +3 -3
- package/dist/components/EmptyDashboard/EmptyDashboard.js.map +1 -1
- package/dist/components/EmptyDashboard/index.js.map +1 -1
- package/dist/components/GridLayout/GridContainer.d.ts +1 -1
- package/dist/components/GridLayout/GridContainer.d.ts.map +1 -1
- package/dist/components/GridLayout/GridContainer.js +1 -1
- package/dist/components/GridLayout/GridContainer.js.map +1 -1
- package/dist/components/GridLayout/GridItemContent.d.ts +1 -2
- package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
- package/dist/components/GridLayout/GridItemContent.js +31 -15
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.d.ts +1 -2
- package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +6 -6
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.d.ts +1 -2
- package/dist/components/GridLayout/GridTitle.d.ts.map +1 -1
- package/dist/components/GridLayout/GridTitle.js +5 -6
- 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 +2 -2
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +7 -13
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/Panel/PanelContent.d.ts +3 -3
- package/dist/components/Panel/PanelContent.d.ts.map +1 -1
- package/dist/components/Panel/PanelContent.js +4 -3
- package/dist/components/Panel/PanelContent.js.map +1 -1
- package/dist/components/Panel/PanelHeader.d.ts +2 -2
- package/dist/components/Panel/PanelHeader.d.ts.map +1 -1
- package/dist/components/Panel/PanelHeader.js +2 -2
- 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 +1 -2
- 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 +5 -3
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js +231 -142
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.d.ts +1 -2
- package/dist/components/PanelDrawer/PanelPreview.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js +4 -5
- 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 +2 -2
- package/dist/components/PanelDrawer/usePanelEditor.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts +1 -2
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.d.ts +1 -2
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.d.ts.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.map +1 -1
- package/dist/components/QuerySummaryTable/QuerySummaryTable.d.ts +1 -2
- package/dist/components/QuerySummaryTable/QuerySummaryTable.d.ts.map +1 -1
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js +8 -8
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js.map +1 -1
- package/dist/components/QuerySummaryTable/index.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.d.ts +1 -2
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.d.ts.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +8 -8
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/SaveDashboardButton/SaveDashboardButton.d.ts +1 -2
- package/dist/components/SaveDashboardButton/SaveDashboardButton.d.ts.map +1 -1
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js +8 -10
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
- package/dist/components/SaveDashboardButton/index.js.map +1 -1
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts +7 -0
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts.map +1 -0
- package/dist/components/Variables/BuiltinVariableAccordions.js +128 -0
- package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -0
- package/dist/components/Variables/EditVariablesButton.d.ts +1 -2
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -1
- package/dist/components/Variables/EditVariablesButton.js +7 -7
- package/dist/components/Variables/EditVariablesButton.js.map +1 -1
- package/dist/components/Variables/TemplateVariable.d.ts +12 -4
- package/dist/components/Variables/TemplateVariable.d.ts.map +1 -1
- package/dist/components/Variables/TemplateVariable.js +244 -100
- package/dist/components/Variables/TemplateVariable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts +4 -4
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js +232 -161
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts +2 -3
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +11 -13
- 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 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -2
- 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/{utils/time.js → constants/styles.js} +10 -10
- package/dist/constants/styles.js.map +1 -0
- package/dist/constants/user-interface-text.d.ts +2 -1
- package/dist/constants/user-interface-text.d.ts.map +1 -1
- package/dist/constants/user-interface-text.js +2 -1
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +7 -4
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js +16 -9
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.d.ts +3 -3
- package/dist/context/DashboardProvider/common.d.ts.map +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +17 -17
- 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 +5 -5
- 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 +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 +11 -13
- 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.d.ts +2 -2
- package/dist/context/DashboardProvider/panel-group-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +4 -4
- 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 +17 -12
- package/dist/context/DatasourceStoreProvider.d.ts.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +172 -47
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts +15 -8
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +115 -23
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/hydrationUtils.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/hydrationUtils.js +7 -7
- 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.js +3 -3
- package/dist/context/TemplateVariableProvider/utils.js.map +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/useDashboard.d.ts +3 -3
- package/dist/context/useDashboard.d.ts.map +1 -1
- package/dist/context/useDashboard.js +24 -7
- 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 +9 -4
- 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.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/panelUtils.d.ts +1 -1
- package/dist/utils/panelUtils.d.ts.map +1 -1
- package/dist/utils/panelUtils.js +2 -2
- package/dist/utils/panelUtils.js.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/{components/ToolbarIconButton → validation}/index.js +1 -1
- 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 +4 -3
- package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
- package/dist/views/ViewDashboard/DashboardApp.js +19 -7
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts +2 -2
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +53 -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
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +0 -183
- package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +0 -38
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +0 -14
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +0 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +0 -165
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +0 -1
- package/dist/components/TimeRangeControls/index.d.ts +0 -2
- package/dist/components/TimeRangeControls/index.d.ts.map +0 -1
- package/dist/components/TimeRangeControls/index.js.map +0 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.d.ts +0 -6
- package/dist/components/ToolbarIconButton/ToolbarIconButton.d.ts.map +0 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js +0 -32
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +0 -1
- package/dist/components/ToolbarIconButton/index.d.ts +0 -2
- package/dist/components/ToolbarIconButton/index.d.ts.map +0 -1
- package/dist/components/ToolbarIconButton/index.js.map +0 -1
- package/dist/utils/time.d.ts +0 -5
- package/dist/utils/time.d.ts.map +0 -1
- package/dist/utils/time.js.map +0 -1
|
@@ -16,27 +16,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "AddGroupButton", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return AddGroupButton;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
|
-
const
|
|
25
|
+
const _PlusBoxOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PlusBoxOutline"));
|
|
24
26
|
const _components = require("@perses-dev/components");
|
|
25
27
|
const _constants = require("../../constants");
|
|
26
28
|
const _context = require("../../context");
|
|
27
|
-
function
|
|
29
|
+
function _interop_require_default(obj) {
|
|
28
30
|
return obj && obj.__esModule ? obj : {
|
|
29
31
|
default: obj
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
const AddGroupButton = ()=>{
|
|
33
|
-
const { openAddPanelGroup
|
|
34
|
-
return /*#__PURE__*/ (0,
|
|
35
|
+
const { openAddPanelGroup } = (0, _context.useDashboardActions)();
|
|
36
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
|
|
35
37
|
description: _constants.TOOLTIP_TEXT.addGroup,
|
|
36
|
-
children: /*#__PURE__*/ (0,
|
|
37
|
-
startIcon: /*#__PURE__*/ (0,
|
|
38
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
39
|
+
startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_PlusBoxOutline.default, {}),
|
|
38
40
|
onClick: openAddPanelGroup,
|
|
39
41
|
"aria-label": _constants.TOOLTIP_TEXT.addGroup,
|
|
42
|
+
sx: _constants.editButtonStyle,
|
|
40
43
|
children: "Panel Group"
|
|
41
44
|
})
|
|
42
45
|
});
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./AddGroupButton"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,34 +16,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "AddPanelButton", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return AddPanelButton;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
|
-
const
|
|
25
|
+
const _ChartBoxPlusOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChartBoxPlusOutline"));
|
|
24
26
|
const _components = require("@perses-dev/components");
|
|
25
27
|
const _constants = require("../../constants");
|
|
26
28
|
const _context = require("../../context");
|
|
27
|
-
function
|
|
29
|
+
function _interop_require_default(obj) {
|
|
28
30
|
return obj && obj.__esModule ? obj : {
|
|
29
31
|
default: obj
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
|
-
const AddPanelButton = ({ variant ='text'
|
|
33
|
-
const { openAddPanel
|
|
34
|
-
return /*#__PURE__*/ (0,
|
|
34
|
+
const AddPanelButton = ({ variant = 'text', color = 'primary', label = 'Panel', fullWidth })=>{
|
|
35
|
+
const { openAddPanel } = (0, _context.useDashboardActions)();
|
|
36
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
|
|
35
37
|
description: _constants.TOOLTIP_TEXT.addPanel,
|
|
36
|
-
children: /*#__PURE__*/ (0,
|
|
37
|
-
startIcon: /*#__PURE__*/ (0,
|
|
38
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
39
|
+
startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChartBoxPlusOutline.default, {}),
|
|
38
40
|
onClick: openAddPanel,
|
|
39
41
|
"aria-label": _constants.TOOLTIP_TEXT.addPanel,
|
|
40
42
|
variant: variant,
|
|
41
43
|
color: color,
|
|
42
44
|
fullWidth: fullWidth,
|
|
43
|
-
sx:
|
|
44
|
-
whiteSpace: 'nowrap',
|
|
45
|
-
minWidth: 'auto'
|
|
46
|
-
},
|
|
45
|
+
sx: _constants.editButtonStyle,
|
|
47
46
|
children: label
|
|
48
47
|
})
|
|
49
48
|
});
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./AddPanelButton"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,36 +16,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "Dashboard", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return Dashboard;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
const _components = require("@perses-dev/components");
|
|
24
26
|
const _context = require("../../context");
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
function Dashboard({ emptyDashboardProps
|
|
27
|
+
const _GridLayout = require("../GridLayout");
|
|
28
|
+
const _EmptyDashboard = require("../EmptyDashboard");
|
|
29
|
+
function Dashboard({ emptyDashboardProps, panelOptions, ...boxProps }) {
|
|
28
30
|
const panelGroupIds = (0, _context.usePanelGroupIds)();
|
|
29
31
|
const isEmpty = !panelGroupIds.length;
|
|
30
|
-
return /*#__PURE__*/ (0,
|
|
32
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
31
33
|
...boxProps,
|
|
32
34
|
sx: {
|
|
33
35
|
height: '100%'
|
|
34
36
|
},
|
|
35
|
-
children: /*#__PURE__*/ (0,
|
|
37
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.ErrorBoundary, {
|
|
36
38
|
FallbackComponent: _components.ErrorAlert,
|
|
37
39
|
children: [
|
|
38
|
-
isEmpty && /*#__PURE__*/ (0,
|
|
40
|
+
isEmpty && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
39
41
|
sx: {
|
|
40
42
|
height: '100%',
|
|
41
43
|
display: 'flex',
|
|
42
44
|
alignItems: 'center'
|
|
43
45
|
},
|
|
44
|
-
children: /*#__PURE__*/ (0,
|
|
46
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_EmptyDashboard.EmptyDashboard, {
|
|
45
47
|
...emptyDashboardProps
|
|
46
48
|
})
|
|
47
49
|
}),
|
|
48
|
-
!isEmpty && panelGroupIds.map((panelGroupId)=>/*#__PURE__*/ (0,
|
|
50
|
+
!isEmpty && panelGroupIds.map((panelGroupId)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_GridLayout.GridLayout, {
|
|
49
51
|
panelGroupId: panelGroupId,
|
|
50
52
|
panelOptions: panelOptions
|
|
51
53
|
}, panelGroupId))
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./Dashboard"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,16 +16,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DashboardStickyToolbar", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return DashboardStickyToolbar;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _react = require("react");
|
|
23
25
|
const _material = require("@mui/material");
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
function
|
|
26
|
+
const _PinOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PinOutline"));
|
|
27
|
+
const _PinOffOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PinOffOutline"));
|
|
28
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
29
|
+
const _Variables = require("../Variables");
|
|
30
|
+
function _interop_require_default(obj) {
|
|
29
31
|
return obj && obj.__esModule ? obj : {
|
|
30
32
|
default: obj
|
|
31
33
|
};
|
|
@@ -36,12 +38,13 @@ function DashboardStickyToolbar(props) {
|
|
|
36
38
|
disableHysteresis: true
|
|
37
39
|
});
|
|
38
40
|
const isSticky = scrollTrigger && props.initialVariableIsSticky && isPin;
|
|
41
|
+
const isBiggerThanMd = (0, _material.useMediaQuery)((0, _material.useTheme)().breakpoints.up('md'));
|
|
39
42
|
return(// marginBottom={-1} counteracts the marginBottom={1} on every variable input.
|
|
40
43
|
// The margin on the inputs is for spacing between inputs, but is not meant to add space to bottom of the container.
|
|
41
|
-
/*#__PURE__*/ (0,
|
|
44
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
42
45
|
marginBottom: -1,
|
|
43
46
|
"data-testid": "variable-list",
|
|
44
|
-
children: /*#__PURE__*/ (0,
|
|
47
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.AppBar, {
|
|
45
48
|
color: "inherit",
|
|
46
49
|
position: isSticky ? 'fixed' : 'static',
|
|
47
50
|
elevation: isSticky ? 4 : 0,
|
|
@@ -49,28 +52,56 @@ function DashboardStickyToolbar(props) {
|
|
|
49
52
|
backgroundColor: 'inherit',
|
|
50
53
|
...props.sx
|
|
51
54
|
},
|
|
52
|
-
children: /*#__PURE__*/ (0,
|
|
55
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
53
56
|
display: "flex",
|
|
54
57
|
justifyContent: "space-between",
|
|
58
|
+
sx: {
|
|
59
|
+
flexDirection: isBiggerThanMd ? 'row' : 'column'
|
|
60
|
+
},
|
|
55
61
|
children: [
|
|
56
|
-
/*#__PURE__*/ (0,
|
|
62
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
57
63
|
display: "flex",
|
|
58
|
-
flexWrap:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
flexWrap: !isSticky && isBiggerThanMd ? 'wrap' : 'nowrap',
|
|
65
|
+
maxWidth: isSticky || !isBiggerThanMd ? '100vw' : '100%',
|
|
66
|
+
maxHeight: "150px" // Limit the vertical space used to ~3 rows of variables
|
|
67
|
+
,
|
|
68
|
+
pt: 1,
|
|
69
|
+
pl: isSticky ? 1 : 0,
|
|
70
|
+
mt: isSticky && isBiggerThanMd ? 0.5 : 0,
|
|
71
|
+
ml: isSticky && isBiggerThanMd ? 0.5 : 0,
|
|
72
|
+
sx: {
|
|
73
|
+
overflowX: !isSticky && isBiggerThanMd ? 'hidden' : 'auto',
|
|
74
|
+
// Firefox:
|
|
75
|
+
scrollbarWidth: 'thin',
|
|
76
|
+
// Safari and Chrome:
|
|
77
|
+
'&::-webkit-scrollbar': {
|
|
78
|
+
height: '8px',
|
|
79
|
+
backgroundColor: (theme)=>theme.palette.grey['300']
|
|
80
|
+
},
|
|
81
|
+
'&::-webkit-scrollbar-thumb': {
|
|
82
|
+
background: (theme)=>theme.palette.grey['600']
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
gap: 1,
|
|
62
86
|
children: [
|
|
63
|
-
/*#__PURE__*/ (0,
|
|
64
|
-
props.initialVariableIsSticky && /*#__PURE__*/ (0,
|
|
87
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Variables.TemplateVariableList, {}),
|
|
88
|
+
props.initialVariableIsSticky && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
89
|
+
style: {
|
|
90
|
+
width: 'fit-content',
|
|
91
|
+
height: 'fit-content'
|
|
92
|
+
},
|
|
65
93
|
onClick: ()=>setIsPin(!isPin),
|
|
66
|
-
children: isPin ? /*#__PURE__*/ (0,
|
|
94
|
+
children: isPin ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_PinOutline.default, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_PinOffOutline.default, {})
|
|
67
95
|
})
|
|
68
96
|
]
|
|
69
97
|
}),
|
|
70
|
-
isSticky && /*#__PURE__*/ (0,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
isSticky && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
99
|
+
m: isBiggerThanMd ? 1.5 : 1,
|
|
100
|
+
mt: isBiggerThanMd ? 1.5 : 0,
|
|
101
|
+
ml: isBiggerThanMd ? 1.5 : 'auto',
|
|
102
|
+
direction: "row",
|
|
103
|
+
justifyContent: "end",
|
|
104
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.TimeRangeControls, {})
|
|
74
105
|
})
|
|
75
106
|
]
|
|
76
107
|
})
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./DashboardStickyToolbar"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|
|
@@ -16,50 +16,53 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DashboardToolbar", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return DashboardToolbar;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
const _components = require("@perses-dev/components");
|
|
26
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
24
27
|
const _context = require("../../context");
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
28
|
+
const _AddPanelButton = require("../AddPanelButton");
|
|
29
|
+
const _AddGroupButton = require("../AddGroupButton");
|
|
30
|
+
const _DownloadButton = require("../DownloadButton");
|
|
31
|
+
const _Variables = require("../Variables");
|
|
32
|
+
const _Datasources = require("../Datasources");
|
|
33
|
+
const _EditButton = require("../EditButton");
|
|
34
|
+
const _EditJsonButton = require("../EditJsonButton");
|
|
35
|
+
const _SaveDashboardButton = require("../SaveDashboardButton");
|
|
36
|
+
const _DashboardStickyToolbar = require("../DashboardStickyToolbar");
|
|
34
37
|
const DashboardToolbar = (props)=>{
|
|
35
|
-
const { dashboardName
|
|
36
|
-
const { isEditMode
|
|
38
|
+
const { dashboardName, dashboardTitleComponent, initialVariableIsSticky, isReadonly, onEditButtonClick, onCancelButtonClick, onSave } = props;
|
|
39
|
+
const { isEditMode } = (0, _context.useEditMode)();
|
|
37
40
|
const isBiggerThanSm = (0, _material.useMediaQuery)((0, _material.useTheme)().breakpoints.up('sm'));
|
|
38
|
-
const
|
|
39
|
-
const dashboardTitle = dashboardTitleComponent ? dashboardTitleComponent : /*#__PURE__*/ (0,
|
|
41
|
+
const isBiggerThanMd = (0, _material.useMediaQuery)((0, _material.useTheme)().breakpoints.up('md'));
|
|
42
|
+
const dashboardTitle = dashboardTitleComponent ? dashboardTitleComponent : /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
40
43
|
variant: "h2",
|
|
41
44
|
children: dashboardName
|
|
42
45
|
});
|
|
43
46
|
const testId = 'dashboard-toolbar';
|
|
44
|
-
return /*#__PURE__*/ (0,
|
|
45
|
-
children:
|
|
46
|
-
spacing: 1,
|
|
47
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
48
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
47
49
|
"data-testid": testId,
|
|
48
50
|
children: [
|
|
49
|
-
/*#__PURE__*/ (0,
|
|
50
|
-
|
|
51
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
52
|
+
px: 2,
|
|
53
|
+
py: 1.5,
|
|
51
54
|
display: "flex",
|
|
52
55
|
sx: {
|
|
53
|
-
backgroundColor: (theme)=>theme.palette.primary.main + '30'
|
|
56
|
+
backgroundColor: (theme)=>theme.palette.primary.main + (isEditMode ? '30' : '0')
|
|
54
57
|
},
|
|
55
58
|
children: [
|
|
56
59
|
dashboardTitle,
|
|
57
|
-
/*#__PURE__*/ (0,
|
|
60
|
+
isEditMode ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
58
61
|
direction: "row",
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
gap: 1,
|
|
63
|
+
ml: "auto",
|
|
61
64
|
children: [
|
|
62
|
-
isReadonly && /*#__PURE__*/ (0,
|
|
65
|
+
isReadonly && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Alert, {
|
|
63
66
|
severity: 'warning',
|
|
64
67
|
sx: {
|
|
65
68
|
backgroundColor: 'transparent',
|
|
@@ -67,107 +70,83 @@ const DashboardToolbar = (props)=>{
|
|
|
67
70
|
},
|
|
68
71
|
children: "Dashboard managed via code only. Download JSON and commit changes to save."
|
|
69
72
|
}),
|
|
70
|
-
/*#__PURE__*/ (0,
|
|
73
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
74
|
+
direction: "row",
|
|
75
|
+
spacing: 0.5,
|
|
76
|
+
ml: 1,
|
|
77
|
+
whiteSpace: "nowrap",
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Variables.EditVariablesButton, {}),
|
|
80
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Datasources.EditDatasourcesButton, {}),
|
|
81
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_AddPanelButton.AddPanelButton, {}),
|
|
82
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_AddGroupButton.AddGroupButton, {})
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_SaveDashboardButton.SaveDashboardButton, {
|
|
71
86
|
onSave: onSave,
|
|
72
87
|
isDisabled: isReadonly
|
|
73
88
|
}),
|
|
74
|
-
/*#__PURE__*/ (0,
|
|
89
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
75
90
|
variant: "outlined",
|
|
76
91
|
onClick: onCancelButtonClick,
|
|
77
92
|
children: "Cancel"
|
|
78
93
|
})
|
|
79
94
|
]
|
|
95
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
96
|
+
children: isBiggerThanSm && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
97
|
+
direction: "row",
|
|
98
|
+
gap: 1,
|
|
99
|
+
ml: "auto",
|
|
100
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_EditButton.EditButton, {
|
|
101
|
+
onClick: onEditButtonClick
|
|
102
|
+
})
|
|
103
|
+
})
|
|
80
104
|
})
|
|
81
105
|
]
|
|
82
106
|
}),
|
|
83
|
-
/*#__PURE__*/ (0,
|
|
107
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
84
108
|
sx: {
|
|
85
109
|
display: 'flex',
|
|
86
110
|
width: '100%',
|
|
87
111
|
alignItems: 'start',
|
|
88
|
-
padding: (theme)=>theme.spacing(1, 2)
|
|
112
|
+
padding: (theme)=>theme.spacing(1, 2, 0, 2),
|
|
113
|
+
flexDirection: isBiggerThanMd ? 'row' : 'column',
|
|
114
|
+
flexWrap: 'nowrap',
|
|
115
|
+
gap: 1
|
|
89
116
|
},
|
|
90
117
|
children: [
|
|
91
|
-
/*#__PURE__*/ (0,
|
|
92
|
-
|
|
93
|
-
children: /*#__PURE__*/ (0,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
118
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
119
|
+
width: "100%",
|
|
120
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorBoundary, {
|
|
121
|
+
FallbackComponent: _components.ErrorAlert,
|
|
122
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DashboardStickyToolbar.DashboardStickyToolbar, {
|
|
123
|
+
initialVariableIsSticky: initialVariableIsSticky,
|
|
124
|
+
sx: {
|
|
125
|
+
backgroundColor: ({ palette })=>palette.background.default
|
|
126
|
+
}
|
|
127
|
+
})
|
|
98
128
|
})
|
|
99
129
|
}),
|
|
100
|
-
/*#__PURE__*/ (0,
|
|
101
|
-
ml: "auto",
|
|
130
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
102
131
|
direction: "row",
|
|
103
|
-
|
|
132
|
+
ml: "auto",
|
|
133
|
+
flexWrap: "wrap",
|
|
104
134
|
justifyContent: "end",
|
|
105
|
-
children:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
119
|
-
direction: "row",
|
|
120
|
-
spacing: 1,
|
|
121
|
-
ml: 1,
|
|
122
|
-
mb: 1,
|
|
123
|
-
children: [
|
|
124
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_timeRangeControls.TimeRangeControls, {}),
|
|
125
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_downloadButton.DownloadButton, {}),
|
|
126
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_editJsonButton.EditJsonButton, {})
|
|
127
|
-
]
|
|
128
|
-
})
|
|
129
|
-
]
|
|
130
|
-
})
|
|
131
|
-
]
|
|
132
|
-
})
|
|
133
|
-
]
|
|
134
|
-
}) : /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
135
|
-
spacing: 1,
|
|
136
|
-
padding: 2,
|
|
137
|
-
"data-testid": testId,
|
|
138
|
-
children: [
|
|
139
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
140
|
-
sx: {
|
|
141
|
-
display: 'flex',
|
|
142
|
-
width: '100%'
|
|
143
|
-
},
|
|
144
|
-
children: [
|
|
145
|
-
dashboardTitle,
|
|
146
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
147
|
-
direction: "row",
|
|
148
|
-
spacing: 1,
|
|
149
|
-
marginLeft: "auto",
|
|
150
|
-
children: [
|
|
151
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_timeRangeControls.TimeRangeControls, {}),
|
|
152
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_downloadButton.DownloadButton, {}),
|
|
153
|
-
isBiggerThanSm && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_editButton.EditButton, {
|
|
154
|
-
onClick: onEditButtonClick
|
|
155
|
-
})
|
|
156
|
-
]
|
|
135
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
136
|
+
direction: "row",
|
|
137
|
+
spacing: 1,
|
|
138
|
+
mt: 1,
|
|
139
|
+
ml: 1,
|
|
140
|
+
children: [
|
|
141
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.TimeRangeControls, {}),
|
|
142
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_DownloadButton.DownloadButton, {}),
|
|
143
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_EditJsonButton.EditJsonButton, {
|
|
144
|
+
isReadonly: !isEditMode
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
})
|
|
157
148
|
})
|
|
158
149
|
]
|
|
159
|
-
}),
|
|
160
|
-
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
161
|
-
paddingY: 2,
|
|
162
|
-
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorBoundary, {
|
|
163
|
-
FallbackComponent: _components.ErrorAlert,
|
|
164
|
-
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_dashboardStickyToolbar.DashboardStickyToolbar, {
|
|
165
|
-
initialVariableIsSticky: initialVariableIsSticky,
|
|
166
|
-
sx: {
|
|
167
|
-
backgroundColor: ({ palette })=>palette.background.default
|
|
168
|
-
}
|
|
169
|
-
})
|
|
170
|
-
})
|
|
171
150
|
})
|
|
172
151
|
]
|
|
173
152
|
})
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./DashboardToolbar"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
19
|
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return from;
|
|
28
30
|
}
|