From 651dfd93a551daddefe17994fcc226d33383bb85 Mon Sep 17 00:00:00 2001 From: SergeyVS Date: Mon, 11 Mar 2024 17:09:10 +0300 Subject: [PATCH] feat(update onchange route values): --- .../src/components/3_organisms/RoutersEditor/RouterRow.vue | 2 +- proxy-ui-app/src/store/modules/proxy/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy-ui-app/src/components/3_organisms/RoutersEditor/RouterRow.vue b/proxy-ui-app/src/components/3_organisms/RoutersEditor/RouterRow.vue index cd9d841..96bc4c5 100644 --- a/proxy-ui-app/src/components/3_organisms/RoutersEditor/RouterRow.vue +++ b/proxy-ui-app/src/components/3_organisms/RoutersEditor/RouterRow.vue @@ -93,7 +93,7 @@ export default { }) }, parseNumber (value) { - if (!value || value !== 0) return 0 + if (isNaN(parseFloat(value)) || !value && value !== 0) return 0 return parseFloat(value) }, removeCurrentRoute() { diff --git a/proxy-ui-app/src/store/modules/proxy/index.js b/proxy-ui-app/src/store/modules/proxy/index.js index ee4f4af..1bcb8f7 100644 --- a/proxy-ui-app/src/store/modules/proxy/index.js +++ b/proxy-ui-app/src/store/modules/proxy/index.js @@ -108,7 +108,7 @@ const actions = { const newRoute = { "path": null, "role": null, - id: Math.random().toString(36).slice(4), + id: Math.floor(100000 + Math.random() * 900000), action: "create", server_id: getters.selectedSite.id }