build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / ui / web / src / components / actions / AddChargingStations.vue
index 0ddf612e56a7f441690128d310ed1cadef75fec7..51e8a83093f1f2591e74bf32957318edf595f132 100644 (file)
     name="number-of-stations"
     placeholder="number of stations"
   />
-  <p>Options:</p>
+  <p>Template options overrides:</p>
   <ul>
+    <li>
+      Supervision url:
+      <input
+        id="supervision-url"
+        v-model.trim="state.supervisionUrl"
+        type="url"
+        name="supervision-url"
+        placeholder="wss://"
+      />
+    </li>
     <li>
       Auto start:
       <input v-model="state.autoStart" type="checkbox" true-value="true" false-value="false" />
     </li>
+    <li>
+      Persistent configuration:
+      <input
+        v-model="state.persistentConfiguration"
+        type="checkbox"
+        true-value="true"
+        false-value="false"
+      />
+    </li>
+    <li>
+      OCPP strict compliance:
+      <input
+        v-model="state.ocppStrictCompliance"
+        type="checkbox"
+        true-value="true"
+        false-value="false"
+      />
+    </li>
+    <li>
+      Performance statistics:
+      <input
+        v-model="state.enableStatistics"
+        type="checkbox"
+        true-value="true"
+        false-value="false"
+      />
+    </li>
   </ul>
   <br />
   <Button
       () => {
         uiClient
           .addChargingStations(state.template, state.numberOfStations, {
-            autoStart: convertToBoolean(state.autoStart)
+            supervisionUrls: state.supervisionUrl.length > 0 ? state.supervisionUrl : undefined,
+            autoStart: convertToBoolean(state.autoStart),
+            persistentConfiguration: convertToBoolean(state.persistentConfiguration),
+            ocppStrictCompliance: convertToBoolean(state.ocppStrictCompliance),
+            enableStatistics: convertToBoolean(state.enableStatistics)
           })
           .then(() => {
             $toast.success('Charging stations successfully added')
@@ -62,7 +103,11 @@ const state = reactive({
   ready: false,
   template: '',
   numberOfStations: 1,
-  autoStart: false
+  supervisionUrl: '',
+  autoStart: false,
+  persistentConfiguration: true,
+  ocppStrictCompliance: true,
+  enableStatistics: false
 })
 
 const app = getCurrentInstance()
@@ -93,4 +138,9 @@ onMounted(() => {
   width: 15%;
   text-align: center;
 }
+
+#supervision-url {
+  width: 90%;
+  text-align: left;
+}
 </style>