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:
parent
e296ce89d2
commit
9770f48b5c
|
@ -214,7 +214,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="threadGroup.strategy === 'auto'"></div>
|
<div v-if="threadGroup.strategy === 'auto'"></div>
|
||||||
<div v-else-if="threadGroup.strategy === 'specify'">
|
<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)"
|
<el-select v-model="threadGroup.resourceNodeIndex" @change="specifyNodeChange(threadGroup)"
|
||||||
size="mini">
|
size="mini">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -226,11 +230,11 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
<div style="margin-left: 5px;float: right">
|
<div style="margin-left: 5px;float: right">
|
||||||
<el-tag size="mini" v-if="nodeTaskCount(resourceNodes[threadGroup.resourceNodeIndex])===0"
|
<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") }}
|
{{ $t("commons.idle") }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag size="mini" v-else-if="nodeTaskCount(resourceNodes[threadGroup.resourceNodeIndex])>0"
|
<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") }}
|
{{ $t("commons.running") }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|
||||||
|
|
|
@ -1781,9 +1781,9 @@ public class TestPlanService {
|
||||||
}
|
}
|
||||||
issuesService.calculateReportByIssueList(testPlanCaseReportResultDTO.getIssueList(), report);
|
issuesService.calculateReportByIssueList(testPlanCaseReportResultDTO.getIssueList(), report);
|
||||||
|
|
||||||
DecimalFormat rateFormat = new DecimalFormat("#0.00");
|
DecimalFormat rateFormat = new DecimalFormat("#0.0000");
|
||||||
rateFormat.setMinimumFractionDigits(2);
|
rateFormat.setMinimumFractionDigits(4);
|
||||||
rateFormat.setMaximumFractionDigits(2);
|
rateFormat.setMaximumFractionDigits(4);
|
||||||
|
|
||||||
if (report.getExecuteCount() != 0 && report.getCaseCount() != null) {
|
if (report.getExecuteCount() != 0 && report.getCaseCount() != null) {
|
||||||
double executeRate = Double.parseDouble(rateFormat.format((double) report.getExecuteCount() / (double) report.getCaseCount()));
|
double executeRate = Double.parseDouble(rateFormat.format((double) report.getExecuteCount() / (double) report.getCaseCount()));
|
||||||
|
@ -1793,7 +1793,7 @@ public class TestPlanService {
|
||||||
report.setExecuteRate(executeRate);
|
report.setExecuteRate(executeRate);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
report.setExecuteRate(0.00);
|
report.setExecuteRate(0.0000);
|
||||||
}
|
}
|
||||||
if (report.getPassCount() != 0 && report.getCaseCount() != null) {
|
if (report.getPassCount() != 0 && report.getCaseCount() != null) {
|
||||||
double passRate = Double.parseDouble(rateFormat.format((double) report.getPassCount() / (double) report.getCaseCount()));
|
double passRate = Double.parseDouble(rateFormat.format((double) report.getPassCount() / (double) report.getCaseCount()));
|
||||||
|
@ -1803,7 +1803,7 @@ public class TestPlanService {
|
||||||
report.setPassRate(passRate);
|
report.setPassRate(passRate);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
report.setPassRate(0.00);
|
report.setPassRate(0.0000);
|
||||||
}
|
}
|
||||||
|
|
||||||
report.setName(testPlan.getName());
|
report.setName(testPlan.getName());
|
||||||
|
|
Loading…
Reference in New Issue