From 632867ea4a0561fb3a103254f1339c07ef41392b Mon Sep 17 00:00:00 2001 From: Nawo-pingu <64965495+Nawo-pingu@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:37:39 +0200 Subject: [PATCH 01/14] add a button froce delete (not functionnal) --- src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue b/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue index 709ddf16..5e3ca894 100644 --- a/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue +++ b/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue @@ -101,6 +101,8 @@ You are about to remove hypervisor {{ JSON.parse(JSON.stringify(this.selectedHost)).hostname }}.
Please confirm action. + Force Delete + From ff732c7909337b7cd9dc40ce4d3bdd9709ee2c08 Mon Sep 17 00:00:00 2001 From: Nawo-pingu <64965495+Nawo-pingu@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:38:43 +0200 Subject: [PATCH 02/14] change button into checkbox --- .../resources/hypervisors/HypervisorForm.vue | 54 ++- .../resources/hypervisors/HypervisorList.vue | 307 ++++++++++++------ 2 files changed, 251 insertions(+), 110 deletions(-) diff --git a/src/ui/src/pages/admin/resources/hypervisors/HypervisorForm.vue b/src/ui/src/pages/admin/resources/hypervisors/HypervisorForm.vue index 05139af0..15d87a4b 100644 --- a/src/ui/src/pages/admin/resources/hypervisors/HypervisorForm.vue +++ b/src/ui/src/pages/admin/resources/hypervisors/HypervisorForm.vue @@ -2,26 +2,48 @@ + :title=" + hypersivorId + ? `Updating hypervisor ${stateHypervisor?.hostname ?? ''}` + : 'Adding hypervisor' + " + /> - +
- +
- +

- + {{ hypervisorId ? "Update" : "Add" }}
@@ -40,7 +62,7 @@ import FormHeader from "@/components/forms/FormHeader.vue"; export default { components: { ...spinners, - FormHeader + FormHeader, }, data() { return { @@ -122,7 +144,9 @@ export default { } ) .then((response) => { - this.$store.dispatch("requestHost", { token: this.$store.state.token }); + this.$store.dispatch("requestHost", { + token: this.$store.state.token, + }); this.$router.push("/admin/resources/hypervisors"); this.$vaToast.init({ title: response.data.state, @@ -130,8 +154,8 @@ export default { color: "success", }); }) - .catch(error => { - console.error(error) + .catch((error) => { + console.error(error); this.$vaToast.init({ title: "Unable to add hypervisor", message: error?.response?.data?.detail ?? error, diff --git a/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue b/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue index 5e3ca894..fc06a405 100644 --- a/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue +++ b/src/ui/src/pages/admin/resources/hypervisors/HypervisorList.vue @@ -2,16 +2,29 @@
- + - + @@ -21,9 +34,14 @@
- +
@@ -60,32 +102,51 @@ Connecting to the hypervisor at {{ selectedHost.hostname }} -
- - +
+ + -
- + - + v-model="currentSshKey" + type="textarea" + :autosize="true" + :min-rows="2" + readonly + class="mb-4" + /> +
- - Cancel - + Cancel - - Done - + Done
@@ -96,26 +157,35 @@ Removing hypervisor -
+
- You are about to remove hypervisor {{ JSON.parse(JSON.stringify(this.selectedHost)).hostname }}. -
Please confirm action. + You are about to remove hypervisor + {{ JSON.parse(JSON.stringify(this.selectedHost)).hostname }}.
Please confirm action.
- Force Delete +