From c4388d78e07c511815f86ba9215c791ae23422fc Mon Sep 17 00:00:00 2001 From: davidjumani Date: Wed, 21 Jul 2021 15:05:30 +0530 Subject: [PATCH 1/3] ui: Refresh only on current / parent page (#5214) --- ui/src/utils/plugins.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/src/utils/plugins.js b/ui/src/utils/plugins.js index c7a385cd07c..60dfff28731 100644 --- a/ui/src/utils/plugins.js +++ b/ui/src/utils/plugins.js @@ -53,7 +53,8 @@ export const pollJobPlugin = { showLoading = true, catchMessage = i18n.t('label.error.caught'), catchMethod = () => {}, - action = null + action = null, + originalPage = null } = options store.dispatch('AddHeaderNotice', { @@ -63,6 +64,7 @@ export const pollJobPlugin = { status: 'progress' }) + options.originalPage = options.originalPage ? options.originalPage : this.$router.currentRoute.path api('queryAsyncJobResult', { jobId }).then(json => { const result = json.queryasyncjobresultresponse if (result.jobstatus === 1) { @@ -85,7 +87,11 @@ export const pollJobPlugin = { status: 'done', duration: 2 }) - if (!action || !('isFetchData' in action) || (action.isFetchData)) { + + // Ensure we refresh on the same / parent page + const currentPage = this.$router.currentRoute.path + const samePage = originalPage === currentPage || originalPage.startsWith(currentPage + '/') + if (samePage && (!action || !('isFetchData' in action) || (action.isFetchData))) { eventBus.$emit('async-job-complete') } successMethod(result) From 29090fe4ab46e7daaba71c5b1f35c38c3f61e516 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 26 Jul 2021 13:28:07 +0200 Subject: [PATCH 2/3] Only display information, if they are relevant (#5206) --- ui/src/views/infra/HostInfo.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/views/infra/HostInfo.vue b/ui/src/views/infra/HostInfo.vue index 2c9814307d7..e867956ca60 100644 --- a/ui/src/views/infra/HostInfo.vue +++ b/ui/src/views/infra/HostInfo.vue @@ -43,7 +43,7 @@ - +
{{ $t('label.hosttags') }}
@@ -51,7 +51,7 @@
- +
{{ $t('label.oscategoryid') }}
@@ -83,7 +83,7 @@
- +
{{ $t('label.hastate') }}
@@ -91,7 +91,7 @@
- +
{{ $t('label.haprovider') }}
From 446337b4cccf4ef871426a432e2dbcd4c15678c1 Mon Sep 17 00:00:00 2001 From: slavkap <51903378+slavkap@users.noreply.github.com> Date: Mon, 26 Jul 2021 14:37:47 +0300 Subject: [PATCH 3/3] Fix of shrinking volumes with QCOW2 format (#5225) * Fix of shrinking volumes with QCOW2 format If the volumes are with QCOW2 format the shrinking will be handled on the agents side. There are cases in some storage plugins where the volumes' format is kept in the DB in QCOW2 but the actual format is raw. Till the current implementation this was limiting the plugins to shrink the volumes. Now this will be handled by the storage plugins * Addressed @nvazquez suggested change Will log the exception instead the exception message --- .../java/com/cloud/storage/VolumeApiServiceImpl.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java index ccb91f180ed..9791267f498 100644 --- a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java @@ -1063,14 +1063,6 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic * This will be checked again at the hypervisor level where we can see * the actual disk size. */ - if (currentSize > newSize) { - VolumeVO vol = _volsDao.findById(cmd.getEntityId()); - if (vol != null && ImageFormat.QCOW2.equals(vol.getFormat()) && !Volume.State.Allocated.equals(volume.getState())) { - String message = "Unable to shrink volumes of type QCOW2"; - s_logger.warn(message); - throw new InvalidParameterValueException(message); - } - } if (currentSize > newSize && !shrinkOk) { throw new InvalidParameterValueException("Going from existing size of " + currentSize + " to size of " + newSize + " would shrink the volume." + "Need to sign off by supplying the shrinkok parameter with value of true."); @@ -1323,7 +1315,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic return volume; } catch (Exception e) { - throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e); + throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e.getMessage()), e); } }