mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudMigrations: only append notification policy if feature flag is on and it exists (#94896)
This commit is contained in:
parent
ccedc41c57
commit
8673c757a5
@ -167,6 +167,7 @@ func (s *Service) getMigrationDataJSON(ctx context.Context, signedInUser *user.S
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.features.IsEnabledGlobally(featuremgmt.FlagOnPremToCloudMigrationsAlerts) && len(notificationPolicies.Name) > 0 {
|
||||||
// Notification Policy can only be managed by updating its entire tree, so we send the whole thing as one item.
|
// Notification Policy can only be managed by updating its entire tree, so we send the whole thing as one item.
|
||||||
migrationDataSlice = append(migrationDataSlice, cloudmigration.MigrateDataRequestItem{
|
migrationDataSlice = append(migrationDataSlice, cloudmigration.MigrateDataRequestItem{
|
||||||
Type: cloudmigration.NotificationPolicyType,
|
Type: cloudmigration.NotificationPolicyType,
|
||||||
@ -174,6 +175,7 @@ func (s *Service) getMigrationDataJSON(ctx context.Context, signedInUser *user.S
|
|||||||
Name: notificationPolicies.Name,
|
Name: notificationPolicies.Name,
|
||||||
Data: notificationPolicies.Routes,
|
Data: notificationPolicies.Routes,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Obtain the names of parent elements for Dashboard and Folders data types
|
// Obtain the names of parent elements for Dashboard and Folders data types
|
||||||
parentNamesByType, err := s.getParentNames(ctx, signedInUser, dashs, folders, libraryElements)
|
parentNamesByType, err := s.getParentNames(ctx, signedInUser, dashs, folders, libraryElements)
|
||||||
|
Loading…
Reference in New Issue
Block a user