BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c997c4cc
Commit
c997c4cc
authored
May 09, 2018
by
Dennis Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use watchers instead of eventHub
parent
e73da567
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
gke_machine_type_dropdown.vue
...luster_dropdowns/components/gke_machine_type_dropdown.vue
+7
-4
gke_zone_dropdown.vue
...ts/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
+4
-3
actions.js
...ascripts/projects/gke_cluster_dropdowns/stores/actions.js
+0
-7
No files found.
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
View file @
c997c4cc
...
...
@@ -7,7 +7,6 @@ import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_searc
import
DropdownHiddenInput
from
'~/vue_shared/components/dropdown/dropdown_hidden_input.vue'
;
import
DropdownButton
from
'~/vue_shared/components/dropdown/dropdown_button.vue'
;
import
eventHub
from
'../eventhub'
;
import
store
from
'../stores'
;
export
default
{
...
...
@@ -79,9 +78,13 @@ export default {
return
s__
(
'ClusterIntegration|No machine types matched your search'
);
},
},
created
()
{
eventHub
.
$on
(
'zoneSelected'
,
this
.
fetchMachineTypes
);
eventHub
.
$on
(
'machineTypeSelected'
,
this
.
enableSubmit
);
watch
:
{
selectedZone
()
{
this
.
fetchMachineTypes
();
},
selectedMachineType
()
{
this
.
enableSubmit
();
},
},
methods
:
{
...
mapActions
([
'setMachineType'
,
'getMachineTypes'
]),
...
...
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
View file @
c997c4cc
...
...
@@ -7,7 +7,6 @@ import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_searc
import
DropdownHiddenInput
from
'~/vue_shared/components/dropdown/dropdown_hidden_input.vue'
;
import
DropdownButton
from
'~/vue_shared/components/dropdown/dropdown_button.vue'
;
import
eventHub
from
'../eventhub'
;
import
store
from
'../stores'
;
export
default
{
...
...
@@ -70,8 +69,10 @@ export default {
return
s__
(
'ClusterIntegration|No zones matched your search'
);
},
},
created
()
{
eventHub
.
$on
(
'projectSelected'
,
this
.
fetchZones
);
watch
:
{
selectedProject
()
{
this
.
fetchZones
();
},
},
methods
:
{
...
mapActions
([
'setZone'
,
'getZones'
]),
...
...
app/assets/javascripts/projects/gke_cluster_dropdowns/stores/actions.js
View file @
c997c4cc
...
...
@@ -3,24 +3,17 @@ import Flash from '~/flash';
import
{
s__
,
sprintf
}
from
'~/locale'
;
import
*
as
types
from
'./mutation_types'
;
import
eventHub
from
'../eventhub'
;
export
const
setProject
=
({
commit
},
selectedProject
)
=>
{
commit
(
types
.
SET_PROJECT
,
selectedProject
);
eventHub
.
$emit
(
'projectSelected'
);
};
export
const
setZone
=
({
commit
},
selectedZone
)
=>
{
commit
(
types
.
SET_ZONE
,
selectedZone
);
eventHub
.
$emit
(
'zoneSelected'
);
};
export
const
setMachineType
=
({
commit
},
selectedMachineType
)
=>
{
commit
(
types
.
SET_MACHINE_TYPE
,
selectedMachineType
);
eventHub
.
$emit
(
'machineTypeSelected'
);
};
export
const
getProjects
=
({
commit
})
=>
...
...
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