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
c1461770
Commit
c1461770
authored
Sep 27, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed deployment flag having content hidden when being too far right
parent
3b2d68d3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
1 deletion
+45
-1
app/assets/javascripts/monitoring/components/graph.vue
app/assets/javascripts/monitoring/components/graph.vue
+1
-0
app/assets/javascripts/monitoring/components/graph/deployment.vue
...ts/javascripts/monitoring/components/graph/deployment.vue
+13
-1
changelogs/unreleased/38031-monitoring-hover-info-is-clipped.yml
...ogs/unreleased/38031-monitoring-hover-info-is-clipped.yml
+6
-0
spec/javascripts/monitoring/graph/deployment_spec.js
spec/javascripts/monitoring/graph/deployment_spec.js
+25
-0
No files found.
app/assets/javascripts/monitoring/components/graph.vue
View file @
c1461770
...
@@ -247,6 +247,7 @@
...
@@ -247,6 +247,7 @@
<graph-deployment
<graph-deployment
:show-deploy-info=
"showDeployInfo"
:show-deploy-info=
"showDeployInfo"
:deployment-data=
"reducedDeploymentData"
:deployment-data=
"reducedDeploymentData"
:graph-width=
"graphWidth"
:graph-height=
"graphHeight"
:graph-height=
"graphHeight"
:graph-height-offset=
"graphHeightOffset"
:graph-height-offset=
"graphHeightOffset"
/>
/>
...
...
app/assets/javascripts/monitoring/components/graph/deployment.vue
View file @
c1461770
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
type
:
Number
,
type
:
Number
,
required
:
true
,
required
:
true
,
},
},
graphWidth
:
{
type
:
Number
,
required
:
true
,
},
},
},
computed
:
{
computed
:
{
...
@@ -47,6 +51,14 @@
...
@@ -47,6 +51,14 @@
transformDeploymentGroup
(
deployment
)
{
transformDeploymentGroup
(
deployment
)
{
return
`translate(
${
Math
.
floor
(
deployment
.
xPos
)
+
1
}
, 20)`
;
return
`translate(
${
Math
.
floor
(
deployment
.
xPos
)
+
1
}
, 20)`
;
},
},
positionFlag
(
deployment
)
{
let
xPosition
=
3
;
if
(
deployment
.
xPos
>
(
this
.
graphWidth
-
200
))
{
xPosition
=
-
97
;
}
return
xPosition
;
},
},
},
};
};
</
script
>
</
script
>
...
@@ -77,7 +89,7 @@
...
@@ -77,7 +89,7 @@
<svg
<svg
v-if=
"deployment.showDeploymentFlag"
v-if=
"deployment.showDeploymentFlag"
class=
"js-deploy-info-box"
class=
"js-deploy-info-box"
x=
"3
"
:x=
"positionFlag(deployment)
"
y=
"0"
y=
"0"
width=
"92"
width=
"92"
height=
"60"
>
height=
"60"
>
...
...
changelogs/unreleased/38031-monitoring-hover-info-is-clipped.yml
0 → 100644
View file @
c1461770
---
title
:
Move the deployment flag content to the left when deployment marker is near
the end
merge_request
:
14514
author
:
type
:
fixed
spec/javascripts/monitoring/graph/deployment_spec.js
View file @
c1461770
...
@@ -21,6 +21,7 @@ describe('MonitoringDeployment', () => {
...
@@ -21,6 +21,7 @@ describe('MonitoringDeployment', () => {
const
component
=
createComponent
({
const
component
=
createComponent
({
showDeployInfo
:
false
,
showDeployInfo
:
false
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphWidth
:
440
,
graphHeight
:
300
,
graphHeight
:
300
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -36,6 +37,7 @@ describe('MonitoringDeployment', () => {
...
@@ -36,6 +37,7 @@ describe('MonitoringDeployment', () => {
showDeployInfo
:
false
,
showDeployInfo
:
false
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -49,6 +51,7 @@ describe('MonitoringDeployment', () => {
...
@@ -49,6 +51,7 @@ describe('MonitoringDeployment', () => {
showDeployInfo
:
false
,
showDeployInfo
:
false
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -62,6 +65,7 @@ describe('MonitoringDeployment', () => {
...
@@ -62,6 +65,7 @@ describe('MonitoringDeployment', () => {
showDeployInfo
:
false
,
showDeployInfo
:
false
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -75,6 +79,7 @@ describe('MonitoringDeployment', () => {
...
@@ -75,6 +79,7 @@ describe('MonitoringDeployment', () => {
const
component
=
createComponent
({
const
component
=
createComponent
({
showDeployInfo
:
true
,
showDeployInfo
:
true
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphWidth
:
440
,
graphHeight
:
300
,
graphHeight
:
300
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -82,12 +87,29 @@ describe('MonitoringDeployment', () => {
...
@@ -82,12 +87,29 @@ describe('MonitoringDeployment', () => {
expect
(
component
.
$el
.
querySelector
(
'
.js-deploy-info-box
'
)).
toBeNull
();
expect
(
component
.
$el
.
querySelector
(
'
.js-deploy-info-box
'
)).
toBeNull
();
});
});
it
(
'
positions the flag to the left when the xPos is too far right
'
,
()
=>
{
reducedDeploymentData
[
0
].
showDeploymentFlag
=
false
;
reducedDeploymentData
[
0
].
xPos
=
250
;
const
component
=
createComponent
({
showDeployInfo
:
true
,
deploymentData
:
reducedDeploymentData
,
graphWidth
:
440
,
graphHeight
:
300
,
graphHeightOffset
:
120
,
});
expect
(
component
.
positionFlag
(
reducedDeploymentData
[
0
]),
).
toBeLessThan
(
0
);
});
it
(
'
shows the deployment flag
'
,
()
=>
{
it
(
'
shows the deployment flag
'
,
()
=>
{
reducedDeploymentData
[
0
].
showDeploymentFlag
=
true
;
reducedDeploymentData
[
0
].
showDeploymentFlag
=
true
;
const
component
=
createComponent
({
const
component
=
createComponent
({
showDeployInfo
:
true
,
showDeployInfo
:
true
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -102,6 +124,7 @@ describe('MonitoringDeployment', () => {
...
@@ -102,6 +124,7 @@ describe('MonitoringDeployment', () => {
showDeployInfo
:
true
,
showDeployInfo
:
true
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -115,6 +138,7 @@ describe('MonitoringDeployment', () => {
...
@@ -115,6 +138,7 @@ describe('MonitoringDeployment', () => {
showDeployInfo
:
true
,
showDeployInfo
:
true
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
@@ -127,6 +151,7 @@ describe('MonitoringDeployment', () => {
...
@@ -127,6 +151,7 @@ describe('MonitoringDeployment', () => {
showDeployInfo
:
true
,
showDeployInfo
:
true
,
deploymentData
:
reducedDeploymentData
,
deploymentData
:
reducedDeploymentData
,
graphHeight
:
300
,
graphHeight
:
300
,
graphWidth
:
440
,
graphHeightOffset
:
120
,
graphHeightOffset
:
120
,
});
});
...
...
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