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
930596aa
Commit
930596aa
authored
Mar 15, 2021
by
Sarah GP
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint and prettify
parent
d82880b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue
...scripts/pipelines/components/graph_shared/links_layer.vue
+6
-8
spec/frontend/pipelines/graph_shared/links_inner_spec.js
spec/frontend/pipelines/graph_shared/links_inner_spec.js
+1
-1
No files found.
app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue
View file @
930596aa
<
script
>
<
script
>
import
{
isEmpty
}
from
'
lodash
'
;
import
{
GlAlert
}
from
'
@gitlab/ui
'
;
import
{
GlAlert
}
from
'
@gitlab/ui
'
;
import
{
isEmpty
}
from
'
lodash
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
import
{
PIPELINES_DETAIL_LINKS_MARK_CALCULATE_START
,
PIPELINES_DETAIL_LINKS_MARK_CALCULATE_START
,
...
@@ -12,9 +12,9 @@ import {
...
@@ -12,9 +12,9 @@ import {
}
from
'
~/performance/constants
'
;
}
from
'
~/performance/constants
'
;
import
{
performanceMarkAndMeasure
}
from
'
~/performance/utils
'
;
import
{
performanceMarkAndMeasure
}
from
'
~/performance/utils
'
;
import
{
reportToSentry
}
from
'
../graph/utils
'
;
import
{
reportToSentry
}
from
'
../graph/utils
'
;
import
LinksInner
from
'
./links_inner.vue
'
;
import
{
parseData
}
from
'
../parsing_utils
'
;
import
{
parseData
}
from
'
../parsing_utils
'
;
import
{
reportPerformance
}
from
'
./api
'
;
import
{
reportPerformance
}
from
'
./api
'
;
import
LinksInner
from
'
./links_inner.vue
'
;
export
default
{
export
default
{
name
:
'
LinksLayer
'
,
name
:
'
LinksLayer
'
,
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
neverShowLinks
:
{
neverShowLinks
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
default
:
false
default
:
false
,
},
},
},
},
data
()
{
data
()
{
...
@@ -73,7 +73,7 @@ export default {
...
@@ -73,7 +73,7 @@ export default {
needing to remove the component entirely for iteration or based on graph type.
needing to remove the component entirely for iteration or based on graph type.
*/
*/
if
(
this
.
neverShowLinks
)
{
if
(
this
.
neverShowLinks
)
{
return
false
;
return
false
;
}
}
return
!
this
.
containerZero
&&
!
this
.
showLinkedLayers
&&
!
this
.
alertDismissed
;
return
!
this
.
containerZero
&&
!
this
.
showLinkedLayers
&&
!
this
.
alertDismissed
;
...
@@ -95,7 +95,7 @@ export default {
...
@@ -95,7 +95,7 @@ export default {
errorCaptured
(
err
,
_vm
,
info
)
{
errorCaptured
(
err
,
_vm
,
info
)
{
reportToSentry
(
this
.
$options
.
name
,
`error:
${
err
}
, info:
${
info
}
`
);
reportToSentry
(
this
.
$options
.
name
,
`error:
${
err
}
, info:
${
info
}
`
);
},
},
mounted
(){
mounted
()
{
/*
/*
This is code to get metrics for the graph (to observe links performance).
This is code to get metrics for the graph (to observe links performance).
It is currently here because we want values for links without drawing them.
It is currently here because we want values for links without drawing them.
...
@@ -106,9 +106,8 @@ export default {
...
@@ -106,9 +106,8 @@ export default {
if
(
this
.
neverShowLinks
&&
!
isEmpty
(
this
.
pipelineData
))
{
if
(
this
.
neverShowLinks
&&
!
isEmpty
(
this
.
pipelineData
))
{
window
.
requestAnimationFrame
(()
=>
{
window
.
requestAnimationFrame
(()
=>
{
this
.
prepareLinkData
();
this
.
prepareLinkData
();
})
})
;
}
}
},
},
methods
:
{
methods
:
{
beginPerfMeasure
()
{
beginPerfMeasure
()
{
...
@@ -117,7 +116,6 @@ export default {
...
@@ -117,7 +116,6 @@ export default {
}
}
},
},
finishPerfMeasureAndSend
(
numLinks
)
{
finishPerfMeasureAndSend
(
numLinks
)
{
if
(
this
.
shouldCollectMetrics
)
{
if
(
this
.
shouldCollectMetrics
)
{
performanceMarkAndMeasure
({
performanceMarkAndMeasure
({
mark
:
PIPELINES_DETAIL_LINKS_MARK_CALCULATE_END
,
mark
:
PIPELINES_DETAIL_LINKS_MARK_CALCULATE_END
,
...
...
spec/frontend/pipelines/graph_shared/links_inner_spec.js
View file @
930596aa
...
@@ -284,7 +284,7 @@ describe('Links Inner component', () => {
...
@@ -284,7 +284,7 @@ describe('Links Inner component', () => {
const
numLinks
=
1
;
const
numLinks
=
1
;
const
metricsData
=
{
const
metricsData
=
{
histograms
:
[
histograms
:
[
{
name
:
PIPELINES_DETAIL_LINK_DURATION
,
value
:
duration
},
{
name
:
PIPELINES_DETAIL_LINK_DURATION
,
value
:
duration
/
1000
},
{
name
:
PIPELINES_DETAIL_LINKS_TOTAL
,
value
:
numLinks
},
{
name
:
PIPELINES_DETAIL_LINKS_TOTAL
,
value
:
numLinks
},
{
{
name
:
PIPELINES_DETAIL_LINKS_JOB_RATIO
,
name
:
PIPELINES_DETAIL_LINKS_JOB_RATIO
,
...
...
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