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:
authorJacob Schatz <jschatz@gitlab.com>2016-06-16 00:11:31 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-16 03:56:33 +0300
commit386faaa735cda2101738acb09033ea1459c1bafa (patch)
tree0a0f053bbfe9dd98e7293854425a2e7d706cf005 /app/views/projects
parent15160d973f47447e12a8aea3a5714a9e748ff62f (diff)
Merge branch 'network-assets' into 'master'
Replace raphael-rails with raphael.js and split it from the rest of the JS ## What does this MR do? Removes raphael.js and its related libraries from the default JS bundle. It also removes raphael-rails because the gem is unmaintained and – for whatever reason – didn't want to cooperate with the way I was trying to require it. This brings the default (compressed and minified) application.js from 354KB after the d3 MR (!4394) down to 324KB. ## Are there points in the code the reviewer needs to double check? That tests pass and that there aren't errors on any pages (especially the Network page). ## Why was this MR needed? It's only used on the Network page and was using way too much bandwidth for just one page. ## What are the relevant issue numbers? #14372 #13165 Follow-up to !4394 and !4516. cc: @jschatz1 See merge request !4519
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/network/show.html.haml12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml
index bf9baaea889..e4ab064eda8 100644
--- a/app/views/projects/network/show.html.haml
+++ b/app/views/projects/network/show.html.haml
@@ -1,4 +1,5 @@
- page_title "Network", @ref
+- page_specific_javascripts asset_path("network/application.js")
= render "projects/commits/head"
= render "head"
%div{ class: (container_class) }
@@ -14,14 +15,5 @@
= check_box_tag :filter_ref, 1, @options[:filter_ref]
%span Begin with the selected commit
- .network-graph
+ .network-graph{ data: { url: '#{escape_javascript(@url)}', commit_url: '#{escape_javascript(@commit_url)}', ref: '#{escape_javascript(@ref)}', commit_id: '#{escape_javascript(@commit.id)}' } }
= spinner nil, true
-
-:javascript
- network_graph = new Network({
- url: "#{escape_javascript(@url)}",
- commit_url: "#{escape_javascript(@commit_url)}",
- ref: "#{escape_javascript(@ref)}",
- commit_id: '#{@commit.id}'
- })
- new ShortcutsNetwork(network_graph.branch_graph)