formatDuration returned an empty value when a migration was in progress (started set but completed missing), causing the duration column to show an em-dash for all running plans. It now computes elapsed time up to Date.now() when completed is absent, only returning the placeholder when started is unset or timestamps are invalid.
Related issue: harvester/harvester#10417
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor(host): update resource usage gauges and table column headers
- Replace ConsumptionGauge with PercentageBar in CPU/Memory/Storage
formatters to show the percentage next to the progress bar
- Rename the Disk State column header to Disk (via i18n)
- Display the CPU Manager column header on two lines
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add noopener noreferrer rel
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve VM migration dashboard mapping labels and VM detail link
- Display Management Network / Ignored labels via i18n in mappings column and review card
- Add clickable external-link icon to migrated VM detail page after successful migration
- Add tooltip to the VM detail external-link icon
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify duration column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: regenerate stale cloud-init secret name after VM name change
When creating a VM, the cloud-init/sysprep secret name was generated
once and cached for the component's lifetime (needNewSecret is always
false during create). If a first create attempt was rejected by the
API (e.g. duplicate name) and the user corrected the name and retried,
the VM was created successfully but reused the secret name derived
from the rejected attempt, and any subsequent secret-creation failure
surfaced as a stale error after the VM already existed.
Now the secret name (and Windows sysprep secret name) is regenerated
whenever the VM name prefix used to generate it no longer matches the
current name, and is proactively reset on a failed create attempt so
retries always start fresh.
Fixesharvester/harvester#11174
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove console
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat: allow user specify namespace for migrated VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: not pre-select target namespace
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: ignore option
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: keep upgrade button appear
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add migration plan duration time column
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow duration column to be sorted
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add customized migration plan delete model
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add progress bar tooltip
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: hide Virtul machine migration tabs if forklift addon is not enabled
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: rename advanced to configurations
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: fixed column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
* revert: power on background color
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow suer give static IP for VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow user to select kube-system ns
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add NICs tab when creating overlay network
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: only show NIC tab if ns is kube-system
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add NAT & Internet tabs
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add provider networks / vlan edit pages
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add edit pages
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: review comments
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
This exposes the longhorn-v2-data-engine-hugepage-enabled and
longhorn-v2-data-engine-memory-size settings in the Harvester GUI, on
Harvester v1.9.0 and later.
Related-to: https://github.com/harvester/harvester/issues/9390
Signed-off-by: Tim Serong <tserong@suse.com>
When editing a Virtual Machine's volumes, if the user selects 'No media' for the Image, the 'harvesterhci.io/os' label is incorrectly removed from the VM's metadata.
Related to: https://github.com/harvester/harvester/issues/10947
Signed-off-by: Volker Theile <vtheile@suse.com>
* feat: allow user to select kube-system ns
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add NICs tab when creating overlay network
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: only show NIC tab if ns is kube-system
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: clear selected VM rows after click bulk action
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: await altStopVM action
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: multiple VM start actions
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify altRestartVM()
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add Host Network tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add Host Network edit page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add node selector tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: lint
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add warning message if addon is not enabled or already hasone
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: some wordings in en-us.yaml
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for volume expansion in storage configuration
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update volume expansion wording
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: hide checkbox if feature flag is not enabled
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: revert unneeded change
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add VM display name annotation support in edit and list views
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add display name checkbox and input field
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
when implementing the first version pci device passthrough,
we didn't have our own device plugin, then resource name was changed
after upgrade.
Right now, we already have our own device plugin, which we can control
resource name by our ourselves. So, we can remove old mechanism.
Signed-off-by: Jack Yu <jack.yu@suse.com>
* feat: add filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add filesystem tab in create VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update some wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and enable filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and update icon button positioning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove wrong feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: vm template
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add filesystem tab in create VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update some wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and enable filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and update icon button positioning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: tab name
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add autoattachPodInterface in edit VM mode if no network interface configured
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded code
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>