Skip to content

Commit 0653e77

Browse files
authored
Merge pull request #169 from gnehapk/gluster-utilisation-replica-default-value
fixed gluster's utilisation and replica default value for pool
2 parents 25fa1fe + c49cc08 commit 0653e77

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/commons/components/create-pool/create-pool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
vm.checkboxModelQwnerValue = false;
3535
vm.poolName = "MyPool";
3636
vm.poolCount = 3;
37-
vm.replicaCount = 2;
37+
vm.replicaCount = 3;
3838
vm.quotasMaxPercentage = 0;
3939
vm.quotasMaxObjects = 0;
4040
vm.taskSubmitted = false;

src/modules/cluster/cluster-list/cluster-list.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
}, 1000 * config.refreshIntervalTime );
5555

5656
/*Cancelling interval when scope is destroy*/
57-
$scope.$on('$destroy', function() {
57+
$scope.$on("$destroy", function() {
5858
$interval.cancel(timer);
5959
});
6060

@@ -78,7 +78,16 @@
7878
cluster.sds_name = clusterData[i].sds_name;
7979

8080
if(typeof clusterData[i].utilization !== "undefined") {
81-
cluster.utilization = {"percent_used": clusterData[i].utilization.pcnt_used };
81+
82+
if(cluster.sds_name === "ceph") {
83+
cluster.utilization = clusterData[i].utilization;
84+
cluster.utilization.percent_used = clusterData[i].utilization.pcnt_used;
85+
} else if(cluster.sds_name === "glusterfs") {
86+
cluster.utilization = {};
87+
cluster.utilization.percent_used = clusterData[i].utilization.pcnt_used;
88+
cluster.utilization.used = clusterData[i].utilization.used_capacity;
89+
cluster.utilization.total = clusterData[i].utilization.usable_capacity;
90+
}
8291
}
8392
cluster.alertCount = "NA";
8493
cluster.status = "NA";

0 commit comments

Comments
 (0)