diff --git a/nezha-fronted/src/components/page/config/system.vue b/nezha-fronted/src/components/page/config/system.vue
index 7ecbb36fc..0429a0e4a 100644
--- a/nezha-fronted/src/components/page/config/system.vue
+++ b/nezha-fronted/src/components/page/config/system.vue
@@ -65,7 +65,7 @@
- {{$t('overall.clear')}}
+ {{$t('overall.reset')}}
{{$t('overall.submit')}}
@@ -111,7 +111,7 @@
- {{$t('overall.clear')}}
+ {{$t('overall.reset')}}
{{$t('config.system.email.testConnection')}}
{{$t('overall.submit')}}
@@ -155,7 +155,7 @@
- {{$t('overall.clear')}}
+ {{$t('overall.reset')}}
{{$t('config.system.email.testConnection')}}
{{$t('overall.submit')}}
@@ -219,6 +219,7 @@
timezone:'',
default_cabinet_usize:'',
},
+ basicCopy:null,
basicRules:{
system_name:[{required:true,message:this.$t('validate.required'),trigger:'blur'},],
node_exporter_target_path:[{required:true,message:this.$t('validate.required'),trigger:'blur'},],
@@ -276,6 +277,7 @@
email_ssl_flag: 'off',
email_tls_flag: 'off',
},
+ emailCopy:null,
emailRules:{
email_smtp_host: [
{required:true,message:this.$t('validate.required'),trigger:'blur'},
@@ -295,6 +297,7 @@
terminal:{
max_terminal_num:10
},
+ terminalCopy:null,
terminalRules:{
max_terminal_num:[
{required:true,message:this.$t('validate.required'),trigger:'blur'},
@@ -310,6 +313,7 @@
ldap_mapping:'',
ldap_enable:'off',
},
+ ldapCopy:null,
ldapRules:{
ldap_address:[{required:true,message:this.$t('validate.required'),trigger:'blur'},],
ldap_user_filter:[{required:true,message:this.$t('validate.required'),trigger:'blur'},],
@@ -361,6 +365,7 @@
if(type == 'email'){
this.$refs.emailForm.clearValidate();
}
+ this[type+"Copy"]=Object.assign({},this[type])
}
})
},
@@ -439,20 +444,9 @@
});
},
- resetForm(formName){
+ resetForm(formName,type){
this.$refs[formName].resetFields();
- switch (formName) {
- case 'basicForm':
- this.basic.scrape_interval=15;
- this.basic.storage_local_retention=15*24;
- break;
- case 'emailForm':
- this.email.email_smtp_port=25;
- break;
- case 'terminalForm':
- this.terminal.max_terminal_num=10;
- break;
- }
+ this[type]=Object.assign({},this[type+"Copy"]);
},
switchChange:function(formName){
let $temp=this;