diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-08 12:29:53 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-08 12:29:53 +0200 |
commit | f78fd3de5d55830c84f25cfd50d399e7ddaddf30 (patch) | |
tree | c03894b057000cc183a8e0b6b38642cc7325a00d /app | |
parent | 6eb96b2019d392d906a64108dbe83b3ce7cce758 (diff) | |
download | gitlab-ce-f78fd3de5d55830c84f25cfd50d399e7ddaddf30.tar.gz |
Fix Additional metrics filtering
+ remove test button that was leftover after a bad merge
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project_services/prometheus_service.rb | 6 | ||||
-rw-r--r-- | app/views/projects/services/_form.html.haml | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/project_services/prometheus_service.rb b/app/models/project_services/prometheus_service.rb index 1c4ae18c6ca..d81fec3514f 100644 --- a/app/models/project_services/prometheus_service.rb +++ b/app/models/project_services/prometheus_service.rb @@ -72,7 +72,11 @@ class PrometheusService < MonitoringService end def matched_metrics - additional_deployment_metrics(Gitlab::Prometheus::Queries::MatchedMetricsQuery.name, &:itself) + with_reactive_cache(Gitlab::Prometheus::Queries::MatchedMetricsQuery.name, &:itself) + end + + def with_reactive_cache(*args, &block) + yield calculate_reactive_cache(*args) end # Cache metrics for specific environment diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index cb3e1543fde..6dffc026392 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -22,7 +22,6 @@ - disabled_class = 'disabled' - disabled_title = @service.disabled_title - = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service), class: "btn #{disabled_class}", title: disabled_title = link_to 'Cancel', namespace_project_settings_integrations_path(@project.namespace, @project), class: 'btn btn-cancel' - if lookup_context.template_exists?('show', "projects/services/#{@service.to_param}", true) |