fix: 部分百分比数据计算调整
This commit is contained in:
@@ -469,12 +469,12 @@
|
||||
flex-shrink: 1;
|
||||
flex-grow: 1;
|
||||
overflow: hidden;
|
||||
min-width: 50%;
|
||||
min-width: calc(50% - 37px);
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.table__below-statistics {
|
||||
width: calc((50% - 27px)/4);
|
||||
width: calc((50% + 10px)/4);
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{unitConvert(row[c], unitTypes.number).join(' ')}}
|
||||
</span>
|
||||
<span v-else-if="c === 'responseFailRate'">
|
||||
{{unitConvert(row[c] * 100, unitTypes.percent).join(' ')}}
|
||||
{{unitConvert(row[c], unitTypes.percent).join(' ')}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{row[c]}}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<div v-for="(item, index) in data" :key="index" class="table-below-box" :class="{'table-below-box--inactivated': !item.active}" @click="toggleLegend(index)">
|
||||
<div class="table__below-color"><div :style="{backgroundColor: getChartColor(index)}"></div></div>
|
||||
<div class="table__below-title" :title="item.legend">{{item.legend}}</div>
|
||||
<div class="table__below-statistics" :title="item.aggregation.avg">{{valueToRangeValue(item.aggregation.avg, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="item.aggregation.max">{{valueToRangeValue(item.aggregation.max, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="item.aggregation.p50">{{valueToRangeValue(item.aggregation.p50, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="item.aggregation.p90">{{valueToRangeValue(item.aggregation.p90, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="valueToRangeValue(item.aggregation.avg, chartInfo.params.unitType).join('')">{{valueToRangeValue(item.aggregation.avg, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="valueToRangeValue(item.aggregation.max, chartInfo.params.unitType).join('')">{{valueToRangeValue(item.aggregation.max, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="valueToRangeValue(item.aggregation.p50, chartInfo.params.unitType).join('')">{{valueToRangeValue(item.aggregation.p50, chartInfo.params.unitType).join('')}}</div>
|
||||
<div class="table__below-statistics" :title="valueToRangeValue(item.aggregation.p90, chartInfo.params.unitType).join('')">{{valueToRangeValue(item.aggregation.p90, chartInfo.params.unitType).join('')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -181,7 +181,7 @@ export default {
|
||||
})
|
||||
const max = parseFloat(sorted[0].bytes)
|
||||
const maxId = parseFloat(sortedId[0].commonIngressLinkId)
|
||||
this.entityData.linkInPercent = (parseFloat(max / sum) * 100).toFixed(2)
|
||||
this.entityData.linkInPercent = (parseFloat(max / sum)).toFixed(2)
|
||||
this.entityData.linkInId = maxId
|
||||
}
|
||||
}
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
})
|
||||
const max = parseFloat(sorted[0].bytes)
|
||||
const maxId = parseFloat(sortedId[0].commonEgressLinkId)
|
||||
this.entityData.linkOutPercent = (parseFloat(max / sum) * 100).toFixed(2)
|
||||
this.entityData.linkOutPercent = (parseFloat(max / sum)).toFixed(2)
|
||||
this.entityData.linkOutId = maxId
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user