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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-31 21:09:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-31 21:09:11 +0300
commit0434f38ef1dce4fe640fe1e4542235746ceb943c (patch)
tree3affe5902c9da74441dfbf5069f76c023b5cd03a /app/views/projects
parentc27acb1d376f7127cd33eadcc8f5683ed55262bc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/pipelines/charts.html.haml3
-rw-r--r--app/views/projects/pipelines/charts/_overall.haml6
-rw-r--r--app/views/projects/pipelines/charts/_pipeline_statistics.haml14
-rw-r--r--app/views/projects/pipelines/charts/_pipeline_times.haml8
-rw-r--r--app/views/projects/snippets/index.html.haml7
5 files changed, 6 insertions, 32 deletions
diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml
index c9a50b97fea..9542f8c9766 100644
--- a/app/views/projects/pipelines/charts.html.haml
+++ b/app/views/projects/pipelines/charts.html.haml
@@ -1,6 +1,7 @@
- page_title _('CI / CD Charts')
+#js-project-pipelines-charts-app{ data: { counts: @counts, success_ratio: success_ratio(@counts), times_chart: { labels: @charts[:pipeline_times].labels, values: @charts[:pipeline_times].pipeline_times } } }
+
#charts.ci-charts
- = render 'projects/pipelines/charts/overall'
%hr
= render 'projects/pipelines/charts/pipelines'
diff --git a/app/views/projects/pipelines/charts/_overall.haml b/app/views/projects/pipelines/charts/_overall.haml
deleted file mode 100644
index 651f9217455..00000000000
--- a/app/views/projects/pipelines/charts/_overall.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%h4.mt-4.mb-4= s_("PipelineCharts|Overall statistics")
-.row
- .col-md-6
- = render 'projects/pipelines/charts/pipeline_statistics'
- .col-md-6
- = render 'projects/pipelines/charts/pipeline_times'
diff --git a/app/views/projects/pipelines/charts/_pipeline_statistics.haml b/app/views/projects/pipelines/charts/_pipeline_statistics.haml
deleted file mode 100644
index b323e290ed4..00000000000
--- a/app/views/projects/pipelines/charts/_pipeline_statistics.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-%ul
- %li
- = s_("PipelineCharts|Total:")
- %strong= n_("1 pipeline", "%d pipelines", @counts[:total]) % @counts[:total]
- %li
- = s_("PipelineCharts|Successful:")
- %strong= n_("1 pipeline", "%d pipelines", @counts[:success]) % @counts[:success]
- %li
- = s_("PipelineCharts|Failed:")
- %strong= n_("1 pipeline", "%d pipelines", @counts[:failed]) % @counts[:failed]
- %li
- = s_("PipelineCharts|Success ratio:")
- %strong
- #{success_ratio(@counts)}%
diff --git a/app/views/projects/pipelines/charts/_pipeline_times.haml b/app/views/projects/pipelines/charts/_pipeline_times.haml
deleted file mode 100644
index c0ac79ed5f8..00000000000
--- a/app/views/projects/pipelines/charts/_pipeline_times.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-%p.light
- = _("Commit duration in minutes for last 30 commits")
-
-%div
- %canvas#build_timesChart{ height: 200 }
-
--# haml-lint:disable InlineJavaScript
-%script#pipelinesTimesChartsData{ type: "application/json" }= { :labels => @charts[:pipeline_times].labels, :values => @charts[:pipeline_times].pipeline_times }.to_json.html_safe
diff --git a/app/views/projects/snippets/index.html.haml b/app/views/projects/snippets/index.html.haml
index 65462647419..ed56cc8289c 100644
--- a/app/views/projects/snippets/index.html.haml
+++ b/app/views/projects/snippets/index.html.haml
@@ -1,4 +1,5 @@
- page_title _("Snippets")
+- new_project_snippet_link = new_project_snippet_path(@project) if can?(current_user, :create_snippet, @project)
- if @snippets.exists?
- if current_user
@@ -6,10 +7,10 @@
- include_private = @project.team.member?(current_user) || current_user.admin?
= render partial: 'snippets/snippets_scope_menu', locals: { subject: @project, include_private: include_private }
- - if can?(current_user, :create_snippet, @project)
+ - if new_project_snippet_link.present?
.nav-controls
- = link_to _("New snippet"), new_project_snippet_path(@project), class: "btn btn-success", title: _("New snippet")
+ = link_to _("New snippet"), new_project_snippet_link, class: "btn btn-success", title: _("New snippet")
= render 'shared/snippets/list'
- else
- = render 'shared/empty_states/snippets', button_path: new_namespace_project_snippet_path(@project.namespace, @project)
+ = render 'shared/empty_states/snippets', button_path: new_project_snippet_link