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
cc9def05
Commit
cc9def05
authored
Aug 29, 2018
by
Adriel Santiago
Committed by
Fatih Acet
Aug 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Show number of pods deployed on Deploy Boards"
parent
bff7c4b1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
3 deletions
+48
-3
ee/app/assets/javascripts/environments/components/deploy_board_component.vue
...cripts/environments/components/deploy_board_component.vue
+29
-3
ee/changelogs/unreleased/5906-show-number-of-pods-deployed-on-deploy-boards.yml
...ed/5906-show-number-of-pods-deployed-on-deploy-boards.yml
+5
-0
ee/spec/javascripts/environments/deploy_board_component_spec.js
...c/javascripts/environments/deploy_board_component_spec.js
+9
-0
locale/gitlab.pot
locale/gitlab.pot
+5
-0
No files found.
ee/app/assets/javascripts/environments/components/deploy_board_component.vue
View file @
cc9def05
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
n__
}
from
'
~/locale
'
;
import
{
n__
}
from
'
~/locale
'
;
import
loadingIcon
from
'
~/vue_shared/components/loading_icon.vue
'
;
import
loadingIcon
from
'
~/vue_shared/components/loading_icon.vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
deployBoardSvg
from
'
ee_empty_states/icons/_deploy_board.svg
'
;
import
deployBoardSvg
from
'
ee_empty_states/icons/_deploy_board.svg
'
;
import
instanceComponent
from
'
./deploy_board_instance_component.vue
'
;
import
instanceComponent
from
'
./deploy_board_instance_component.vue
'
;
...
@@ -19,6 +20,9 @@
...
@@ -19,6 +20,9 @@
instanceComponent
,
instanceComponent
,
loadingIcon
,
loadingIcon
,
},
},
directives
:
{
tooltip
,
},
props
:
{
props
:
{
deployBoardData
:
{
deployBoardData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -45,8 +49,24 @@
...
@@ -45,8 +49,24 @@
canRenderEmptyState
()
{
canRenderEmptyState
()
{
return
!
this
.
isLoading
&&
this
.
isEmpty
;
return
!
this
.
isLoading
&&
this
.
isEmpty
;
},
},
instanceCount
()
{
const
{
instances
}
=
this
.
deployBoardData
;
return
Array
.
isArray
(
instances
)
?
instances
.
length
:
0
;
},
instanceIsCompletedCount
()
{
const
completionPercentage
=
this
.
deployBoardData
.
completion
/
100
;
const
completionCount
=
Math
.
floor
(
completionPercentage
*
this
.
instanceCount
);
return
Number
.
isNaN
(
completionCount
)
?
0
:
completionCount
;
},
instanceIsCompletedText
()
{
const
title
=
n__
(
'
instance completed
'
,
'
instances completed
'
,
this
.
instanceIsCompletedCount
);
return
`
${
this
.
instanceIsCompletedCount
}
${
title
}
`
;
},
instanceTitle
()
{
instanceTitle
()
{
return
n__
(
'
Instance
'
,
'
Instances
'
,
this
.
deployBoardData
.
instances
.
length
);
return
n__
(
'
Instance
'
,
'
Instances
'
,
this
.
instanceCount
);
},
},
projectName
()
{
projectName
()
{
return
'
<projectname>
'
;
return
'
<projectname>
'
;
...
@@ -65,14 +85,20 @@
...
@@ -65,14 +85,20 @@
<div
v-if=
"canRenderDeployBoard"
>
<div
v-if=
"canRenderDeployBoard"
>
<section
class=
"deploy-board-information"
>
<section
class=
"deploy-board-information"
>
<span>
<span
v-tooltip
:title=
"instanceIsCompletedText"
>
<span
class=
"percentage"
>
{{
deployBoardData
.
completion
}}
%
</span>
<span
class=
"percentage"
>
{{
deployBoardData
.
completion
}}
%
</span>
<span
class=
"text"
>
Complete
</span>
<span
class=
"text"
>
Complete
</span>
</span>
</span>
</section>
</section>
<section
class=
"deploy-board-instances"
>
<section
class=
"deploy-board-instances"
>
<p
class=
"text"
>
{{
instanceTitle
}}
</p>
<p
class=
"text"
>
<span>
{{
instanceTitle
}}
</span>
<span
class=
"total-instances"
>
(
{{
instanceCount
}}
)
</span>
</p>
<div
class=
"deploy-board-instances-container"
>
<div
class=
"deploy-board-instances-container"
>
<template
v-for=
"(instance, i) in deployBoardData.instances"
>
<template
v-for=
"(instance, i) in deployBoardData.instances"
>
...
...
ee/changelogs/unreleased/5906-show-number-of-pods-deployed-on-deploy-boards.yml
0 → 100644
View file @
cc9def05
---
title
:
Show total and completed instances deployed on deploy boards
merge_request
:
6955
author
:
type
:
added
ee/spec/javascripts/environments/deploy_board_component_spec.js
View file @
cc9def05
...
@@ -29,6 +29,15 @@ describe('Deploy Board', () => {
...
@@ -29,6 +29,15 @@ describe('Deploy Board', () => {
).
toEqual
(
`
${
deployBoardMockData
.
completion
}
%`
);
).
toEqual
(
`
${
deployBoardMockData
.
completion
}
%`
);
});
});
it
(
'
should render total instance count
'
,
()
=>
{
const
renderedTotal
=
component
.
$el
.
querySelector
(
'
.deploy-board-instances .total-instances
'
);
const
actualTotal
=
deployBoardMockData
.
instances
.
length
;
expect
(
renderedTotal
.
textContent
,
).
toEqual
(
`(
${
actualTotal
}
)`
);
});
it
(
'
should render all instances
'
,
()
=>
{
it
(
'
should render all instances
'
,
()
=>
{
const
instances
=
component
.
$el
.
querySelectorAll
(
'
.deploy-board-instances-container a
'
);
const
instances
=
component
.
$el
.
querySelectorAll
(
'
.deploy-board-instances-container a
'
);
...
...
locale/gitlab.pot
View file @
cc9def05
...
@@ -8476,6 +8476,11 @@ msgstr ""
...
@@ -8476,6 +8476,11 @@ msgstr ""
msgid "importing"
msgid "importing"
msgstr ""
msgstr ""
msgid "instance completed"
msgid_plural "instances completed"
msgstr[0] ""
msgstr[1] ""
msgid "is invalid because there is downstream lock"
msgid "is invalid because there is downstream lock"
msgstr ""
msgstr ""
...
...
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