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
0
Merge Requests
0
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
Boxiang Sun
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
...luster_dropdowns/components/gke_machine_type_dropdown.vue
+7
-4
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
...ts/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
+4
-3
app/assets/javascripts/projects/gke_cluster_dropdowns/stores/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
...
@@ -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
DropdownHiddenInput
from
'
~/vue_shared/components/dropdown/dropdown_hidden_input.vue
'
;
import
DropdownButton
from
'
~/vue_shared/components/dropdown/dropdown_button.vue
'
;
import
DropdownButton
from
'
~/vue_shared/components/dropdown/dropdown_button.vue
'
;
import
eventHub
from
'
../eventhub
'
;
import
store
from
'
../stores
'
;
import
store
from
'
../stores
'
;
export
default
{
export
default
{
...
@@ -79,9 +78,13 @@ export default {
...
@@ -79,9 +78,13 @@ export default {
return
s__
(
'
ClusterIntegration|No machine types matched your search
'
);
return
s__
(
'
ClusterIntegration|No machine types matched your search
'
);
},
},
},
},
created
()
{
watch
:
{
eventHub
.
$on
(
'
zoneSelected
'
,
this
.
fetchMachineTypes
);
selectedZone
()
{
eventHub
.
$on
(
'
machineTypeSelected
'
,
this
.
enableSubmit
);
this
.
fetchMachineTypes
();
},
selectedMachineType
()
{
this
.
enableSubmit
();
},
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
setMachineType
'
,
'
getMachineTypes
'
]),
...
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
...
@@ -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
DropdownHiddenInput
from
'
~/vue_shared/components/dropdown/dropdown_hidden_input.vue
'
;
import
DropdownButton
from
'
~/vue_shared/components/dropdown/dropdown_button.vue
'
;
import
DropdownButton
from
'
~/vue_shared/components/dropdown/dropdown_button.vue
'
;
import
eventHub
from
'
../eventhub
'
;
import
store
from
'
../stores
'
;
import
store
from
'
../stores
'
;
export
default
{
export
default
{
...
@@ -70,8 +69,10 @@ export default {
...
@@ -70,8 +69,10 @@ export default {
return
s__
(
'
ClusterIntegration|No zones matched your search
'
);
return
s__
(
'
ClusterIntegration|No zones matched your search
'
);
},
},
},
},
created
()
{
watch
:
{
eventHub
.
$on
(
'
projectSelected
'
,
this
.
fetchZones
);
selectedProject
()
{
this
.
fetchZones
();
},
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
setZone
'
,
'
getZones
'
]),
...
mapActions
([
'
setZone
'
,
'
getZones
'
]),
...
...
app/assets/javascripts/projects/gke_cluster_dropdowns/stores/actions.js
View file @
c997c4cc
...
@@ -3,24 +3,17 @@ import Flash from '~/flash';
...
@@ -3,24 +3,17 @@ import Flash from '~/flash';
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
eventHub
from
'
../eventhub
'
;
export
const
setProject
=
({
commit
},
selectedProject
)
=>
{
export
const
setProject
=
({
commit
},
selectedProject
)
=>
{
commit
(
types
.
SET_PROJECT
,
selectedProject
);
commit
(
types
.
SET_PROJECT
,
selectedProject
);
eventHub
.
$emit
(
'
projectSelected
'
);
};
};
export
const
setZone
=
({
commit
},
selectedZone
)
=>
{
export
const
setZone
=
({
commit
},
selectedZone
)
=>
{
commit
(
types
.
SET_ZONE
,
selectedZone
);
commit
(
types
.
SET_ZONE
,
selectedZone
);
eventHub
.
$emit
(
'
zoneSelected
'
);
};
};
export
const
setMachineType
=
({
commit
},
selectedMachineType
)
=>
{
export
const
setMachineType
=
({
commit
},
selectedMachineType
)
=>
{
commit
(
types
.
SET_MACHINE_TYPE
,
selectedMachineType
);
commit
(
types
.
SET_MACHINE_TYPE
,
selectedMachineType
);
eventHub
.
$emit
(
'
machineTypeSelected
'
);
};
};
export
const
getProjects
=
({
commit
})
=>
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