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
path: root/app/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 18:09:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 18:09:50 +0300
commitde2fb5b82c92c90f90ed67ced45143c04e934fb8 (patch)
treeff8e5e642580de7bb596d90dd0e7f739f44ca540 /app/views
parentc6a33b298229f9e04933be43d6176c476ef03012 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r--app/views/clusters/clusters/show.html.haml11
-rw-r--r--app/views/projects/services/prometheus/_custom_metrics.html.haml30
-rw-r--r--app/views/projects/services/prometheus/_metrics.html.haml2
3 files changed, 38 insertions, 5 deletions
diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml
index 8797178f920..7fc76880480 100644
--- a/app/views/clusters/clusters/show.html.haml
+++ b/app/views/clusters/clusters/show.html.haml
@@ -41,7 +41,12 @@
.js-serverless-survey-banner{ data: { user_name: current_user.name, user_email: current_user.email } }
- %h4= @cluster.name
+ .d-flex.my-3
+ %p.badge.badge-light.p-2.mr-2
+ = cluster_type_label(@cluster.cluster_type)
+ %h4.m-0
+ = @cluster.name
+
= render 'banner'
- if cluster_created?(@cluster)
@@ -56,7 +61,3 @@
.tab-content.py-3
.tab-pane.active{ role: 'tabpanel' }
= render_cluster_info_tab_content(params[:tab], expanded_by_default?)
-
-
-
-
diff --git a/app/views/projects/services/prometheus/_custom_metrics.html.haml b/app/views/projects/services/prometheus/_custom_metrics.html.haml
new file mode 100644
index 00000000000..21f9d1125e0
--- /dev/null
+++ b/app/views/projects/services/prometheus/_custom_metrics.html.haml
@@ -0,0 +1,30 @@
+- project = local_assigns.fetch(:project)
+
+.col-lg-3
+ %p
+ = s_('PrometheusService|Custom metrics require Prometheus installed on a cluster with environment scope "*" OR a manually configured Prometheus to be available.')
+ = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus', anchor: 'adding-custom-metrics'), target: '_blank', rel: "noopener noreferrer"
+
+.col-lg-9
+ .card.custom-monitored-metrics.js-panel-custom-monitored-metrics{ data: { active_custom_metrics: project_prometheus_metrics_path(project), environments_data: environments_list_data, service_active: "#{@service.active}" } }
+ .card-header
+ %strong
+ = s_('PrometheusService|Custom metrics')
+ -# haml-lint:disable NoPlainNodes
+ %span.badge.badge-pill.js-custom-monitored-count 0
+ -# haml-lint:enable NoPlainNodes
+ = link_to s_('PrometheusService|New metric'), new_project_prometheus_metric_path(project), class: 'btn btn-success js-new-metric-button hidden'
+ .card-body
+ .flash-container.hidden
+ .flash-warning
+ .flash-text
+ .loading-metrics.js-loading-custom-metrics
+ %p.m-3
+ = icon('spinner spin', class: 'metrics-load-spinner')
+ = s_('PrometheusService|Finding custom metrics...')
+ .empty-metrics.hidden.js-empty-custom-metrics
+ %p.text-tertiary.m-3.js-no-active-integration-text.hidden
+ = s_('PrometheusService|Enable Prometheus to define custom metrics, using either option above')
+ %p.text-tertiary.m-3.js-new-metric-text.hidden
+ = s_('PrometheusService|No custom metrics have been created. Create one using the button above')
+ %ul.list-unstyled.metrics-list.hidden.js-custom-metrics-list
diff --git a/app/views/projects/services/prometheus/_metrics.html.haml b/app/views/projects/services/prometheus/_metrics.html.haml
index 7685dee08fc..3bd5f69f67e 100644
--- a/app/views/projects/services/prometheus/_metrics.html.haml
+++ b/app/views/projects/services/prometheus/_metrics.html.haml
@@ -1,5 +1,7 @@
- project = local_assigns.fetch(:project)
+= render 'projects/services/prometheus/custom_metrics', project: project
+
.col-lg-3
%p
= s_('PrometheusService|Common metrics are automatically monitored based on a library of metrics from popular exporters.')