Skip to content

Commit

Permalink
Remove gb/hr from plans, it's redundant and the user can't controll it
Browse files Browse the repository at this point in the history
  • Loading branch information
krujos committed May 1, 2015
1 parent b02d5af commit bd5e938
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,9 @@ shekelApp.controller('ShekelCostingController', function($scope, vmLayout, aiSer
return perHour/$scope.deaRam();
}

$scope.getGbPerHrWithPoints = function() {
//if ( 'date' == $scope.forecasting.burndownMode) {
//var gbHr = $scope.getDurationTCO() / ($scope.forecasting.burndownMonths / 12 ) / 365 / 24 / $scope.deaRam();
//$scope.forecasting.profitMarginPoints = ((gbHr - $scope.gbPerHrBreakEven() ) / gbHr ) * 100;
//return gbHr;
//}
//else {
return parseFloat($scope.gbPerHrBreakEven().toFixed(2)) +
parseFloat(($scope.gbPerHrBreakEven() * $scope.forecasting.profitMarginPoints * .01).toFixed(2))
//}
$scope.getGbPerHrWithPoints = function() {
return parseFloat($scope.gbPerHrBreakEven().toFixed(2)) +
parseFloat(($scope.gbPerHrBreakEven() * $scope.forecasting.profitMarginPoints * .01).toFixed(2))
};

//100% utilization.
Expand Down Expand Up @@ -188,9 +181,7 @@ shekelApp.controller('ShekelCostingController', function($scope, vmLayout, aiSer
$scope.generateRunCard = function(plan) {
var runCard = new Array();
var plansInUse = (plan.consumption / 100) * $scope.forecasting.initialPlans;
var gbHr = $scope.getGbPerHrWithPoints();
plan.monthlyBill = $scope.calculateMonthly(plan)
plan.gbPerHr = gbHr;
var lastMonthRevenue = 0;
var runcostModelType = plan.costModelType.value;
for ( var i = 1; i <= $scope.forecastLength; ++i ) {
Expand Down
5 changes: 0 additions & 5 deletions src/main/resources/static/app/components/plan/planService.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ var planService = shekelApp.factory('planService', function($rootScope) {
paidServicePlans: paidServicePlans,
diskQuota: diskQuota,
aiMax: aiMax,
gbPerHr: gbPerHr,
consumption: consumption,
costModelTypeValue: this.costModelTypeOptions()[0],
costModelType: function(option) {
if (angular.isDefined(option)) {
this.costModelTypeValue = option;
if( "Free" == option.value ) {
this.gbPerHr = 0;
}
}
return this.costModelTypeValue;
}
Expand All @@ -53,7 +49,6 @@ var planService = shekelApp.factory('planService', function($rootScope) {
paidServicePlans: this.paidServicePlanOptions()[0],
diskQuota: 16,
aiMax: 4,
gbPerHr: 0,
consumption: 25,
monthlyBill: 0,
costModelTypeValue: this.costModelTypeOptions()[0],
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/static/app/components/plan/plan_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<td>Paid Service Plans</td>
<td>Disk Quota</td>
<td>Max AI's</td>
<td>GB/Hour Cost</td>
<td>IaaS Reservation %</td>
<td>Monthly Bill</td>
<td>Cost Model</td>
Expand All @@ -29,7 +28,6 @@
</td>
<td><input type="number" ng-model="plan.diskQuota"></td>
<td><input type="number" ng-model="plan.aiMax"></td>
<td><shkl-money value="{{plan.gbPerHr}}"></shkl-money></td>
<td><input type="number" ng-model="plan.consumption"></td>
<td><shkl-money value="{{plan.monthlyBill}}"></shkl-money></td>
<td>
Expand Down

0 comments on commit bd5e938

Please sign in to comment.