From 79802d19992a6a6c5f713ae87d9aca6fe0f70d7a Mon Sep 17 00:00:00 2001 From: baron_l Date: Mon, 18 Mar 2019 16:14:05 +0100 Subject: [PATCH] feat(storidge): remove snapshots panels when volume snapshots are disabled --- app/docker/views/volumes/edit/volume.html | 4 +- .../views/volumes/edit/volumeController.js | 4 +- .../volumeStoridgeInfo.html | 44 +++++++++++++++++++ app/extensions/storidge/models/volume.js | 22 +++++----- 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/app/docker/views/volumes/edit/volume.html b/app/docker/views/volumes/edit/volume.html index 24b50fcd9..0760cf207 100644 --- a/app/docker/views/volumes/edit/volume.html +++ b/app/docker/views/volumes/edit/volume.html @@ -54,12 +54,12 @@
- +
-
+
Vdisk {{ $ctrl.volume.Vdisk }} + + IP + {{ $ctrl.volume.IP}} + + + Volume + {{ $ctrl.volume.Volume}} + + + DriveType + {{ $ctrl.volume.DriveType}} + + + Compression + {{ $ctrl.volume.Compression}} + + + Dedup + {{ $ctrl.volume.Dedup}} + + + Encryption + {{ $ctrl.volume.Encryption}} + + + Replication + {{ $ctrl.volume.Replication}} + + + Snapshot + {{ $ctrl.volume.Snapshot}} + + + Snapshot Interval + {{ $ctrl.volume.SnapshotInterval}} + + + Max Snapshots + {{ $ctrl.volume.SnapshotMax}} + + + Filesystem + {{ $ctrl.volume.Filesystem}} + Labels diff --git a/app/extensions/storidge/models/volume.js b/app/extensions/storidge/models/volume.js index c2b300db5..d77f84a97 100644 --- a/app/extensions/storidge/models/volume.js +++ b/app/extensions/storidge/models/volume.js @@ -15,17 +15,17 @@ function StoridgeVolumeModel(data) { this.Vdisk = data.vdisk; this.Labels = data.labels; - // this.IP = data.ipaddr; - // this.Volume = data.volume; - // this.DriveType = data.type; - // this.Compression = data.compression; - // this.Dedup = data.dedup; - // this.Encryption = data.encryption; - // this.Replication = data.replication; - // this.Snapshot = data.snapshot; - // this.SnapshotInterval = data.snap_interval; - // this.SnapshotMax = data.snap_max; - // this.Filesystem = data.filesystem; + this.IP = data.ipaddr; + this.Volume = data.volume; + this.DriveType = data.type; + this.Compression = data.compression; + this.Dedup = data.dedup; + this.Encryption = data.encryption; + this.Replication = data.replication; + this.SnapshotEnabled = data.snapshot; + this.SnapshotInterval = data.snapshotinterval; + this.SnapshotMax = data.snapshotmax; + this.Filesystem = data.filesystem; } function StoridgeVolumeUpdateModel(data) {