change(ui) - gridview - menu

This commit is contained in:
Shekar Siri 2023-02-27 16:13:27 +01:00
parent 478a8ea417
commit 8f9bafdb85
2 changed files with 5 additions and 2 deletions

View file

@ -22,6 +22,7 @@ function GridView(props: Props) {
<WidgetWrapper
key={metric.metricId}
widget={metric}
isGridView={true}
active={selectedList.includes(metric.metricId)}
isWidget={true}
onClick={() => onItemClick(parseInt(metric.metricId))}

View file

@ -28,6 +28,7 @@ interface Props {
isWidget?: boolean;
hideName?: boolean;
grid?: string;
isGridView?: boolean;
}
function WidgetWrapper(props: Props & RouteComponentProps) {
const { dashboardStore } = useStore();
@ -40,6 +41,7 @@ function WidgetWrapper(props: Props & RouteComponentProps) {
isTemplate = false,
siteId,
grid = '',
isGridView = false,
} = props;
const widget: any = props.widget;
const isTimeSeries = widget.metricType === 'timeseries';
@ -133,14 +135,14 @@ function WidgetWrapper(props: Props & RouteComponentProps) {
) : null}
{isWidget && (
<div className="flex items-center" id="no-print">
{!isPredefined && isTimeSeries && (
{!isPredefined && isTimeSeries && !isGridView && (
<>
<AlertButton seriesId={widget.series[0] && widget.series[0].seriesId} />
<div className="mx-2" />
</>
)}
{!isTemplate && (
{!isTemplate && !isGridView && (
<ItemMenu
items={[
{