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:
authorTim Zallmann <tzallmann@gitlab.com>2017-07-25 13:12:30 +0300
committerTim Zallmann <tzallmann@gitlab.com>2017-07-27 16:03:04 +0300
commit84a3ab25fe9dd9002c8c47976d7f17fc2a897071 (patch)
tree19e195829b8d7ece2b452df1c58e8e0ce08705b3 /app/views/projects/pipelines
parent395e34bd0fd32e6f8d8145f14d71ea3c1350b46f (diff)
Moved Inline JS for Pipelines Charts + new Pipeline to dispatcher
Diffstat (limited to 'app/views/projects/pipelines')
-rw-r--r--app/views/projects/pipelines/charts/_pipeline_times.haml5
-rw-r--r--app/views/projects/pipelines/new.html.haml5
2 files changed, 6 insertions, 4 deletions
diff --git a/app/views/projects/pipelines/charts/_pipeline_times.haml b/app/views/projects/pipelines/charts/_pipeline_times.haml
index 1292f580a81..55477a922e7 100644
--- a/app/views/projects/pipelines/charts/_pipeline_times.haml
+++ b/app/views/projects/pipelines/charts/_pipeline_times.haml
@@ -1,9 +1,14 @@
+- content_for :page_specific_javascripts do
+ = webpack_bundle_tag('pipelines_times')
+
%div
%p.light
= _("Commit duration in minutes for last 30 commits")
%canvas#build_timesChart{ height: 200 }
+%script#pipelinesTimesChartsData{ type: "application/json" }= { :labels => @charts[:pipeline_times].labels, :values => @charts[:pipeline_times].pipeline_times }.to_json.html_safe
+
:javascript
var data = {
labels : #{@charts[:pipeline_times].labels.to_json},
diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml
index c966df62856..4ad37d0e882 100644
--- a/app/views/projects/pipelines/new.html.haml
+++ b/app/views/projects/pipelines/new.html.haml
@@ -20,7 +20,4 @@
= f.submit 'Create pipeline', class: 'btn btn-create', tabindex: 3
= link_to 'Cancel', project_pipelines_path(@project), class: 'btn btn-cancel'
-:javascript
- var availableRefs = #{@project.repository.ref_names.to_json};
-
- new NewBranchForm($('.js-new-pipeline-form'), availableRefs)
+%script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe