UNPKG

@spotinst/spinnaker-deck

Version:

Spinnaker-Deck service, forked with support to Spotinst

185 lines (172 loc) 6.77 kB
<div class="container-fluid form-horizontal"> <div class="form-group"> <div class="col-md-5 sm-label-right"> Health Check Grace Period <help-field key="ecs.healthgraceperiod"></help-field> </div> <div class="col-md-2"> <input type="number" class="form-control input-sm no-spel" ng-model="$ctrl.command.healthCheckGracePeriodSeconds" /> </div> </div> <div class="form-group"> <div class="col-md-5 sm-label-right"> <b>ECS IAM Instance Profile</b> <help-field key="ecs.iamrole"></help-field> </div> <!-- TODO - Add a help box that explains that the container does not share profiles with the host --> <div class="col-md-7" ng-if="!$ctrl.command.backingData.filtered.iamRoles.length"> No account was selected, or no IAM roles are available for ECS tasks in this account. </div> <div class="col-md-7" ng-if="$ctrl.command.backingData.filtered.iamRoles.length"> <ui-select ng-model="$ctrl.command.iamRole" class="form-control input-sm" required on-select="$ctrl.fieldChanged()" > <ui-select-match>{{ $select.selected }}</ui-select-match> <ui-select-choices repeat="iamRole in $ctrl.command.backingData.filtered.iamRoles | filter: $select.search"> <span ng-bind-html="iamRole"></span> </ui-select-choices> </ui-select> </div> </div> <div ng-if="!$ctrl.command.useTaskDefinitionArtifact"> <div class="form-group"> <div class="col-md-5 sm-label-right"> <b>Docker Image Credentials</b> <help-field key="ecs.dockerimagecredentials"></help-field> </div> <div class="col-md-7" ng-if="!$ctrl.command.backingData.filtered.secrets.length"> No account or region was selected, or no AWS Secrets Manager secrets are available in this account and region. </div> <div class="col-md-7" ng-if="$ctrl.command.backingData.filtered.secrets.length"> <ui-select ng-model="$ctrl.command.dockerImageCredentialsSecret" class="form-control input-sm" required on-select="$ctrl.fieldChanged()" > <ui-select-match>{{ $select.selected }}</ui-select-match> <ui-select-choices repeat="secret in $ctrl.command.backingData.filtered.secrets | filter: $select.search"> <span ng-bind-html="secret"></span> </ui-select-choices> </ui-select> </div> </div> </div> <div class="form-group"> <div class="col-md-5 sm-label-right"> Fargate platform version <help-field key="ecs.platformVersion"></help-field> </div> <div class="col-md-3"> <input type="text" class="form-control input-sm" name="platformVersion" ng-model="$ctrl.command.platformVersion" /> </div> </div> <div class="form-group"> <div class="col-md-5 sm-label-right"> <b>Placement Strategy</b> <help-field key="ecs.placementStrategy"></help-field> </div> <div class="col-md-7"> <ui-select ng-model="$ctrl.command.placementStrategyName" class="form-control input-sm"> <ui-select-match>{{ $select.selected }}</ui-select-match> <ui-select-choices repeat="item in ['AZ Balanced Spread', 'AZ Balanced BinPack CPU', 'AZ Balanced BinPack Memory', 'BinPack CPU', 'BinPack Memory', 'One Task Per Host', 'None'] | filter: $select.search" > <span ng-bind-html="item"></span> </ui-select-choices> </ui-select> <!-- TODO - implement handling of custom placement strategies and constraints --> </div> </div> <div class="form-group"> <div class="sm-label-left"> <b>Placement Constraints</b> <help-field key="ecs.placementConstraints"></help-field> </div> <form name="ecsPlacementConstraints"> <table class="table table-condensed packed tags"> <thead> <tr> <th style="width: 25%">Type <help-field key="ecs.placementConstraintType"></help-field></th> <th style="width: 68%">Expression <help-field key="ecs.placementConstraintExpression"></help-field></th> <th></th> </tr> </thead> <tbody> <tr ng-repeat="constraint in $ctrl.command.placementConstraints"> <td> <select class="form-control input-sm" ng-model="constraint.type" ng-options="type for type in ['distinctInstance', 'memberOf']" ></select> </td> <td> <input type="text" class="form-control input-sm no-spel" ng-model="constraint.expression" /> </td> <td> <div class="form-control-static"> <a class="btn-link sm-label" ng-click="$ctrl.command.placementConstraints.splice($index, 1)"> <span class="glyphicon glyphicon-trash"></span> <span class="sr-only">Remove</span> </a> </div> </td> </tr> </tbody> <tfoot> <tr> <td colspan="3"> <button class="btn btn-block btn-sm add-new" ng-click="$ctrl.command.placementConstraints.push({})"> <span class="glyphicon glyphicon-plus-sign"></span> Add New Placement Constraint </button> </td> </tr> </tfoot> </table> </form> </div> <div ng-if="!$ctrl.command.useTaskDefinitionArtifact"> <div class="form-group"> <div class="sm-label-left"> <b>Docker labels (optional)</b> <help-field key="ecs.dockerLabels"></help-field> </div> <map-editor model="$ctrl.command.dockerLabels" allow-empty="true"></map-editor> </div> <div class="form-group"> <div class="sm-label-left"> <b>Environment Variables (optional)</b> <help-field key="ecs.environmentVariables"></help-field> </div> <map-editor model="$ctrl.command.environmentVariables" allow-empty="true"></map-editor> </div> </div> <div class="form-group"> <div class="sm-label-left"> <b>Tags (optional)</b> <help-field key="ecs.tags"></help-field> </div> <map-editor model="$ctrl.command.tags" allow-empty="true"></map-editor> </div> <div ng-if="$ctrl.command.useTaskDefinitionArtifact" style="color: #666"> <hr /> <p> <em ><strong>Docker Image Credentials, Docker labels</strong>, and <strong>Environment Variables</strong> cannot be individually set when using a Task Definition artifact. Please include them in their respective container definition in that file. </em> </p> </div> </div>