Commit ab53f7aa authored by Phil Hughes's avatar Phil Hughes

Fix performance bar spacing

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