This is an automated email from the ASF dual-hosted git repository.

vishesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new b8813c7b243 UI: Add info for 'Use primary storage replication' in 
snapshot view(s) (#11943)
b8813c7b243 is described below

commit b8813c7b243787b8b33080d7fea3327d709bcccf
Author: Suresh Kumar Anaparti <[email protected]>
AuthorDate: Mon Jan 12 16:50:15 2026 +0530

    UI: Add info for 'Use primary storage replication' in snapshot view(s) 
(#11943)
---
 .../cloudstack/api/command/user/snapshot/CopySnapshotCmd.java  |  6 +++++-
 .../api/command/user/snapshot/CreateSnapshotCmd.java           |  5 ++++-
 .../api/command/user/snapshot/CreateSnapshotPolicyCmd.java     |  6 +++++-
 .../main/java/com/cloud/storage/snapshot/SnapshotManager.java  |  4 +++-
 ui/src/views/storage/FormSchedule.vue                          |  8 +++++++-
 ui/src/views/storage/SnapshotZones.vue                         |  7 ++++++-
 ui/src/views/storage/TakeSnapshot.vue                          | 10 ++++++++--
 7 files changed, 38 insertions(+), 8 deletions(-)

diff --git 
a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CopySnapshotCmd.java
 
b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CopySnapshotCmd.java
index ac54ebbd8f8..519f9876b96 100644
--- 
a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CopySnapshotCmd.java
+++ 
b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CopySnapshotCmd.java
@@ -97,7 +97,11 @@ public class CopySnapshotCmd extends BaseAsyncCmd implements 
UserCmd {
                     "The snapshot will always be made available in the zone in 
which the volume is present. Currently supported for StorPool only")
     protected List<Long> storagePoolIds;
 
-    @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, 
type=CommandType.BOOLEAN, required = false, since = "4.21.0", description = 
"This parameter enables the option the snapshot to be copied to supported 
primary storage")
+    @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+            type=CommandType.BOOLEAN,
+            since = "4.21.0",
+            description = "Enables the snapshot to be copied to the supported 
primary storages when the config 'use.storage.replication' is set to true for 
the storage or globally. " +
+                    "This is supported only for StorPool storage for now.")
     protected Boolean useStorageReplication;
 
     /////////////////////////////////////////////////////
diff --git 
a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java
 
b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java
index 3a49bad8fcb..f78112d679f 100644
--- 
a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java
+++ 
b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java
@@ -112,7 +112,10 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
             since = "4.21.0")
     protected List<Long> storagePoolIds;
 
-    @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, 
type=CommandType.BOOLEAN, required = false, description = "This parameter 
enables the option the snapshot to be copied to supported primary storage")
+    @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+            type=CommandType.BOOLEAN,
+            description = "Enables the snapshot to be copied to the supported 
primary storages when the config 'use.storage.replication' is set to true for 
the storage or globally. " +
+                    "This is supported only for StorPool storage for now.")
     protected Boolean useStorageReplication;
 
     private String syncObjectType = BaseAsyncCmd.snapshotHostSyncObject;
diff --git 
a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java
 
b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java
index 24d756befab..b1e7b2a0004 100644
--- 
a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java
+++ 
b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java
@@ -94,7 +94,11 @@ public class CreateSnapshotPolicyCmd extends BaseCmd {
             since = "4.21.0")
     protected List<Long> storagePoolIds;
 
-    @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, 
type=CommandType.BOOLEAN, required = false, since = "4.21.0", description = 
"This parameter enables the option the snapshot to be copied to supported 
primary storage")
+    @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+            type=CommandType.BOOLEAN,
+            since = "4.21.0",
+            description = "Enables the snapshot to be copied to the supported 
primary storages when the config 'use.storage.replication' is set to true for 
the storage or globally. " +
+                    "This is supported only for StorPool storage for now.")
     protected Boolean useStorageReplication;
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
diff --git 
a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java 
b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java
index b245a371969..10dcc2683de 100644
--- a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java
+++ b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java
@@ -68,7 +68,9 @@ public interface SnapshotManager extends Configurable {
             "Whether to show chain size (sum of physical size of snapshot and 
all its parents) for incremental snapshots in the snapshot response",
             true, ConfigKey.Scope.Global, null);
 
-    public static final ConfigKey<Boolean> UseStorageReplication = new 
ConfigKey<Boolean>(Boolean.class, "use.storage.replication", "Snapshots", 
"false", "For snapshot copy to another primary storage in a different zone. 
Supports only StorPool storage for now", true, ConfigKey.Scope.StoragePool, 
null);
+    ConfigKey<Boolean> UseStorageReplication = new ConfigKey<>(Boolean.class, 
"use.storage.replication", "Snapshots", "false",
+            "For snapshot copy to another primary storage in a different zone. 
This is supported only for StorPool storage for now.",
+            true, ConfigKey.Scope.StoragePool, null);
 
     void deletePoliciesForVolume(Long volumeId);
 
