mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -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,13 +167,15 @@ func (s *Service) getMigrationDataJSON(ctx context.Context, signedInUser *user.S
|
||||
})
|
||||
}
|
||||
|
||||
// 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{
|
||||
Type: cloudmigration.NotificationPolicyType,
|
||||
RefID: notificationPolicies.Name, // no UID available
|
||||
Name: notificationPolicies.Name,
|
||||
Data: notificationPolicies.Routes,
|
||||
})
|
||||
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.
|
||||
migrationDataSlice = append(migrationDataSlice, cloudmigration.MigrateDataRequestItem{
|
||||
Type: cloudmigration.NotificationPolicyType,
|
||||
RefID: notificationPolicies.Name, // no UID available
|
||||
Name: notificationPolicies.Name,
|
||||
Data: notificationPolicies.Routes,
|
||||
})
|
||||
}
|
||||
|
||||
// Obtain the names of parent elements for Dashboard and Folders data types
|
||||
parentNamesByType, err := s.getParentNames(ctx, signedInUser, dashs, folders, libraryElements)
|
||||
|
Loading…
Reference in New Issue
Block a user