@perses-dev/dashboards 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AddGroupButton/AddGroupButton.js +43 -0
- package/dist/cjs/components/AddGroupButton/index.js +28 -0
- package/dist/cjs/components/AddPanelButton/AddPanelButton.js +43 -0
- package/dist/cjs/components/AddPanelButton/index.js +28 -0
- package/dist/cjs/components/Dashboard/Dashboard.js +1 -1
- package/dist/cjs/components/Dashboard/index.js +1 -1
- package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +47 -22
- package/dist/cjs/components/DashboardToolbar/index.js +1 -1
- package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +1 -1
- package/dist/cjs/components/DeletePanelDialog/index.js +1 -1
- package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +1 -1
- package/dist/cjs/components/DeletePanelGroupDialog/index.js +1 -1
- package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +1 -1
- package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +1 -1
- package/dist/cjs/components/DownloadButton/DownloadButton.js +17 -53
- package/dist/cjs/components/DownloadButton/index.js +1 -1
- package/dist/cjs/components/GridLayout/GridContainer.js +2 -1
- package/dist/cjs/components/GridLayout/GridItemContent.js +1 -1
- package/dist/cjs/components/GridLayout/GridLayout.js +2 -1
- package/dist/cjs/components/GridLayout/GridTitle.js +14 -11
- package/dist/cjs/components/GridLayout/index.js +1 -1
- package/dist/cjs/components/Panel/Panel.js +2 -1
- package/dist/cjs/components/Panel/Panel.test.js +1 -1
- package/dist/cjs/components/Panel/PanelContent.js +1 -1
- package/dist/cjs/components/Panel/PanelHeader.js +9 -8
- package/dist/cjs/components/Panel/index.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +2 -1
- package/dist/cjs/components/PanelDrawer/PanelDrawer.test.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +1 -1
- package/dist/cjs/components/PanelDrawer/index.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +3 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.test.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/index.js +1 -1
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +14 -16
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.test.js +1 -1
- package/dist/cjs/components/TimeRangeControls/index.js +1 -1
- package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +35 -0
- package/dist/cjs/components/ToolbarIconButton/index.js +28 -0
- package/dist/cjs/components/Variables/EditVariablesButton.js +74 -0
- package/dist/cjs/components/Variables/Variable.js +1 -1
- package/dist/cjs/components/Variables/VariableEditor.js +9 -5
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +6 -7
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/cjs/components/Variables/VariableList.js +38 -110
- package/dist/cjs/components/Variables/index.js +4 -2
- package/dist/cjs/components/Variables/variable-model.js +1 -1
- package/dist/cjs/components/Variables/variable-model.test.js +1 -1
- package/dist/cjs/components/index.js +5 -2
- package/dist/cjs/constants/index.js +28 -0
- package/dist/cjs/constants/user-interface-text.js +59 -0
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +1 -1
- package/dist/cjs/context/DashboardProvider/common.js +1 -1
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +1 -1
- package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/index.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-editor-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-slice.js +1 -1
- package/dist/cjs/context/DatasourceStoreProvider.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +8 -8
- package/dist/cjs/context/TemplateVariableProvider/index.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/query-params.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/query-params.test.js +1 -1
- package/dist/cjs/context/index.js +1 -1
- package/dist/cjs/context/useDashboard.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/test/dashboard-provider.js +1 -1
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/test/plugin-registry.js +1 -1
- package/dist/cjs/test/render.js +1 -1
- package/dist/cjs/test/setup-tests.js +1 -1
- package/dist/cjs/test/testDashboard.js +1 -1
- package/dist/cjs/utils/functions.js +1 -1
- package/dist/cjs/utils/index.js +28 -0
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +1 -1
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +1 -1
- package/dist/cjs/views/ViewDashboard/index.js +1 -1
- package/dist/cjs/views/ViewDashboard/tests/panelGroups.test.js +1 -1
- package/dist/cjs/views/index.js +1 -1
- package/dist/components/AddGroupButton/AddGroupButton.d.ts +3 -0
- package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -0
- package/dist/components/AddGroupButton/AddGroupButton.js +32 -0
- package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -0
- package/dist/components/AddGroupButton/index.d.ts +2 -0
- package/dist/components/AddGroupButton/index.d.ts.map +1 -0
- package/dist/components/AddGroupButton/index.js +15 -0
- package/dist/components/AddGroupButton/index.js.map +1 -0
- package/dist/components/AddPanelButton/AddPanelButton.d.ts +3 -0
- package/dist/components/AddPanelButton/AddPanelButton.d.ts.map +1 -0
- package/dist/components/AddPanelButton/AddPanelButton.js +32 -0
- package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -0
- package/dist/components/AddPanelButton/index.d.ts +2 -0
- package/dist/components/AddPanelButton/index.d.ts.map +1 -0
- package/dist/components/AddPanelButton/index.js +15 -0
- package/dist/components/AddPanelButton/index.js.map +1 -0
- package/dist/components/Dashboard/Dashboard.js +1 -1
- package/dist/components/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Dashboard/index.js +1 -1
- package/dist/components/Dashboard/index.js.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +48 -23
- package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
- package/dist/components/DashboardToolbar/index.js +1 -1
- package/dist/components/DashboardToolbar/index.js.map +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
- package/dist/components/DeletePanelDialog/index.js +1 -1
- package/dist/components/DeletePanelDialog/index.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.d.ts +5 -1
- package/dist/components/DownloadButton/DownloadButton.d.ts.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.js +18 -15
- package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
- package/dist/components/DownloadButton/index.js +1 -1
- package/dist/components/DownloadButton/index.js.map +1 -1
- package/dist/components/GridLayout/GridContainer.d.ts.map +1 -1
- package/dist/components/GridLayout/GridContainer.js +2 -1
- package/dist/components/GridLayout/GridContainer.js.map +1 -1
- package/dist/components/GridLayout/GridItemContent.js +1 -1
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +2 -1
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.d.ts.map +1 -1
- package/dist/components/GridLayout/GridTitle.js +14 -11
- package/dist/components/GridLayout/GridTitle.js.map +1 -1
- package/dist/components/GridLayout/index.js +1 -1
- package/dist/components/GridLayout/index.js.map +1 -1
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +2 -1
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/Panel/Panel.test.js +1 -1
- package/dist/components/Panel/Panel.test.js.map +1 -1
- package/dist/components/Panel/PanelContent.js +1 -1
- package/dist/components/Panel/PanelContent.js.map +1 -1
- package/dist/components/Panel/PanelHeader.d.ts.map +1 -1
- package/dist/components/Panel/PanelHeader.js +9 -8
- package/dist/components/Panel/PanelHeader.js.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js +2 -1
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.js +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.js.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
- package/dist/components/PanelDrawer/index.js +1 -1
- package/dist/components/PanelDrawer/index.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js +3 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js.map +1 -1
- package/dist/components/PanelGroupDialog/index.js +1 -1
- package/dist/components/PanelGroupDialog/index.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +15 -17
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js.map +1 -1
- package/dist/components/TimeRangeControls/index.js +1 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.d.ts +6 -0
- package/dist/components/ToolbarIconButton/ToolbarIconButton.d.ts.map +1 -0
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js +29 -0
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +1 -0
- package/dist/components/ToolbarIconButton/index.d.ts +2 -0
- package/dist/components/ToolbarIconButton/index.d.ts.map +1 -0
- package/dist/components/ToolbarIconButton/index.js +15 -0
- package/dist/components/ToolbarIconButton/index.js.map +1 -0
- package/dist/components/Variables/EditVariablesButton.d.ts +3 -0
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -0
- package/dist/components/Variables/EditVariablesButton.js +63 -0
- package/dist/components/Variables/EditVariablesButton.js.map +1 -0
- package/dist/components/Variables/Variable.js +1 -1
- package/dist/components/Variables/Variable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js +9 -5
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +8 -9
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +40 -73
- package/dist/components/Variables/VariableList.js.map +1 -1
- package/dist/components/Variables/index.d.ts +3 -1
- package/dist/components/Variables/index.d.ts.map +1 -1
- package/dist/components/Variables/index.js +4 -2
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/Variables/variable-model.js +1 -1
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/Variables/variable-model.test.js +1 -1
- package/dist/components/Variables/variable-model.test.js.map +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -2
- package/dist/components/index.js.map +1 -1
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +15 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/user-interface-text.d.ts +28 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -0
- package/dist/constants/user-interface-text.js +47 -0
- package/dist/constants/user-interface-text.js.map +1 -0
- package/dist/context/DashboardProvider/DashboardProvider.js +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.js +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/index.js +1 -1
- package/dist/context/DashboardProvider/index.js.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +1 -1
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +8 -8
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/index.js +1 -1
- package/dist/context/TemplateVariableProvider/index.js.map +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
- package/dist/context/TemplateVariableProvider/query-params.test.js +1 -1
- package/dist/context/TemplateVariableProvider/query-params.test.js.map +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/useDashboard.js +1 -1
- package/dist/context/useDashboard.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/test/dashboard-provider.js +1 -1
- package/dist/test/dashboard-provider.js.map +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/plugin-registry.js +1 -1
- package/dist/test/plugin-registry.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/testDashboard.js +1 -1
- package/dist/test/testDashboard.js.map +1 -1
- package/dist/utils/functions.js +1 -1
- package/dist/utils/functions.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/views/ViewDashboard/DashboardApp.js +1 -1
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
- package/dist/views/ViewDashboard/index.js +1 -1
- package/dist/views/ViewDashboard/index.js.map +1 -1
- package/dist/views/ViewDashboard/tests/panelGroups.test.js +1 -1
- package/dist/views/ViewDashboard/tests/panelGroups.test.js.map +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Button } from '@mui/material';
|
|
15
|
+
import AddGroupIcon from 'mdi-material-ui/PlusBoxOutline';
|
|
16
|
+
import { InfoTooltip } from '@perses-dev/components';
|
|
17
|
+
import { TOOLTIP_TEXT } from '../../constants';
|
|
18
|
+
import { useDashboardActions } from '../../context';
|
|
19
|
+
export const AddGroupButton = ()=>{
|
|
20
|
+
const { openAddPanelGroup } = useDashboardActions();
|
|
21
|
+
return /*#__PURE__*/ _jsx(InfoTooltip, {
|
|
22
|
+
description: TOOLTIP_TEXT.addGroup,
|
|
23
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
24
|
+
startIcon: /*#__PURE__*/ _jsx(AddGroupIcon, {}),
|
|
25
|
+
onClick: openAddPanelGroup,
|
|
26
|
+
"aria-label": TOOLTIP_TEXT.addGroup,
|
|
27
|
+
children: "Panel Group"
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=AddGroupButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddGroupButton/AddGroupButton.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport AddGroupIcon from 'mdi-material-ui/PlusBoxOutline';\nimport { InfoTooltip } from '@perses-dev/components';\nimport { TOOLTIP_TEXT } from '../../constants';\nimport { useDashboardActions } from '../../context';\n\nexport const AddGroupButton = () => {\n const { openAddPanelGroup } = useDashboardActions();\n\n return (\n <InfoTooltip description={TOOLTIP_TEXT.addGroup}>\n <Button startIcon={<AddGroupIcon />} onClick={openAddPanelGroup} aria-label={TOOLTIP_TEXT.addGroup}>\n Panel Group\n </Button>\n </InfoTooltip>\n );\n};\n"],"names":["Button","AddGroupIcon","InfoTooltip","TOOLTIP_TEXT","useDashboardActions","AddGroupButton","openAddPanelGroup","description","addGroup","startIcon","onClick","aria-label"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,MAAM,QAAQ,eAAe,CAAC;AACvC,OAAOC,YAAY,MAAM,gCAAgC,CAAC;AAC1D,SAASC,WAAW,QAAQ,wBAAwB,CAAC;AACrD,SAASC,YAAY,QAAQ,iBAAiB,CAAC;AAC/C,SAASC,mBAAmB,QAAQ,eAAe,CAAC;AAEpD,OAAO,MAAMC,cAAc,GAAG,IAAM;IAClC,MAAM,EAAEC,iBAAiB,CAAA,EAAE,GAAGF,mBAAmB,EAAE,AAAC;IAEpD,qBACE,KAACF,WAAW;QAACK,WAAW,EAAEJ,YAAY,CAACK,QAAQ;kBAC7C,cAAA,KAACR,MAAM;YAACS,SAAS,gBAAE,KAACR,YAAY,KAAG;YAAES,OAAO,EAAEJ,iBAAiB;YAAEK,YAAU,EAAER,YAAY,CAACK,QAAQ;sBAAE,aAEpG;UAAS;MACG,CACd;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddGroupButton/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './AddGroupButton';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddGroupButton/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './AddGroupButton';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddPanelButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddPanelButton/AddPanelButton.tsx"],"names":[],"mappings":";AAmBA,eAAO,MAAM,cAAc,mBAU1B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Button } from '@mui/material';
|
|
15
|
+
import AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';
|
|
16
|
+
import { InfoTooltip } from '@perses-dev/components';
|
|
17
|
+
import { TOOLTIP_TEXT } from '../../constants';
|
|
18
|
+
import { useDashboardActions } from '../../context';
|
|
19
|
+
export const AddPanelButton = ()=>{
|
|
20
|
+
const { openAddPanel } = useDashboardActions();
|
|
21
|
+
return /*#__PURE__*/ _jsx(InfoTooltip, {
|
|
22
|
+
description: TOOLTIP_TEXT.addPanel,
|
|
23
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
24
|
+
startIcon: /*#__PURE__*/ _jsx(AddPanelIcon, {}),
|
|
25
|
+
onClick: openAddPanel,
|
|
26
|
+
"aria-label": TOOLTIP_TEXT.addPanel,
|
|
27
|
+
children: "Panel"
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=AddPanelButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AddPanelButton/AddPanelButton.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';\nimport { InfoTooltip } from '@perses-dev/components';\nimport { TOOLTIP_TEXT } from '../../constants';\nimport { useDashboardActions } from '../../context';\n\nexport const AddPanelButton = () => {\n const { openAddPanel } = useDashboardActions();\n\n return (\n <InfoTooltip description={TOOLTIP_TEXT.addPanel}>\n <Button startIcon={<AddPanelIcon />} onClick={openAddPanel} aria-label={TOOLTIP_TEXT.addPanel}>\n Panel\n </Button>\n </InfoTooltip>\n );\n};\n"],"names":["Button","AddPanelIcon","InfoTooltip","TOOLTIP_TEXT","useDashboardActions","AddPanelButton","openAddPanel","description","addPanel","startIcon","onClick","aria-label"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,MAAM,QAAQ,eAAe,CAAC;AACvC,OAAOC,YAAY,MAAM,qCAAqC,CAAC;AAC/D,SAASC,WAAW,QAAQ,wBAAwB,CAAC;AACrD,SAASC,YAAY,QAAQ,iBAAiB,CAAC;AAC/C,SAASC,mBAAmB,QAAQ,eAAe,CAAC;AAEpD,OAAO,MAAMC,cAAc,GAAG,IAAM;IAClC,MAAM,EAAEC,YAAY,CAAA,EAAE,GAAGF,mBAAmB,EAAE,AAAC;IAE/C,qBACE,KAACF,WAAW;QAACK,WAAW,EAAEJ,YAAY,CAACK,QAAQ;kBAC7C,cAAA,KAACR,MAAM;YAACS,SAAS,gBAAE,KAACR,YAAY,KAAG;YAAES,OAAO,EAAEJ,YAAY;YAAEK,YAAU,EAAER,YAAY,CAACK,QAAQ;sBAAE,OAE/F;UAAS;MACG,CACd;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddPanelButton/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './AddPanelButton';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Dashboard/Dashboard.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Dashboard/Dashboard.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 { Box, BoxProps } from '@mui/material';\nimport { ErrorBoundary, ErrorAlert } from '@perses-dev/components';\nimport { usePanelGroupIds } from '../../context';\nimport { GridLayout } from '../GridLayout';\n\nexport type DashboardProps = BoxProps;\n\n/**\n * Renders a Dashboard for the provided Dashboard spec.\n */\nexport function Dashboard(props: DashboardProps) {\n const panelGroupIds = usePanelGroupIds();\n return (\n <Box {...props}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n {panelGroupIds.map((panelGroupId) => (\n <GridLayout key={panelGroupId} panelGroupId={panelGroupId} />\n ))}\n </ErrorBoundary>\n </Box>\n );\n}\n"],"names":["Box","ErrorBoundary","ErrorAlert","usePanelGroupIds","GridLayout","Dashboard","props","panelGroupIds","FallbackComponent","map","panelGroupId"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,GAAG,QAAkB,eAAe,CAAC;AAC9C,SAASC,aAAa,EAAEC,UAAU,QAAQ,wBAAwB,CAAC;AACnE,SAASC,gBAAgB,QAAQ,eAAe,CAAC;AACjD,SAASC,UAAU,QAAQ,eAAe,CAAC;AAI3C;;CAEC,GACD,OAAO,SAASC,SAAS,CAACC,KAAqB,EAAE;IAC/C,MAAMC,aAAa,GAAGJ,gBAAgB,EAAE,AAAC;IACzC,qBACE,KAACH,GAAG;QAAE,GAAGM,KAAK;kBACZ,cAAA,KAACL,aAAa;YAACO,iBAAiB,EAAEN,UAAU;sBACzCK,aAAa,CAACE,GAAG,CAAC,CAACC,YAAY,iBAC9B,KAACN,UAAU;oBAAoBM,YAAY,EAAEA,YAAY;mBAAxCA,YAAY,CAAgC,AAC9D,CAAC;UACY;MACZ,CACN;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Dashboard/index.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Dashboard/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 './Dashboard';\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,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/DashboardToolbar/DashboardToolbar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DashboardToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/DashboardToolbar/DashboardToolbar.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQrD,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACtC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,gBA0I5D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { useState } from 'react';
|
|
14
15
|
import { Typography, Stack, Button, Box, useTheme, useMediaQuery, Alert } from '@mui/material';
|
|
15
16
|
import PencilIcon from 'mdi-material-ui/PencilOutline';
|
|
16
|
-
import AddPanelGroupIcon from 'mdi-material-ui/PlusBoxOutline';
|
|
17
|
-
import AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';
|
|
18
17
|
import { ErrorBoundary, ErrorAlert } from '@perses-dev/components';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { TimeRangeControls } from '../TimeRangeControls';
|
|
18
|
+
import { useDashboard, useEditMode } from '../../context';
|
|
19
|
+
import { AddPanelButton } from '../AddPanelButton';
|
|
20
|
+
import { AddGroupButton } from '../AddGroupButton';
|
|
23
21
|
import { DownloadButton } from '../DownloadButton';
|
|
22
|
+
import { TimeRangeControls } from '../TimeRangeControls';
|
|
23
|
+
import { TemplateVariableList, EditVariablesButton } from '../Variables';
|
|
24
24
|
export const DashboardToolbar = (props)=>{
|
|
25
25
|
const { dashboardName , dashboardTitleComponent , initialVariableIsSticky , isReadonly , onEditButtonClick , onCancelButtonClick , onSave , } = props;
|
|
26
|
+
const dashboard = useDashboard();
|
|
26
27
|
const { isEditMode , setEditMode } = useEditMode();
|
|
28
|
+
const isBiggerThanMd = useMediaQuery(useTheme().breakpoints.up('md'));
|
|
29
|
+
const isBiggerThanSm = useMediaQuery(useTheme().breakpoints.up('sm'));
|
|
27
30
|
const [isSavingDashboard, setSavingDashboard] = useState(false);
|
|
28
|
-
const dashboard = useDashboard();
|
|
29
|
-
const { openAddPanelGroup , openAddPanel } = useDashboardActions();
|
|
30
|
-
const isLaptopSize = useMediaQuery(useTheme().breakpoints.up('sm'));
|
|
31
31
|
const dashboardTitle = dashboardTitleComponent ? dashboardTitleComponent : /*#__PURE__*/ _jsx(Typography, {
|
|
32
32
|
variant: "h2",
|
|
33
33
|
children: dashboardName
|
|
@@ -89,8 +89,8 @@ export const DashboardToolbar = (props)=>{
|
|
|
89
89
|
sx: {
|
|
90
90
|
display: 'flex',
|
|
91
91
|
width: '100%',
|
|
92
|
-
alignItems: '
|
|
93
|
-
padding: (theme)=>theme.spacing(
|
|
92
|
+
alignItems: 'start',
|
|
93
|
+
padding: (theme)=>theme.spacing(1, 2, 2, 2)
|
|
94
94
|
},
|
|
95
95
|
children: [
|
|
96
96
|
/*#__PURE__*/ _jsx(ErrorBoundary, {
|
|
@@ -102,6 +102,7 @@ export const DashboardToolbar = (props)=>{
|
|
|
102
102
|
}
|
|
103
103
|
})
|
|
104
104
|
}),
|
|
105
|
+
isBiggerThanMd ? // On bigger screens, make it one row
|
|
105
106
|
/*#__PURE__*/ _jsxs(Stack, {
|
|
106
107
|
direction: "row",
|
|
107
108
|
spacing: 1,
|
|
@@ -110,19 +111,42 @@ export const DashboardToolbar = (props)=>{
|
|
|
110
111
|
whiteSpace: 'nowrap'
|
|
111
112
|
},
|
|
112
113
|
children: [
|
|
113
|
-
/*#__PURE__*/ _jsx(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
children: "Add Panel Group"
|
|
117
|
-
}),
|
|
118
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
119
|
-
startIcon: /*#__PURE__*/ _jsx(AddPanelIcon, {}),
|
|
120
|
-
onClick: openAddPanel,
|
|
121
|
-
children: "Add Panel"
|
|
122
|
-
}),
|
|
114
|
+
/*#__PURE__*/ _jsx(EditVariablesButton, {}),
|
|
115
|
+
/*#__PURE__*/ _jsx(AddPanelButton, {}),
|
|
116
|
+
/*#__PURE__*/ _jsx(AddGroupButton, {}),
|
|
123
117
|
/*#__PURE__*/ _jsx(TimeRangeControls, {}),
|
|
124
118
|
/*#__PURE__*/ _jsx(DownloadButton, {})
|
|
125
119
|
]
|
|
120
|
+
}) : // On smaller screens, make it two rows
|
|
121
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
122
|
+
spacing: 1,
|
|
123
|
+
children: [
|
|
124
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
125
|
+
direction: "row",
|
|
126
|
+
spacing: 1,
|
|
127
|
+
marginLeft: "auto",
|
|
128
|
+
sx: {
|
|
129
|
+
whiteSpace: 'nowrap'
|
|
130
|
+
},
|
|
131
|
+
children: [
|
|
132
|
+
/*#__PURE__*/ _jsx(TimeRangeControls, {}),
|
|
133
|
+
/*#__PURE__*/ _jsx(DownloadButton, {})
|
|
134
|
+
]
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
137
|
+
direction: "row",
|
|
138
|
+
spacing: 1,
|
|
139
|
+
marginLeft: "auto",
|
|
140
|
+
sx: {
|
|
141
|
+
whiteSpace: 'nowrap'
|
|
142
|
+
},
|
|
143
|
+
children: [
|
|
144
|
+
/*#__PURE__*/ _jsx(EditVariablesButton, {}),
|
|
145
|
+
/*#__PURE__*/ _jsx(AddPanelButton, {}),
|
|
146
|
+
/*#__PURE__*/ _jsx(AddGroupButton, {})
|
|
147
|
+
]
|
|
148
|
+
})
|
|
149
|
+
]
|
|
126
150
|
})
|
|
127
151
|
]
|
|
128
152
|
})
|
|
@@ -145,8 +169,9 @@ export const DashboardToolbar = (props)=>{
|
|
|
145
169
|
children: [
|
|
146
170
|
/*#__PURE__*/ _jsx(TimeRangeControls, {}),
|
|
147
171
|
/*#__PURE__*/ _jsx(DownloadButton, {}),
|
|
148
|
-
|
|
172
|
+
isBiggerThanSm && /*#__PURE__*/ _jsx(Button, {
|
|
149
173
|
variant: "outlined",
|
|
174
|
+
color: "secondary",
|
|
150
175
|
startIcon: /*#__PURE__*/ _jsx(PencilIcon, {}),
|
|
151
176
|
onClick: onEditButtonClick,
|
|
152
177
|
sx: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DashboardToolbar/DashboardToolbar.tsx"],"sourcesContent":["// Copyright 2022 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 { Typography, Stack, Button, Box, useTheme, useMediaQuery, Alert } from '@mui/material';\nimport PencilIcon from 'mdi-material-ui/PencilOutline';\nimport AddPanelGroupIcon from 'mdi-material-ui/PlusBoxOutline';\nimport AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';\nimport { ErrorBoundary, ErrorAlert } from '@perses-dev/components';\nimport { DashboardResource } from '@perses-dev/core';\nimport { useState } from 'react';\nimport { useDashboard, useDashboardActions, useEditMode } from '../../context';\nimport { TemplateVariableList } from '../Variables';\nimport { TimeRangeControls } from '../TimeRangeControls';\nimport { DownloadButton } from '../DownloadButton';\n\nexport interface DashboardToolbarProps {\n dashboardName: string;\n dashboardTitleComponent?: JSX.Element;\n initialVariableIsSticky?: boolean;\n isReadonly: boolean;\n onEditButtonClick: () => void;\n onCancelButtonClick: () => void;\n onSave?: (entity: DashboardResource) => Promise<DashboardResource>;\n}\n\nexport const DashboardToolbar = (props: DashboardToolbarProps) => {\n const {\n dashboardName,\n dashboardTitleComponent,\n initialVariableIsSticky,\n isReadonly,\n onEditButtonClick,\n onCancelButtonClick,\n onSave,\n } = props;\n\n const { isEditMode, setEditMode } = useEditMode();\n const [isSavingDashboard, setSavingDashboard] = useState<boolean>(false);\n const dashboard = useDashboard();\n const { openAddPanelGroup, openAddPanel } = useDashboardActions();\n const isLaptopSize = useMediaQuery(useTheme().breakpoints.up('sm'));\n const dashboardTitle = dashboardTitleComponent ? (\n dashboardTitleComponent\n ) : (\n <Typography variant=\"h2\">{dashboardName}</Typography>\n );\n\n const onSaveButtonClick = () => {\n if (onSave !== undefined) {\n setSavingDashboard(true);\n onSave(dashboard.dashboard)\n .then(() => {\n setSavingDashboard(false);\n setEditMode(false);\n })\n .catch(() => {\n setSavingDashboard(false);\n });\n } else {\n setEditMode(false);\n }\n };\n\n return (\n <>\n {isEditMode ? (\n <Stack spacing={1}>\n <Box p={2} display=\"flex\" sx={{ backgroundColor: (theme) => theme.palette.primary.main + '30' }}>\n {dashboardTitle}\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\">\n {isReadonly && (\n <Alert severity={'warning'} sx={{ backgroundColor: 'transparent', padding: 0 }}>\n Dashboard managed via code only. Download JSON and commit changes to save.\n </Alert>\n )}\n <Button variant=\"contained\" onClick={onSaveButtonClick} disabled={isReadonly || isSavingDashboard}>\n Save\n </Button>\n <Button variant=\"outlined\" onClick={onCancelButtonClick}>\n Cancel\n </Button>\n </Stack>\n </Box>\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n alignItems: 'flex-start',\n padding: (theme) => theme.spacing(0, 2, 2, 2),\n }}\n >\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <TemplateVariableList\n initialVariableIsSticky={initialVariableIsSticky}\n sx={{\n backgroundColor: ({ palette }) =>\n palette.mode === 'dark' ? palette.background.default : palette.background.paper,\n }}\n />\n </ErrorBoundary>\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\" sx={{ whiteSpace: 'nowrap' }}>\n <Button startIcon={<AddPanelGroupIcon />} onClick={openAddPanelGroup}>\n Add Panel Group\n </Button>\n <Button startIcon={<AddPanelIcon />} onClick={openAddPanel}>\n Add Panel\n </Button>\n <TimeRangeControls />\n <DownloadButton />\n </Stack>\n </Box>\n </Stack>\n ) : (\n <Stack spacing={1} padding={2}>\n <Box sx={{ display: 'flex', width: '100%' }}>\n {dashboardTitle}\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\">\n <TimeRangeControls />\n <DownloadButton />\n {isLaptopSize && (\n <Button\n variant=\"outlined\"\n startIcon={<PencilIcon />}\n onClick={onEditButtonClick}\n sx={{ marginLeft: 'auto' }}\n >\n Edit\n </Button>\n )}\n </Stack>\n </Box>\n <Box paddingY={2}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <TemplateVariableList\n initialVariableIsSticky={initialVariableIsSticky}\n sx={{\n backgroundColor: ({ palette }) =>\n palette.mode === 'dark' ? palette.background.default : palette.background.paper,\n }}\n />\n </ErrorBoundary>\n </Box>\n </Stack>\n )}\n </>\n );\n};\n"],"names":["Typography","Stack","Button","Box","useTheme","useMediaQuery","Alert","PencilIcon","AddPanelGroupIcon","AddPanelIcon","ErrorBoundary","ErrorAlert","useState","useDashboard","useDashboardActions","useEditMode","TemplateVariableList","TimeRangeControls","DownloadButton","DashboardToolbar","props","dashboardName","dashboardTitleComponent","initialVariableIsSticky","isReadonly","onEditButtonClick","onCancelButtonClick","onSave","isEditMode","setEditMode","isSavingDashboard","setSavingDashboard","dashboard","openAddPanelGroup","openAddPanel","isLaptopSize","breakpoints","up","dashboardTitle","variant","onSaveButtonClick","undefined","then","catch","spacing","p","display","sx","backgroundColor","theme","palette","primary","main","direction","marginLeft","severity","padding","onClick","disabled","width","alignItems","FallbackComponent","mode","background","default","paper","whiteSpace","startIcon","paddingY"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,KAAK,QAAQ,eAAe,CAAC;AAC/F,OAAOC,UAAU,MAAM,+BAA+B,CAAC;AACvD,OAAOC,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAOC,YAAY,MAAM,qCAAqC,CAAC;AAC/D,SAASC,aAAa,EAAEC,UAAU,QAAQ,wBAAwB,CAAC;AAEnE,SAASC,QAAQ,QAAQ,OAAO,CAAC;AACjC,SAASC,YAAY,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,eAAe,CAAC;AAC/E,SAASC,oBAAoB,QAAQ,cAAc,CAAC;AACpD,SAASC,iBAAiB,QAAQ,sBAAsB,CAAC;AACzD,SAASC,cAAc,QAAQ,mBAAmB,CAAC;AAYnD,OAAO,MAAMC,gBAAgB,GAAG,CAACC,KAA4B,GAAK;IAChE,MAAM,EACJC,aAAa,CAAA,EACbC,uBAAuB,CAAA,EACvBC,uBAAuB,CAAA,EACvBC,UAAU,CAAA,EACVC,iBAAiB,CAAA,EACjBC,mBAAmB,CAAA,EACnBC,MAAM,CAAA,IACP,GAAGP,KAAK,AAA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,OAAO,CAACa,UAAU,CAACC,OAAO,GAAGd,OAAO,CAACa,UAAU,CAACE,KAAK;6BAClF;0BACD;sBACY;kBACZ;;UACA,AACT;MACA,CACH;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DashboardToolbar/DashboardToolbar.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 { useState } from 'react';\nimport { Typography, Stack, Button, Box, useTheme, useMediaQuery, Alert } from '@mui/material';\nimport PencilIcon from 'mdi-material-ui/PencilOutline';\nimport { ErrorBoundary, ErrorAlert } from '@perses-dev/components';\nimport { DashboardResource } from '@perses-dev/core';\nimport { useDashboard, useEditMode } from '../../context';\nimport { AddPanelButton } from '../AddPanelButton';\nimport { AddGroupButton } from '../AddGroupButton';\nimport { DownloadButton } from '../DownloadButton';\nimport { TimeRangeControls } from '../TimeRangeControls';\nimport { TemplateVariableList, EditVariablesButton } from '../Variables';\n\nexport interface DashboardToolbarProps {\n dashboardName: string;\n dashboardTitleComponent?: JSX.Element;\n initialVariableIsSticky?: boolean;\n isReadonly: boolean;\n onEditButtonClick: () => void;\n onCancelButtonClick: () => void;\n onSave?: (entity: DashboardResource) => Promise<DashboardResource>;\n}\n\nexport const DashboardToolbar = (props: DashboardToolbarProps) => {\n const {\n dashboardName,\n dashboardTitleComponent,\n initialVariableIsSticky,\n isReadonly,\n onEditButtonClick,\n onCancelButtonClick,\n onSave,\n } = props;\n\n const dashboard = useDashboard();\n const { isEditMode, setEditMode } = useEditMode();\n\n const isBiggerThanMd = useMediaQuery(useTheme().breakpoints.up('md'));\n const isBiggerThanSm = useMediaQuery(useTheme().breakpoints.up('sm'));\n\n const [isSavingDashboard, setSavingDashboard] = useState<boolean>(false);\n\n const dashboardTitle = dashboardTitleComponent ? (\n dashboardTitleComponent\n ) : (\n <Typography variant=\"h2\">{dashboardName}</Typography>\n );\n\n const onSaveButtonClick = () => {\n if (onSave !== undefined) {\n setSavingDashboard(true);\n onSave(dashboard.dashboard)\n .then(() => {\n setSavingDashboard(false);\n setEditMode(false);\n })\n .catch(() => {\n setSavingDashboard(false);\n });\n } else {\n setEditMode(false);\n }\n };\n\n return (\n <>\n {isEditMode ? (\n <Stack spacing={1}>\n <Box p={2} display=\"flex\" sx={{ backgroundColor: (theme) => theme.palette.primary.main + '30' }}>\n {dashboardTitle}\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\">\n {isReadonly && (\n <Alert severity={'warning'} sx={{ backgroundColor: 'transparent', padding: 0 }}>\n Dashboard managed via code only. Download JSON and commit changes to save.\n </Alert>\n )}\n <Button variant=\"contained\" onClick={onSaveButtonClick} disabled={isReadonly || isSavingDashboard}>\n Save\n </Button>\n <Button variant=\"outlined\" onClick={onCancelButtonClick}>\n Cancel\n </Button>\n </Stack>\n </Box>\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n alignItems: 'start',\n padding: (theme) => theme.spacing(1, 2, 2, 2),\n }}\n >\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <TemplateVariableList\n initialVariableIsSticky={initialVariableIsSticky}\n sx={{\n backgroundColor: ({ palette }) =>\n palette.mode === 'dark' ? palette.background.default : palette.background.paper,\n }}\n />\n </ErrorBoundary>\n {isBiggerThanMd ? (\n // On bigger screens, make it one row\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\" sx={{ whiteSpace: 'nowrap' }}>\n <EditVariablesButton />\n <AddPanelButton />\n <AddGroupButton />\n <TimeRangeControls />\n <DownloadButton />\n </Stack>\n ) : (\n // On smaller screens, make it two rows\n <Stack spacing={1}>\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\" sx={{ whiteSpace: 'nowrap' }}>\n <TimeRangeControls />\n <DownloadButton />\n </Stack>\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\" sx={{ whiteSpace: 'nowrap' }}>\n <EditVariablesButton />\n <AddPanelButton />\n <AddGroupButton />\n </Stack>\n </Stack>\n )}\n </Box>\n </Stack>\n ) : (\n <Stack spacing={1} padding={2}>\n <Box sx={{ display: 'flex', width: '100%' }}>\n {dashboardTitle}\n <Stack direction=\"row\" spacing={1} marginLeft=\"auto\">\n <TimeRangeControls />\n <DownloadButton />\n {isBiggerThanSm && (\n <Button\n variant=\"outlined\"\n color=\"secondary\"\n startIcon={<PencilIcon />}\n onClick={onEditButtonClick}\n sx={{ marginLeft: 'auto' }}\n >\n Edit\n </Button>\n )}\n </Stack>\n </Box>\n <Box paddingY={2}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <TemplateVariableList\n initialVariableIsSticky={initialVariableIsSticky}\n sx={{\n backgroundColor: ({ palette }) =>\n palette.mode === 'dark' ? palette.background.default : palette.background.paper,\n }}\n />\n </ErrorBoundary>\n </Box>\n </Stack>\n )}\n </>\n );\n};\n"],"names":["useState","Typography","Stack","Button","Box","useTheme","useMediaQuery","Alert","PencilIcon","ErrorBoundary","ErrorAlert","useDashboard","useEditMode","AddPanelButton","AddGroupButton","DownloadButton","TimeRangeControls","TemplateVariableList","EditVariablesButton","DashboardToolbar","props","dashboardName","dashboardTitleComponent","initialVariableIsSticky","isReadonly","onEditButtonClick","onCancelButtonClick","onSave","dashboard","isEditMode","setEditMode","isBiggerThanMd","breakpoints","up","isBiggerThanSm","isSavingDashboard","setSavingDashboard","dashboardTitle","variant","onSaveButtonClick","undefined","then","catch","spacing","p","display","sx","backgroundColor","theme","palette","primary","main","direction","marginLeft","severity","padding","onClick","disabled","width","alignItems","FallbackComponent","mode","background","default","paper","whiteSpace","color","startIcon","paddingY"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,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4BAChDuB,EAAE,EAAE;gCACFC,eAAe,EAAE,CAAC,EAAEE,OAAO,CAAA,EAAE,GAC3BA,OAAO,CAACY,IAAI,KAAK,MAAM,GAAGZ,OAAO,CAACa,UAAU,CAACC,OAAO,GAAGd,OAAO,CAACa,UAAU,CAACE,KAAK;6BAClF;0BACD;sBACY;kBACZ;;UACA,AACT;MACA,CACH;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DashboardToolbar/index.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DashboardToolbar/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 './DashboardToolbar';\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,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DeletePanelDialog/DeletePanelDialog.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DeletePanelDialog/DeletePanelDialog.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 { FormEvent } from 'react';\nimport { IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { useDeletePanelDialog, DeletePanelDialogState } from '../../context';\n\nexport const DeletePanelDialog = () => {\n const { deletePanelDialog, closeDeletePanelDialog } = useDeletePanelDialog();\n\n return (\n <Dialog open={deletePanelDialog !== undefined}>\n <DialogTitle>Delete Panel</DialogTitle>\n <IconButton\n aria-label=\"Close\"\n onClick={() => closeDeletePanelDialog()}\n sx={(theme) => ({\n position: 'absolute',\n top: theme.spacing(0.5),\n right: theme.spacing(0.5),\n })}\n >\n <CloseIcon />\n </IconButton>\n {deletePanelDialog && <DeletePanelForm deletePanelDialog={deletePanelDialog} />}\n </Dialog>\n );\n};\n\ninterface DeletePanelFormProps {\n deletePanelDialog: DeletePanelDialogState;\n}\n\nconst DeletePanelForm = ({ deletePanelDialog }: DeletePanelFormProps) => {\n const { deletePanel, closeDeletePanelDialog } = useDeletePanelDialog();\n\n const handleDelete = (e: FormEvent) => {\n e.preventDefault();\n const { panelGroupItemId } = deletePanelDialog;\n deletePanel(panelGroupItemId);\n closeDeletePanelDialog();\n };\n return (\n <form onSubmit={handleDelete}>\n <DialogContent dividers sx={{ width: '500px' }}>\n Are you sure you want to delete {deletePanelDialog.panelName} from {deletePanelDialog.panelGroupName}? This\n action cannot be undone.\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" type=\"submit\">\n Delete\n </Button>\n <Button variant=\"outlined\" onClick={() => closeDeletePanelDialog()}>\n Cancel\n </Button>\n </DialogActions>\n </form>\n );\n};\n"],"names":["IconButton","Dialog","DialogTitle","DialogContent","DialogActions","Button","CloseIcon","useDeletePanelDialog","DeletePanelDialog","deletePanelDialog","closeDeletePanelDialog","open","undefined","aria-label","onClick","sx","theme","position","top","spacing","right","DeletePanelForm","deletePanel","handleDelete","e","preventDefault","panelGroupItemId","form","onSubmit","dividers","width","panelName","panelGroupName","variant","type"],"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;AACA,SAASA,UAAU,EAAEC,MAAM,EAAEC,WAAW,EAAEC,aAAa,EAAEC,aAAa,EAAEC,MAAM,QAAQ,eAAe,CAAC;AACtG,OAAOC,SAAS,MAAM,uBAAuB,CAAC;AAC9C,SAASC,oBAAoB,QAAgC,eAAe,CAAC;AAE7E,OAAO,MAAMC,iBAAiB,GAAG,IAAM;IACrC,MAAM,EAAEC,iBAAiB,CAAA,EAAEC,sBAAsB,CAAA,EAAE,GAAGH,oBAAoB,EAAE,AAAC;IAE7E,qBACE,MAACN,MAAM;QAACU,IAAI,EAAEF,iBAAiB,KAAKG,SAAS;;0BAC3C,KAACV,WAAW;0BAAC,cAAY;cAAc;0BACvC,KAACF,UAAU;gBACTa,YAAU,EAAC,OAAO;gBAClBC,OAAO,EAAE,IAAMJ,sBAAsB,EAAE;gBACvCK,EAAE,EAAE,CAACC,KAAK,GAAM,CAAA;wBACdC,QAAQ,EAAE,UAAU;wBACpBC,GAAG,EAAEF,KAAK,CAACG,OAAO,CAAC,GAAG,CAAC;wBACvBC,KAAK,EAAEJ,KAAK,CAACG,OAAO,CAAC,GAAG,CAAC;qBAC1B,CAAA,AAAC;0BAEF,cAAA,KAACb,SAAS,KAAG;cACF;YACZG,iBAAiB,kBAAI,KAACY,eAAe;gBAACZ,iBAAiB,EAAEA,iBAAiB;cAAI;;MACxE,CACT;AACJ,CAAC,CAAC;AAMF,MAAMY,eAAe,GAAG,CAAC,EAAEZ,iBAAiB,CAAA,EAAwB,GAAK;IACvE,MAAM,EAAEa,WAAW,CAAA,EAAEZ,sBAAsB,CAAA,EAAE,GAAGH,oBAAoB,EAAE,AAAC;IAEvE,MAAMgB,YAAY,GAAG,CAACC,CAAY,GAAK;QACrCA,CAAC,CAACC,cAAc,EAAE,CAAC;QACnB,MAAM,EAAEC,gBAAgB,CAAA,EAAE,GAAGjB,iBAAiB,AAAC;QAC/Ca,WAAW,CAACI,gBAAgB,CAAC,CAAC;QAC9BhB,sBAAsB,EAAE,CAAC;IAC3B,CAAC,AAAC;IACF,qBACE,MAACiB,MAAI;QAACC,QAAQ,EAAEL,YAAY;;0BAC1B,MAACpB,aAAa;gBAAC0B,QAAQ;gBAACd,EAAE,EAAE;oBAAEe,KAAK,EAAE,OAAO;iBAAE;;oBAAE,kCACd;oBAACrB,iBAAiB,CAACsB,SAAS;oBAAC,QAAM;oBAACtB,iBAAiB,CAACuB,cAAc;oBAAC,iCAEvG;;cAAgB;0BAChB,MAAC5B,aAAa;;kCACZ,KAACC,MAAM;wBAAC4B,OAAO,EAAC,WAAW;wBAACC,IAAI,EAAC,QAAQ;kCAAC,QAE1C;sBAAS;kCACT,KAAC7B,MAAM;wBAAC4B,OAAO,EAAC,UAAU;wBAACnB,OAAO,EAAE,IAAMJ,sBAAsB,EAAE;kCAAE,QAEpE;sBAAS;;cACK;;MACX,CACP;AACJ,CAAC,AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DeletePanelDialog/index.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DeletePanelDialog/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 './DeletePanelDialog';\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,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DeletePanelGroupDialog/DeletePanelGroupDialog.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DeletePanelGroupDialog/DeletePanelGroupDialog.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 { FormEvent } from 'react';\nimport { IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { useDeletePanelGroupDialog } from '../../context';\n\nexport const DeletePanelGroupDialog = () => {\n const { deletePanelGroupDialog, closeDeletePanelGroupDialog, deletePanelGroup } = useDeletePanelGroupDialog();\n\n const panelGroupId = deletePanelGroupDialog?.panelGroupId;\n\n const handleDelete = (e: FormEvent) => {\n e.preventDefault();\n if (panelGroupId == undefined) {\n throw new Error('group index is undefined');\n }\n deletePanelGroup(panelGroupId);\n closeDeletePanelGroupDialog();\n };\n\n return (\n <Dialog open={deletePanelGroupDialog !== undefined}>\n <DialogTitle>Delete Panel Group</DialogTitle>\n <IconButton\n aria-label=\"Close\"\n onClick={() => closeDeletePanelGroupDialog()}\n sx={(theme) => ({\n position: 'absolute',\n top: theme.spacing(0.5),\n right: theme.spacing(0.5),\n })}\n >\n <CloseIcon />\n </IconButton>\n <form onSubmit={handleDelete}>\n <DialogContent dividers sx={{ width: '500px' }}>\n Are you sure you want to delete {deletePanelGroupDialog?.panelGroupName ?? 'panel group'}? This will delete\n all the panels within the group.\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" type=\"submit\">\n Delete\n </Button>\n <Button variant=\"outlined\" onClick={() => closeDeletePanelGroupDialog()}>\n Cancel\n </Button>\n </DialogActions>\n </form>\n </Dialog>\n );\n};\n"],"names":["IconButton","Dialog","DialogTitle","DialogContent","DialogActions","Button","CloseIcon","useDeletePanelGroupDialog","DeletePanelGroupDialog","deletePanelGroupDialog","closeDeletePanelGroupDialog","deletePanelGroup","panelGroupId","handleDelete","e","preventDefault","undefined","Error","open","aria-label","onClick","sx","theme","position","top","spacing","right","form","onSubmit","dividers","width","panelGroupName","variant","type"],"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;AACA,SAASA,UAAU,EAAEC,MAAM,EAAEC,WAAW,EAAEC,aAAa,EAAEC,aAAa,EAAEC,MAAM,QAAQ,eAAe,CAAC;AACtG,OAAOC,SAAS,MAAM,uBAAuB,CAAC;AAC9C,SAASC,yBAAyB,QAAQ,eAAe,CAAC;AAE1D,OAAO,MAAMC,sBAAsB,GAAG,IAAM;IAC1C,MAAM,EAAEC,sBAAsB,CAAA,EAAEC,2BAA2B,CAAA,EAAEC,gBAAgB,CAAA,EAAE,GAAGJ,yBAAyB,EAAE,AAAC;IAE9G,MAAMK,YAAY,GAAGH,sBAAsB,aAAtBA,sBAAsB,WAAc,GAApCA,KAAAA,CA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,KAAC5B,MAAM;gCAAC2B,OAAO,EAAC,UAAU;gCAACZ,OAAO,EAAE,IAAMV,2BAA2B,EAAE;0CAAE,QAEzE;8BAAS;;sBACK;;cACX;;MACA,CACT;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DeletePanelGroupDialog/index.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DeletePanelGroupDialog/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 './DeletePanelGroupDialog';\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,0BAA0B,CAAC"}
|
package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.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 { IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { useDiscardChangesConfirmationDialog } from '../../context';\n\nexport const DiscardChangesConfirmationDialog = () => {\n const { discardChangesConfirmationDialog: dialog } = useDiscardChangesConfirmationDialog();\n const isOpen = dialog !== undefined;\n\n return (\n <Dialog open={isOpen}>\n {dialog !== undefined && (\n <>\n <DialogTitle>Discard Changes</DialogTitle>\n <IconButton\n aria-label=\"Close\"\n onClick={dialog.onCancel}\n sx={(theme) => ({\n position: 'absolute',\n top: theme.spacing(0.5),\n right: theme.spacing(0.5),\n })}\n >\n <CloseIcon />\n </IconButton>\n <DialogContent dividers sx={{ width: '500px' }}>\n {dialog.description ||\n 'You have unsaved changes in this dashboard. Are you sure you want to discard these changes? Changes cannot be recovered.'}\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={dialog.onDiscardChanges}>\n Discard Changes\n </Button>\n <Button variant=\"outlined\" onClick={dialog.onCancel}>\n Cancel\n </Button>\n </DialogActions>\n </>\n )}\n </Dialog>\n );\n};\n"],"names":["IconButton","Dialog","DialogTitle","DialogContent","DialogActions","Button","CloseIcon","useDiscardChangesConfirmationDialog","DiscardChangesConfirmationDialog","discardChangesConfirmationDialog","dialog","isOpen","undefined","open","aria-label","onClick","onCancel","sx","theme","position","top","spacing","right","dividers","width","description","variant","onDiscardChanges"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,UAAU,EAAEC,MAAM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|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DiscardChangesConfirmationDialog/index.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DiscardChangesConfirmationDialog/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 './DiscardChangesConfirmationDialog';\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,oCAAoC,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
interface DownloadButtonProps {
|
|
3
|
+
heightPx?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function DownloadButton({ heightPx }: DownloadButtonProps): JSX.Element;
|
|
6
|
+
export {};
|
|
3
7
|
//# sourceMappingURL=DownloadButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadButton.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadButton/DownloadButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DownloadButton.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadButton/DownloadButton.tsx"],"names":[],"mappings":";AAoBA,UAAU,mBAAmB;IAE3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,eAiC/D"}
|