Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/metrics/dashboard/annotations/create.rb')
-rw-r--r--app/graphql/mutations/metrics/dashboard/annotations/create.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/app/graphql/mutations/metrics/dashboard/annotations/create.rb b/app/graphql/mutations/metrics/dashboard/annotations/create.rb
index 59ddffe3aad..e544b96f679 100644
--- a/app/graphql/mutations/metrics/dashboard/annotations/create.rb
+++ b/app/graphql/mutations/metrics/dashboard/annotations/create.rb
@@ -70,28 +70,8 @@ module Mutations
private
- def ready?(**args)
- raise_resource_not_available_error! if Feature.enabled?(:remove_monitor_metrics)
-
- # Raise error if both cluster_id and environment_id are present or neither is present
- unless args[:cluster_id].present? ^ args[:environment_id].present?
- raise Gitlab::Graphql::Errors::ArgumentError, ANNOTATION_SOURCE_ARGUMENT_ERROR
- end
-
- super(**args)
- end
-
- def annotation_create_params(args)
- annotation_source = AnnotationSource.new(object: annotation_source(args))
-
- args[annotation_source.type] = annotation_source.object
-
- args
- end
-
- def annotation_source(args)
- annotation_source_id = args[:cluster_id] || args[:environment_id]
- authorized_find!(id: annotation_source_id)
+ def ready?(**_args)
+ raise_resource_not_available_error!
end
end
end