diff client/src/components/systemconfiguration/DataAccuracy.vue @ 3864:a7abfb3d400d

client: configuration: reset data accuracy to defaults
author Markus Kottlaender <markus@intevation.de>
date Tue, 09 Jul 2019 15:41:31 +0200
parents a688a478e35f
children d37f44c4d531
line wrap: on
line diff
--- a/client/src/components/systemconfiguration/DataAccuracy.vue	Tue Jul 09 15:37:59 2019 +0200
+++ b/client/src/components/systemconfiguration/DataAccuracy.vue	Tue Jul 09 15:41:31 2019 +0200
@@ -274,6 +274,9 @@
       <a @click.prevent="submit" class="btn btn-info btn-sm text-white">
         <translate>Send</translate>
       </a>
+      <a @click.prevent="reset" class="btn btn-outline-info btn-sm ml-2">
+        <translate>Reset to defaults</translate>
+      </a>
     </div>
   </div>
 </template>
@@ -329,6 +332,15 @@
     ...mapState("application", ["config"])
   },
   methods: {
+    reset() {
+      this.config.bn_revtime_multiplier = "1.5";
+      this.config.gm_min_values_14d = "1224";
+      this.config.gm_latest_hours = "24";
+      this.config.gm_forecast_offset_24h = "15";
+      this.config.gm_forecast_offset_72h = "15";
+      this.config.gm_forecast_vs_reality_nsc_24h = "-12.5";
+      this.config.gm_forecast_vs_reality_nsc_72h = "-12.5";
+    },
     submit() {
       this.$store.dispatch("application/saveConfig", {
         bn_revtime_multiplier: this.config.bn_revtime_multiplier,