fix(ui): fix metrics table width, fix reload pathing
This commit is contained in:
parent
25f792edc2
commit
c1af05fbbe
2 changed files with 2 additions and 3 deletions
|
|
@ -12,7 +12,6 @@ function NewDashboard(props: RouteComponentProps<{}>) {
|
|||
const { history, match: { params: { siteId, dashboardId, metricId } } } = props;
|
||||
const { dashboardStore } = useStore();
|
||||
const loading = useObserver(() => dashboardStore.isLoading);
|
||||
const dashboardsNumber = useObserver(() => dashboardStore.dashboards.length);
|
||||
const isMetricDetails = history.location.pathname.includes('/metrics/') || history.location.pathname.includes('/metric/');
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -21,7 +20,7 @@ function NewDashboard(props: RouteComponentProps<{}>) {
|
|||
dashboardStore.selectDashboardById(dashboardId);
|
||||
}
|
||||
});
|
||||
if (!dashboardId) {
|
||||
if (!dashboardId && location.pathname.includes('dashboard')) {
|
||||
dashboardStore.selectDefaultDashboard().then(({ dashboardId }) => {
|
||||
props.history.push(withSiteId(`/dashboard/${dashboardId}`, siteId));
|
||||
}, () => {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function MetricsView(props: Props) {
|
|||
metricStore.fetchList();
|
||||
}, []);
|
||||
return useObserver(() => (
|
||||
<div>
|
||||
<div style={{ maxWidth: 1300 }}>
|
||||
<div className="flex items-center mb-4 justify-between">
|
||||
<div className="flex items-baseline mr-3">
|
||||
<PageTitle title="Metrics" className="" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue