Resolve circular dependencies in merge request widget
This commit is contained in:
parent
10bb8297eb
commit
aaa6cab05a
9 changed files with 50 additions and 83 deletions
|
@ -1,47 +0,0 @@
|
|||
/**
|
||||
* 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
|
||||
* be contained in the ee/vue_merge_request_widget directory, and should **extend**
|
||||
* rather than mutate CE MR Widget code.
|
||||
*
|
||||
* This file should be the only source of conflicts between EE and CE. EE-only components should
|
||||
* imported directly where they are needed, and import paths for EE extensions of CE components
|
||||
* should overwrite import paths **without** changing the order of dependencies listed here.
|
||||
*/
|
||||
|
||||
export { default as Vue } from 'vue';
|
||||
export { default as SmartInterval } from '~/smart_interval';
|
||||
export { default as WidgetHeader } from './components/mr_widget_header.vue';
|
||||
export { default as WidgetMergeHelp } from './components/mr_widget_merge_help.vue';
|
||||
export { default as WidgetPipeline } from './components/mr_widget_pipeline.vue';
|
||||
export { default as Deployment } from './components/deployment.vue';
|
||||
export { default as WidgetRelatedLinks } from './components/mr_widget_related_links.vue';
|
||||
export { default as MergedState } from './components/states/mr_widget_merged.vue';
|
||||
export { default as FailedToMerge } from './components/states/mr_widget_failed_to_merge.vue';
|
||||
export { default as ClosedState } from './components/states/mr_widget_closed.vue';
|
||||
export { default as MergingState } from './components/states/mr_widget_merging.vue';
|
||||
export { default as WorkInProgressState } from './components/states/work_in_progress.vue';
|
||||
export { default as ArchivedState } from './components/states/mr_widget_archived.vue';
|
||||
export { default as ConflictsState } from './components/states/mr_widget_conflicts.vue';
|
||||
export { default as NothingToMergeState } from './components/states/nothing_to_merge.vue';
|
||||
export { default as MissingBranchState } from './components/states/mr_widget_missing_branch.vue';
|
||||
export { default as NotAllowedState } from './components/states/mr_widget_not_allowed.vue';
|
||||
export { default as ReadyToMergeState } from './components/states/ready_to_merge.vue';
|
||||
export { default as ShaMismatchState } from './components/states/sha_mismatch.vue';
|
||||
export { default as UnresolvedDiscussionsState } from './components/states/unresolved_discussions.vue';
|
||||
export { default as PipelineBlockedState } from './components/states/mr_widget_pipeline_blocked.vue';
|
||||
export { default as PipelineFailedState } from './components/states/pipeline_failed.vue';
|
||||
export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds.vue';
|
||||
export { default as RebaseState } from './components/states/mr_widget_rebase.vue';
|
||||
export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed.vue';
|
||||
export { default as CheckingState } from './components/states/mr_widget_checking.vue';
|
||||
export { default as MRWidgetStore } from './stores/mr_widget_store';
|
||||
export { default as MRWidgetService } from './services/mr_widget_service';
|
||||
export { default as eventHub } from './event_hub';
|
||||
export { default as getStateKey } from './stores/get_state_key';
|
||||
export { default as stateMaps } from './stores/state_maps';
|
||||
export { default as SquashBeforeMerge } from './components/states/squash_before_merge.vue';
|
||||
export { default as notify } from '../lib/utils/notify';
|
||||
export { default as SourceBranchRemovalStatus } from './components/source_branch_removal_status.vue';
|
||||
|
||||
export { default as mrWidgetOptions } from './mr_widget_options.vue';
|
|
@ -0,0 +1,3 @@
|
|||
import MRWidgetOptions from './mr_widget_options.vue';
|
||||
|
||||
export default MRWidgetOptions;
|
|
@ -1,4 +1,5 @@
|
|||
import { Vue, mrWidgetOptions } from './dependencies';
|
||||
import Vue from 'vue';
|
||||
import MrWidgetOptions from './ee_switch_mr_widget_options';
|
||||
import Translate from '../vue_shared/translate';
|
||||
|
||||
Vue.use(Translate);
|
||||
|
@ -6,7 +7,7 @@ Vue.use(Translate);
|
|||
export default () => {
|
||||
gl.mrWidgetData.gitlabLogo = gon.gitlab_logo;
|
||||
|
||||
const vm = new Vue(mrWidgetOptions);
|
||||
const vm = new Vue(MrWidgetOptions);
|
||||
|
||||
window.gl.mrWidget = {
|
||||
checkStatus: vm.checkStatus,
|
||||
|
|
|
@ -2,39 +2,37 @@
|
|||
import Project from '~/pages/projects/project';
|
||||
import SmartInterval from '~/smart_interval';
|
||||
import createFlash from '../flash';
|
||||
import {
|
||||
WidgetHeader,
|
||||
WidgetMergeHelp,
|
||||
WidgetPipeline,
|
||||
Deployment,
|
||||
WidgetRelatedLinks,
|
||||
MergedState,
|
||||
ClosedState,
|
||||
MergingState,
|
||||
RebaseState,
|
||||
WorkInProgressState,
|
||||
ArchivedState,
|
||||
ConflictsState,
|
||||
NothingToMergeState,
|
||||
MissingBranchState,
|
||||
NotAllowedState,
|
||||
ReadyToMergeState,
|
||||
ShaMismatchState,
|
||||
UnresolvedDiscussionsState,
|
||||
PipelineBlockedState,
|
||||
PipelineFailedState,
|
||||
FailedToMerge,
|
||||
MergeWhenPipelineSucceedsState,
|
||||
AutoMergeFailed,
|
||||
CheckingState,
|
||||
MRWidgetStore,
|
||||
MRWidgetService,
|
||||
eventHub,
|
||||
stateMaps,
|
||||
SquashBeforeMerge,
|
||||
notify,
|
||||
SourceBranchRemovalStatus,
|
||||
} from './dependencies';
|
||||
import WidgetHeader from './components/mr_widget_header.vue';
|
||||
import WidgetMergeHelp from './components/mr_widget_merge_help.vue';
|
||||
import WidgetPipeline from './components/mr_widget_pipeline.vue';
|
||||
import Deployment from './components/deployment.vue';
|
||||
import WidgetRelatedLinks from './components/mr_widget_related_links.vue';
|
||||
import MergedState from './components/states/mr_widget_merged.vue';
|
||||
import ClosedState from './components/states/mr_widget_closed.vue';
|
||||
import MergingState from './components/states/mr_widget_merging.vue';
|
||||
import RebaseState from './components/states/mr_widget_rebase.vue';
|
||||
import WorkInProgressState from './components/states/work_in_progress.vue';
|
||||
import ArchivedState from './components/states/mr_widget_archived.vue';
|
||||
import ConflictsState from './components/states/mr_widget_conflicts.vue';
|
||||
import NothingToMergeState from './components/states/nothing_to_merge.vue';
|
||||
import MissingBranchState from './components/states/mr_widget_missing_branch.vue';
|
||||
import NotAllowedState from './components/states/mr_widget_not_allowed.vue';
|
||||
import ReadyToMergeState from './components/states/ready_to_merge.vue';
|
||||
import ShaMismatchState from './components/states/sha_mismatch.vue';
|
||||
import UnresolvedDiscussionsState from './components/states/unresolved_discussions.vue';
|
||||
import PipelineBlockedState from './components/states/mr_widget_pipeline_blocked.vue';
|
||||
import PipelineFailedState from './components/states/pipeline_failed.vue';
|
||||
import FailedToMerge from './components/states/mr_widget_failed_to_merge.vue';
|
||||
import MergeWhenPipelineSucceedsState from './components/states/mr_widget_merge_when_pipeline_succeeds.vue';
|
||||
import AutoMergeFailed from './components/states/mr_widget_auto_merge_failed.vue';
|
||||
import CheckingState from './components/states/mr_widget_checking.vue';
|
||||
import MRWidgetStore from './stores/ee_switch_mr_widget_store';
|
||||
import MRWidgetService from './services/ee_switch_mr_widget_service';
|
||||
import eventHub from './event_hub';
|
||||
import stateMaps from './stores/ee_switch_state_maps';
|
||||
import SquashBeforeMerge from './components/states/squash_before_merge.vue';
|
||||
import notify from '~/lib/utils/notify';
|
||||
import SourceBranchRemovalStatus from './components/source_branch_removal_status.vue';
|
||||
import GroupedTestReportsApp from '../reports/components/grouped_test_reports_app.vue';
|
||||
import { setFaviconOverlay } from '../lib/utils/common_utils';
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import MRWidgetService from './mr_widget_service';
|
||||
|
||||
export default MRWidgetService;
|
|
@ -0,0 +1,3 @@
|
|||
import getStateKey from './get_state_key';
|
||||
|
||||
export default getStateKey;
|
|
@ -0,0 +1,3 @@
|
|||
import MergeRequestStore from './mr_widget_store';
|
||||
|
||||
export default MergeRequestStore;
|
|
@ -0,0 +1,3 @@
|
|||
import stateMaps from './state_maps';
|
||||
|
||||
export default stateMaps;
|
|
@ -1,5 +1,5 @@
|
|||
import Timeago from 'timeago.js';
|
||||
import { getStateKey } from '../dependencies';
|
||||
import getStateKey from './ee_switch_get_state_key';
|
||||
import { stateKey } from './state_maps';
|
||||
import { formatDate } from '../../lib/utils/datetime_utility';
|
||||
|
||||
|
|
Loading…
Reference in a new issue