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
b45714db
Commit
b45714db
authored
May 09, 2018
by
Dennis Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
e33c4458
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
38 deletions
+35
-38
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_dropdown_mixin.js
...ts/gke_cluster_dropdowns/components/gke_dropdown_mixin.js
+0
-0
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
...luster_dropdowns/components/gke_machine_type_dropdown.vue
+8
-8
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
..._cluster_dropdowns/components/gke_project_id_dropdown.vue
+19
-22
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
...ts/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
+8
-8
No files found.
app/assets/javascripts/projects/gke_cluster_dropdowns/components/g
cp
_dropdown_mixin.js
→
app/assets/javascripts/projects/gke_cluster_dropdowns/components/g
ke
_dropdown_mixin.js
View file @
b45714db
File moved
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
View file @
b45714db
...
...
@@ -3,11 +3,17 @@ import _ from 'underscore';
import
{
s__
}
from
'
~/locale
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
g
cpDropdownMixin
from
'
./gcp
_dropdown_mixin
'
;
import
g
keDropdownMixin
from
'
./gke
_dropdown_mixin
'
;
export
default
{
name
:
'
GkeMachineTypeDropdown
'
,
mixins
:
[
gcpDropdownMixin
],
mixins
:
[
gkeDropdownMixin
],
data
()
{
return
{
searchPlaceholderText
:
s__
(
'
ClusterIntegration|Search machine types
'
),
noSearchResultsText
:
s__
(
'
ClusterIntegration|No machine types matched your search
'
),
};
},
computed
:
{
...
mapState
([
'
selectedProject
'
,
'
selectedZone
'
,
'
selectedMachineType
'
]),
...
mapState
({
items
:
'
machineTypes
'
}),
...
...
@@ -35,12 +41,6 @@ export default {
?
s__
(
'
ClusterIntegration|Select zone to choose machine type
'
)
:
s__
(
'
ClusterIntegration|Select machine type
'
);
},
searchPlaceholderText
()
{
return
s__
(
'
ClusterIntegration|Search machine types
'
);
},
noSearchResultsText
()
{
return
s__
(
'
ClusterIntegration|No machine types matched your search
'
);
},
},
watch
:
{
selectedZone
()
{
...
...
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
View file @
b45714db
...
...
@@ -3,11 +3,11 @@ import _ from 'underscore';
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
g
cpDropdownMixin
from
'
./gcp
_dropdown_mixin
'
;
import
g
keDropdownMixin
from
'
./gke
_dropdown_mixin
'
;
export
default
{
name
:
'
GkeProjectIdDropdown
'
,
mixins
:
[
g
cp
DropdownMixin
],
mixins
:
[
g
ke
DropdownMixin
],
props
:
{
docsUrl
:
{
type
:
String
,
...
...
@@ -17,6 +17,8 @@ export default {
data
()
{
return
{
isLoading
:
true
,
searchPlaceholderText
:
s__
(
'
ClusterIntegration|Search projects
'
),
noSearchResultsText
:
s__
(
'
ClusterIntegration|No projects matched your search
'
),
};
},
computed
:
{
...
...
@@ -29,9 +31,6 @@ export default {
isDisabled
()
{
return
this
.
items
.
length
<
2
;
},
noSearchResultsText
()
{
return
s__
(
'
ClusterIntegration|No projects matched your search
'
);
},
toggleText
()
{
if
(
this
.
isLoading
)
{
return
s__
(
'
ClusterIntegration|Fetching projects
'
);
...
...
@@ -45,9 +44,6 @@ export default {
?
s__
(
'
ClusterIntegration|No projects found
'
)
:
s__
(
'
ClusterIntegration|Select project
'
);
},
searchPlaceholderText
()
{
return
s__
(
'
ClusterIntegration|Search projects
'
);
},
helpText
()
{
let
message
;
if
(
this
.
hasErrors
)
{
...
...
@@ -73,25 +69,26 @@ export default {
},
created
()
{
this
.
getProjects
()
.
then
(()
=>
{
if
(
this
.
defaultValue
)
{
const
projectToSelect
=
_
.
find
(
this
.
items
,
item
=>
item
.
projectId
===
this
.
defaultValue
);
if
(
projectToSelect
)
{
this
.
setItem
(
projectToSelect
);
}
}
else
if
(
this
.
items
.
length
===
1
)
{
this
.
setItem
(
this
.
items
[
0
]);
}
this
.
isLoading
=
false
;
this
.
hasErrors
=
false
;
})
.
then
(
this
.
fetchSuccessHandler
)
.
catch
(
this
.
fetchFailureHandler
);
},
methods
:
{
...
mapActions
([
'
getProjects
'
]),
...
mapActions
({
setItem
:
'
setProject
'
}),
fetchSuccessHandler
()
{
if
(
this
.
defaultValue
)
{
const
projectToSelect
=
_
.
find
(
this
.
items
,
item
=>
item
.
projectId
===
this
.
defaultValue
);
if
(
projectToSelect
)
{
this
.
setItem
(
projectToSelect
);
}
}
else
if
(
this
.
items
.
length
===
1
)
{
this
.
setItem
(
this
.
items
[
0
]);
}
this
.
isLoading
=
false
;
this
.
hasErrors
=
false
;
},
},
};
</
script
>
...
...
app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
View file @
b45714db
...
...
@@ -2,11 +2,17 @@
import
{
s__
}
from
'
~/locale
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
g
cpDropdownMixin
from
'
./gcp
_dropdown_mixin
'
;
import
g
keDropdownMixin
from
'
./gke
_dropdown_mixin
'
;
export
default
{
name
:
'
GkeZoneDropdown
'
,
mixins
:
[
gcpDropdownMixin
],
mixins
:
[
gkeDropdownMixin
],
data
()
{
return
{
searchPlaceholderText
:
s__
(
'
ClusterIntegration|Search zones
'
),
noSearchResultsText
:
s__
(
'
ClusterIntegration|No zones matched your search
'
),
};
},
computed
:
{
...
mapState
([
'
selectedProject
'
,
'
selectedZone
'
]),
...
mapState
({
items
:
'
zones
'
}),
...
...
@@ -27,12 +33,6 @@ export default {
?
s__
(
'
ClusterIntegration|Select project to choose zone
'
)
:
s__
(
'
ClusterIntegration|Select zone
'
);
},
searchPlaceholderText
()
{
return
s__
(
'
ClusterIntegration|Search zones
'
);
},
noSearchResultsText
()
{
return
s__
(
'
ClusterIntegration|No zones matched your search
'
);
},
},
watch
:
{
selectedProject
()
{
...
...
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