summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2018-03-02 16:28:27 +0000
committerJacob Schatz <jschatz@gitlab.com>2018-03-02 16:28:27 +0000
commite7d0b649ac2a9b2df14f56050da040b983af7e81 (patch)
tree348c9666d2c927da8c4f26094e4062bae82cef4d
parent9b704ef327cc0224bf09c1e8d8d27df88ab13734 (diff)
parent834f4de181c07d527b9b91d889e0c5b6da8440c4 (diff)
downloadgitlab-ce-e7d0b649ac2a9b2df14f56050da040b983af7e81.tar.gz
Merge branch 'refactor-protected-branches' into 'master'
Remove protected branches webpack bundle tag See merge request gitlab-org/gitlab-ce!17374
-rw-r--r--app/assets/javascripts/pages/projects/settings/repository/show/index.js4
-rw-r--r--app/assets/javascripts/protected_branches/index.js9
-rw-r--r--app/views/projects/protected_branches/_index.html.haml3
-rw-r--r--config/webpack.config.js1
4 files changed, 4 insertions, 13 deletions
diff --git a/app/assets/javascripts/pages/projects/settings/repository/show/index.js b/app/assets/javascripts/pages/projects/settings/repository/show/index.js
index 001128ead59..788d86d1192 100644
--- a/app/assets/javascripts/pages/projects/settings/repository/show/index.js
+++ b/app/assets/javascripts/pages/projects/settings/repository/show/index.js
@@ -4,10 +4,14 @@ import ProtectedTagCreate from '~/protected_tags/protected_tag_create';
import ProtectedTagEditList from '~/protected_tags/protected_tag_edit_list';
import initSettingsPanels from '~/settings_panels';
import initDeployKeys from '~/deploy_keys';
+import ProtectedBranchCreate from '~/protected_branches/protected_branch_create';
+import ProtectedBranchEditList from '~/protected_branches/protected_branch_edit_list';
document.addEventListener('DOMContentLoaded', () => {
new ProtectedTagCreate();
new ProtectedTagEditList();
initDeployKeys();
initSettingsPanels();
+ new ProtectedBranchCreate(); // eslint-disable-line no-new
+ new ProtectedBranchEditList(); // eslint-disable-line no-new
});
diff --git a/app/assets/javascripts/protected_branches/index.js b/app/assets/javascripts/protected_branches/index.js
deleted file mode 100644
index c9e7af127d2..00000000000
--- a/app/assets/javascripts/protected_branches/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable no-unused-vars */
-
-import ProtectedBranchCreate from './protected_branch_create';
-import ProtectedBranchEditList from './protected_branch_edit_list';
-
-$(() => {
- const protectedBranchCreate = new ProtectedBranchCreate();
- const protectedBranchEditList = new ProtectedBranchEditList();
-});
diff --git a/app/views/projects/protected_branches/_index.html.haml b/app/views/projects/protected_branches/_index.html.haml
index 127a338e413..2b0a502fe4d 100644
--- a/app/views/projects/protected_branches/_index.html.haml
+++ b/app/views/projects/protected_branches/_index.html.haml
@@ -1,6 +1,3 @@
-- content_for :page_specific_javascripts do
- = webpack_bundle_tag('protected_branches')
-
- content_for :create_protected_branch do
= render 'projects/protected_branches/create_protected_branch'
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 6d672ff00ba..32c972f4dd3 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -45,7 +45,6 @@ function generateEntries() {
const manualEntries = {
monitoring: './monitoring/monitoring_bundle.js',
mr_notes: './mr_notes/index.js',
- protected_branches: './protected_branches',
terminal: './terminal/terminal_bundle.js',
two_factor_auth: './two_factor_auth.js',