mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 15:35:57 +08:00
Dashboard full screen should be allowed regardless of whether dashboard is locked (#4055)
This commit is contained in:
parent
fc4cdea539
commit
feaac39e2a
@ -109,39 +109,37 @@ function GraphLayout({ onAddPanelHandler }: GraphLayoutProps): JSX.Element {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!isDashboardLocked && (
|
<ButtonContainer>
|
||||||
<ButtonContainer>
|
<Button
|
||||||
|
loading={updateDashboardMutation.isLoading}
|
||||||
|
onClick={handle.enter}
|
||||||
|
icon={<FullscreenIcon size={16} />}
|
||||||
|
disabled={updateDashboardMutation.isLoading}
|
||||||
|
>
|
||||||
|
{t('dashboard:full_view')}
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
{!isDashboardLocked && saveLayoutPermission && (
|
||||||
<Button
|
<Button
|
||||||
loading={updateDashboardMutation.isLoading}
|
loading={updateDashboardMutation.isLoading}
|
||||||
onClick={handle.enter}
|
onClick={onSaveHandler}
|
||||||
icon={<FullscreenIcon size={16} />}
|
icon={<SaveFilled />}
|
||||||
disabled={updateDashboardMutation.isLoading}
|
disabled={updateDashboardMutation.isLoading}
|
||||||
>
|
>
|
||||||
{t('dashboard:full_view')}
|
{t('dashboard:save_layout')}
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
|
|
||||||
{saveLayoutPermission && (
|
{!isDashboardLocked && addPanelPermission && (
|
||||||
<Button
|
<Button
|
||||||
loading={updateDashboardMutation.isLoading}
|
onClick={onAddPanelHandler}
|
||||||
onClick={onSaveHandler}
|
icon={<PlusOutlined />}
|
||||||
icon={<SaveFilled />}
|
data-testid="add-panel"
|
||||||
disabled={updateDashboardMutation.isLoading}
|
>
|
||||||
>
|
{t('dashboard:add_panel')}
|
||||||
{t('dashboard:save_layout')}
|
</Button>
|
||||||
</Button>
|
)}
|
||||||
)}
|
</ButtonContainer>
|
||||||
|
|
||||||
{addPanelPermission && (
|
|
||||||
<Button
|
|
||||||
onClick={onAddPanelHandler}
|
|
||||||
icon={<PlusOutlined />}
|
|
||||||
data-testid="add-panel"
|
|
||||||
>
|
|
||||||
{t('dashboard:add_panel')}
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</ButtonContainer>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<FullScreen handle={handle} className="fullscreen-grid-container">
|
<FullScreen handle={handle} className="fullscreen-grid-container">
|
||||||
<ReactGridLayout
|
<ReactGridLayout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user