Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3a31cedb
Commit
3a31cedb
authored
May 11, 2020
by
Arun Kumar Mohan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate from Vue event hub to Mitt
parent
935b1b6d
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
51 additions
and
66 deletions
+51
-66
app/assets/javascripts/clusters/event_hub.js
app/assets/javascripts/clusters/event_hub.js
+2
-2
app/assets/javascripts/deploy_keys/eventhub.js
app/assets/javascripts/deploy_keys/eventhub.js
+2
-2
app/assets/javascripts/environments/event_hub.js
app/assets/javascripts/environments/event_hub.js
+2
-2
app/assets/javascripts/filtered_search/event_hub.js
app/assets/javascripts/filtered_search/event_hub.js
+2
-2
app/assets/javascripts/frequent_items/event_hub.js
app/assets/javascripts/frequent_items/event_hub.js
+2
-2
app/assets/javascripts/groups/event_hub.js
app/assets/javascripts/groups/event_hub.js
+2
-2
app/assets/javascripts/import_projects/event_hub.js
app/assets/javascripts/import_projects/event_hub.js
+2
-2
app/assets/javascripts/integrations/edit/event_hub.js
app/assets/javascripts/integrations/edit/event_hub.js
+2
-2
app/assets/javascripts/issue_show/event_hub.js
app/assets/javascripts/issue_show/event_hub.js
+2
-2
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-2
app/assets/javascripts/pages/milestones/shared/event_hub.js
app/assets/javascripts/pages/milestones/shared/event_hub.js
+2
-2
app/assets/javascripts/pages/projects/labels/event_hub.js
app/assets/javascripts/pages/projects/labels/event_hub.js
+2
-2
app/assets/javascripts/serverless/event_hub.js
app/assets/javascripts/serverless/event_hub.js
+2
-2
app/assets/javascripts/set_status_modal/event_hub.js
app/assets/javascripts/set_status_modal/event_hub.js
+2
-2
app/assets/javascripts/vue_merge_request_widget/event_hub.js
app/assets/javascripts/vue_merge_request_widget/event_hub.js
+2
-2
app/assets/javascripts/vue_shared/components/recaptcha_eventhub.js
...s/javascripts/vue_shared/components/recaptcha_eventhub.js
+2
-2
changelogs/unreleased/chore-vue-event-hub-to-mitt-migration.yml
...logs/unreleased/chore-vue-event-hub-to-mitt-migration.yml
+5
-0
ee/app/assets/javascripts/geo_nodes/event_hub.js
ee/app/assets/javascripts/geo_nodes/event_hub.js
+2
-2
ee/app/assets/javascripts/onboarding/onboarding_helper/event_hub.js
...ets/javascripts/onboarding/onboarding_helper/event_hub.js
+2
-2
ee/app/assets/javascripts/projects/settings_service_desk/event_hub.js
...s/javascripts/projects/settings_service_desk/event_hub.js
+2
-2
ee/app/assets/javascripts/vue_shared/components/accordion/accordion_event_bus.js
...ts/vue_shared/components/accordion/accordion_event_bus.js
+2
-4
ee/app/assets/javascripts/vulnerabilities/components/vulnerabilities_event_bus.js
...s/vulnerabilities/components/vulnerabilities_event_bus.js
+2
-4
ee/spec/frontend/vue_shared/components/accordion/accordion_event_bus_spec.js
...e_shared/components/accordion/accordion_event_bus_spec.js
+0
-8
ee/spec/frontend/vulnerabilities/vulnerabilities_event_bus_spec.js
...rontend/vulnerabilities/vulnerabilities_event_bus_spec.js
+0
-8
spec/frontend/notes/components/discussion_filter_spec.js
spec/frontend/notes/components/discussion_filter_spec.js
+2
-2
spec/frontend/notes/mixins/discussion_navigation_spec.js
spec/frontend/notes/mixins/discussion_navigation_spec.js
+2
-2
No files found.
app/assets/javascripts/clusters/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/deploy_keys/eventhub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/environments/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/filtered_search/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/frequent_items/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/groups/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/import_projects/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/integrations/edit/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/issue_show/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/merge_request_tabs.js
View file @
3a31cedb
/* eslint-disable no-new, class-methods-use-this */
import
$
from
'
jquery
'
;
import
Vue
from
'
vue
'
;
import
{
GlBreakpointInstance
as
bp
}
from
'
@gitlab/ui/dist/utils
'
;
import
Cookies
from
'
js-cookie
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
flash
from
'
./flash
'
;
import
BlobForkSuggestion
from
'
./blob/blob_fork_suggestion
'
;
...
...
@@ -93,7 +93,7 @@ export default class MergeRequestTabs {
this
.
pipelinesLoaded
=
false
;
this
.
commitsLoaded
=
false
;
this
.
fixedLayoutPref
=
null
;
this
.
eventHub
=
new
Vue
();
this
.
eventHub
=
createEventHub
();
this
.
setUrl
=
setUrl
!==
undefined
?
setUrl
:
true
;
this
.
setCurrentAction
=
this
.
setCurrentAction
.
bind
(
this
);
...
...
app/assets/javascripts/pages/milestones/shared/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/pages/projects/labels/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/serverless/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/set_status_modal/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/vue_merge_request_widget/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
app/assets/javascripts/vue_shared/components/recaptcha_eventhub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
// see recaptcha_tags in app/views/shared/_recaptcha_form.html.haml
export
const
callbackName
=
'
recaptchaDialogCallback
'
;
export
const
eventHub
=
new
Vue
();
export
const
eventHub
=
createEventHub
();
const
throwDuplicateCallbackError
=
()
=>
{
throw
new
Error
(
`
${
callbackName
}
is already defined!`
);
...
...
changelogs/unreleased/chore-vue-event-hub-to-mitt-migration.yml
0 → 100644
View file @
3a31cedb
---
title
:
Migrate from Vue event hub to Mitt
merge_request
:
31666
author
:
Arun Kumar Mohan
type
:
changed
ee/app/assets/javascripts/geo_nodes/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
ee/app/assets/javascripts/onboarding/onboarding_helper/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
ee/app/assets/javascripts/projects/settings_service_desk/event_hub.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
ee/app/assets/javascripts/vue_shared/components/accordion/accordion_event_bus.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
const
accordionEventBus
=
new
Vue
();
export
default
accordionEventBus
;
export
default
createEventHub
();
ee/app/assets/javascripts/vulnerabilities/components/vulnerabilities_event_bus.js
View file @
3a31cedb
// TODO: Replace with mitt implementation for Vue3 once it has been verified
// (https://gitlab.com/gitlab-org/gitlab/-/issues/215672)
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
export
default
new
Vue
();
export
default
createEventHub
();
ee/spec/frontend/vue_shared/components/accordion/accordion_event_bus_spec.js
deleted
100644 → 0
View file @
935b1b6d
import
Vue
from
'
vue
'
;
import
accordionEventBus
from
'
ee/vue_shared/components/accordion/accordion_event_bus
'
;
describe
(
'
Accordion event bus
'
,
()
=>
{
it
(
'
default exports a vue instance
'
,
()
=>
{
expect
(
accordionEventBus
instanceof
Vue
).
toBe
(
true
);
});
});
ee/spec/frontend/vulnerabilities/vulnerabilities_event_bus_spec.js
deleted
100644 → 0
View file @
935b1b6d
import
Vue
from
'
vue
'
;
import
vulnerabilitiesEventBus
from
'
ee/vulnerabilities/components/vulnerabilities_event_bus
'
;
describe
(
'
Vulnerabilities event bus
'
,
()
=>
{
it
(
'
default exports a vue instance
'
,
()
=>
{
expect
(
vulnerabilitiesEventBus
instanceof
Vue
).
toBe
(
true
);
});
});
spec/frontend/notes/components/discussion_filter_spec.js
View file @
3a31cedb
import
Vue
from
'
vue
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
import
Vuex
from
'
vuex
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
...
...
@@ -132,7 +132,7 @@ describe('DiscussionFilter component', () => {
});
describe
(
'
Merge request tabs
'
,
()
=>
{
eventHub
=
new
Vue
();
eventHub
=
createEventHub
();
beforeEach
(()
=>
{
window
.
mrTabs
=
{
...
...
spec/frontend/notes/mixins/discussion_navigation_spec.js
View file @
3a31cedb
...
...
@@ -3,6 +3,7 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
import
*
as
utils
from
'
~/lib/utils/common_utils
'
;
import
discussionNavigation
from
'
~/notes/mixins/discussion_navigation
'
;
import
eventHub
from
'
~/notes/event_hub
'
;
import
createEventHub
from
'
~/helpers/event_hub_factory
'
;
import
notesModule
from
'
~/notes/stores/modules
'
;
import
{
setHTMLFixture
}
from
'
helpers/fixtures
'
;
...
...
@@ -67,8 +68,7 @@ describe('Discussion navigation mixin', () => {
describe
(
'
cycle through discussions
'
,
()
=>
{
beforeEach
(()
=>
{
// eslint-disable-next-line new-cap
window
.
mrTabs
=
{
eventHub
:
new
localVue
(),
tabShown
:
jest
.
fn
()
};
window
.
mrTabs
=
{
eventHub
:
createEventHub
(),
tabShown
:
jest
.
fn
()
};
});
describe
.
each
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment