Fixes performance bar looking for a key in a undefined prop
This commit is contained in:
parent
44fbb7a8b2
commit
e373b2e972
3 changed files with 31 additions and 13 deletions
|
@ -42,7 +42,7 @@ export default {
|
|||
keys: ['feature', 'request'],
|
||||
},
|
||||
],
|
||||
simpleMetrics: ['redis', 'sidekiq'],
|
||||
simpleMetrics: ['redis'],
|
||||
data() {
|
||||
return { currentRequestId: '' };
|
||||
},
|
||||
|
|
|
@ -1,16 +1,29 @@
|
|||
<script>
|
||||
export default {
|
||||
props: {
|
||||
currentRequest: {
|
||||
type: Object,
|
||||
required: true,
|
||||
export default {
|
||||
props: {
|
||||
currentRequest: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
metric: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
metric: {
|
||||
type: String,
|
||||
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>
|
||||
<template>
|
||||
<div
|
||||
|
@ -21,9 +34,9 @@ export default {
|
|||
v-if="currentRequest.details"
|
||||
class="bold"
|
||||
>
|
||||
{{ currentRequest.details[metric].duration }}
|
||||
{{ duration }}
|
||||
/
|
||||
{{ currentRequest.details[metric].calls }}
|
||||
{{ calls }}
|
||||
</span>
|
||||
{{ metric }}
|
||||
</div>
|
||||
|
|
5
changelogs/unreleased/51569-performance-bar.yml
Normal file
5
changelogs/unreleased/51569-performance-bar.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fixes performance bar looking for a key in a undefined prop
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
Loading…
Reference in a new issue