diff --git a/ui/src/views/storage/FormSchedule.vue 
b/ui/src/views/storage/FormSchedule.vue
index 433e399d2a8..baecd3bb5be 100644
--- a/ui/src/views/storage/FormSchedule.vue
+++ b/ui/src/views/storage/FormSchedule.vue
@@ -174,7 +174,10 @@
               </a-form-item>
             </a-col>
             <a-col :md="24" :lg="24" v-if="resourceType === 'Volume'">
-              <a-form-item :label="$t('label.usestoragereplication')" 
name="useStorageReplication" ref="useStorageReplication">
+              <a-form-item name="useStorageReplication" 
ref="useStorageReplication">
+                <template #label>
+                  <tooltip-label :title="$t('label.usestoragereplication')" 
:tooltip="apiParams.usestoragereplication.description" />
+                </template>
                 <a-switch v-model:checked="form.useStorageReplication" />
               </a-form-item>
               <a-form-item v-if="isAdmin && form.useStorageReplication" 
ref="storageids" name="storageids">
@@ -310,6 +313,9 @@ export default {
       storagePools: []
     }
   },
+  beforeCreate () {
+    this.apiParams = this.$getApiParams('createSnapshotPolicy')
+  },
   created () {
     this.initForm()
     this.volumeId = this.resource.id
diff --git a/ui/src/views/storage/SnapshotZones.vue 
b/ui/src/views/storage/SnapshotZones.vue
index ed46ce4172a..f37996a3f29 100644
--- a/ui/src/views/storage/SnapshotZones.vue
+++ b/ui/src/views/storage/SnapshotZones.vue
@@ -137,7 +137,10 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-          <a-form-item :label="$t('label.usestoragereplication')" 
name="useStorageReplication" ref="useStorageReplication">
+          <a-form-item name="useStorageReplication" 
ref="useStorageReplication">
+            <template #label>
+              <tooltip-label :title="$t('label.usestoragereplication')" 
:tooltip="apiParams.usestoragereplication.description" />
+            </template>
             <a-switch v-model:checked="form.useStorageReplication" />
           </a-form-item>
           <a-form-item v-if="isAdmin && form.useStorageReplication" 
ref="storageid" name="storageid" :label="$t('label.storagepools')">
@@ -236,6 +239,7 @@ import { isAdmin } from '@/role'
 import OsLogo from '@/components/widgets/OsLogo'
 import ResourceIcon from '@/components/view/ResourceIcon'
 import TooltipButton from '@/components/widgets/TooltipButton'
+import TooltipLabel from '@/components/widgets/TooltipLabel'
 import BulkActionProgress from '@/components/view/BulkActionProgress'
 import Status from '@/components/widgets/Status'
 import eventBus from '@/config/eventBus'
@@ -244,6 +248,7 @@ export default {
   name: 'SnapshotZones',
   components: {
     TooltipButton,
+    TooltipLabel,
     OsLogo,
     ResourceIcon,
     BulkActionProgress,
diff --git a/ui/src/views/storage/TakeSnapshot.vue 
b/ui/src/views/storage/TakeSnapshot.vue
index fc80e6d775f..9e17e0683b8 100644
--- a/ui/src/views/storage/TakeSnapshot.vue
+++ b/ui/src/views/storage/TakeSnapshot.vue
@@ -66,7 +66,10 @@
             </a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item :label="$t('label.usestoragereplication')" 
name="useStorageReplication" ref="useStorageReplication">
+        <a-form-item name="useStorageReplication" ref="useStorageReplication">
+          <template #label>
+            <tooltip-label :title="$t('label.usestoragereplication')" 
:tooltip="apiParams.usestoragereplication.description" />
+          </template>
           <a-switch v-model:checked="form.useStorageReplication" />
         </a-form-item>
         <a-form-item v-if="isAdmin && form.useStorageReplication" 
ref="storageids" name="storageids">
@@ -93,7 +96,10 @@
             </a-select-option>
           </a-select>
         </a-form-item>
-          <a-form-item :label="$t('label.asyncbackup')" name="asyncbackup" 
ref="asyncbackup" v-if="!supportsStorageSnapshot">
+          <a-form-item name="asyncbackup" ref="asyncbackup" 
v-if="!supportsStorageSnapshot">
+            <template #label>
+              <tooltip-label :title="$t('label.asyncbackup')" 
:tooltip="apiParams.asyncbackup.description" />
+            </template>
           <a-switch v-model:checked="form.asyncbackup" />
         </a-form-item>
         <a-form-item :label="$t('label.quiescevm')" name="quiescevm" 
ref="quiescevm" v-if="quiescevm && hypervisorSupportsQuiesceVm">

Reply via email to