-
+
-
-
-
@@ -147,7 +144,6 @@ export default {
formData: {
configName: '',
projectName: '',
- userPassword: '',
yamlData: baseYamlData,
testIP: '',
testPassword: '',
@@ -167,18 +163,23 @@ export default {
yamlDialog: false,
configDialog: false,
- configNameDialog: false,
yamlType: '',
configID: 0,
configData: '',
configDatas: [],
+ rules: {
+ configName: [{required: true, message: 'configName不能为空', trigger: 'blur'}],
+ projectName: [{required: true, message: 'projectName不能为空', trigger: 'blur'}],
+ yamlData: [{required: true, message: 'yamlData不能为空', trigger: 'blur'}],
+ },
};
},
created() {
this.getData()
},
methods: {
- getData() {},
+ getData() {
+ },
//展示yaml文件
showYaml(yamlType) {
this.yamlDialog = true
@@ -213,7 +214,6 @@ export default {
this.configID = config.id
this.formData.configName = config.config_name
this.formData.projectName = config.project_name
- this.formData.userPassword = config.user_password
this.formData.iterations.stream = config.stream_number
this.formData.iterations.lmbench = config.lmbench_number
this.formData.iterations.unixbench = config.unixbench_number
@@ -258,7 +258,6 @@ export default {
this.configID = this.configData.id
this.formData.configName = this.configData.config_name
this.formData.projectName = this.configData.project_name
- this.formData.userPassword = this.configData.user_password
this.formData.iterations.stream = this.configData.stream_number
this.formData.iterations.lmbench = this.configData.lmbench_number
this.formData.iterations.unixbench = this.configData.unixbench_number
@@ -283,7 +282,6 @@ export default {
//更新配置
update() {
if (this.check()) {
- console.log(this.configID)
if (this.configID) {
const formData = {
id: this.configID,
@@ -291,7 +289,6 @@ export default {
project_name: this.formData.projectName,
test_ip: this.formData.testIP,
test_password: this.formData.testPassword,
- user_password: this.formData.userPassword,
stream: this.formData.iterations.stream,
lmbench: this.formData.iterations.lmbench,
unixbench: this.formData.iterations.unixbench,
@@ -312,13 +309,11 @@ export default {
//新增配置
add() {
if (this.check()) {
- this.configNameDialog = true
const formData = {
config_name: this.formData.configName,
project_name: this.formData.projectName,
test_ip: this.formData.testIP,
test_password: this.formData.testPassword,
- user_password: this.formData.userPassword,
stream: this.formData.iterations.stream,
lmbench: this.formData.iterations.lmbench,
unixbench: this.formData.iterations.unixbench,
@@ -343,7 +338,6 @@ export default {
project_name: this.formData.projectName,
test_ip: this.formData.testIP,
test_password: this.formData.testPassword,
- user_password: this.formData.userPassword,
stream: this.formData.iterations.stream,
lmbench: this.formData.iterations.lmbench,
unixbench: this.formData.iterations.unixbench,
@@ -356,12 +350,11 @@ export default {
message: this.formData.message
}
do_test_case(formData).then(response => {
- console.log(response.data)
+ console.log(response.data.code)
this.formData.configName = ''
this.formData.projectName = ''
this.formData.testIP = ''
this.formData.testPassword = ''
- this.formData.userPassword = ''
this.formData.iterations.stream = ''
this.formData.iterations.lmbench = ''
this.formData.iterations.unixbench = ''
@@ -382,10 +375,6 @@ export default {
ElMessage({message: "项目名称不能为空", type: 'error'});
return false;
}
- if (!this.formData.userPassword) {
- ElMessage({message: "kytuning用户密码不能为空", type: 'error'});
- return false;
- }
const iterations = {
stream: this.formData.iterations.stream !== '' ? parseInt(this.formData.iterations.stream) : 0,
lmbench: this.formData.iterations.lmbench !== '' ? parseInt(this.formData.iterations.lmbench) : 0,