fix(接口测试): 修改报告细节

This commit is contained in:
teukkk 2024-06-06 15:19:45 +08:00 committed by 刘瑞斌
parent d821cfe9f2
commit 5d152a7faf
8 changed files with 4 additions and 24 deletions

View File

@ -75,16 +75,6 @@
</div> </div>
</template> </template>
</a-popover> </a-popover>
<a-popover position="left" content-class="response-popover-content">
<div v-if="props.showType && props.showType !== 'CASE'" class="one-line-text max-w-[150px]">
{{ props.environmentName }}
</div>
<template #content>
<div v-if="props.showType && props.showType !== 'CASE'" class="one-line-text">
{{ props.environmentName }}
</div>
</template>
</a-popover>
</div> </div>
</div> </div>
<div v-if="activeType === 'SubRequest'" class="my-4 flex justify-start"> <div v-if="activeType === 'SubRequest'" class="my-4 flex justify-start">
@ -152,7 +142,6 @@
isHttpProtocol?: boolean; isHttpProtocol?: boolean;
isDefinition?: boolean; isDefinition?: boolean;
showType: 'API' | 'CASE'; showType: 'API' | 'CASE';
environmentName?: string; //
isResponseModel?: boolean; isResponseModel?: boolean;
reportId?: string; reportId?: string;
steps?: ScenarioItemType[]; // steps?: ScenarioItemType[]; //

View File

@ -40,7 +40,7 @@
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full" :class="item.class"></div> <div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full" :class="item.class"></div>
<div class="text-[var(--color-text-4)]">{{ item.label }}</div> <div class="text-[var(--color-text-4)]">{{ item.label }}</div>
</div> </div>
<div class="text-center font-medium text-[var(--color-text-1)]">{{ item.count || 0 }}</div> <div class="text-end font-medium text-[var(--color-text-1)]">{{ item.count || 0 }}</div>
<div class="text-right font-medium text-[var(--color-text-1)]" <div class="text-right font-medium text-[var(--color-text-1)]"
>{{ item.rote || 0 }} <span v-if="String(item.rote) !== 'Calculating'"></span >{{ item.rote || 0 }} <span v-if="String(item.rote) !== 'Calculating'"></span
></div> ></div>

View File

@ -23,7 +23,6 @@
:step-item="props.scenarioDetail" :step-item="props.scenarioDetail"
:console="props.console" :console="props.console"
:is-definition="true" :is-definition="true"
:environment-name="props.environmentName"
:report-id="props.scenarioDetail?.reportId" :report-id="props.scenarioDetail?.reportId"
/> />
</div> </div>
@ -37,12 +36,9 @@
import ConditionStatus from '../conditionStatus.vue'; import ConditionStatus from '../conditionStatus.vue';
import StepDetailContent from '@/views/api-test/components/requestComposition/response/result/index.vue'; import StepDetailContent from '@/views/api-test/components/requestComposition/response/result/index.vue';
import { useI18n } from '@/hooks/useI18n';
import type { ScenarioItemType } from '@/models/apiTest/report'; import type { ScenarioItemType } from '@/models/apiTest/report';
import { ScenarioStepType } from '@/enums/apiEnum'; import { ScenarioStepType } from '@/enums/apiEnum';
const { t } = useI18n();
const props = defineProps<{ const props = defineProps<{
visible: boolean; visible: boolean;
stepId: string; stepId: string;
@ -50,7 +46,6 @@
scenarioDetail?: ScenarioItemType; scenarioDetail?: ScenarioItemType;
showType: 'API' | 'CASE'; // | showType: 'API' | 'CASE'; // |
console?: string; // console?: string; //
environmentName?: string; //
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{

View File

@ -172,7 +172,6 @@
:step-item="step" :step-item="step"
:console="props.console" :console="props.console"
:is-definition="true" :is-definition="true"
:environment-name="props.environmentName"
:show-type="props.showType" :show-type="props.showType"
:is-response-model="true" :is-response-model="true"
:report-id="props?.reportId" :report-id="props?.reportId"
@ -221,7 +220,6 @@
showType: 'API' | 'CASE'; showType: 'API' | 'CASE';
activeType: 'tiled' | 'tab'; activeType: 'tiled' | 'tab';
console?: string; console?: string;
environmentName?: string;
reportId?: string; reportId?: string;
expandedKeys: (string | number)[]; expandedKeys: (string | number)[];
}>(); }>();

View File

@ -14,7 +14,6 @@
:active-type="props.activeType" :active-type="props.activeType"
:expand-all="isExpandAll" :expand-all="isExpandAll"
:console="props.reportDetail.console" :console="props.reportDetail.console"
:environment-name="props.reportDetail.environmentName"
:report-id="props.reportDetail.id" :report-id="props.reportDetail.id"
@detail="showDetail" @detail="showDetail"
/> />
@ -26,7 +25,6 @@
:scenario-detail="scenarioDetail" :scenario-detail="scenarioDetail"
:show-type="props.showType" :show-type="props.showType"
:console="props.reportDetail.console" :console="props.reportDetail.console"
:environment-name="props.reportDetail.environmentName"
:report-id="props.reportDetail.id" :report-id="props.reportDetail.id"
/> />
</div> </div>

View File

@ -36,7 +36,7 @@ export default {
'report.detail.api.requestTotalTimeTip': 'The total response time of all requests', 'report.detail.api.requestTotalTimeTip': 'The total response time of all requests',
'report.detail.api.assertPass': 'Assert pass', 'report.detail.api.assertPass': 'Assert pass',
'report.detail.api.executionRate': 'Req execution Rate', 'report.detail.api.executionRate': 'Req execution Rate',
'report.detail.api.requestAnalysis': 'Report analysis', 'report.detail.api.requestAnalysis': 'Request analysis',
'report.detail.api.total': 'total', 'report.detail.api.total': 'total',
'report.detail.api.reportDetail': 'Report detail', 'report.detail.api.reportDetail': 'Report detail',
'report.detail.api.filterPlaceholder': 'Please select a filter conditions', 'report.detail.api.filterPlaceholder': 'Please select a filter conditions',

View File

@ -34,7 +34,7 @@ export default {
'report.detail.api.requestTotalTimeTip': '全部请求的响应时间总和', 'report.detail.api.requestTotalTimeTip': '全部请求的响应时间总和',
'report.detail.api.assertPass': '断言通过率', 'report.detail.api.assertPass': '断言通过率',
'report.detail.api.executionRate': '请求执行率', 'report.detail.api.executionRate': '请求执行率',
'report.detail.api.requestAnalysis': '报告分析', 'report.detail.api.requestAnalysis': '请求分析',
'report.detail.api.total': '总数(个)', 'report.detail.api.total': '总数(个)',
'report.detail.api.reportDetail': '报告明细', 'report.detail.api.reportDetail': '报告明细',
'report.detail.api.filterPlaceholder': '请选择过滤条件', 'report.detail.api.filterPlaceholder': '请选择过滤条件',

View File

@ -13,7 +13,7 @@
</MsCard> </MsCard>
<div class="analysis-wrapper"> <div class="analysis-wrapper">
<div class="analysis min-w-[238px]"> <div class="analysis min-w-[238px]">
<div class="block-title">{{ t('report.detail.api.requestAnalysis') }}</div> <div class="block-title">{{ t('report.detail.api.reportAnalysis') }}</div>
<ReportMetricsItem <ReportMetricsItem
v-for="analysisItem in reportAnalysisList" v-for="analysisItem in reportAnalysisList"
:key="analysisItem.name" :key="analysisItem.name"