From 712296c3d1234ef66833d8d4252ce81a7bad39bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=22axel=5Fverse=22=20=D0=9C=D1=83=D0=B4=D1=80=D0=BE=D0=B2?= Date: Tue, 8 Sep 2026 02:37:09 +0300 Subject: [PATCH] FEAT: MVP --- src/components/configurationForm.vue | 2 - src/components/configurationFormView.vue | 132 +++++++++++++++++++++++ src/pages/index.vue | 27 ++++- src/stores/useSwStore.js | 8 -- src/utils/calculator.js | 25 +++-- 5 files changed, 172 insertions(+), 22 deletions(-) create mode 100644 src/components/configurationFormView.vue delete mode 100644 src/stores/useSwStore.js diff --git a/src/components/configurationForm.vue b/src/components/configurationForm.vue index 7e23dce..a42d8b0 100644 --- a/src/components/configurationForm.vue +++ b/src/components/configurationForm.vue @@ -23,7 +23,6 @@ import { } from '../utils/constants/configuration' import { validationSchema as schema } from '../utils/validation' import { useRoute, useRouter } from 'vue-router' -import { calculateSettings } from '../utils/calculator' const route = useRoute() const router = useRouter() @@ -125,7 +124,6 @@ const state = reactive({ const onSubmit = async () => { await router.push({ name: 'Index', query: { ...state } }) - console.log(calculateSettings({ ...state })) } diff --git a/src/components/configurationFormView.vue b/src/components/configurationFormView.vue new file mode 100644 index 0000000..5ca501f --- /dev/null +++ b/src/components/configurationFormView.vue @@ -0,0 +1,132 @@ + + + diff --git a/src/pages/index.vue b/src/pages/index.vue index ea03bca..f061bb3 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -1,6 +1,28 @@ diff --git a/src/stores/useSwStore.js b/src/stores/useSwStore.js deleted file mode 100644 index ce41ae5..0000000 --- a/src/stores/useSwStore.js +++ /dev/null @@ -1,8 +0,0 @@ -import { defineStore } from 'pinia' -import { ref } from 'vue' - -export const useConfigurationStore = defineStore('sw', () => { - const state = ref() - - return { state } -}) diff --git a/src/utils/calculator.js b/src/utils/calculator.js index 157d1ab..7d86d41 100644 --- a/src/utils/calculator.js +++ b/src/utils/calculator.js @@ -162,30 +162,35 @@ export function calculateSettings({ ) return { - totalMemoryInBytes, - totalMemoryInKb, - dbDefaultValues, - isConfigured, + dbVersion, + osType, + dbType, + totalMemory, + totalMemoryUnit, + cpuNum, + connectionNum, + hdType, maxConnections, + hugePages, + sharedBuffers, effectiveCacheSize, + maintenanceWorkMem, checkpointSegments, checkpointCompletionTarget, - defaultStatisticsTarget, - walLevel, - jit, - sharedBuffers, - hugePages, walBuffers, + defaultStatisticsTarget, randomPageCost, effectiveIoConcurrency, parallelSettings, workMem, + warningInfoMessages, + walLevel, + jit, walCompression, autovacuumMaxWorkers, autovacuumWorkMem, ioMethod, ioWorkers, - warningInfoMessages, } }