UNPKG

@spotinst/spinnaker-deck

Version:

Spinnaker-Deck service, forked with support to Spotinst

165 lines (154 loc) 5.43 kB
<ng-form name="healthCheckForm" novalidate> <div class="container-fluid form-horizontal"> <div class="form-group"> <div class="col-md-12 well alert-danger" ng-if="healthCheckForm.healthCheckName.$error.validateUnique"> <validation-error message="There is already a health check with that name."></validation-error> </div> <div class="col-md-12 well alert-danger" ng-if="healthCheckForm.healthCheckName.$error.pattern || healthCheckForm.healthCheckName.$error.max" > <validation-error message="Name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen." > </validation-error> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right">Protocol</div> <div class="col-md-4"> <select class="form-control input-sm" ng-change="$ctrl.onProtocolChange()" ng-options="protocol as protocol for protocol in ['HTTP', 'HTTPS', 'TCP', 'SSL']" ng-model="$ctrl.healthCheck.healthCheckType" ></select> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right">Name</div> <div class="col-md-4" ng-if="$ctrl.editExisting"> <ui-select ng-model="$ctrl.healthCheckPlaceholder" on-select="$ctrl.onHealthCheckSelect($item)" class="form-control input-sm" > <ui-select-match placeholder="Select..."> {{ $select.selected.name }} </ui-select-match> <ui-select-choices repeat="healthCheck in $ctrl.existingHealthChecksForProtocol | filter: {name: $select.search}" > <div ng-bind-html="healthCheck.name | highlight: $select.search"></div> </ui-select-choices> </ui-select> </div> <div class="col-md-4" ng-if="!$ctrl.editExisting"> <input class="form-control input-sm" novalidate type="text" ng-pattern="/^[a-z]([-a-z0-9]*[a-z0-9])?$/" name="healthCheckName" max="63" required validate-unique="$ctrl.existingHealthCheckNames" ng-model-options="{ debounce: 250 }" ng-change="$ctrl.onHealthCheckNameChange($ctrl.healthCheckPlaceholder.name)" ng-model="$ctrl.healthCheckPlaceholder.name" /> </div> </div> <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <a href class="small" ng-if="!$ctrl.editExisting" ng-click="$ctrl.toggleEditExisting()" >Toggle for list of existing health checks</a > <a href class="small" ng-if="$ctrl.editExisting" ng-click="$ctrl.toggleEditExisting()">Toggle for text input</a> </div> </div> <div class="form-group" ng-if="$ctrl.healthCheck.healthCheckType === 'HTTP' || $ctrl.healthCheck.healthCheckType === 'HTTPS'" > <div class="col-md-4 sm-label-right">Request Path</div> <div class="col-md-4"> <input class="form-control input-sm" required ng-model="$ctrl.healthCheck.requestPath" /> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right">Port</div> <div class="col-md-4"> <input type="number" class="form-control input-sm" required min="1" max="65535" ng-model="$ctrl.healthCheck.port" /> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right"> <b>Timeout</b><help-field key="loadBalancer.advancedSettings.healthTimeout"></help-field> </div> <div class="col-md-4"> <input class="form-control input-sm" type="number" min="0" max="{{:: $ctrl.max}}" required ng-model="$ctrl.healthCheck.timeoutSec" /> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right"> <b>Interval</b><help-field key="gce.loadBalancer.advancedSettings.healthInterval"></help-field> </div> <div class="col-md-4"> <input class="form-control input-sm" type="number" min="0" max="{{:: $ctrl.max}}" required ng-model="$ctrl.healthCheck.checkIntervalSec" /> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right"> <b>Healthy Threshold</b><help-field key="gce.loadBalancer.advancedSettings.healthyThreshold"></help-field> </div> <div class="col-md-4"> <input class="form-control input-sm" type="number" min="0" max="{{:: $ctrl.max}}" required ng-model="$ctrl.healthCheck.healthyThreshold" /> </div> </div> <div class="form-group"> <div class="col-md-4 sm-label-right"> <b>Unhealthy Threshold</b><help-field key="gce.loadBalancer.advancedSettings.unhealthyThreshold"></help-field> </div> <div class="col-md-4"> <input class="form-control input-sm" type="number" min="0" max="{{:: $ctrl.max}}" required ng-model="$ctrl.healthCheck.unhealthyThreshold" /> </div> </div> </div> </ng-form>