Commit 5d924e53 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Move javascript files

parent f4832119
/* global ListIssue */ /* global ListIssue */
import Vue from 'vue'; import Vue from 'vue';
import queryData from '../../utils/query_data'; import queryData from '~/boards/utils/query_data';
import loadingIcon from '../../../vue_shared/components/loading_icon.vue'; import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import './header'; import './header';
import './list'; import './list';
import './footer'; import './footer';
......
<script> <script>
import GfmAutoComplete from '~/gfm_auto_complete'; import GfmAutoComplete from '~/gfm_auto_complete';
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import issueToken from './issue_token.vue'; import issueToken from './issue_token.vue';
import loadingIcon from '../../../vue_shared/components/loading_icon.vue';
export default { export default {
name: 'AddIssuableForm', name: 'AddIssuableForm',
......
<script> <script>
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import loadingIcon from '../../../vue_shared/components/loading_icon.vue';
import tooltip from '../../../vue_shared/directives/tooltip';
import issueToken from './issue_token.vue'; import issueToken from './issue_token.vue';
import addIssuableForm from './add_issuable_form.vue'; import addIssuableForm from './add_issuable_form.vue';
......
<script> <script>
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import linkedPipelinesColumn from './linked_pipelines_column.vue'; import linkedPipelinesColumn from './linked_pipelines_column.vue';
import stageColumnComponent from './stage_column_component.vue'; import stageColumnComponent from './stage_column_component.vue';
import loadingIcon from '../../../vue_shared/components/loading_icon.vue';
export default { export default {
props: { props: {
......
/** /**
* This file is the centerpiece of an attempt to reduce potential conflicts * This file is the centerpiece of an attempt to reduce potential conflicts
* between the CE and EE versions of the MR widget. EE additions to the MR widget should * between the CE and EE versions of the MR widget. EE additions to the MR widget should
* be contained in the ./vue_merge_request_widget/ee directory, and should **extend** * be contained in the ee/vue_merge_request_widget directory, and should **extend**
* rather than mutate CE MR Widget code. * rather than mutate CE MR Widget code.
* *
* This file should be the only source of conflicts between EE and CE. EE-only components should * This file should be the only source of conflicts between EE and CE. EE-only components should
...@@ -26,7 +26,7 @@ export { default as ConflictsState } from './components/states/mr_widget_conflic ...@@ -26,7 +26,7 @@ export { default as ConflictsState } from './components/states/mr_widget_conflic
export { default as NothingToMergeState } from './components/states/mr_widget_nothing_to_merge'; export { default as NothingToMergeState } from './components/states/mr_widget_nothing_to_merge';
export { default as MissingBranchState } from './components/states/mr_widget_missing_branch'; export { default as MissingBranchState } from './components/states/mr_widget_missing_branch';
export { default as NotAllowedState } from './components/states/mr_widget_not_allowed'; export { default as NotAllowedState } from './components/states/mr_widget_not_allowed';
export { default as ReadyToMergeState } from './ee/components/states/mr_widget_ready_to_merge'; export { default as ReadyToMergeState } from 'ee/vue_merge_request_widget/components/states/mr_widget_ready_to_merge';
export { default as SHAMismatchState } from './components/states/mr_widget_sha_mismatch'; export { default as SHAMismatchState } from './components/states/mr_widget_sha_mismatch';
export { default as UnresolvedDiscussionsState } from './components/states/mr_widget_unresolved_discussions'; export { default as UnresolvedDiscussionsState } from './components/states/mr_widget_unresolved_discussions';
export { default as PipelineBlockedState } from './components/states/mr_widget_pipeline_blocked'; export { default as PipelineBlockedState } from './components/states/mr_widget_pipeline_blocked';
...@@ -34,11 +34,11 @@ export { default as PipelineFailedState } from './components/states/mr_widget_pi ...@@ -34,11 +34,11 @@ export { default as PipelineFailedState } from './components/states/mr_widget_pi
export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds'; export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds';
export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed'; export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed';
export { default as CheckingState } from './components/states/mr_widget_checking'; export { default as CheckingState } from './components/states/mr_widget_checking';
export { default as MRWidgetStore } from './ee/stores/mr_widget_store'; export { default as MRWidgetStore } from 'ee/vue_merge_request_widget/stores/mr_widget_store';
export { default as MRWidgetService } from './ee/services/mr_widget_service'; export { default as MRWidgetService } from 'ee/vue_merge_request_widget/services/mr_widget_service';
export { default as eventHub } from './event_hub'; export { default as eventHub } from './event_hub';
export { default as getStateKey } from './ee/stores/get_state_key'; export { default as getStateKey } from 'ee/vue_merge_request_widget/stores/get_state_key';
export { default as mrWidgetOptions } from './ee/mr_widget_options'; export { default as mrWidgetOptions } from 'ee/vue_merge_request_widget/mr_widget_options';
export { default as stateMaps } from './ee/stores/state_maps'; export { default as stateMaps } from 'ee/vue_merge_request_widget/stores/state_maps';
export { default as SquashBeforeMerge } from './ee/components/states/mr_widget_squash_before_merge'; export { default as SquashBeforeMerge } from 'ee/vue_merge_request_widget/components/states/mr_widget_squash_before_merge';
export { default as notify } from '../lib/utils/notify'; export { default as notify } from '../lib/utils/notify';
...@@ -61,9 +61,9 @@ var config = { ...@@ -61,9 +61,9 @@ var config = {
profile: './profile/profile_bundle.js', profile: './profile/profile_bundle.js',
prometheus_metrics: './prometheus_metrics', prometheus_metrics: './prometheus_metrics',
protected_branches: './protected_branches', protected_branches: './protected_branches',
ee_protected_branches: './protected_branches/ee', ee_protected_branches: 'ee/protected_branches',
protected_tags: './protected_tags', protected_tags: './protected_tags',
ee_protected_tags: './protected_tags/ee', ee_protected_tags: 'ee/protected_tags',
service_desk: './projects/settings_service_desk/service_desk_bundle.js', service_desk: './projects/settings_service_desk/service_desk_bundle.js',
sidebar: './sidebar/sidebar_bundle.js', sidebar: './sidebar/sidebar_bundle.js',
schedule_form: './pipeline_schedules/pipeline_schedule_form_bundle.js', schedule_form: './pipeline_schedules/pipeline_schedule_form_bundle.js',
...@@ -208,6 +208,7 @@ var config = { ...@@ -208,6 +208,7 @@ var config = {
resolve: { resolve: {
extensions: ['.js'], extensions: ['.js'],
alias: { alias: {
'ee': path.join(ROOT_PATH, 'ee/app/assets/javascripts'),
'~': path.join(ROOT_PATH, 'app/assets/javascripts'), '~': path.join(ROOT_PATH, 'app/assets/javascripts'),
'emojis': path.join(ROOT_PATH, 'fixtures/emojis'), 'emojis': path.join(ROOT_PATH, 'fixtures/emojis'),
'empty_states': path.join(ROOT_PATH, 'app/views/shared/empty_states'), 'empty_states': path.join(ROOT_PATH, 'app/views/shared/empty_states'),
......
/* global Flash */ /* global Flash */
import MRWidgetAuthor from '../../../components/mr_widget_author'; import MRWidgetAuthor from '~/vue_merge_request_widget/components/mr_widget_author';
import eventHub from '../../../event_hub'; import eventHub from '~/vue_merge_request_widget/event_hub';
export default { export default {
name: 'approvals-body', name: 'approvals-body',
......
/* global Flash */ /* global Flash */
import LinkToMemberAvatar from '~/vue_shared/components/link_to_member_avatar'; import LinkToMemberAvatar from '~/vue_shared/components/link_to_member_avatar';
import eventHub from '../../../event_hub'; import eventHub from '~/vue_merge_request_widget/event_hub';
export default { export default {
name: 'approvals-footer', name: 'approvals-footer',
......
<script> <script>
import successIcon from 'icons/_icon_status_success.svg'; import successIcon from 'icons/_icon_status_success.svg';
import errorIcon from 'icons/_icon_status_failed.svg'; import errorIcon from 'icons/_icon_status_failed.svg';
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import '~/lib/utils/text_utility';
import issuesBlock from './mr_widget_code_quality_issues.vue'; import issuesBlock from './mr_widget_code_quality_issues.vue';
import loadingIcon from '../../../vue_shared/components/loading_icon.vue';
import '../../../lib/utils/text_utility';
export default { export default {
name: 'MRWidgetCodeQuality', name: 'MRWidgetCodeQuality',
......
import eventHub from '../../../event_hub'; import eventHub from '~/vue_merge_request_widget/event_hub';
import ReadyToMergeState from '../../../components/states/mr_widget_ready_to_merge'; import ReadyToMergeState from '~/vue_merge_request_widget/components/states/mr_widget_ready_to_merge';
import SquashBeforeMerge from './mr_widget_squash_before_merge'; import SquashBeforeMerge from './mr_widget_squash_before_merge';
export default { export default {
......
/* global Flash */ /* global Flash */
import simplePoll from '~/lib/utils/simple_poll'; import simplePoll from '~/lib/utils/simple_poll';
import eventHub from '../../../event_hub'; import eventHub from '~/vue_merge_request_widget/event_hub';
export default { export default {
props: { props: {
......
import eventHub from '../../../event_hub'; import eventHub from '~/vue_merge_request_widget/event_hub';
import CESquashBeforeMerge from '../../components/states/mr_widget_squash_before_merge'; import CESquashBeforeMerge from '~/vue_merge_request_widget/components/states/mr_widget_squash_before_merge';
export default { export default {
extends: CESquashBeforeMerge, extends: CESquashBeforeMerge,
......
import CEWidgetOptions from '../mr_widget_options'; import CEWidgetOptions from '~/vue_merge_request_widget/mr_widget_options';
import WidgetApprovals from './components/approvals/mr_widget_approvals'; import WidgetApprovals from './components/approvals/mr_widget_approvals';
import GeoSecondaryNode from './components/states/mr_widget_secondary_geo_node'; import GeoSecondaryNode from './components/states/mr_widget_secondary_geo_node';
import RebaseState from './components/states/mr_widget_rebase'; import RebaseState from './components/states/mr_widget_rebase';
......
import Vue from 'vue'; import Vue from 'vue';
import CEWidgetService from '../../services/mr_widget_service'; import CEWidgetService from '~/vue_merge_request_widget/services/mr_widget_service';
export default class MRWidgetService extends CEWidgetService { export default class MRWidgetService extends CEWidgetService {
constructor(mr) { constructor(mr) {
......
import CEGetStateKey from '../../stores/get_state_key'; import CEGetStateKey from '~/vue_merge_request_widget/stores/get_state_key';
export default function (data) { export default function (data) {
if (this.isGeoSecondaryNode) { if (this.isGeoSecondaryNode) {
......
import CEMergeRequestStore from '../../stores/mr_widget_store'; import CEMergeRequestStore from '~/vue_merge_request_widget/stores/mr_widget_store';
export default class MergeRequestStore extends CEMergeRequestStore { export default class MergeRequestStore extends CEMergeRequestStore {
constructor(data) { constructor(data) {
......
import stateMaps from '../../stores/state_maps'; import stateMaps from '~/vue_merge_request_widget/stores/state_maps';
stateMaps.stateToComponentMap.geoSecondaryNode = 'mr-widget-geo-secondary-node'; stateMaps.stateToComponentMap.geoSecondaryNode = 'mr-widget-geo-secondary-node';
stateMaps.stateToComponentMap.rebase = 'mr-widget-rebase'; stateMaps.stateToComponentMap.rebase = 'mr-widget-rebase';
......
import Vue from 'vue'; import Vue from 'vue';
import ApprovalsBody from '~/vue_merge_request_widget/ee/components/approvals/approvals_body'; import ApprovalsBody from 'ee/vue_merge_request_widget/components/approvals/approvals_body';
(() => { (() => {
gl.ApprovalsStore = { gl.ApprovalsStore = {
......
import Vue from 'vue'; import Vue from 'vue';
import pendingAvatarSvg from 'icons/_icon_dotted_circle.svg'; import pendingAvatarSvg from 'icons/_icon_dotted_circle.svg';
import ApprovalsFooter from '~/vue_merge_request_widget/ee/components/approvals/approvals_footer'; import ApprovalsFooter from 'ee/vue_merge_request_widget/components/approvals/approvals_footer';
(() => { (() => {
gl.ApprovalsStore = { gl.ApprovalsStore = {
......
import Vue from 'vue'; import Vue from 'vue';
import mrWidgetCodeQualityIssues from '~/vue_merge_request_widget/ee/components/mr_widget_code_quality_issues.vue'; import mrWidgetCodeQualityIssues from 'ee/vue_merge_request_widget/components/mr_widget_code_quality_issues.vue';
describe('Merge Request Code Quality Issues', () => { describe('Merge Request Code Quality Issues', () => {
let vm; let vm;
......
import Vue from 'vue'; import Vue from 'vue';
import mrWidgetCodeQuality from '~/vue_merge_request_widget/ee/components/mr_widget_code_quality.vue'; import mrWidgetCodeQuality from 'ee/vue_merge_request_widget/components/mr_widget_code_quality.vue';
import Store from '~/vue_merge_request_widget/ee/stores/mr_widget_store'; import Store from 'ee/vue_merge_request_widget/stores/mr_widget_store';
import Service from '~/vue_merge_request_widget/ee/services/mr_widget_service'; import Service from 'ee/vue_merge_request_widget/services/mr_widget_service';
import mockData, { baseIssues, headIssues } from '../mock_data'; import mockData, { baseIssues, headIssues } from '../mock_data';
describe('Merge Request Code Quality', () => { describe('Merge Request Code Quality', () => {
......
import MergeRequestStore from '~/vue_merge_request_widget/ee/stores/mr_widget_store'; import MergeRequestStore from 'ee/vue_merge_request_widget/stores/mr_widget_store';
import mockData, { headIssues, baseIssues } from '../mock_data'; import mockData, { headIssues, baseIssues } from '../mock_data';
describe('MergeRequestStore', () => { describe('MergeRequestStore', () => {
......
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