@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,15 +16,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "default", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return _default;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const testDashboard = {
|
|
22
24
|
kind: 'Dashboard',
|
|
23
25
|
metadata: {
|
|
24
26
|
name: 'Node Stats',
|
|
25
27
|
project: 'perses',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
createdAt: '2021-11-09',
|
|
29
|
+
updatedAt: '2021-11-09',
|
|
28
30
|
version: 0
|
|
29
31
|
},
|
|
30
32
|
spec: {
|
|
@@ -63,8 +65,8 @@ const testDashboard = {
|
|
|
63
65
|
plugin: {
|
|
64
66
|
kind: 'TimeSeriesChart',
|
|
65
67
|
spec: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
format: {
|
|
69
|
+
unit: '%'
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
},
|
|
@@ -92,8 +94,8 @@ const testDashboard = {
|
|
|
92
94
|
plugin: {
|
|
93
95
|
kind: 'TimeSeriesChart',
|
|
94
96
|
spec: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
format: {
|
|
98
|
+
unit: 'bytes'
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
},
|
|
@@ -155,8 +157,8 @@ const testDashboard = {
|
|
|
155
157
|
plugin: {
|
|
156
158
|
kind: 'TimeSeriesChart',
|
|
157
159
|
spec: {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
format: {
|
|
161
|
+
unit: 'percent'
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
},
|
|
@@ -184,8 +186,8 @@ const testDashboard = {
|
|
|
184
186
|
plugin: {
|
|
185
187
|
kind: 'TimeSeriesChart',
|
|
186
188
|
spec: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
format: {
|
|
190
|
+
unit: 'percent'
|
|
189
191
|
}
|
|
190
192
|
}
|
|
191
193
|
},
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -14,16 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _exportStar(from, to) {
|
|
17
|
+
_export_star(require("./panelUtils"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
20
19
|
Object.keys(from).forEach(function(k) {
|
|
21
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+
}
|
|
27
28
|
});
|
|
28
29
|
return from;
|
|
29
30
|
}
|
|
@@ -21,9 +21,15 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
getValidPanelKey: function() {
|
|
25
|
+
return getValidPanelKey;
|
|
26
|
+
},
|
|
27
|
+
getYForNewRow: function() {
|
|
28
|
+
return getYForNewRow;
|
|
29
|
+
},
|
|
30
|
+
insertPanelInLayout: function() {
|
|
31
|
+
return insertPanelInLayout;
|
|
32
|
+
}
|
|
27
33
|
});
|
|
28
34
|
const _constants = require("../constants");
|
|
29
35
|
function getYForNewRow(group) {
|
|
@@ -36,7 +42,7 @@ function getYForNewRow(group) {
|
|
|
36
42
|
}
|
|
37
43
|
return newRowY;
|
|
38
44
|
}
|
|
39
|
-
function getPanelBounds({ x
|
|
45
|
+
function getPanelBounds({ x, y, w, h }) {
|
|
40
46
|
return {
|
|
41
47
|
x1: x,
|
|
42
48
|
x2: x + w,
|
|
@@ -153,7 +159,7 @@ const removeWhiteSpaces = (str)=>{
|
|
|
153
159
|
function getUniquePanelKeys(panels) {
|
|
154
160
|
const uniquePanelKeys = {};
|
|
155
161
|
Object.keys(panels).forEach((panelKey)=>{
|
|
156
|
-
const { name
|
|
162
|
+
const { name, number } = getPanelKeyParts(panelKey);
|
|
157
163
|
if (uniquePanelKeys[name] === undefined) {
|
|
158
164
|
uniquePanelKeys[name] = 0;
|
|
159
165
|
}
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./panel"), 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
|
}
|
|
@@ -14,14 +14,16 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "panelEditorValidationSchema", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return panelEditorValidationSchema;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _zod = require("zod");
|
|
24
|
+
const panelEditorValidationSchema = _zod.z.object({
|
|
25
|
+
name: _zod.z.string().nonempty('Required'),
|
|
26
|
+
groupId: _zod.z.number(),
|
|
27
|
+
description: _zod.z.string().optional(),
|
|
28
|
+
type: _zod.z.string().nonempty('Required')
|
|
20
29
|
});
|
|
21
|
-
const _core = require("@perses-dev/core");
|
|
22
|
-
const _pluginSystem = require("@perses-dev/plugin-system");
|
|
23
|
-
function useSuggestedStepMs(width) {
|
|
24
|
-
const { absoluteTimeRange } = (0, _pluginSystem.useTimeRange)();
|
|
25
|
-
if (width === undefined) return 0;
|
|
26
|
-
return (0, _core.getSuggestedStepMs)(absoluteTimeRange, width);
|
|
27
|
-
}
|
|
@@ -16,20 +16,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DashboardApp", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return DashboardApp;
|
|
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
26
|
const _components = require("@perses-dev/components");
|
|
27
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
25
28
|
const _components1 = require("../../components");
|
|
26
29
|
const _context = require("../../context");
|
|
27
30
|
const DashboardApp = (props)=>{
|
|
28
|
-
const { dashboardResource
|
|
29
|
-
const
|
|
30
|
-
const {
|
|
31
|
+
const { dashboardResource, dashboardTitleComponent, emptyDashboardProps, onSave, onDiscard, initialVariableIsSticky, isReadonly, isCreating } = props;
|
|
32
|
+
const chartsTheme = (0, _components.useChartsTheme)();
|
|
33
|
+
const { isEditMode, setEditMode } = (0, _context.useEditMode)();
|
|
34
|
+
const { dashboard, setDashboard } = (0, _context.useDashboard)();
|
|
31
35
|
const [originalDashboard, setOriginalDashboard] = (0, _react.useState)(undefined);
|
|
32
|
-
const {
|
|
36
|
+
const { setSavedDatasources } = (0, _pluginsystem.useDatasourceStore)();
|
|
37
|
+
const { openDiscardChangesConfirmationDialog, closeDiscardChangesConfirmationDialog } = (0, _context.useDiscardChangesConfirmationDialog)();
|
|
33
38
|
const handleDiscardChanges = ()=>{
|
|
34
39
|
// Reset to the original spec and exit edit mode
|
|
35
40
|
if (originalDashboard) {
|
|
@@ -44,6 +49,8 @@ const DashboardApp = (props)=>{
|
|
|
44
49
|
const onEditButtonClick = ()=>{
|
|
45
50
|
setEditMode(true);
|
|
46
51
|
setOriginalDashboard(dashboard);
|
|
52
|
+
var _dashboard_spec_datasources;
|
|
53
|
+
setSavedDatasources((_dashboard_spec_datasources = dashboard.spec.datasources) !== null && _dashboard_spec_datasources !== void 0 ? _dashboard_spec_datasources : {});
|
|
47
54
|
};
|
|
48
55
|
const onCancelButtonClick = ()=>{
|
|
49
56
|
// check if dashboard has been modified
|
|
@@ -60,7 +67,7 @@ const DashboardApp = (props)=>{
|
|
|
60
67
|
});
|
|
61
68
|
}
|
|
62
69
|
};
|
|
63
|
-
return /*#__PURE__*/ (0,
|
|
70
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
64
71
|
sx: {
|
|
65
72
|
flexGrow: 1,
|
|
66
73
|
overflowX: 'hidden',
|
|
@@ -69,7 +76,7 @@ const DashboardApp = (props)=>{
|
|
|
69
76
|
flexDirection: 'column'
|
|
70
77
|
},
|
|
71
78
|
children: [
|
|
72
|
-
/*#__PURE__*/ (0,
|
|
79
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.DashboardToolbar, {
|
|
73
80
|
dashboardName: dashboardResource.metadata.name,
|
|
74
81
|
dashboardTitleComponent: dashboardTitleComponent,
|
|
75
82
|
initialVariableIsSticky: initialVariableIsSticky,
|
|
@@ -78,28 +85,35 @@ const DashboardApp = (props)=>{
|
|
|
78
85
|
onEditButtonClick: onEditButtonClick,
|
|
79
86
|
onCancelButtonClick: onCancelButtonClick
|
|
80
87
|
}),
|
|
81
|
-
/*#__PURE__*/ (0,
|
|
88
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
82
89
|
sx: {
|
|
83
90
|
padding: (theme)=>theme.spacing(2),
|
|
84
91
|
height: '100%'
|
|
85
92
|
},
|
|
86
93
|
children: [
|
|
87
|
-
/*#__PURE__*/ (0,
|
|
94
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorBoundary, {
|
|
88
95
|
FallbackComponent: _components.ErrorAlert,
|
|
89
|
-
children: /*#__PURE__*/ (0,
|
|
96
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.Dashboard, {
|
|
90
97
|
emptyDashboardProps: {
|
|
91
98
|
onEditButtonClick,
|
|
92
99
|
...emptyDashboardProps
|
|
93
100
|
}
|
|
94
101
|
})
|
|
95
102
|
}),
|
|
96
|
-
/*#__PURE__*/ (0,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/*#__PURE__*/ (0,
|
|
102
|
-
/*#__PURE__*/ (0,
|
|
103
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ChartsProvider, {
|
|
104
|
+
chartsTheme: chartsTheme,
|
|
105
|
+
enablePinning: false,
|
|
106
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.PanelDrawer, {})
|
|
107
|
+
}),
|
|
108
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.PanelGroupDialog, {}),
|
|
109
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.DeletePanelGroupDialog, {}),
|
|
110
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.DeletePanelDialog, {}),
|
|
111
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.DashboardDiscardChangesConfirmationDialog, {}),
|
|
112
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.EditJsonDialog, {
|
|
113
|
+
isReadonly: !isEditMode,
|
|
114
|
+
disableMetadataEdition: !isCreating
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.SaveChangesConfirmationDialog, {})
|
|
103
117
|
]
|
|
104
118
|
})
|
|
105
119
|
]
|
|
@@ -16,40 +16,82 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "ViewDashboard", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return ViewDashboard;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
25
|
const _core = require("@perses-dev/core");
|
|
24
26
|
const _components = require("@perses-dev/components");
|
|
25
|
-
const
|
|
27
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
28
|
+
const _react = require("react");
|
|
26
29
|
const _context = require("../../context");
|
|
27
|
-
const
|
|
30
|
+
const _DashboardApp = require("./DashboardApp");
|
|
28
31
|
function ViewDashboard(props) {
|
|
29
|
-
const { dashboardResource
|
|
30
|
-
const { spec
|
|
31
|
-
var
|
|
32
|
-
const dashboardDuration = (
|
|
33
|
-
var
|
|
34
|
-
const dashboardRefreshInterval = (
|
|
35
|
-
const initialTimeRange = (0,
|
|
36
|
-
const initialRefreshInterval = (0,
|
|
37
|
-
|
|
32
|
+
const { dashboardResource, datasourceApi, externalVariableDefinitions, dashboardTitleComponent, emptyDashboardProps, onSave, onDiscard, initialVariableIsSticky, isReadonly, isEditing, isCreating, sx, ...others } = props;
|
|
33
|
+
const { spec } = dashboardResource;
|
|
34
|
+
var _spec_duration;
|
|
35
|
+
const dashboardDuration = (_spec_duration = spec.duration) !== null && _spec_duration !== void 0 ? _spec_duration : _core.DEFAULT_DASHBOARD_DURATION;
|
|
36
|
+
var _spec_refreshInterval;
|
|
37
|
+
const dashboardRefreshInterval = (_spec_refreshInterval = spec.refreshInterval) !== null && _spec_refreshInterval !== void 0 ? _spec_refreshInterval : _core.DEFAULT_REFRESH_INTERVAL;
|
|
38
|
+
const initialTimeRange = (0, _pluginsystem.useInitialTimeRange)(dashboardDuration);
|
|
39
|
+
const initialRefreshInterval = (0, _pluginsystem.useInitialRefreshInterval)(dashboardRefreshInterval);
|
|
40
|
+
const { data } = (0, _pluginsystem.usePluginBuiltinVariableDefinitions)();
|
|
41
|
+
const builtinVariables = (0, _react.useMemo)(()=>{
|
|
42
|
+
const result = [
|
|
43
|
+
{
|
|
44
|
+
kind: 'BuiltinVariable',
|
|
45
|
+
spec: {
|
|
46
|
+
name: '__dashboard',
|
|
47
|
+
value: ()=>dashboardResource.metadata.name,
|
|
48
|
+
source: 'Dashboard',
|
|
49
|
+
display: {
|
|
50
|
+
name: '__dashboard',
|
|
51
|
+
description: 'The name of the current dashboard',
|
|
52
|
+
hidden: true
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
kind: 'BuiltinVariable',
|
|
58
|
+
spec: {
|
|
59
|
+
name: '__project',
|
|
60
|
+
value: ()=>dashboardResource.metadata.project,
|
|
61
|
+
source: 'Dashboard',
|
|
62
|
+
display: {
|
|
63
|
+
name: '__project',
|
|
64
|
+
description: 'The name of the current dashboard project',
|
|
65
|
+
hidden: true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
];
|
|
70
|
+
if (data) {
|
|
71
|
+
data.forEach((def)=>result.push(def));
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}, [
|
|
75
|
+
dashboardResource.metadata.name,
|
|
76
|
+
dashboardResource.metadata.project,
|
|
77
|
+
data
|
|
78
|
+
]);
|
|
79
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_context.DatasourceStoreProvider, {
|
|
38
80
|
dashboardResource: dashboardResource,
|
|
39
81
|
datasourceApi: datasourceApi,
|
|
40
|
-
children: /*#__PURE__*/ (0,
|
|
82
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_context.DashboardProvider, {
|
|
41
83
|
initialState: {
|
|
42
84
|
dashboardResource,
|
|
43
85
|
isEditMode: !!isEditing
|
|
44
86
|
},
|
|
45
|
-
children: /*#__PURE__*/ (0,
|
|
87
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.TimeRangeProviderWithQueryParams, {
|
|
46
88
|
initialTimeRange: initialTimeRange,
|
|
47
89
|
initialRefreshInterval: initialRefreshInterval,
|
|
48
|
-
|
|
49
|
-
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_context.TemplateVariableProvider, {
|
|
90
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_context.TemplateVariableProviderWithQueryParams, {
|
|
50
91
|
initialVariableDefinitions: spec.variables,
|
|
51
92
|
externalVariableDefinitions: externalVariableDefinitions,
|
|
52
|
-
|
|
93
|
+
builtinVariables: builtinVariables,
|
|
94
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
53
95
|
sx: (0, _components.combineSx)({
|
|
54
96
|
display: 'flex',
|
|
55
97
|
width: '100%',
|
|
@@ -58,16 +100,17 @@ function ViewDashboard(props) {
|
|
|
58
100
|
overflow: 'hidden'
|
|
59
101
|
}, sx),
|
|
60
102
|
...others,
|
|
61
|
-
children: /*#__PURE__*/ (0,
|
|
103
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorBoundary, {
|
|
62
104
|
FallbackComponent: _components.ErrorAlert,
|
|
63
|
-
children: /*#__PURE__*/ (0,
|
|
105
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DashboardApp.DashboardApp, {
|
|
64
106
|
dashboardResource: dashboardResource,
|
|
65
107
|
dashboardTitleComponent: dashboardTitleComponent,
|
|
66
108
|
emptyDashboardProps: emptyDashboardProps,
|
|
67
109
|
onSave: onSave,
|
|
68
110
|
onDiscard: onDiscard,
|
|
69
111
|
initialVariableIsSticky: initialVariableIsSticky,
|
|
70
|
-
isReadonly: isReadonly
|
|
112
|
+
isReadonly: isReadonly,
|
|
113
|
+
isCreating: isCreating
|
|
71
114
|
})
|
|
72
115
|
})
|
|
73
116
|
})
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./ViewDashboard"), 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
|
}
|
package/dist/cjs/views/index.js
CHANGED
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
function
|
|
17
|
+
_export_star(require("./ViewDashboard"), 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
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddGroupButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddGroupButton/AddGroupButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddGroupButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddGroupButton/AddGroupButton.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,cAAc,+CAe1B,CAAC"}
|
|
@@ -14,16 +14,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { Button } from '@mui/material';
|
|
15
15
|
import AddGroupIcon from 'mdi-material-ui/PlusBoxOutline';
|
|
16
16
|
import { InfoTooltip } from '@perses-dev/components';
|
|
17
|
-
import { TOOLTIP_TEXT } from '../../constants';
|
|
17
|
+
import { TOOLTIP_TEXT, editButtonStyle } from '../../constants';
|
|
18
18
|
import { useDashboardActions } from '../../context';
|
|
19
19
|
export const AddGroupButton = ()=>{
|
|
20
|
-
const { openAddPanelGroup
|
|
20
|
+
const { openAddPanelGroup } = useDashboardActions();
|
|
21
21
|
return /*#__PURE__*/ _jsx(InfoTooltip, {
|
|
22
22
|
description: TOOLTIP_TEXT.addGroup,
|
|
23
23
|
children: /*#__PURE__*/ _jsx(Button, {
|
|
24
24
|
startIcon: /*#__PURE__*/ _jsx(AddGroupIcon, {}),
|
|
25
25
|
onClick: openAddPanelGroup,
|
|
26
26
|
"aria-label": TOOLTIP_TEXT.addGroup,
|
|
27
|
+
sx: editButtonStyle,
|
|
27
28
|
children: "Panel Group"
|
|
28
29
|
})
|
|
29
30
|
});
|
|
@@ -1 +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
|
|
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, editButtonStyle } 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\n startIcon={<AddGroupIcon />}\n onClick={openAddPanelGroup}\n aria-label={TOOLTIP_TEXT.addGroup}\n sx={editButtonStyle}\n >\n Panel Group\n </Button>\n </InfoTooltip>\n );\n};\n"],"names":["Button","AddGroupIcon","InfoTooltip","TOOLTIP_TEXT","editButtonStyle","useDashboardActions","AddGroupButton","openAddPanelGroup","description","addGroup","startIcon","onClick","aria-label","sx"],"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,SAASA,MAAM,QAAQ,gBAAgB;AACvC,OAAOC,kBAAkB,iCAAiC;AAC1D,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,YAAY,EAAEC,eAAe,QAAQ,kBAAkB;AAChE,SAASC,mBAAmB,QAAQ,gBAAgB;AAEpD,OAAO,MAAMC,iBAAiB;IAC5B,MAAM,EAAEC,iBAAiB,EAAE,GAAGF;IAE9B,qBACE,KAACH;QAAYM,aAAaL,aAAaM,QAAQ;kBAC7C,cAAA,KAACT;YACCU,yBAAW,KAACT;YACZU,SAASJ;YACTK,cAAYT,aAAaM,QAAQ;YACjCI,IAAIT;sBACL;;;AAKP,EAAE"}
|
|
@@ -1 +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,
|
|
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,mBAAmB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ButtonProps } from '@mui/material';
|
|
3
2
|
export interface AddPanelButtonProps extends Pick<ButtonProps, 'fullWidth'> {
|
|
4
3
|
/**
|
|
@@ -14,5 +13,5 @@ export interface AddPanelButtonProps extends Pick<ButtonProps, 'fullWidth'> {
|
|
|
14
13
|
*/
|
|
15
14
|
label?: string;
|
|
16
15
|
}
|
|
17
|
-
export declare const AddPanelButton: ({ variant, color, label, fullWidth, }: AddPanelButtonProps) => JSX.Element;
|
|
16
|
+
export declare const AddPanelButton: ({ variant, color, label, fullWidth, }: AddPanelButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
//# sourceMappingURL=AddPanelButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddPanelButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddPanelButton/AddPanelButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddPanelButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddPanelButton/AddPanelButton.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAMpD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC;IACzE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAEhC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,0CAKxB,mBAAmB,4CAkBrB,CAAC"}
|
|
@@ -14,10 +14,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { Button } from '@mui/material';
|
|
15
15
|
import AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';
|
|
16
16
|
import { InfoTooltip } from '@perses-dev/components';
|
|
17
|
-
import { TOOLTIP_TEXT } from '../../constants';
|
|
17
|
+
import { TOOLTIP_TEXT, editButtonStyle } from '../../constants';
|
|
18
18
|
import { useDashboardActions } from '../../context';
|
|
19
|
-
export const AddPanelButton = ({ variant ='text'
|
|
20
|
-
const { openAddPanel
|
|
19
|
+
export const AddPanelButton = ({ variant = 'text', color = 'primary', label = 'Panel', fullWidth })=>{
|
|
20
|
+
const { openAddPanel } = useDashboardActions();
|
|
21
21
|
return /*#__PURE__*/ _jsx(InfoTooltip, {
|
|
22
22
|
description: TOOLTIP_TEXT.addPanel,
|
|
23
23
|
children: /*#__PURE__*/ _jsx(Button, {
|
|
@@ -27,10 +27,7 @@ export const AddPanelButton = ({ variant ='text' , color ='primary' , label ='Pa
|
|
|
27
27
|
variant: variant,
|
|
28
28
|
color: color,
|
|
29
29
|
fullWidth: fullWidth,
|
|
30
|
-
sx:
|
|
31
|
-
whiteSpace: 'nowrap',
|
|
32
|
-
minWidth: 'auto'
|
|
33
|
-
},
|
|
30
|
+
sx: editButtonStyle,
|
|
34
31
|
children: label
|
|
35
32
|
})
|
|
36
33
|
});
|
|
@@ -1 +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, ButtonProps } 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 interface AddPanelButtonProps extends Pick<ButtonProps, 'fullWidth'> {\n /**\n * The variant to use to display the button.\n */\n variant?: 'text' | 'outlined';\n\n /**\n * The color to use to display the button.\n */\n color?: 'primary' | 'secondary';\n\n /**\n * The label used inside the button.\n */\n label?: string;\n}\n\nexport const AddPanelButton = ({\n variant = 'text',\n color = 'primary',\n label = 'Panel',\n fullWidth,\n}: AddPanelButtonProps) => {\n const { openAddPanel } = useDashboardActions();\n\n return (\n <InfoTooltip description={TOOLTIP_TEXT.addPanel}>\n <Button\n startIcon={<AddPanelIcon />}\n onClick={openAddPanel}\n aria-label={TOOLTIP_TEXT.addPanel}\n variant={variant}\n color={color}\n fullWidth={fullWidth}\n sx={
|
|
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, ButtonProps } from '@mui/material';\nimport AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';\nimport { InfoTooltip } from '@perses-dev/components';\nimport { TOOLTIP_TEXT, editButtonStyle } from '../../constants';\nimport { useDashboardActions } from '../../context';\n\nexport interface AddPanelButtonProps extends Pick<ButtonProps, 'fullWidth'> {\n /**\n * The variant to use to display the button.\n */\n variant?: 'text' | 'outlined';\n\n /**\n * The color to use to display the button.\n */\n color?: 'primary' | 'secondary';\n\n /**\n * The label used inside the button.\n */\n label?: string;\n}\n\nexport const AddPanelButton = ({\n variant = 'text',\n color = 'primary',\n label = 'Panel',\n fullWidth,\n}: AddPanelButtonProps) => {\n const { openAddPanel } = useDashboardActions();\n\n return (\n <InfoTooltip description={TOOLTIP_TEXT.addPanel}>\n <Button\n startIcon={<AddPanelIcon />}\n onClick={openAddPanel}\n aria-label={TOOLTIP_TEXT.addPanel}\n variant={variant}\n color={color}\n fullWidth={fullWidth}\n sx={editButtonStyle}\n >\n {label}\n </Button>\n </InfoTooltip>\n );\n};\n"],"names":["Button","AddPanelIcon","InfoTooltip","TOOLTIP_TEXT","editButtonStyle","useDashboardActions","AddPanelButton","variant","color","label","fullWidth","openAddPanel","description","addPanel","startIcon","onClick","aria-label","sx"],"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,SAASA,MAAM,QAAqB,gBAAgB;AACpD,OAAOC,kBAAkB,sCAAsC;AAC/D,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,YAAY,EAAEC,eAAe,QAAQ,kBAAkB;AAChE,SAASC,mBAAmB,QAAQ,gBAAgB;AAmBpD,OAAO,MAAMC,iBAAiB,CAAC,EAC7BC,UAAU,MAAM,EAChBC,QAAQ,SAAS,EACjBC,QAAQ,OAAO,EACfC,SAAS,EACW;IACpB,MAAM,EAAEC,YAAY,EAAE,GAAGN;IAEzB,qBACE,KAACH;QAAYU,aAAaT,aAAaU,QAAQ;kBAC7C,cAAA,KAACb;YACCc,yBAAW,KAACb;YACZc,SAASJ;YACTK,cAAYb,aAAaU,QAAQ;YACjCN,SAASA;YACTC,OAAOA;YACPE,WAAWA;YACXO,IAAIb;sBAEHK;;;AAIT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/AddPanelButton/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 './AddPanelButton';\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,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddPanelButton/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 './AddPanelButton';\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,mBAAmB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BoxProps } from '@mui/material';
|
|
3
2
|
import { EmptyDashboardProps } from '../EmptyDashboard';
|
|
4
3
|
import { PanelOptions } from '../Panel';
|
|
5
|
-
export
|
|
4
|
+
export type DashboardProps = BoxProps & {
|
|
6
5
|
/**
|
|
7
6
|
* Props for `EmptyDashboard` component that will be rendered when the dashboard
|
|
8
7
|
* is empty (i.e. has no panel groups). If not specified, the defaults will
|
|
@@ -14,5 +13,5 @@ export declare type DashboardProps = BoxProps & {
|
|
|
14
13
|
/**
|
|
15
14
|
* Renders a Dashboard for the provided Dashboard spec.
|
|
16
15
|
*/
|
|
17
|
-
export declare function Dashboard({ emptyDashboardProps, panelOptions, ...boxProps }: DashboardProps): JSX.Element;
|
|
16
|
+
export declare function Dashboard({ emptyDashboardProps, panelOptions, ...boxProps }: DashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
//# sourceMappingURL=Dashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["../../../src/components/Dashboard/Dashboard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["../../../src/components/Dashboard/Dashboard.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAO,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,OAAO,EAAkB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACtC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,mBAAmB,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,EAAE,cAAc,2CAmB3F"}
|
|
@@ -18,7 +18,7 @@ import { GridLayout } from '../GridLayout';
|
|
|
18
18
|
import { EmptyDashboard } from '../EmptyDashboard';
|
|
19
19
|
/**
|
|
20
20
|
* Renders a Dashboard for the provided Dashboard spec.
|
|
21
|
-
*/ export function Dashboard({ emptyDashboardProps
|
|
21
|
+
*/ export function Dashboard({ emptyDashboardProps, panelOptions, ...boxProps }) {
|
|
22
22
|
const panelGroupIds = usePanelGroupIds();
|
|
23
23
|
const isEmpty = !panelGroupIds.length;
|
|
24
24
|
return /*#__PURE__*/ _jsx(Box, {
|