mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 21:26:08 +08:00
show volume encryption in vm detail volume tab
Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
@@ -173,15 +173,15 @@ export default {
|
||||
|
||||
methods: {
|
||||
lockIconTooltipMessage(row) {
|
||||
if (row.isVMImageEncrypted && row.isVolumeEncrypted) {
|
||||
return this.t('harvester.virtualMachine.lockIconTooltip.both');
|
||||
} else if (row.isVMImageEncrypted) {
|
||||
return this.t('harvester.virtualMachine.lockIconTooltip.image');
|
||||
} else if (row.isVolumeEncrypted) {
|
||||
return this.t('harvester.virtualMachine.lockIconTooltip.volume');
|
||||
const message = '';
|
||||
|
||||
if (row.encryptedVolumeType === 'all') {
|
||||
return this.t('harvester.virtualMachine.volume.lockTooltip.all');
|
||||
} else if (row.encryptedVolumeType === 'partial') {
|
||||
return this.t('harvester.virtualMachine.volume.lockTooltip.partial');
|
||||
}
|
||||
|
||||
return '';
|
||||
return message;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -213,7 +213,12 @@ export default {
|
||||
:to="scope.row.detailLocation"
|
||||
>
|
||||
{{ scope.row.metadata.name }}
|
||||
<i v-if="lockIconTooltipMessage(scope.row)" v-tooltip="lockIconTooltipMessage(scope.row)" class="icon icon-lock" />
|
||||
<i
|
||||
v-if="lockIconTooltipMessage(scope.row)"
|
||||
v-tooltip="lockIconTooltipMessage(scope.row)"
|
||||
class="icon icon-lock"
|
||||
:class="{'green-icon': scope.row.encryptedVolumeType === 'all', 'yellow-icon': scope.row.encryptedVolumeType === 'partial'}"
|
||||
/>
|
||||
</router-link>
|
||||
<span v-else>
|
||||
{{ scope.row.metadata.name }}
|
||||
@@ -234,6 +239,14 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.green-icon {
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.yellow-icon {
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
.name-console {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user