diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2016-10-14 13:15:29 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2016-11-16 11:57:51 +0000 |
commit | 2c0f97cd1e99abdf7c80e2c79ed55b321bf5fb7b (patch) | |
tree | be84794b07faff24161f0803b01708abbf3c170d | |
parent | 235213dc68b7eeec8527347f7bc304d7765b4ff0 (diff) | |
download | gitlab-ce-2c0f97cd1e99abdf7c80e2c79ed55b321bf5fb7b.tar.gz |
Includes page specific JS
-rw-r--r-- | app/helpers/environments_helper.rb | 7 | ||||
-rw-r--r-- | app/views/projects/environments/index.html.haml | 7 | ||||
-rw-r--r-- | config/application.rb | 1 |
3 files changed, 13 insertions, 2 deletions
diff --git a/app/helpers/environments_helper.rb b/app/helpers/environments_helper.rb new file mode 100644 index 00000000000..d9a3106f706 --- /dev/null +++ b/app/helpers/environments_helper.rb @@ -0,0 +1,7 @@ +module EnvironmentsHelper + def environments_list_data + { + endpoint: namespace_project_environments_path(@project.namespace, @project) + } + end +end
\ No newline at end of file diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 8f555afcf11..a2526209df2 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -2,6 +2,9 @@ - page_title "Environments" = render "projects/pipelines/head" +- content_for :page_specific_javascripts do + = page_specific_javascript_tag('environments/environments_bundle.js') + %div{ class: container_class } .top-area %ul.nav-links @@ -22,7 +25,7 @@ = link_to new_namespace_project_environment_path(@project.namespace, @project), class: 'btn btn-create' do New environment - .environments-container + .environments-container#environments-list-view{ "v-cloak" => true, data: environments_list_data } - if @all_environments.blank? .blank-state.blank-state-no-icon %h2.blank-state-title @@ -45,4 +48,4 @@ %th Commit %th %th.hidden-xs - = render @environments + / = render @environments diff --git a/config/application.rb b/config/application.rb index 946b632b0e8..fb84870dfbd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -94,6 +94,7 @@ module Gitlab config.assets.precompile << "cycle_analytics/cycle_analytics_bundle.js" config.assets.precompile << "merge_conflicts/merge_conflicts_bundle.js" config.assets.precompile << "boards/test_utils/simulate_drag.js" + config.assets.precompile << "environments/environments_bundle.js" config.assets.precompile << "blob_edit/blob_edit_bundle.js" config.assets.precompile << "snippet/snippet_bundle.js" config.assets.precompile << "lib/utils/*.js" |