mirror of https://github.com/apache/cloudstack.git
UI: Add info for 'Use primary storage replication' in snapshot view(s) (#11943)
This commit is contained in:
parent
2358632253
commit
b8813c7b24
|
|
@ -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")
|
"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;
|
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;
|
protected Boolean useStorageReplication;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,10 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
|
||||||
since = "4.21.0")
|
since = "4.21.0")
|
||||||
protected List<Long> storagePoolIds;
|
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;
|
protected Boolean useStorageReplication;
|
||||||
|
|
||||||
private String syncObjectType = BaseAsyncCmd.snapshotHostSyncObject;
|
private String syncObjectType = BaseAsyncCmd.snapshotHostSyncObject;
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,11 @@ public class CreateSnapshotPolicyCmd extends BaseCmd {
|
||||||
since = "4.21.0")
|
since = "4.21.0")
|
||||||
protected List<Long> storagePoolIds;
|
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;
|
protected Boolean useStorageReplication;
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
/////////////////// Accessors ///////////////////////
|
/////////////////// Accessors ///////////////////////
|
||||||
|
|
|
||||||
|
|
@ -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",
|
"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);
|
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);
|
void deletePoliciesForVolume(Long volumeId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,10 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="24" :lg="24" v-if="resourceType === 'Volume'">
|
<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-switch v-model:checked="form.useStorageReplication" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageids" name="storageids">
|
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageids" name="storageids">
|
||||||
|
|
@ -310,6 +313,9 @@ export default {
|
||||||
storagePools: []
|
storagePools: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeCreate () {
|
||||||
|
this.apiParams = this.$getApiParams('createSnapshotPolicy')
|
||||||
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initForm()
|
this.initForm()
|
||||||
this.volumeId = this.resource.id
|
this.volumeId = this.resource.id
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,10 @@
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</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-switch v-model:checked="form.useStorageReplication" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageid" name="storageid" :label="$t('label.storagepools')">
|
<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 OsLogo from '@/components/widgets/OsLogo'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipButton from '@/components/widgets/TooltipButton'
|
import TooltipButton from '@/components/widgets/TooltipButton'
|
||||||
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
import BulkActionProgress from '@/components/view/BulkActionProgress'
|
import BulkActionProgress from '@/components/view/BulkActionProgress'
|
||||||
import Status from '@/components/widgets/Status'
|
import Status from '@/components/widgets/Status'
|
||||||
import eventBus from '@/config/eventBus'
|
import eventBus from '@/config/eventBus'
|
||||||
|
|
@ -244,6 +248,7 @@ export default {
|
||||||
name: 'SnapshotZones',
|
name: 'SnapshotZones',
|
||||||
components: {
|
components: {
|
||||||
TooltipButton,
|
TooltipButton,
|
||||||
|
TooltipLabel,
|
||||||
OsLogo,
|
OsLogo,
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
BulkActionProgress,
|
BulkActionProgress,
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,10 @@
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</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-switch v-model:checked="form.useStorageReplication" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageids" name="storageids">
|
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageids" name="storageids">
|
||||||
|
|
@ -93,7 +96,10 @@
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</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-switch v-model:checked="form.asyncbackup" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :label="$t('label.quiescevm')" name="quiescevm" ref="quiescevm" v-if="quiescevm && hypervisorSupportsQuiesceVm">
|
<a-form-item :label="$t('label.quiescevm')" name="quiescevm" ref="quiescevm" v-if="quiescevm && hypervisorSupportsQuiesceVm">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue