fix(性能测试): 性能测试编辑时固定节点的资源池状态增加刷新按钮

--bug=1032092 --user=宋天阳 【性能测试】测试-编辑-压力配置-固定节点前未显示刷新按钮
https://www.tapd.cn/55049933/s/1427880;--bug=1032095 --user=宋天阳
【性能测试】测试-编辑-压力配置-固定节点和自定义节点-空闲状态显示红色
https://www.tapd.cn/55049933/s/1427881
This commit is contained in:
song-tianyang 2023-10-18 16:17:31 +08:00 committed by 建国
parent e296ce89d2
commit 9770f48b5c
2 changed files with 12 additions and 8 deletions

View File

@ -214,7 +214,11 @@
</el-form-item>
<div v-if="threadGroup.strategy === 'auto'"></div>
<div v-else-if="threadGroup.strategy === 'specify'">
<el-form-item :label="$t('load_test.specify_resource')">
<el-button v-if="nodeTaskCount(resourceNodes[threadGroup.resourceNodeIndex]) !== -1" circle
icon="el-icon-refresh" size="mini"
style="margin:10px 0 0 0" @click="refreshNodeOperation"></el-button>
<el-form-item :label="$t('load_test.specify_resource')" label-width="80px">
<el-select v-model="threadGroup.resourceNodeIndex" @change="specifyNodeChange(threadGroup)"
size="mini">
<el-option
@ -226,11 +230,11 @@
</el-select>
<div style="margin-left: 5px;float: right">
<el-tag size="mini" v-if="nodeTaskCount(resourceNodes[threadGroup.resourceNodeIndex])===0"
style="color:#E5594B;background-color: #FFFFFF;border-color: #E5594B;margin-left: 5px;margin-right: 5px">
style="color:#89DB7E;background-color: #FFFFFF;border-color: #89DB7E;margin-left: 5px;margin-right: 5px">
{{ $t("commons.idle") }}
</el-tag>
<el-tag size="mini" v-else-if="nodeTaskCount(resourceNodes[threadGroup.resourceNodeIndex])>0"
style="color:#89DB7E;background-color: #FFFFFF;border-color: #89DB7E;margin-left: 5px;margin-right: 5px">
style="color:#E5594B;background-color: #FFFFFF;border-color: #E5594B;margin-left: 5px;margin-right: 5px">
{{ $t("commons.running") }}
</el-tag>

View File

@ -1781,9 +1781,9 @@ public class TestPlanService {
}
issuesService.calculateReportByIssueList(testPlanCaseReportResultDTO.getIssueList(), report);
DecimalFormat rateFormat = new DecimalFormat("#0.00");
rateFormat.setMinimumFractionDigits(2);
rateFormat.setMaximumFractionDigits(2);
DecimalFormat rateFormat = new DecimalFormat("#0.0000");
rateFormat.setMinimumFractionDigits(4);
rateFormat.setMaximumFractionDigits(4);
if (report.getExecuteCount() != 0 && report.getCaseCount() != null) {
double executeRate = Double.parseDouble(rateFormat.format((double) report.getExecuteCount() / (double) report.getCaseCount()));
@ -1793,7 +1793,7 @@ public class TestPlanService {
report.setExecuteRate(executeRate);
}
} else {
report.setExecuteRate(0.00);
report.setExecuteRate(0.0000);
}
if (report.getPassCount() != 0 && report.getCaseCount() != null) {
double passRate = Double.parseDouble(rateFormat.format((double) report.getPassCount() / (double) report.getCaseCount()));
@ -1803,7 +1803,7 @@ public class TestPlanService {
report.setPassRate(passRate);
}
} else {
report.setPassRate(0.00);
report.setPassRate(0.0000);
}
report.setName(testPlan.getName());