From 39cb05d47e4db5d2b4278af80496fbac2289b984 Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Wed, 28 Aug 2024 17:11:09 +0300 Subject: [PATCH 01/16] feat: Add NetworkItem component to make it less complex feat: Refactor Networks component --- .../playground/src/components/NetworkItem.vue | 38 ++++ .../playground/src/components/networks.vue | 214 ++++++------------ 2 files changed, 113 insertions(+), 139 deletions(-) create mode 100644 packages/playground/src/components/NetworkItem.vue diff --git a/packages/playground/src/components/NetworkItem.vue b/packages/playground/src/components/NetworkItem.vue new file mode 100644 index 0000000000..26ba750687 --- /dev/null +++ b/packages/playground/src/components/NetworkItem.vue @@ -0,0 +1,38 @@ + + + diff --git a/packages/playground/src/components/networks.vue b/packages/playground/src/components/networks.vue index e9e9047932..d764493db0 100644 --- a/packages/playground/src/components/networks.vue +++ b/packages/playground/src/components/networks.vue @@ -1,100 +1,64 @@ From 954d9794a26407d6eac1a5a621c3eb24de757e03 Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Sun, 1 Sep 2024 12:37:14 +0300 Subject: [PATCH 08/16] feat: Use 'useNetworks' in full_vm solution --- packages/playground/src/weblets/full_vm.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/playground/src/weblets/full_vm.vue b/packages/playground/src/weblets/full_vm.vue index 5d345c4e67..21bcb79df6 100644 --- a/packages/playground/src/weblets/full_vm.vue +++ b/packages/playground/src/weblets/full_vm.vue @@ -44,7 +44,7 @@ v-model="solution" /> - (); -const ipv4 = ref(false); -const ipv6 = ref(false); -const planetary = ref(false); -const mycelium = ref(true); -const wireguard = ref(false); +const { ipv4, ipv6, mycelium, planetary, wireguard } = useNetworks(); const dedicated = ref(false); const certified = ref(false); const disks = ref([]); From a9ff88fd926fc72aab30a18730b8a1bb49ea50ef Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Sun, 1 Sep 2024 12:38:55 +0300 Subject: [PATCH 09/16] feat: Use 'useNetworks' in jenkins solution --- packages/playground/src/weblets/jenkins.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/playground/src/weblets/jenkins.vue b/packages/playground/src/weblets/jenkins.vue index 7b3f6b43a7..b21f97fe3d 100644 --- a/packages/playground/src/weblets/jenkins.vue +++ b/packages/playground/src/weblets/jenkins.vue @@ -133,10 +133,7 @@ const flist: Flist = { }; const dedicated = ref(false); const certified = ref(false); -const ipv4 = ref(false); -const ipv6 = ref(false); -const mycelium = ref(true); -const planetary = ref(true); +const { ipv4, ipv6, mycelium, planetary } = useNetworks(); const selectionDetails = ref(); const gridStore = useGrid(); const grid = gridStore.client as GridClient; @@ -240,7 +237,7 @@ function updateSSHkeyEnv(selectedKeys: string) {