修改消息提示
This commit is contained in:
parent
dcef65f719
commit
f3b9026421
|
@ -167,10 +167,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
this.result = this.$post(this.deletePath, data, () => {
|
this.result = this.$post(this.deletePath, data, () => {
|
||||||
this.$message({
|
this.$success(this.$t('commons.delete_success'));
|
||||||
message: this.$t('commons.delete_success'),
|
|
||||||
type: 'success'
|
|
||||||
});
|
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -306,23 +306,23 @@
|
||||||
let counts = this.groupBy(this.domains, 'domain');
|
let counts = this.groupBy(this.domains, 'domain');
|
||||||
for (let c in counts) {
|
for (let c in counts) {
|
||||||
if (counts[c] > 1) {
|
if (counts[c] > 1) {
|
||||||
this.$message.error(this.$t('load_test.domain_is_duplicate'));
|
this.$error(this.$t('load_test.domain_is_duplicate'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
counts = this.groupBy(this.params, 'name');
|
counts = this.groupBy(this.params, 'name');
|
||||||
for (let c in counts) {
|
for (let c in counts) {
|
||||||
if (counts[c] > 1) {
|
if (counts[c] > 1) {
|
||||||
this.$message.error(this.$t('load_test.param_is_duplicate'));
|
this.$error(this.$t('load_test.param_is_duplicate'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.domains.filter(d => !d.domain || !d.ip).length > 0) {
|
if (this.domains.filter(d => !d.domain || !d.ip).length > 0) {
|
||||||
this.$message.error(this.$t('load_test.domain_ip_is_empty'));
|
this.$error(this.$t('load_test.domain_ip_is_empty'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.params.filter(d => !d.name || !d.value).length > 0) {
|
if (this.params.filter(d => !d.name || !d.value).length > 0) {
|
||||||
this.$message.error(this.$t('load_test.param_name_value_is_empty'));
|
this.$error(this.$t('load_test.param_name_value_is_empty'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.tableData.filter(f => f.name === file.name).length > 0) {
|
if (this.tableData.filter(f => f.name === file.name).length > 0) {
|
||||||
this.$message.error(this.$t('load_test.delete_file'));
|
this.$error(this.$t('load_test.delete_file'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExceed() {
|
handleExceed() {
|
||||||
this.$message.error(this.$t('load_test.delete_file'));
|
this.$error(this.$t('load_test.delete_file'));
|
||||||
},
|
},
|
||||||
fileValidator(file) {
|
fileValidator(file) {
|
||||||
/// todo: 是否需要对文件内容和大小做限制
|
/// todo: 是否需要对文件内容和大小做限制
|
||||||
|
|
|
@ -281,10 +281,7 @@
|
||||||
},
|
},
|
||||||
validConfig() {
|
validConfig() {
|
||||||
if (!this.resourcePool) {
|
if (!this.resourcePool) {
|
||||||
this.$message({
|
this.$warning(this.$t('load_test.resource_pool_is_null'));
|
||||||
message: this.$t('load_test.resource_pool_is_null'),
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue