From cac72cee1eb1b220389961248ac1c32854cad357 Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Fri, 26 Jan 2024 18:12:02 +0100 Subject: [PATCH 01/11] Add boot order tab to VM page Signed-off-by: Francesco Torchia --- .vscode/settings.json | 2 +- package.json | 2 +- .../VirtualMachineBootOrder/index.vue | 254 ++++++++++++++++++ .../edit/kubevirt.io.virtualmachine/index.vue | 15 ++ pkg/harvester/l10n/en-us.yaml | 1 + pkg/harvester/mixins/harvester-vm/index.js | 39 ++- .../src/components/Card/Card.vue | 11 +- 7 files changed, 311 insertions(+), 13 deletions(-) create mode 100644 pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineBootOrder/index.vue diff --git a/.vscode/settings.json b/.vscode/settings.json index a8209ce563c..e5ac1948794 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,7 +11,7 @@ "eslint.packageManager": "yarn", "eslint.validate": ["vue","html","javascript","typescript"], "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "javascript.preferences.importModuleSpecifier": "non-relative", "typescript.preferences.importModuleSpecifier": "non-relative", diff --git a/package.json b/package.json index b7eb4f61587..709379cc007 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test": "jest --watch", "test:ci": "jest --collectCoverage --silent", "install:ci": "yarn install --frozen-lockfile", - "dev": "bash -c 'source ./scripts/version && NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve'", + "dev": "bash -c 'source ./scripts/version && NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve --host localhost'", "mem-dev": "bash -c 'source ./scripts/version && NODE_ENV=dev node --max-old-space-size=8192 ./node_modules/.bin/vue-cli-service serve'", "docker-dev": "docker run --rm --name dashboard-dev -p 8005:8005 -e API=$API -v $(pwd):/src -v dashboard_node:/src/node_modules rancher/dashboard:dev", "docker:local:start": "docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -e CATTLE_BOOTSTRAP_PASSWORD=password -e CATTLE_PASSWORD_MIN_LENGTH=3 --name cypress --privileged rancher/rancher:v2.7-head", diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineBootOrder/index.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineBootOrder/index.vue new file mode 100644 index 00000000000..476ab18cd83 --- /dev/null +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineBootOrder/index.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue index af95611559b..954ebe1eba4 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue @@ -17,6 +17,7 @@ import Reserved from './VirtualMachineReserved'; import SSHKey from './VirtualMachineSSHKey'; import Volume from './VirtualMachineVolume'; import Network from './VirtualMachineNetwork'; +import BootOrder from './VirtualMachineBootOrder'; import CpuMemory from './VirtualMachineCpuMemory'; import CloudConfig from './VirtualMachineCloudConfig'; import NodeScheduling from '@shell/components/form/NodeScheduling'; @@ -43,6 +44,7 @@ export default { name: 'HarvesterEditVM', components: { + BootOrder, Tab, Tabbed, Checkbox, @@ -429,6 +431,11 @@ export default { return out; }, + + onBootOrderChange({ diskRows, networkRows }) { + this.diskRows = diskRows; + this.networkRows = networkRows; + } }, }; @@ -541,6 +548,14 @@ export default { + + + +