i18n load_test
This commit is contained in:
parent
aa44f7973f
commit
4d0efc25ac
|
@ -65,6 +65,25 @@ const en_US = {
|
||||||
'test_name_is_null': 'Test name cannot be empty! ',
|
'test_name_is_null': 'Test name cannot be empty! ',
|
||||||
'project_is_null': 'Project cannot be empty! ',
|
'project_is_null': 'Project cannot be empty! ',
|
||||||
'jmx_is_null': 'JMX file cannot be empty! ',
|
'jmx_is_null': 'JMX file cannot be empty! ',
|
||||||
|
'file_name': 'File name',
|
||||||
|
'file_size': 'File size',
|
||||||
|
'file_type': 'File Type',
|
||||||
|
'file_status': 'File Status',
|
||||||
|
'last_modify_time': 'Modify time',
|
||||||
|
'upload_tips': 'Drag files here, or <em> click to upload </em>',
|
||||||
|
'upload_type': 'Only JMX files can be uploaded',
|
||||||
|
'related_file_not_found': "No related test file found!",
|
||||||
|
'delete_file_confirm': 'Confirm delete file:',
|
||||||
|
'delete_file': "Please delete an existing file first!",
|
||||||
|
'thread_num': 'Concurrent users:',
|
||||||
|
'input_thread_num': 'Please enter the number of threads',
|
||||||
|
'duration': 'Duration time (minutes):',
|
||||||
|
'input_duration': 'Please enter a duration',
|
||||||
|
'rps_limit': 'RPS Limit:',
|
||||||
|
'input_rps_limit': 'Please enter a limit',
|
||||||
|
'ramp_up_time_within': 'In',
|
||||||
|
'ramp_up_time_minutes': 'minutes, separate',
|
||||||
|
'ramp_up_time_times': 'add concurrent users',
|
||||||
},
|
},
|
||||||
i18n: {
|
i18n: {
|
||||||
'home': 'Home',
|
'home': 'Home',
|
||||||
|
|
|
@ -65,6 +65,25 @@ const zh_CN = {
|
||||||
'test_name_is_null': '测试名称不能为空!',
|
'test_name_is_null': '测试名称不能为空!',
|
||||||
'project_is_null': '项目不能为空!',
|
'project_is_null': '项目不能为空!',
|
||||||
'jmx_is_null': 'JMX文件不能为空!',
|
'jmx_is_null': 'JMX文件不能为空!',
|
||||||
|
'file_name': '文件名',
|
||||||
|
'file_size': '文件大小',
|
||||||
|
'file_type': '文件类型',
|
||||||
|
'file_status': '文件状态',
|
||||||
|
'last_modify_time': '修改时间',
|
||||||
|
'upload_tips': '将文件拖到此处,或<em>点击上传</em>',
|
||||||
|
'upload_type': '只能上传JMX文件',
|
||||||
|
'related_file_not_found': "未找到关联的测试文件!",
|
||||||
|
'delete_file_confirm': '确认删除文件: ',
|
||||||
|
'delete_file': "请先删除已存在的文件!",
|
||||||
|
'thread_num': '并发用户数:',
|
||||||
|
'input_thread_num': '请输入线程数',
|
||||||
|
'duration': '压测时长(分钟):',
|
||||||
|
'input_duration': '请输入时长',
|
||||||
|
'rps_limit': 'RPS上限:',
|
||||||
|
'input_rps_limit': '请输入限制',
|
||||||
|
'ramp_up_time_within': '在',
|
||||||
|
'ramp_up_time_minutes': '分钟内,分',
|
||||||
|
'ramp_up_time_times': '次增加并发用户',
|
||||||
},
|
},
|
||||||
i18n: {
|
i18n: {
|
||||||
'home': '首页',
|
'home': '首页',
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
:file-list="fileList">
|
:file-list="fileList">
|
||||||
<i class="el-icon-upload"/>
|
<i class="el-icon-upload"/>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text" v-html="$t('load_test.upload_tips')"></div>
|
||||||
<div class="el-upload__tip" slot="tip">只能上传jmx文件</div>
|
<div class="el-upload__tip" slot="tip">{{$t('load_test.upload_type')}}</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -20,18 +20,18 @@
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
label="文件名">
|
:label="$t('load_test.file_name')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="size"
|
prop="size"
|
||||||
label="文件大小">
|
:label="$t('load_test.file_size')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="type"
|
prop="type"
|
||||||
label="文件类型">
|
:label="$t('load_test.file_type')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="修改时间">
|
:label="$t('load_test.last_modify_time')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<i class="el-icon-time"/>
|
<i class="el-icon-time"/>
|
||||||
<span style="margin-left: 10px">{{ scope.row.lastModified | timestampFormatDate }}</span>
|
<span style="margin-left: 10px">{{ scope.row.lastModified | timestampFormatDate }}</span>
|
||||||
|
@ -39,13 +39,15 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="status"
|
prop="status"
|
||||||
label="文件状态">
|
:label="$t('load_test.file_status')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作">
|
:label="$t('commons.operating')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="handleDownload(scope.row)" type="text" size="small">下载</el-button>
|
<el-button @click="handleDownload(scope.row)" :disabled="!scope.row.id" type="primary" icon="el-icon-download"
|
||||||
<el-button @click="handleDelete(scope.row, scope.$index)" type="text" size="small">删除</el-button>
|
size="mini" circle/>
|
||||||
|
<el-button @click="handleDelete(scope.row, scope.$index)" type="danger" icon="el-icon-delete" size="mini"
|
||||||
|
circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -88,7 +90,7 @@
|
||||||
let file = response.data;
|
let file = response.data;
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
Message.error({message: "未找到关联的测试文件!", showClose: true});
|
Message.error({message: this.$t('load_test.related_file_not_found'), showClose: true});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,8 +160,8 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDelete(file, index) {
|
handleDelete(file, index) {
|
||||||
this.$alert('确认删除文件: ' + file.name + "?", '', {
|
this.$alert(this.$t('commons.delete_file_confirm') + file.name + "?", '', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
this._handleDelete(file, index);
|
this._handleDelete(file, index);
|
||||||
|
@ -173,7 +175,7 @@
|
||||||
this.testPlan.file = null;
|
this.testPlan.file = null;
|
||||||
},
|
},
|
||||||
handleExceed() {
|
handleExceed() {
|
||||||
this.$message.error("请先删除已存在的文件!");
|
this.$message.error(this.$t('load_test.delete_file'));
|
||||||
},
|
},
|
||||||
fileValidator(file) {
|
fileValidator(file) {
|
||||||
/// todo: 是否需要对文件内容和大小做限制
|
/// todo: 是否需要对文件内容和大小做限制
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="config-form-label">并发用户数:</div>
|
<div class="config-form-label">{{$t('load_test.thread_num')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入线程数"
|
:placeholder="$t('load_test.input_thread_num')"
|
||||||
v-model="threadNumber"
|
v-model="threadNumber"
|
||||||
@click="convertProperty"
|
@click="convertProperty"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
|
@ -20,12 +20,12 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="config-form-label">压测时长(分钟):</div>
|
<div class="config-form-label">{{$t('load_test.duration')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入时长"
|
:placeholder="$t('load_test.duration')"
|
||||||
v-model="duration"
|
v-model="duration"
|
||||||
@click="convertProperty"
|
@click="convertProperty"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
|
@ -37,12 +37,12 @@
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="config-form-label">RPS上限:</div>
|
<div class="config-form-label">{{$t('load_test.rps_limit')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入限制"
|
:placeholder="$t('load_test.input_rps_limit')"
|
||||||
v-model="rpsLimit"
|
v-model="rpsLimit"
|
||||||
@click="convertProperty"
|
@click="convertProperty"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
<el-form :inline="true" class="input-bottom-border">
|
<el-form :inline="true" class="input-bottom-border">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div>在</div>
|
<div>{{$t('load_test.ramp_up_time_within')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div>分钟内,分</div>
|
<div>{{$t('load_test.ramp_up_time_minutes')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div>次增加并发用户</div>
|
<div>{{$t('load_test.ramp_up_time_times')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
Loading…
Reference in New Issue