diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 12:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 12:09:01 +0300 |
commit | c72e5ebe9938d315ec598197873e71a80168d40a (patch) | |
tree | 439bf5c40aaf774e5a301825af517cb52726f450 /app/views/projects/settings | |
parent | ffc43b862df32a590eae874bcbb11109b46dc8be (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/settings')
3 files changed, 44 insertions, 0 deletions
diff --git a/app/views/projects/settings/operations/_configuration_banner.html.haml b/app/views/projects/settings/operations/_configuration_banner.html.haml new file mode 100644 index 00000000000..bdbc9b7d69d --- /dev/null +++ b/app/views/projects/settings/operations/_configuration_banner.html.haml @@ -0,0 +1,24 @@ +%b + = s_('PrometheusService|Auto configuration') + +- if service.manual_configuration? + .info-well.p-2.mt-2 + = s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration below') +- else + .container-fluid + .row + - if service.prometheus_available? + .col-sm-2 + .svg-container + = image_tag 'illustrations/monitoring/getting_started.svg' + .col-sm-10 + %p.text-success.prepend-top-default + = s_('PrometheusService|Prometheus is being automatically managed on your clusters') + = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn' + - else + .col-sm-2 + = image_tag 'illustrations/monitoring/loading.svg' + .col-sm-10 + %p.prepend-top-default + = s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments') + = link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn btn-success' diff --git a/app/views/projects/settings/operations/_prometheus.html.haml b/app/views/projects/settings/operations/_prometheus.html.haml new file mode 100644 index 00000000000..3d7a6b021a8 --- /dev/null +++ b/app/views/projects/settings/operations/_prometheus.html.haml @@ -0,0 +1,19 @@ +%section.settings.no-animate.js-prometheus-settings + .settings-header + %h4 + = _('Prometheus') + %button.btn.js-settings-toggle{ type: 'button' } + = _('Expand') + %p + = _('Link Prometheus monitoring to GitLab.') + = link_to _('More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: 'noopener noreferrer' + .settings-content + - if @project + = render 'projects/settings/operations/configuration_banner', project: @project, service: service + + %b.append-bottom-default + = s_('PrometheusService|Manual configuration') + + - unless service.editable? + .info-well + = s_('PrometheusService|To enable manual configuration, uninstall Prometheus from your clusters') diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 30b914b5199..22477f315d6 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -4,6 +4,7 @@ = render 'projects/settings/operations/incidents' = render 'projects/settings/operations/error_tracking' += render 'projects/settings/operations/prometheus', service: prometheus_service if Feature.enabled?(:settings_operations_prometheus_service) = render 'projects/settings/operations/external_dashboard' = render 'projects/settings/operations/grafana_integration' = render_if_exists 'projects/settings/operations/tracing' |