-
- { dashboard.exists() ? "Add metric(s) to dashboard" : "Create Dashboard" }
-
+
+
+
+
+
+ { dashboard.exists() ? "Add metrics to dashboard" : "Create Dashboard" }
+
+
+
+ {dashboard.exists() && }
+
-
- {dashboard.exists() && }
-
-
- { !dashboard.exists() && (
- <>
-
-
Create new dashboard by choosing from the range of predefined metrics that you care about. You can always add your custom metrics later.
- >
- )}
-
+ { !dashboard.exists() && (
+ <>
+
+
Create new dashboard by choosing from the range of predefined metrics that you care about. You can always add your custom metrics later.
+ >
+ )}
+
-
-
-
{selectedWidgetsCount} Widgets
+
+
+ {selectedWidgetsCount} Metrics
+
));
}
-export default withRouter(DashboardModal);
\ No newline at end of file
+export default withRouter(DashboardModal);
diff --git a/frontend/app/components/Dashboard/components/DashboardOptions/DashboardOptions.tsx b/frontend/app/components/Dashboard/components/DashboardOptions/DashboardOptions.tsx
index b616d2e50..08e5f88f4 100644
--- a/frontend/app/components/Dashboard/components/DashboardOptions/DashboardOptions.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardOptions/DashboardOptions.tsx
@@ -19,10 +19,10 @@ function DashboardOptions(props: Props) {
if (isEnterprise) {
menuItems.unshift({ icon: 'pdf-download', text: 'Download Report', onClick: renderReport });
}
-
+
return (
);
@@ -30,4 +30,4 @@ function DashboardOptions(props: Props) {
export default connect(state => ({
isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
-}))(DashboardOptions);
\ No newline at end of file
+}))(DashboardOptions);
diff --git a/frontend/app/components/Dashboard/components/DashboardRouter/DashboardRouter.tsx b/frontend/app/components/Dashboard/components/DashboardRouter/DashboardRouter.tsx
index 6004202a2..31e509d52 100644
--- a/frontend/app/components/Dashboard/components/DashboardRouter/DashboardRouter.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardRouter/DashboardRouter.tsx
@@ -58,4 +58,4 @@ function DashboardRouter(props: Props) {
);
}
-export default withRouter(DashboardRouter);
\ No newline at end of file
+export default withRouter(DashboardRouter);
diff --git a/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx b/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx
index 9dd64733c..7d2ca62b4 100644
--- a/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx
@@ -11,15 +11,18 @@ import DashboardModal from '../DashboardModal';
import cn from 'classnames';
import { Tooltip } from 'react-tippy';
import { connect } from 'react-redux';
+import { compose } from 'redux'
import { setShowAlerts } from 'Duck/dashboard';
+import stl from 'Shared/MainSearchBar/mainSearchBar.css';
const SHOW_COUNT = 8;
+
interface Props {
siteId: string
history: any
setShowAlerts: (show: boolean) => void
}
-function DashboardSideMenu(props: Props) {
+function DashboardSideMenu(props: RouteComponentProps
) {
const { history, siteId, setShowAlerts } = props;
const { hideModal, showModal } = useModal();
const { dashboardStore } = useStore();
@@ -40,7 +43,7 @@ function DashboardSideMenu(props: Props) {
const onAddDashboardClick = (e) => {
dashboardStore.initDashboard();
- showModal(, {})
+ showModal(, { right: true })
}
const togglePinned = (dashboard) => {
@@ -49,11 +52,24 @@ function DashboardSideMenu(props: Props) {
return useObserver(() => (
-
+
+
+ Create
+
+ }
+ />
{dashboardsPicked.sort((a: any, b: any) => a.isPinned === b.isPinned ? 0 : a.isPinned ? -1 : 1 ).map((item: any) => (
onItemClick(item)}
@@ -92,14 +108,6 @@ function DashboardSideMenu(props: Props) {
)}
-
-
-
setShowAlerts(true)}
- />
+ />
));
}
-export default connect(null, { setShowAlerts })(withRouter(DashboardSideMenu));
\ No newline at end of file
+export default compose(
+ withRouter,
+ connect(null, { setShowAlerts }),
+)(DashboardSideMenu) as React.FunctionComponent