Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
fix-dashboard-endpoint-trace-incorrect (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
x22x22 authored and wu-sheng committed Nov 11, 2019
1 parent 8cf26c9 commit 7eac68b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/store/modules/dashboard/template/endpoint-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default [
o: 'ServiceEndpoint',
d: 'endpointTraces',
c: 'ChartSlow',
t: 'Endpoint Slow',
t: 'Slow Traces',
w: 6,
h: 250,
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/queryChartData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const queryChartData = {
{ o: 'ServiceEndpoint', d: 'endpointSLA', c: 'ChartBar', t: 'Endpoint SLA', w: 3, h: 250 },
{ o: 'ServiceEndpoint', d: 'endpointPercent', c: 'ChartLine',
t: 'Endpoint Response Time Percentile', w: 3, h: 250},
{ o: 'ServiceEndpoint', d: 'endpointTraces', c: 'ChartSlow', t: 'Endpoint Slow', w: 3, h: 250 },
{ o: 'ServiceEndpoint', d: 'endpointTraces', c: 'ChartSlow', t: 'Slow Traces', w: 3, h: 250 },
{ o: 'ServiceEndpoint', d: 'endpointTopology', c: 'ChartSankey', t: 'Dependency Map', w: 3, h: 250 },
// instance
{ o: 'ServiceInstance', d: 'globalBrief', c: 'ChartInstance', t: 'Instance Info', w: 3, h: 250 },
Expand Down
7 changes: 5 additions & 2 deletions src/views/components/dashboard/charts/chart-slow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<div style="overflow: auto;height: 100%;" class="scroll_hide">
<div class="rk-chart-slow clear">
<div class="rk-chart-slow-i" v-for="(i, index) in data" :key="index">
<svg class="icon vm r grey link-hover cp" @click="handleClick(i.label)">
<svg class="icon vm r grey link-hover cp" @click="handleClick(i.traceIds && i.traceIds[0] || i.label)">
<use xlink:href="#review-list"></use>
</svg>
<div class="mb-5 ell" v-tooltip:top.ellipsis="i.label || ''">
<span class="calls sm mr-10">{{i.value}} ms</span>
<span class="cp link-hover" @click="appChange(i)">{{i.label}}</span>
<span class="cp link-hover" @click="appChange(i)">{{i.label + getTraceId(i)}}</span>
</div>
<RkProgress :precent="i.value/maxValue*100" color="#bf99f8"/>
</div>
Expand All @@ -49,6 +49,9 @@ export default class ChartSlow extends Vue {
const temp: number[] = this.data.map((i: any) => i.value);
return Math.max.apply(null, temp);
}
getTraceId(i: any){
return i.traceIds && i.traceIds[0] ? ` - ${i.traceIds[0]}` : '';
}
private handleClick(i: any) {
copy(i);
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/components/dashboard/charts/chart-trace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div style="overflow: auto;height: 100%;" class="scroll_hide">
<div class="rk-chart-slow clear">
<div class="rk-chart-slow-i" v-for="(i, index) in data" :key="index">
<svg class="icon vm r grey link-hover cp" @click="handleClick(i.traceIds || i.label)">
<svg class="icon vm r grey link-hover cp" @click="handleClick(i.traceIds && i.traceIds[0] || i.label)">
<use xlink:href="#review-list"></use>
</svg>
<div class="mb-5 ell" v-tooltip:top.ellipsis="i.label || ''">
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
devServer: {
proxy: {
'/graphql': {
target: 'http://127.0.0.1:12800',
target: `${process.env.SW_PROXY_TARGET || "http://127.0.0.1:12800"}`,
changeOrigin: true,
},
},
Expand Down

0 comments on commit 7eac68b

Please sign in to comment.