change(ui) - add metric dashboard on create based on the curre path
This commit is contained in:
parent
ddcffef3b4
commit
f6e46ab59d
1 changed files with 2 additions and 0 deletions
|
|
@ -79,6 +79,8 @@ function WidgetForm(props: Props) {
|
|||
if (wasCreating) {
|
||||
if (parseInt(dashboardId) > 0) {
|
||||
history.replace(withSiteId(dashboardMetricDetails(dashboardId, metric.metricId), siteId));
|
||||
const dashboard = dashboardStore.getDashboard(parseInt(dashboardId))
|
||||
dashboardStore.addWidgetToDashboard(dashboard, [metric.metricId])
|
||||
} else {
|
||||
history.replace(withSiteId(metricDetails(metric.metricId), siteId));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue