Commit ab53f7aa authored by Phil Hughes's avatar Phil Hughes

Fix performance bar spacing

parent 40c338a4
......@@ -27,6 +27,11 @@ export default {
required: true,
},
},
computed: {
detailsList() {
return this.currentRequest.details[this.metric][this.details];
},
},
};
</script>
<template>
......@@ -55,19 +60,30 @@ export default {
:header-title-text="header"
class="performance-bar-modal"
>
<table class="table">
<tr
v-for="(item, index) in currentRequest.details[metric][details]"
:key="index"
>
<td><strong>{{ item.duration }}ms</strong></td>
<td
v-for="key in keys"
:key="key"
<table
class="table"
>
<template v-if="detailsList.length">
<tr
v-for="(item, index) in detailsList"
:key="index"
>
{{ item[key] }}
</td>
</tr>
<td><strong>{{ item.duration }}ms</strong></td>
<td
v-for="key in keys"
:key="key"
>
{{ item[key] }}
</td>
</tr>
</template>
<template v-else>
<tr>
<td>
No {{ header.toLowerCase() }} for this request.
</td>
</tr>
</template>
</table>
<div slot="footer">
......
......@@ -124,7 +124,7 @@ export default {
class="view prepend-left-5"
>
<span
v-if="currentRequest && currentRequest.details"
v-if="currentRequest && currentRequest.details && currentRequest.details.host"
class="current-host"
>
{{ currentRequest.details.host.hostname }}
......
......@@ -5,6 +5,8 @@ export default {
.getElementById('peek-view-performance-bar')
.cloneNode(true);
upstreamPerformanceBar.classList.remove('hidden');
this.$refs.wrapper.appendChild(upstreamPerformanceBar);
},
};
......
......@@ -4,9 +4,9 @@ import Vue from 'vue';
import performanceBarApp from './components/performance_bar_app.vue';
import PerformanceBarStore from './stores/performance_bar_store';
export default () =>
export default ({ container }) =>
new Vue({
el: '#js-peek',
el: container,
components: {
performanceBarApp,
},
......
......@@ -6,7 +6,7 @@
profile_url: url_for(params.merge(lineprofiler: 'true')) },
class: Peek.env }
#peek-view-performance-bar
#peek-view-performance-bar.hidden
= render_server_response_time
%span#serverstats
%ul.performance-bar
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