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
75ad40f6
Commit
75ad40f6
authored
Nov 20, 2019
by
Enrique Alcantara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set instance types in initial state
Instead of fetching instance types, retrieve them from a data attribute.
parent
3baa517c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
18 deletions
+3
-18
app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue
...eks_cluster/components/eks_cluster_configuration_form.vue
+0
-2
app/assets/javascripts/create_cluster/eks_cluster/index.js
app/assets/javascripts/create_cluster/eks_cluster/index.js
+0
-4
app/assets/javascripts/create_cluster/eks_cluster/store/cluster_dropdown/index.js
...reate_cluster/eks_cluster/store/cluster_dropdown/index.js
+2
-2
app/assets/javascripts/create_cluster/eks_cluster/store/index.js
...ets/javascripts/create_cluster/eks_cluster/store/index.js
+1
-1
spec/frontend/create_cluster/eks_cluster/components/eks_cluster_configuration_form_spec.js
...cluster/components/eks_cluster_configuration_form_spec.js
+0
-9
No files found.
app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue
View file @
75ad40f6
...
...
@@ -24,7 +24,6 @@ const {
}
=
createNamespacedHelpers
(
'
securityGroups
'
);
const
{
mapState
:
mapInstanceTypesState
,
mapActions
:
mapInstanceTypesActions
,
}
=
createNamespacedHelpers
(
'
instanceTypes
'
);
export
default
{
...
...
@@ -265,7 +264,6 @@ export default {
mounted
()
{
this
.
fetchRegions
();
this
.
fetchRoles
();
this
.
fetchInstanceTypes
();
},
methods
:
{
...
mapActions
([
...
...
app/assets/javascripts/create_cluster/eks_cluster/index.js
View file @
75ad40f6
...
...
@@ -23,7 +23,6 @@ export default el => {
createClusterPath
,
signOutPath
,
externalLinkIcon
,
getInstanceTypesPath
,
}
=
el
.
dataset
;
return
new
Vue
({
...
...
@@ -38,9 +37,6 @@ export default el => {
createClusterPath
,
signOutPath
,
},
apiPaths
:
{
getInstanceTypesPath
,
},
awsCredentials
:
{
accessKeyId
,
secretAccessKey
,
...
...
app/assets/javascripts/create_cluster/eks_cluster/store/cluster_dropdown/index.js
View file @
75ad40f6
...
...
@@ -3,11 +3,11 @@ import actions from './actions';
import
mutations
from
'
./mutations
'
;
import
state
from
'
./state
'
;
const
createStore
=
fetchFn
=>
({
const
createStore
=
({
fetchFn
,
initialState
})
=>
({
actions
:
actions
(
fetchFn
),
getters
,
mutations
,
state
:
state
(
),
state
:
Object
.
assign
(
state
(),
initialState
||
{}
),
});
export
default
createStore
;
app/assets/javascripts/create_cluster/eks_cluster/store/index.js
View file @
75ad40f6
...
...
@@ -48,7 +48,7 @@ const createStore = ({ initialState }) =>
},
instanceTypes
:
{
namespaced
:
true
,
...
clusterDropdownStore
({
initialState
:
initialState
.
instanceTypes
}),
...
clusterDropdownStore
({
initialState
:
{
items
:
initialState
.
instanceTypes
}
}),
},
},
});
...
...
spec/frontend/create_cluster/eks_cluster/components/eks_cluster_configuration_form_spec.js
View file @
75ad40f6
...
...
@@ -27,7 +27,6 @@ describe('EksClusterConfigurationForm', () => {
let
subnetsActions
;
let
keyPairsActions
;
let
securityGroupsActions
;
let
instanceTypesActions
;
let
vm
;
beforeEach
(()
=>
{
...
...
@@ -66,9 +65,6 @@ describe('EksClusterConfigurationForm', () => {
securityGroupsActions
=
{
fetchItems
:
jest
.
fn
(),
};
instanceTypesActions
=
{
fetchItems
:
jest
.
fn
(),
};
rolesState
=
{
...
clusterDropdownStoreState
(),
};
...
...
@@ -127,7 +123,6 @@ describe('EksClusterConfigurationForm', () => {
instanceTypes
:
{
namespaced
:
true
,
state
:
instanceTypesState
,
actions
:
instanceTypesActions
,
},
},
});
...
...
@@ -187,10 +182,6 @@ describe('EksClusterConfigurationForm', () => {
it
(
'
fetches available roles
'
,
()
=>
{
expect
(
rolesActions
.
fetchItems
).
toHaveBeenCalled
();
});
it
(
'
fetches available instance types
'
,
()
=>
{
expect
(
instanceTypesActions
.
fetchItems
).
toHaveBeenCalled
();
});
});
it
(
'
dispatches signOut action when sign out button is clicked
'
,
()
=>
{
...
...
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