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
5fdca34d
Commit
5fdca34d
authored
Apr 04, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds CSS and js logic to render new canary colors
parent
5470f02c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
2 deletions
+43
-2
app/assets/javascripts/environments/components/deploy_board_component.js
...scripts/environments/components/deploy_board_component.js
+2
-1
app/assets/javascripts/environments/components/deploy_board_instance_component.js
...nvironments/components/deploy_board_instance_component.js
+16
-1
app/assets/stylesheets/pages/environments.scss
app/assets/stylesheets/pages/environments.scss
+14
-0
spec/javascripts/environments/deploy_board_instance_component_spec.js
...ipts/environments/deploy_board_instance_component_spec.js
+11
-0
No files found.
app/assets/javascripts/environments/components/deploy_board_component.js
View file @
5fdca34d
...
...
@@ -163,7 +163,8 @@ export default {
<template v-for="instance in deployBoardData.instances">
<instance-component
:status="instance.status"
:tooltipText="instance.tooltip"/>
:tooltipText="instance.tooltip"
:stable="instance.stable" />
</template>
</div>
</section>
...
...
app/assets/javascripts/environments/components/deploy_board_instance_component.js
View file @
5fdca34d
...
...
@@ -7,6 +7,9 @@
* see more information about this in
* https://gitlab.com/gitlab-org/gitlab-ee/uploads/5fff049fd88336d9ee0c6ef77b1ba7e3/monitoring__deployboard--key.png
*
* An instance can represent a normal deploy or a canary deploy. In the latter we need to provide
* this information in the tooltip and the colors.
* Mockup is https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1551#note_26595150
*/
export
default
{
...
...
@@ -28,11 +31,23 @@ export default {
required
:
false
,
default
:
''
,
},
stable
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
},
computed
:
{
cssClass
()
{
return
`deploy-board-instance-
${
this
.
status
}
`
;
let
cssClassName
=
`deploy-board-instance-
${
this
.
status
}
`
;
if
(
!
this
.
stable
)
{
cssClassName
=
`deploy-board-instance-
${
this
.
status
}
deploy-board-instance-canary`
;
}
return
cssClassName
;
},
},
...
...
app/assets/stylesheets/pages/environments.scss
View file @
5fdca34d
...
...
@@ -240,6 +240,9 @@
border-width
:
1px
;
border-style
:
solid
;
margin
:
1px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
&
-finished
{
background-color
:
$green-100
;
...
...
@@ -270,6 +273,17 @@
background-color
:
$white-light
;
border-color
:
$border-color
;
}
&
.deploy-board-instance-canary
{
&
:
:
after
{
width
:
7px
;
height
:
7px
;
border
:
1px
solid
$white-light
;
background-color
:
$orange-300
;
border-radius
:
50px
;
content
:
""
;
}
}
}
.deploy-board-icon
i
{
...
...
spec/javascripts/environments/deploy_board_instance_component_spec.js
View file @
5fdca34d
...
...
@@ -30,4 +30,15 @@ describe('Deploy Board Instance', () => {
expect
(
component
.
$el
.
classList
.
contains
(
'
deploy-board-instance-deploying
'
)).
toBe
(
true
);
expect
(
component
.
$el
.
getAttribute
(
'
data-title
'
)).
toEqual
(
''
);
});
it
(
'
should render a div with canary class when stable prop is provided as false
'
,
()
=>
{
const
component
=
new
DeployBoardInstanceComponent
({
propsData
:
{
status
:
'
deploying
'
,
stable
:
false
,
},
}).
$mount
();
expect
(
component
.
$el
.
classList
.
contains
(
'
deploy-board-instance-canary
'
)).
toBe
(
true
);
});
});
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