mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: remove comments feature (#64644)
This commit is contained in:
@@ -25,7 +25,6 @@ import { useAppNotification } from 'app/core/copy/appNotification';
|
||||
import { appEvents } from 'app/core/core';
|
||||
import { useBusEvent } from 'app/core/hooks/useBusEvent';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { DashboardCommentsModal } from 'app/features/dashboard/components/DashboardComments/DashboardCommentsModal';
|
||||
import { SaveDashboardDrawer } from 'app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer';
|
||||
import { ShareModal } from 'app/features/dashboard/components/ShareModal';
|
||||
import { playlistSrv } from 'app/features/playlist/PlaylistSrv';
|
||||
@@ -244,26 +243,6 @@ export const DashNav = React.memo<Props>((props) => {
|
||||
);
|
||||
}
|
||||
|
||||
if (dashboard.uid && config.featureToggles.dashboardComments) {
|
||||
buttons.push(
|
||||
<ModalsController key="button-dashboard-comments">
|
||||
{({ showModal, hideModal }) => (
|
||||
<DashNavButton
|
||||
tooltip={t('dashboard.toolbar.comments-show', 'Show dashboard comments')}
|
||||
icon="comment-alt-message"
|
||||
iconSize="lg"
|
||||
onClick={() => {
|
||||
showModal(DashboardCommentsModal, {
|
||||
dashboard,
|
||||
onDismiss: hideModal,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</ModalsController>
|
||||
);
|
||||
}
|
||||
|
||||
addCustomContent(customLeftActions, buttons);
|
||||
return buttons;
|
||||
};
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Modal, useStyles2 } from '@grafana/ui';
|
||||
import { CommentManager } from 'app/features/comments/CommentManager';
|
||||
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
type Props = {
|
||||
dashboard: DashboardModel;
|
||||
onDismiss: () => void;
|
||||
};
|
||||
|
||||
export const DashboardCommentsModal = ({ dashboard, onDismiss }: Props) => {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
return (
|
||||
<Modal isOpen={true} title="Dashboard comments" icon="save" onDismiss={onDismiss} className={styles.modal}>
|
||||
<CommentManager objectType={'dashboard'} objectId={dashboard.uid} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) => ({
|
||||
modal: css`
|
||||
width: 500px;
|
||||
height: 60vh;
|
||||
`,
|
||||
});
|
||||
Reference in New Issue
Block a user