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
06fb70fc
Commit
06fb70fc
authored
May 11, 2020
by
Emily Ring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added default cluster status
Added default cluster status to /clusters_list/constants.js
parent
1282559c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
app/assets/javascripts/clusters_list/components/clusters.vue
app/assets/javascripts/clusters_list/components/clusters.vue
+4
-4
app/assets/javascripts/clusters_list/constants.js
app/assets/javascripts/clusters_list/constants.js
+1
-0
spec/frontend/clusters_list/components/clusters_spec.js
spec/frontend/clusters_list/components/clusters_spec.js
+1
-0
spec/frontend/clusters_list/mock_data.js
spec/frontend/clusters_list/mock_data.js
+9
-0
No files found.
app/assets/javascripts/clusters_list/components/clusters.vue
View file @
06fb70fc
...
...
@@ -54,12 +54,12 @@ export default {
methods
:
{
...
mapActions
([
'
fetchClusters
'
]),
statusClass
(
status
)
{
const
{
className
}
=
STATUSES
[
status
]
;
return
className
||
'
disabled
'
;
const
iconClass
=
STATUSES
[
status
]
||
STATUSES
.
default
;
return
iconClass
.
className
;
},
statusTitle
(
status
)
{
const
{
title
}
=
STATUSES
[
status
]
;
return
sprintf
(
__
(
'
Status: %{title}
'
),
{
title
},
false
);
const
iconTitle
=
STATUSES
[
status
]
||
STATUSES
.
default
;
return
sprintf
(
__
(
'
Status: %{title}
'
),
{
title
:
iconTitle
.
title
},
false
);
},
},
};
...
...
app/assets/javascripts/clusters_list/constants.js
View file @
06fb70fc
...
...
@@ -7,6 +7,7 @@ export const CLUSTER_TYPES = {
};
export
const
STATUSES
=
{
default
:
{
className
:
'
bg-white
'
,
title
:
__
(
'
Unknown
'
)
},
disabled
:
{
className
:
'
disabled
'
,
title
:
__
(
'
Disabled
'
)
},
created
:
{
className
:
'
bg-success
'
,
title
:
__
(
'
Connected
'
)
},
unreachable
:
{
className
:
'
bg-danger
'
,
title
:
__
(
'
Unreachable
'
)
},
...
...
spec/frontend/clusters_list/components/clusters_spec.js
View file @
06fb70fc
...
...
@@ -80,6 +80,7 @@ describe('Clusters', () => {
${
'
authentication_failure
'
}
|
${
'
bg-warning
'
}
|
${
2
}
${
'
deleting
'
}
|
${
null
}
|
${
3
}
${
'
created
'
}
|
${
'
bg-success
'
}
|
${
4
}
${
'
default
'
}
|
${
'
bg-white
'
}
|
${
5
}
`
(
'
renders a status for each cluster
'
,
({
statusName
,
className
,
lineNumber
})
=>
{
const
statuses
=
findStatuses
();
const
status
=
statuses
.
at
(
lineNumber
);
...
...
spec/frontend/clusters_list/mock_data.js
View file @
06fb70fc
...
...
@@ -44,6 +44,15 @@ export const clusterList = [
cpu
:
'
6 (100% free)
'
,
memory
:
'
20.12 (35% free)
'
,
},
{
name
:
'
My Cluster 6
'
,
environmentScope
:
'
*
'
,
size
:
'
1
'
,
clusterType
:
'
project_type
'
,
status
:
'
cleanup_ongoing
'
,
cpu
:
'
6 (100% free)
'
,
memory
:
'
20.12 (35% free)
'
,
},
];
export
const
apiData
=
{
...
...
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