UNPKG

@spotinst/spinnaker-deck

Version:

Spinnaker-Deck service, forked with support to Spotinst

117 lines (108 loc) 3.74 kB
<div class="row" ng-repeat="step in $ctrl.command.step.stepAdjustments"> <div class="col-md-10 col-md-offset-1 step-policy-row"> <select ng-if="$first" class="form-control input-sm" style="width: 65px" required ng-model="$ctrl.viewState.operator" ng-change="$ctrl.operatorChanged()" ng-options="adjustment for adjustment in $ctrl.availableActions" ></select> <span style="width: 75px; text-transform: capitalize" class="form-control-static select-placeholder" ng-bind="$ctrl.viewState.operator" ng-if="!$first" ></span> <input type="number" min="1" class="form-control input-sm" required style="width: 65px" ng-model="step.scalingAdjustment" /> <select ng-if="$first" class="form-control input-sm" style="width: 110px" required ng-model="$ctrl.viewState.adjustmentType" ng-change="$ctrl.adjustmentTypeChanged()" ng-options="option for option in $ctrl.adjustmentTypeOptions" ></select> <span style="width: 120px" class="form-control-static select-placeholder" ng-if="!$first" ng-bind="$ctrl.viewState.adjustmentType" ></span> <span class="input-label"> when <strong ng-bind="$ctrl.command.alarm.metricName"></strong> </span> <span ng-if="$ctrl.viewState.comparatorBound === 'max'"> <span class="input-label" ng-if="!$last"> is between <span class="input-label" ng-bind="step.metricIntervalLowerBound"></span> <span class="input-label">and</span> </span> <span class="input-label" ng-if="$last"> is greater than <span ng-if="!$first || $ctrl.command.alarm.comparisonOperator.includes('Equal')"> or equal to </span> <span class="input-label" ng-bind="step.metricIntervalLowerBound"></span> </span> <input type="number" ng-if="!$last" class="form-control input-sm" ng-model="step.metricIntervalUpperBound" ng-change="$ctrl.boundsChanged()" required ng-min="step.metricIntervalLowerBound" style="width: 85px" /> </span> <span ng-if="$ctrl.viewState.comparatorBound === 'min'"> <span class="input-label" ng-if="!$last"> is between </span> <input type="number" ng-if="!$last" class="form-control input-sm" ng-model="step.metricIntervalLowerBound" required ng-max="step.metricIntervalUpperBound" ng-change="$ctrl.boundsChanged()" style="width: 85px" /> <span class="input-label" ng-if="!$last">and</span> <span class="input-label" ng-if="$last"> is less than <span ng-if="!$first || $ctrl.command.alarm.comparisonOperator.includes('Equal')"> or equal to </span> </span> <span class="input-label text-right" ng-bind="step.metricIntervalUpperBound"></span> </span> <span ng-if="!$first" class="pull-right" style="padding: 5px 0"> <a href ng-click="$ctrl.removeStep($index)"> <span class="glyphicon glyphicon-trash"></span> </a> </span> </div> </div> <div class="row" style="margin-top: 10px"> <div class="col-md-10 col-md-offset-1"> <button class="btn btn-block btn-sm add-new" ng-click="$ctrl.addStep(step)"> <span class="glyphicon glyphicon-plus-sign"></span> Add step </button> </div> </div> <div class="row"> <div class="col-md-10 col-md-offset-1"> <a href="http://docs.aws.amazon.com/autoscaling/latest/userguide/as-scale-based-on-demand.html#as-scaling-steps" target="_blank" > <i class="far fa-file-alt"></i> Documentation </a> </div> </div>