GutoVeronezi commented on code in PR #6491:
URL: https://github.com/apache/cloudstack/pull/6491#discussion_r967069212


##########
ui/src/views/compute/InstanceTab.vue:
##########
@@ -33,31 +33,8 @@
         <router-link :to="{ path: '/iso/' + vm.isoid }">{{ vm.isoname 
}}</router-link> <br/>
         <barcode-outlined /> {{ vm.isoid }}
       </a-tab-pane>
-      <a-tab-pane :tab="$t('label.volumes')" key="volumes" v-if="'listVolumes' 
in $store.getters.apis">
-        <a-table
-          class="table"
-          size="small"
-          :columns="volumeColumns"
-          :dataSource="volumes"
-          :rowKey="item => item.id"
-          :pagination="false"
-        >
-          <template #name="{ text, record }">
-            <hdd-outlined />
-            <router-link :to="{ path: '/volume/' + record.id }">
-              {{ text }}
-            </router-link>
-            <a-tag v-if="record.provisioningtype">
-              {{ record.provisioningtype }}
-            </a-tag>
-          </template>
-          <template #state="{ text }">
-            <status :text="text ? text : ''" />{{ text }}
-          </template>
-          <template #size="{ record }">
-            {{ parseFloat(record.size / (1024.0 * 1024.0 * 1024.0)).toFixed(2) 
}} GB
-          </template>
-        </a-table>
+      <a-tab-pane :tab="$t('label.volumes')" key="volumes">
+        <VolumesTab :resource="vm" :items="volumes" :loading="loading" />

Review Comment:
   ```suggestion
           <volumes-tab :resource="vm" :items="volumes" :loading="loading" />
   ```



##########
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##########
@@ -152,20 +153,17 @@ public ApiCommandResourceType getApiResourceType() {
     @Override
     public void execute() {
         if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-            throw new InvalidParameterValueException(String.format("Either %s 
or %s  must be passed for migrating the VM", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
-        }
-
-        UserVm userVm = _userVmService.getUserVm(getVirtualMachineId());
-        if (userVm == null) {
-            throw new InvalidParameterValueException("Unable to find the VM by 
id=" + getVirtualMachineId());
+            throw new InvalidParameterValueException(String.format("Either %s 
or %s  must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));

Review Comment:
   ```suggestion
               throw new InvalidParameterValueException(String.format("Either 
%s or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to