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
64bf653e
Commit
64bf653e
authored
Apr 05, 2021
by
Quang-Minh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix i18n issue
Issue
https://gitlab.com/groups/gitlab-org/-/epics/5590
parent
0132dc4a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
app/assets/javascripts/performance_bar/components/detailed_metric.vue
...avascripts/performance_bar/components/detailed_metric.vue
+4
-4
app/assets/javascripts/performance_bar/index.js
app/assets/javascripts/performance_bar/index.js
+5
-4
changelogs/unreleased/qmnguyen0711-rollout-performance-bar-sort-order.yml
...eased/qmnguyen0711-rollout-performance-bar-sort-order.yml
+5
-0
spec/frontend/performance_bar/components/detailed_metric_spec.js
...ontend/performance_bar/components/detailed_metric_spec.js
+7
-10
No files found.
app/assets/javascripts/performance_bar/components/detailed_metric.vue
View file @
64bf653e
...
...
@@ -54,17 +54,17 @@ export default {
return
this
.
currentRequest
.
details
[
this
.
metric
];
},
metricDetailsSummary
()
{
const
summary
=
{}
const
summary
=
{}
;
if
(
!
this
.
metricDetails
.
summaryOptions
||
!
this
.
metricDetails
.
summaryOptions
.
hideTotal
)
{
summary
[
s__
(
'
Total
'
)]
=
this
.
metricDetails
.
calls
summary
[
s__
(
'
Total
'
)]
=
this
.
metricDetails
.
calls
;
}
if
(
!
this
.
metricDetails
.
summaryOptions
||
!
this
.
metricDetails
.
summaryOptions
.
hideDuration
)
{
summary
[
s__
(
'
PerformanceBar|Total duration
'
)]
=
this
.
metricDetails
.
duration
summary
[
s__
(
'
PerformanceBar|Total duration
'
)]
=
this
.
metricDetails
.
duration
;
}
return
{
...
summary
,
...(
this
.
metricDetails
.
summary
||
{})}
return
{
...
summary
,
...(
this
.
metricDetails
.
summary
||
{})
};
},
metricDetailsLabel
()
{
if
(
this
.
metricDetails
.
duration
&&
this
.
metricDetails
.
calls
)
{
...
...
app/assets/javascripts/performance_bar/index.js
View file @
64bf653e
/* eslint-disable @gitlab/require-i18n-strings */
import
Vue
from
'
vue
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
s__
}
from
'
~/locale
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
initPerformanceBarLog
from
'
./performance_bar_log
'
;
...
...
@@ -82,9 +83,9 @@ const initPerformanceBar = (el) => {
const
domContentLoaded
=
Math
.
round
(
navigationEntries
[
0
].
domContentLoadedEventEnd
);
summary
=
{
Backend
:
backend
,
'
First contentful paint
'
:
firstContentfulPaint
,
'
Dom content loaded
'
:
domContentLoaded
,
[
s__
(
'
PerformanceBar|Backend
'
)]
:
backend
,
[
s__
(
'
PerformanceBar|First contentful paint
'
)]
:
firstContentfulPaint
,
[
s__
(
'
PerformanceBar|Dom content loaded
'
)]
:
domContentLoaded
,
};
durationString
=
`
${
backend
}
|
${
firstContentfulPaint
}
|
${
domContentLoaded
}
`
;
...
...
@@ -122,7 +123,7 @@ const initPerformanceBar = (el) => {
start
:
entry
.
startTime
,
name
:
entry
.
name
.
replace
(
document
.
location
.
origin
,
''
),
duration
:
Math
.
round
(
entry
.
duration
),
size
:
entry
.
transferSize
?
`
${
nf
.
format
(
entry
.
transferSize
)}
bytes
`
:
'
cached
'
,
size
:
entry
.
transferSize
?
`
${
nf
.
format
(
entry
.
transferSize
)}
${
s__
(
'
bytes
'
)}
`
:
'
cached
'
,
};
},
},
...
...
changelogs/unreleased/qmnguyen0711-rollout-performance-bar-sort-order.yml
0 → 100644
View file @
64bf653e
---
title
:
Enable chronological sort order for other items in the performance bar
merge_request
:
58572
author
:
type
:
changed
spec/frontend/performance_bar/components/detailed_metric_spec.js
View file @
64bf653e
...
...
@@ -131,8 +131,8 @@ describe('detailedMetric', () => {
details
:
requestDetails
,
warnings
:
[
'
gitaly calls: 456 over 30
'
],
summaryOptions
:
{
hideTotal
:
true
}
hideTotal
:
true
,
}
,
},
},
},
...
...
@@ -155,8 +155,8 @@ describe('detailedMetric', () => {
details
:
requestDetails
,
warnings
:
[
'
gitaly calls: 456 over 30
'
],
summaryOptions
:
{
hideDuration
:
true
}
hideDuration
:
true
,
}
,
},
},
},
...
...
@@ -184,8 +184,8 @@ describe('detailedMetric', () => {
},
summaryOptions
:
{
hideDuration
:
true
,
hideTotal
:
true
}
hideTotal
:
true
,
}
,
},
},
},
...
...
@@ -193,10 +193,7 @@ describe('detailedMetric', () => {
});
it
(
'
displays a summary section
'
,
()
=>
{
expect
(
findAllSummaryItems
()).
toEqual
([
'
In controllers 100
'
,
'
In middlewares 20
'
,
]);
expect
(
findAllSummaryItems
()).
toEqual
([
'
In controllers 100
'
,
'
In middlewares 20
'
]);
});
});
...
...
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