UNPKG

@spotinst/spinnaker-deck

Version:

Spinnaker-Deck service, forked with support to Spotinst

115 lines (111 loc) 4.49 kB
<div modal-page class="scaling-policy-modal form-inline"> <task-monitor monitor="ctrl.taskMonitor"></task-monitor> <modal-close dismiss="$dismiss()"></modal-close> <div class="modal-header"> <h4 class="modal-title">{{ctrl.action}} scaling policy</h4> </div> <div class="modal-body"> <form name="form" novalidate> <h4 class="section-heading">Conditions</h4> <div class="section-body"> <aws-alarm-configurer command="ctrl.command" modal-view-state="ctrl.viewState" server-group="ctrl.serverGroup" bounds-changed="ctrl.boundsChanged()" ></aws-alarm-configurer> </div> <h4 class="section-heading">Actions</h4> <div class="section-body" ng-if="!ctrl.command.alarm.metricName"> <h4 class="text-center">Select a metric</h4> </div> <div class="section-body" ng-if="ctrl.command.alarm.metricName"> <div ng-if="ctrl.command.simple"> <div class="row"> <div class="col-md-10 col-md-offset-1"> <p> This is a simple scaling policy. To declare different actions based on the magnitude of the alarm, <strong>switch to a <a href ng-click="ctrl.switchMode()">step policy</a>.</strong> </p> </div> </div> <aws-simple-policy-action command="ctrl.command" view-state="ctrl.viewState"></aws-simple-policy-action> </div> <div ng-if="ctrl.command.step"> <aws-step-policy-action command="ctrl.command" view-state="ctrl.viewState" bounds-changed="ctrl.boundsChanged()" ></aws-step-policy-action> </div> </div> <h4 class="section-heading">Additional Settings</h4> <div class="section-body section-additional-settings"> <div class="row" ng-if="!ctrl.viewState.isNew"> <div class="col-md-2 sm-label-right">Policy Name</div> <div class="col-md-10 content-fields"> <span class="form-control-static select-placeholder" ng-if="!ctrl.viewState.isNew" ng-bind="ctrl.command.name" ></span> </div> </div> <div class="row" ng-if="ctrl.viewState.adjustmentType !== 'instances'"> <div class="col-md-2 sm-label-right">Adjustment Step</div> <div class="col-md-10 content-fields"> <span class="form-control-static select-placeholder"> <span ng-bind="ctrl.viewState.operator"></span> instances in increments of at least </span> <input type="number" style="width: 60px" class="form-control input-sm" required ng-model="ctrl.command.minAdjustmentMagnitude" /> <span class="input-label"> instance(s) </span> </div> </div> <div class="row" ng-if="ctrl.command.simple"> <div class="col-md-2 sm-label-right">Cooldown</div> <div class="col-md-10 content-fields"> <span class="form-control-static select-placeholder"> Wait at least </span> <input type="number" style="width: 60px" class="form-control input-sm" required ng-model="ctrl.command.simple.cooldown" /> <span class="input-label"> seconds before another scaling event </span> </div> </div> <div class="row" ng-if="ctrl.command.step && ctrl.viewState.operator !== 'Remove'"> <div class="col-md-2 sm-label-right">Warmup</div> <div class="col-md-10 content-fields"> <span class="form-control-static select-placeholder">Instances need</span> <input type="number" style="width: 60px" class="form-control input-sm" required ng-model="ctrl.command.step.estimatedInstanceWarmup" /> <span class="input-label"> seconds to warm up after each step </span> </div> </div> </div> </form> </div> <div class="modal-footer"> <button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button> <submit-button is-disabled="!form.$valid" submitting="taskMonitor.submitting" on-click="ctrl.save()" is-new="ctrl.viewState.isNew" ></submit-button> </div> </div>