Commit 19000269 authored by Phil Hughes's avatar Phil Hughes

Merge branch '51569-performance-bar' into 'master'

Fixes performance bar looking for a key in a undefined prop

Closes #51569

See merge request gitlab-org/gitlab-ce!21887
parents 44fbb7a8 e373b2e9
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
keys: ['feature', 'request'], keys: ['feature', 'request'],
}, },
], ],
simpleMetrics: ['redis', 'sidekiq'], simpleMetrics: ['redis'],
data() { data() {
return { currentRequestId: '' }; return { currentRequestId: '' };
}, },
......
<script> <script>
export default { export default {
props: { props: {
currentRequest: { currentRequest: {
type: Object, type: Object,
...@@ -10,7 +10,20 @@ export default { ...@@ -10,7 +10,20 @@ export default {
required: true, required: true,
}, },
}, },
}; computed: {
duration() {
return (
this.currentRequest.details[this.metric] &&
this.currentRequest.details[this.metric].duration
);
},
calls() {
return (
this.currentRequest.details[this.metric] && this.currentRequest.details[this.metric].calls
);
},
},
};
</script> </script>
<template> <template>
<div <div
...@@ -21,9 +34,9 @@ export default { ...@@ -21,9 +34,9 @@ export default {
v-if="currentRequest.details" v-if="currentRequest.details"
class="bold" class="bold"
> >
{{ currentRequest.details[metric].duration }} {{ duration }}
/ /
{{ currentRequest.details[metric].calls }} {{ calls }}
</span> </span>
{{ metric }} {{ metric }}
</div> </div>
......
---
title: Fixes performance bar looking for a key in a undefined prop
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment