diff --git a/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx b/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx index 2d4517bf0..bcf214eac 100644 --- a/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx +++ b/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx @@ -235,11 +235,19 @@ const AddCardSection = observer( ); }; return ( -
+
-
What do you want to visualize?
+
+ What do you want to visualize? +
{isSaas ? ( -
+
Ask AI
@@ -253,14 +261,25 @@ const AddCardSection = observer( />
-
- +
+
-
- -
+ +
+ }
); } diff --git a/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx b/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx index 6eac6f656..354e8a6d6 100644 --- a/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx +++ b/frontend/app/components/Dashboard/components/WidgetDatatable/WidgetDatatable.tsx @@ -66,7 +66,7 @@ function WidgetDatatable(props: Props) { avg[s] = { itemsCount: 0, total: 0 }; }); const tableCols: { - title: string; + title: React.ReactNode; dataIndex: string; key: string; sorter: any; @@ -74,7 +74,7 @@ function WidgetDatatable(props: Props) { const uniqueColArr = Array.from(columnNames); uniqueColArr.forEach((name: string, i) => { tableCols.push({ - title: name, + title: {name}, dataIndex: name, key: name, sorter: (a, b) => a[name] - b[name], diff --git a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx index ab0e36109..3cb78e8e1 100644 --- a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx +++ b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx @@ -92,7 +92,8 @@ function WidgetWrapper(props: Props & RouteComponentProps) { }; const ref: any = useRef(null); - const dragDropRef: any = dragRef(dropRef(ref)); + const dragDropRef: any = isPreview ? null : dragRef(dropRef(ref)); + const addOverlay = isTemplate || (!isPredefined && @@ -120,7 +121,7 @@ function WidgetWrapper(props: Props & RouteComponentProps) { }} ref={dragDropRef} onClick={props.onClick ? props.onClick : () => {}} - id={`widget-${widget.widgetId}`} + id={`widget-${widget.metricId}`} > {addOverlay && ( diff --git a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapperNew.tsx b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapperNew.tsx index a2205a8bb..095bd1559 100644 --- a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapperNew.tsx +++ b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapperNew.tsx @@ -109,7 +109,7 @@ function WidgetWrapperNew(props: Props & RouteComponentProps) { }} ref={dragDropRef} onClick={props.onClick ? props.onClick : () => null} - id={`widget-${widget.widgetId}`} + id={`widget-${widget.metricId}`} title={!props.hideName ? widget.name : null} extra={[