Commit 56d17a6d authored by Clement Ho's avatar Clement Ho

Merge branch 'master' into 'ee-refactor-protected-branches'

# Conflicts:
#   config/webpack.config.js
parents 94a407d5 9ecb7440
import initRegistryImages from '~/registry/index';
document.addEventListener('DOMContentLoaded', initRegistryImages);
...@@ -4,7 +4,7 @@ import Translate from '../vue_shared/translate'; ...@@ -4,7 +4,7 @@ import Translate from '../vue_shared/translate';
Vue.use(Translate); Vue.use(Translate);
document.addEventListener('DOMContentLoaded', () => new Vue({ export default () => new Vue({
el: '#js-vue-registry-images', el: '#js-vue-registry-images',
components: { components: {
registryApp, registryApp,
...@@ -22,4 +22,4 @@ document.addEventListener('DOMContentLoaded', () => new Vue({ ...@@ -22,4 +22,4 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
}, },
}); });
}, },
})); });
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'issues'
- if group_issues_count(state: 'all').zero? - if group_issues_count(state: 'all').zero?
= render 'shared/empty_states/issues', project_select_button: true = render 'shared/empty_states/issues', project_select_button: true
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'issues'
= content_for :meta_tags do = content_for :meta_tags do
= auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{@project.name} issues") = auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{@project.name} issues")
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
- can_update_issue = can?(current_user, :update_issue, @issue) - can_update_issue = can?(current_user, :update_issue, @issue)
- can_report_spam = @issue.submittable_as_spam_by?(current_user) - can_report_spam = @issue.submittable_as_spam_by?(current_user)
- content_for :page_specific_javascripts do
= webpack_bundle_tag('common_vue')
= webpack_bundle_tag('issuable')
.detail-page-header .detail-page-header
.detail-page-header-body .detail-page-header-body
......
...@@ -5,14 +5,8 @@ ...@@ -5,14 +5,8 @@
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests" - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
- page_description @merge_request.description - page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes - page_card_attributes @merge_request.card_attributes
- content_for :page_specific_javascripts do - if has_vue_discussions_cookie?
= webpack_bundle_tag('common_vue') - content_for :page_specific_javascripts do
= webpack_bundle_tag('issuable')
- if has_vue_discussions_cookie?
= webpack_bundle_tag('mr_notes')
- if has_vue_discussions_cookie?
= webpack_bundle_tag('mr_notes') = webpack_bundle_tag('mr_notes')
.merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } } .merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } }
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#js-vue-registry-images{ data: { endpoint: project_container_registry_index_path(@project, format: :json) } } #js-vue-registry-images{ data: { endpoint: project_container_registry_index_path(@project, format: :json) } }
= webpack_bundle_tag('common_vue') = webpack_bundle_tag('common_vue')
= webpack_bundle_tag('registry_list')
.row.prepend-top-10 .row.prepend-top-10
.col-lg-12 .col-lg-12
......
...@@ -50,7 +50,6 @@ function generateEntries() { ...@@ -50,7 +50,6 @@ function generateEntries() {
const manualEntries = { const manualEntries = {
monitoring: './monitoring/monitoring_bundle.js', monitoring: './monitoring/monitoring_bundle.js',
mr_notes: './mr_notes/index.js', mr_notes: './mr_notes/index.js',
registry_list: './registry/index.js',
terminal: './terminal/terminal_bundle.js', terminal: './terminal/terminal_bundle.js',
two_factor_auth: './two_factor_auth.js', two_factor_auth: './two_factor_auth.js',
...@@ -67,11 +66,7 @@ function generateEntries() { ...@@ -67,11 +66,7 @@ function generateEntries() {
// EE-only // EE-only
add_gitlab_slack_application: 'ee/add_gitlab_slack_application/index.js', add_gitlab_slack_application: 'ee/add_gitlab_slack_application/index.js',
burndown_chart: 'ee/burndown_chart/index.js', burndown_chart: 'ee/burndown_chart/index.js',
epic_show: 'ee/epics/epic_show/epic_show_bundle.js',
new_epic: 'ee/epics/new_epic/new_epic_bundle.js',
geo_nodes: 'ee/geo_nodes', geo_nodes: 'ee/geo_nodes',
issuable: 'ee/issuable/issuable_bundle.js',
issues: 'ee/issues/issues_bundle.js',
ldap_group_links: 'ee/groups/ldap_group_links.js', ldap_group_links: 'ee/groups/ldap_group_links.js',
mirrors: 'ee/mirrors', mirrors: 'ee/mirrors',
service_desk: 'ee/projects/settings_service_desk/service_desk_bundle.js', service_desk: 'ee/projects/settings_service_desk/service_desk_bundle.js',
......
<script> <script>
/* eslint-disable vue/require-default-prop */ /* eslint-disable vue/require-default-prop */
import issuableApp from '~/issue_show/components/app.vue'; import issuableApp from '~/issue_show/components/app.vue';
import relatedIssuesRoot from 'ee/issuable/related_issues/components/related_issues_root.vue'; import relatedIssuesRoot from 'ee/related_issues/components/related_issues_root.vue';
import issuableAppEventHub from '~/issue_show/event_hub'; import issuableAppEventHub from '~/issue_show/event_hub';
import epicHeader from './epic_header.vue'; import epicHeader from './epic_header.vue';
import epicSidebar from '../../sidebar/components/sidebar_app.vue'; import epicSidebar from '../../sidebar/components/sidebar_app.vue';
......
import Vue from 'vue'; import Vue from 'vue';
import EpicShowApp from './components/epic_show_app.vue'; import EpicShowApp from './components/epic_show_app.vue';
document.addEventListener('DOMContentLoaded', () => { export default () => {
const el = document.querySelector('#epic-show-app'); const el = document.querySelector('#epic-show-app');
const metaData = JSON.parse(el.dataset.meta); const metaData = JSON.parse(el.dataset.meta);
const initialData = JSON.parse(el.dataset.initial); const initialData = JSON.parse(el.dataset.initial);
...@@ -21,4 +21,4 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -21,4 +21,4 @@ document.addEventListener('DOMContentLoaded', () => {
props, props,
}), }),
}); });
}); };
import Vue from 'vue'; import Vue from 'vue';
import NewEpicApp from './components/new_epic.vue'; import NewEpicApp from './components/new_epic.vue';
document.addEventListener('DOMContentLoaded', () => { export default () => {
const el = document.querySelector('#new-epic-app'); const el = document.querySelector('#new-epic-app');
const props = el.dataset;
return new Vue({ if (el) {
el, const props = el.dataset;
components: {
'new-epic-app': NewEpicApp, new Vue({ // eslint-disable-line no-new
}, el,
render: createElement => createElement('new-epic-app', { components: {
props, 'new-epic-app': NewEpicApp,
}), },
}); render: createElement => createElement('new-epic-app', {
}); props,
}),
});
}
};
/* eslint-disable no-new */
$(() => {
class ExportCSVModal {
constructor() {
this.$modal = $('.issues-export-modal');
this.$downloadBtn = $('.csv_download_link');
this.$closeBtn = $('.modal-header .close');
this.init();
}
init() {
this.$modal.modal({ show: false });
this.$downloadBtn.on('click', () => this.$modal.modal('show'));
this.$closeBtn.on('click', () => this.$modal.modal('hide'));
}
}
new ExportCSVModal();
});
import initFilteredSearch from '~/pages/search/init_filtered_search'; import initFilteredSearch from '~/pages/search/init_filtered_search';
import FilteredSearchTokenKeysEpics from 'ee/filtered_search/filtered_search_token_keys_epics'; import FilteredSearchTokenKeysEpics from 'ee/filtered_search/filtered_search_token_keys_epics';
import initNewEpic from 'ee/epics/new_epic/new_epic_bundle';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({ initFilteredSearch({
...@@ -7,4 +8,5 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -7,4 +8,5 @@ document.addEventListener('DOMContentLoaded', () => {
filteredSearchTokenKeys: FilteredSearchTokenKeysEpics, filteredSearchTokenKeys: FilteredSearchTokenKeysEpics,
stateFiltersSelector: '.epics-state-filters', stateFiltersSelector: '.epics-state-filters',
}); });
initNewEpic();
}); });
import ZenMode from '~/zen_mode'; import ZenMode from '~/zen_mode';
import initEpicShow from 'ee/epics/epic_show/epic_show_bundle';
document.addEventListener('DOMContentLoaded', () => new ZenMode()); document.addEventListener('DOMContentLoaded', () => {
new ZenMode(); // eslint-disable-line no-new
initEpicShow();
});
import initNewEpic from 'ee/epics/new_epic/new_epic_bundle';
document.addEventListener('DOMContentLoaded', initNewEpic);
export default function initExportCSVModal() {
const $modal = $('.issues-export-modal');
const $downloadBtn = $('.csv_download_link');
const $closeBtn = $('.modal-header .close');
$modal.modal({ show: false });
$downloadBtn.on('click', () => $modal.modal('show'));
$closeBtn.on('click', () => $modal.modal('hide'));
}
import '~/pages/projects/issues/index/index';
import initExportCSVModal from './export_csv_modal';
document.addEventListener('DOMContentLoaded', initExportCSVModal);
import initShow from '~/pages/projects/issues/show'; import initShow from '~/pages/projects/issues/show';
import initSidebarBundle from 'ee/sidebar/sidebar_bundle'; import initSidebarBundle from 'ee/sidebar/sidebar_bundle';
import initRelatedIssues from 'ee/related_issues';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initShow(); initShow();
initSidebarBundle(); initSidebarBundle();
initRelatedIssues();
}); });
import Vue from 'vue'; import Vue from 'vue';
import { convertPermissionToBoolean } from '~/lib/utils/common_utils'; import { convertPermissionToBoolean } from '~/lib/utils/common_utils';
import RelatedIssuesRoot from './related_issues/components/related_issues_root.vue'; import RelatedIssuesRoot from './components/related_issues_root.vue';
document.addEventListener('DOMContentLoaded', () => { export default function initRelatedIssues() {
const relatedIssuesRootElement = document.querySelector('.js-related-issues-root'); const relatedIssuesRootElement = document.querySelector('.js-related-issues-root');
if (relatedIssuesRootElement) { if (relatedIssuesRootElement) {
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
...@@ -22,4 +22,4 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -22,4 +22,4 @@ document.addEventListener('DOMContentLoaded', () => {
}), }),
}); });
} }
}); }
...@@ -25,7 +25,10 @@ function mountWeightComponent(mediator) { ...@@ -25,7 +25,10 @@ function mountWeightComponent(mediator) {
function mountEpic() { function mountEpic() {
const el = document.querySelector('#js-vue-sidebar-item-epic'); const el = document.querySelector('#js-vue-sidebar-item-epic');
return new Vue({ if (!el) return;
// eslint-disable-next-line no-new
new Vue({
el, el,
components: { components: {
SidebarItemEpic, SidebarItemEpic,
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
= render 'shared/issuable/epic_nav', type: :epics = render 'shared/issuable/epic_nav', type: :epics
.nav-controls .nav-controls
- if can?(current_user, :create_epic, @group) - if can?(current_user, :create_epic, @group)
- content_for :page_specific_javascripts do
= webpack_bundle_tag 'new_epic'
#new-epic-app{ data: { endpoint: request.url, 'align-right' => true } } #new-epic-app{ data: { endpoint: request.url, 'align-right' => true } }
= render 'shared/epic/search_bar', type: :epics = render 'shared/epic/search_bar', type: :epics
......
...@@ -14,6 +14,5 @@ ...@@ -14,6 +14,5 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'epic_show'
#epic-show-app{ data: { initial: issuable_initial_data(@epic).to_json, meta: epic_meta_data } } #epic-show-app{ data: { initial: issuable_initial_data(@epic).to_json, meta: epic_meta_data } }
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
- page_title "Service Desk" - page_title "Service Desk"
- content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'issues'
- content_for :breadcrumbs_extra do - content_for :breadcrumbs_extra do
= render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false = render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false
......
...@@ -11,5 +11,4 @@ ...@@ -11,5 +11,4 @@
- if can?(current_user, :create_epic, @group) - if can?(current_user, :create_epic, @group)
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'new_epic'
#new-epic-app{ data: { endpoint: request.url } } #new-epic-app{ data: { endpoint: request.url } }
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
- if can?(current_user, :create_epic, @group) - if can?(current_user, :create_epic, @group)
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'new_epic'
#new-epic-app{ data: { endpoint: request.url } } #new-epic-app{ data: { endpoint: request.url } }
= link_to group_epics_path(@group), title: 'List', class: 'btn' do = link_to group_epics_path(@group), title: 'List', class: 'btn' do
%span= _('View epics list') %span= _('View epics list')
import Vue from 'vue'; import Vue from 'vue';
import eventHub from 'ee/issuable/related_issues/event_hub'; import eventHub from 'ee/related_issues/event_hub';
import addIssuableForm from 'ee/issuable/related_issues/components/add_issuable_form.vue'; import addIssuableForm from 'ee/related_issues/components/add_issuable_form.vue';
const issuable1 = { const issuable1 = {
id: 200, id: 200,
......
import Vue from 'vue'; import Vue from 'vue';
import issueItem from 'ee/issuable/related_issues/components/issue_item.vue'; import issueItem from 'ee/related_issues/components/issue_item.vue';
import eventHub from 'ee/issuable/related_issues/event_hub'; import eventHub from 'ee/related_issues/event_hub';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
describe('issueItem', () => { describe('issueItem', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import eventHub from 'ee/issuable/related_issues/event_hub'; import eventHub from 'ee/related_issues/event_hub';
import issueToken from 'ee/issuable/related_issues/components/issue_token.vue'; import issueToken from 'ee/related_issues/components/issue_token.vue';
describe('IssueToken', () => { describe('IssueToken', () => {
const idKey = 200; const idKey = 200;
......
import Vue from 'vue'; import Vue from 'vue';
import eventHub from 'ee/issuable/related_issues/event_hub'; import eventHub from 'ee/related_issues/event_hub';
import relatedIssuesBlock from 'ee/issuable/related_issues/components/related_issues_block.vue'; import relatedIssuesBlock from 'ee/related_issues/components/related_issues_block.vue';
import { issuable1, issuable2, issuable3, issuable4, issuable5 } from '../mock_data'; import { issuable1, issuable2, issuable3, issuable4, issuable5 } from '../mock_data';
......
import Vue from 'vue'; import Vue from 'vue';
import _ from 'underscore'; import _ from 'underscore';
import relatedIssuesRoot from 'ee/issuable/related_issues/components/related_issues_root.vue'; import relatedIssuesRoot from 'ee/related_issues/components/related_issues_root.vue';
import relatedIssuesService from 'ee/issuable/related_issues/services/related_issues_service'; import relatedIssuesService from 'ee/related_issues/services/related_issues_service';
import { defaultProps, issuable1, issuable2 } from '../mock_data'; import { defaultProps, issuable1, issuable2 } from '../mock_data';
......
import RelatedIssuesStore from 'ee/issuable/related_issues/stores/related_issues_store'; import RelatedIssuesStore from 'ee/related_issues/stores/related_issues_store';
import { issuable1, issuable2, issuable3, issuable4, issuable5 } from '../mock_data'; import { issuable1, issuable2, issuable3, issuable4, issuable5 } from '../mock_data';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment