Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudbehl committed Oct 10, 2017
1 parent 4044474 commit 7cf29c6
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 41 deletions.
4 changes: 2 additions & 2 deletions src/commons/scss/_base.scss
Expand Up @@ -113,9 +113,9 @@
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
justify-content: space-evenly;
.btn {
width: 90px;
/*width: 90px;*/
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
13 changes: 9 additions & 4 deletions src/commons/stores/brick-store.js
Expand Up @@ -94,14 +94,19 @@
function _calcUtilization(bricks) {
var len = bricks.length,
utilization = { used: 0, total: 0 },
i;
i,
percent_used,
used,
total;

for (i = 0; i < len; i++) {
utilization.used += parseFloat(bricks[i].utilization.used);
used = parseFloat(bricks[i].utilization.used);
total = parseFloat(bricks[i].utilization.total);
utilization.used += (used * total) / 100;
utilization.total += parseFloat(bricks[i].utilization.total);
}

utilization.used = utilization.used.toFixed(2);
percent_used = (utilization.used / utilization.total) * 100;
utilization.used = percent_used.toFixed(2);
utilization.total = utilization.total;

return utilization;
Expand Down
2 changes: 1 addition & 1 deletion src/commons/stores/cluster-store.js
Expand Up @@ -111,7 +111,7 @@
*/
store.importCluster = function(cluster, enableProfiling) {
var requestData = {
"Cluster.enable_volume_profiling": enableProfiling ? "yes" : "no"
"enable_volume_profiling": enableProfiling ? "yes" : "no"
},
deferred;

Expand Down
1 change: 1 addition & 0 deletions src/commons/stores/node-store.js
Expand Up @@ -95,6 +95,7 @@
host.role = store.findRole(list[i].tags).role;
host.integrationId = list[i].cluster.integration_id;
host.managed = _getManagedState(clusters, host);
host.alerts = list[i].alerts ? list[i].alerts : 0;

hostList.push(host);
}
Expand Down
2 changes: 1 addition & 1 deletion src/commons/stores/volume-store.js
Expand Up @@ -46,7 +46,7 @@
temp.clusterId = data[i].cluster_id;
temp.rebalStatus = data[i].rebal_status;
temp.brickCount = data[i].brick_count;
temp.alertCount = data[i].alert_count;
temp.alertCount = data[i].alert_count ? data[i].alert_count : 0;
volumeList.push(temp);
}
return volumeList;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/bricks/host-bricks/host-bricks.html
Expand Up @@ -52,7 +52,7 @@ <h1>No Bricks Detected.</h1>
<div class="ft-row list-group-item ft-header">
<div class="ft-column">Volume</div>
<div class="ft-column">Brick Path</div>
<div class="ft-column ft-main">Utilisation</div>
<div class="ft-column ft-main">Utilization</div>
<div class="ft-column">Devices</div>
<div class="ft-column">Port</div>
<div class="ft-column ft-actions"></div>
Expand All @@ -74,7 +74,7 @@ <h1>No Bricks Detected.</h1>
{{brick.port}}
</div>
<div class="ft-column ft-actions">
<button class="btn btn-default launch-btn" ng-click="vm.redirectToGrafana(brick, $event)" uib-tooltip="Launch Dashboard" tooltip-placement="auto bottom-left">Launch Dashboard</button>
<button class="btn btn-default launch-btn" ng-click="vm.redirectToGrafana(brick, $event)" tooltip-placement="auto bottom-left">Dashboard</button>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/bricks/host-bricks/host-bricks.scss
Expand Up @@ -7,9 +7,9 @@
margin-right: 4px;
}
&.ft-actions {
.launch-btn {
/*.launch-btn {
width: 125px;
}
}*/
}
&.ft-main {
flex-grow: 1.5;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bricks/volume-bricks/volume-bricks.html
Expand Up @@ -107,7 +107,7 @@ <h1>No Bricks Detected.</h1>
<div class="list-group list-view-pf list-view-pf-view " ng-repeat="brick in subVolume.bricks | orderBy: 'fqdn'">
<div class="list-group-item">
<div class="list-view-pf-actions">
<button class="btn btn-default" ng-click="vm.redirectToGrafana(brick, $event)">Launch Dashboard</button>
<button class="btn btn-default" ng-click="vm.redirectToGrafana(brick, $event)">Dashboard</button>
</div>
<div class="list-view-pf-main-info">
<div class="list-view-pf-body">
Expand Down
18 changes: 5 additions & 13 deletions src/modules/clusters/cluster-list/cluster-list.html
Expand Up @@ -67,18 +67,10 @@ <h1>No Clusters Detected.</h1>
<span class="fa fa-angle-down" ng-show="cluster.isExpanded" ng-click="clusterCntrl.expandCluster($event, cluster)"></span>
</div>
<div class="list-view-pf-actions">
<button class="btn btn-default" ng-click="clusterCntrl.goToClusterDetail(cluster)" ng-class="{'hide-button': cluster.managed !== 'Yes'}">Cluster Details</button>
<button class="btn btn-default import-btn" ng-show="cluster.managed === 'No'" ng-disabled="cluster.message === 'Cluster Misconfigured' || cluster.importStatus === 'in_progress'" ng-click="clusterCntrl.goToImportFlow(cluster)" ng-class="{'hide-button': ($root.userRole ==='limited' || cluster.managed !== 'No')}">Import Cluster</button>
<button class="btn btn-default" ng-show="cluster.managed === 'Yes'" ng-click="clusterCntrl.redirectToGrafana(cluster, $event)">Launch Dashboard</button>
<div class="dropdown pull-right dropdown-kebab-pf" ng-class="{'hide-button': (cluster.managed !== 'Yes' || $root.userRole === 'limited')}">
<button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight12" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" ng-click="clusterCntrl.showKababMenu($event, cluster)">
<span class="fa fa-ellipsis-v"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownKebabRight12" ng-class="{display: cluster.isKababOpened}">
<li><a ng-show="cluster.isProfilingEnabled === 'Enabled'" ng-click="clusterCntrl.doProfilingAction($event, cluster, 'Disable', cluster.clusterId)">Disable Profiling</a></li>
<li><a ng-show="cluster.isProfilingEnabled !== 'Enabled'" ng-click="clusterCntrl.doProfilingAction($event, cluster, 'Enable', cluster.clusterId)">Enable Profiling</a></li>
</ul>
</div>
<button class="btn btn-default" ng-click="clusterCntrl.goToClusterDetail(cluster)" ng-class="{'hide-button': cluster.managed !== 'Yes'}">Details</button>
<button class="btn btn-default import-btn" ng-show="cluster.managed === 'No'" ng-disabled="cluster.message === 'Cluster Misconfigured' || cluster.importStatus === 'in_progress'" ng-click="clusterCntrl.goToImportFlow(cluster)" ng-class="{'hide-button': ($root.userRole ==='limited' || cluster.managed !== 'No')}">Import</button>
<button class="btn btn-default" ng-show="cluster.managed === 'Yes'" ng-click="clusterCntrl.redirectToGrafana(cluster, $event)">Dashboard</button>
<button class="btn btn-default" ng-class="{'hide-button': (cluster.managed !== 'Yes' || $root.userRole === 'limited')}" ng-show="cluster.managed === 'Yes'" ng-click="clusterCntrl.doProfilingAction($event, cluster, cluster.isProfilingEnabled === 'Enabled' ? 'Disable' : 'Enable', cluster.clusterId)">{{cluster.isProfilingEnabled === 'Enabled' ? "Disable Profiling" : "Enable Profiling"}}</button>
</div>
<div class="list-view-pf-main-info">
<div class="list-view-pf-left">
Expand All @@ -103,7 +95,7 @@ <h5 class="pull-left counts">{{cluster.sdsName}} {{cluster.sdsVersion}}</h5>
<h5 class="pull-left counts">{{cluster.managed}}</h5>
</div>
<div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
<div class="bold-text">Volume Profile</div>
<div class="bold-text">Volume Profiling</div>
<h5 class="pull-left counts">{{cluster.isProfilingEnabled}}</h5>
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion src/modules/clusters/cluster-list/cluster-list.scss
Expand Up @@ -59,9 +59,15 @@
.display {
display: block;
}
.btn-default {
/*.btn-default {
width: 124px;
overflow: hidden;
}*/
.btn {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 5px;
}
}
.list-view-pf-main-info {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/clusters/import-cluster/import-cluster.html
Expand Up @@ -98,7 +98,7 @@ <h1><label>Import Cluster Task Submitted</label></h1>
<small> An import cluster task has been submitted. You will be notified when processing is complete and the cluster is ready for use. </small>
</div>
<div class="blank-slate-pf-main-action">
<button class="btn btn-default btn-lg" ng-click="vm.importCancel()">Return</button>
<button class="btn btn-default btn-lg" ng-click="vm.importCancel()">Close</button>
<button class="btn btn-primary btn-lg cancel-button" ng-click="vm.viewTaskProgress()">View Task Progress</button>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/modules/hosts/host-list/host-list.html
Expand Up @@ -5,7 +5,7 @@
<h1 class="bold-text">Hosts</h1>
<!-- Actions section -->
<div class="row toolbar-pf">
<div class="col-sm-12">
<div class="col-md-12">
<form class="toolbar-pf-actions">
<div class="form-group toolbar-pf-filter">
<label class="sr-only" for="filter">Name</label>
Expand Down Expand Up @@ -70,19 +70,19 @@ <h1>No Hosts Detected.</h1>
<div class="ft-column ft-main host-name bold-text" uib-tooltip-html="'{{host.name}}'" tooltip-placement="auto bottom-left">{{host.name}}</div>
<div class="ft-column list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
<div class="bold-text">Cluster</div>
<div class="pull-left cluster-name" uib-tooltip-html="'{{host.cluster_name}}'" tooltip-placement="auto bottom-left">{{host.cluster_name || "NA"}}</div>
<div class="pull-left cluster-name" uib-tooltip-html="'{{host.cluster_name}}'" tooltip-placement="auto bottom-left">{{host.cluster_name || "None"}}</div>
</div>
<div class="ft-column list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
<div class="bold-text">Role</div>
<div class="pull-left">{{host.role}}</div>
</div>
<div class="ft-column list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
<div class="bold-text">Alerts</div>
<div class="pull-left counts">{{host.alerts || "NA"}}</div>
<div class="pull-left counts">{{host.alerts}}</div>
</div>
<div class="ft-column ft-actions">
<button class="btn btn-default" ng-click="hostCntrl.goToHostDetail(host)" uib-tooltip="Host Details" tooltip-placement="auto bottom-left" ng-show="hostCntrl.showDetailBtn">Host Details</button>
<button ng-show ="host.role !== 'Tendrl Server'" class="btn btn-default dashboard-btn" uib-tooltip="Launch Dashboard" tooltip-placement="auto bottom-left" ng-click="hostCntrl.redirectToGrafana(host, $event)" ng-disabled="host.managed !== 'Yes'">Launch Dashboard</button>
<button class="btn btn-default" ng-click="hostCntrl.goToHostDetail(host)" ng-show="hostCntrl.showDetailBtn">Details</button>
<button ng-show ="host.role !== 'Tendrl Server'" class="btn btn-default dashboard-btn" ng-click="hostCntrl.redirectToGrafana(host, $event)" ng-disabled="host.managed !== 'Yes'">Dashboard</button>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/hosts/host-list/host-list.scss
Expand Up @@ -25,9 +25,9 @@
}

&.ft-actions {
.dashboard-btn {
/*.dashboard-btn {
width: 125px;
}
}*/
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tasks/task-list/tasks.html
Expand Up @@ -73,7 +73,7 @@ <h1>No Tasks Detected.</h1>
</center>
<div ng-if="taskCntrl.isDataLoading" class="spinner spinner-lg"></div>
<div class="flex-table list-group list-view-pf list-view-pf-view task-list-table" ng-show="!taskCntrl.isDataLoading">
<div class="ft-row list-group-item" ng-repeat="task in taskCntrl.filteredTaskList = (taskCntrl.taskList | filter: taskCntrl.searchBy | filter:taskCntrl.filterByStatus | filter: taskCntrl.filterByCreatedDate| orderBy: ['-created_at', 'job_id'])" ">
<div class="ft-row list-group-item" ng-repeat="task in taskCntrl.filteredTaskList = (taskCntrl.taskList | filter: taskCntrl.searchBy | filter:taskCntrl.filterByStatus | filter: taskCntrl.filterByCreatedDate| orderBy: ['-created_at', 'job_id'])">
<div class="ft-column ft-icon ">
<i ng-class="{ 'pficon pficon-error-circle-o': (task.status==='failed' ), 'pficon pficon-ok': (task.status==='finished' ), 'pficon pficon-warning-triangle-o': (task.status==='warning' ), 'fa fa-spinner': (task.status==='processing' || task.status==='new' )} "></i>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/modules/volumes/volume-list/volume-list.html
Expand Up @@ -74,7 +74,7 @@ <h1>No Volumes Detected.</h1>
</div>
<div class="ft-column list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
<div class="bold-text">Alerts</div>
<div class="pull-left counts">{{volume.alertCount || "NA"}}</div>
<div class="pull-left counts">{{volume.alertCount}}</div>
</div>
<div class="ft-column list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
<div class="bold-text">Running</div>
Expand All @@ -85,8 +85,8 @@ <h1>No Volumes Detected.</h1>
<div class="pull-left counts">{{volumeCntrl.getRebalStatus(volume)}}</div>
</div>
<div class="ft-column ft-actions">
<button class="btn btn-default dashboard-btn" ng-click="volumeCntrl.goToVolumeDetail(volume)" uib-tooltip="Volume Details" tooltip-placement="auto bottom-left">Volume Details</button>
<button class="btn btn-default dashboard-btn" uib-tooltip="Launch Dashboard" tooltip-placement="auto bottom-left" ng-click="volumeCntrl.redirectToGrafana(volume, $event)">Launch Dashboard</button>
<button class="btn btn-default dashboard-btn" ng-click="volumeCntrl.goToVolumeDetail(volume)">Details</button>
<button class="btn btn-default dashboard-btn" ng-click="volumeCntrl.redirectToGrafana(volume, $event)">Dashboard</button>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/volumes/volume-list/volume-list.scss
Expand Up @@ -20,9 +20,9 @@
.flex-table {
.ft-actions {
flex-grow: 1.2;
.dashboard-btn {
/*.dashboard-btn {
width: 125px;
}
} */
}
}
}

0 comments on commit 7cf29c6

Please sign in to comment.