Skip to content

Commit

Permalink
fix: use the envId from route in dashboards component
Browse files Browse the repository at this point in the history
  • Loading branch information
ytvnr committed Mar 20, 2024
1 parent e3256c3 commit 2ead07e
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -20,6 +20,7 @@ import { cloneDeep, every, forEach, isEqual, merge } from 'lodash';

import DashboardService from '../../../../services/dashboard.service';
import NotificationService from '../../../../services/notification.service';
import { Constants } from '../../../../entities/Constants';
const SettingsAnalyticsDashboardComponentAjs: ng.IComponentOptions = {
template: require('html-loader!./settings-analytics-dashboard.html').default, // eslint-disable-line @typescript-eslint/no-var-requires
controller: [
Expand All @@ -30,6 +31,7 @@ const SettingsAnalyticsDashboardComponentAjs: ng.IComponentOptions = {
'$mdDialog',
'$timeout',
'ngRouter',
'Constants',
function (
DashboardService: DashboardService,
NotificationService: NotificationService,
Expand All @@ -38,6 +40,7 @@ const SettingsAnalyticsDashboardComponentAjs: ng.IComponentOptions = {
$mdDialog,
$timeout,
ngRouter: Router,
constants: Constants,
) {
let previousPristine = true;
this.fields = DashboardService.getIndexedFields();
Expand Down Expand Up @@ -68,7 +71,7 @@ const SettingsAnalyticsDashboardComponentAjs: ng.IComponentOptions = {
} else {
this.dashboard = {
type: this.activatedRoute.snapshot.params.type,
reference_id: 'DEFAULT',
reference_id: constants.org.currentEnv.id,
reference_type: 'ENVIRONMENT',
enabled: true,
definition: [],
Expand Down

0 comments on commit 2ead07e

Please sign in to comment.