2022-07-06 06:08:45 +00:00
< page-header title = "'Create Edge stack'" breadcrumbs = "[{label:'Edge Stacks', link:'edge.stacks'}, 'Create Edge stack']" > < / page-header >
2021-09-09 08:38:34 +00:00
< div class = "row" >
< div class = "col-sm-12" >
< rd-widget >
< rd-widget-body >
< form class = "form-horizontal" name = "$ctrl.form" >
<!-- name - input -->
< div class = "form-group" >
2022-01-17 05:53:32 +00:00
< label for = "stack_name" class = "col-sm-1 control-label text-left" > Name < / label >
2021-09-09 08:38:34 +00:00
< div class = "col-sm-11" >
< input
type="text"
class="form-control"
ng-model="$ctrl.formValues.Name"
id="stack_name"
name="nameField"
placeholder="e.g. mystack"
auto-focus
required
data-cy="edgeStackCreate-nameInput"
/>
< / div >
< / div >
<!-- !name - input -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Edge Groups < / div >
2021-09-09 08:38:34 +00:00
< div class = "form-group" ng-if = "$ctrl.edgeGroups" >
< div class = "col-sm-12" >
< edge-groups-selector ng-if = "!$ctrl.noGroups" model = "$ctrl.formValues.Groups" on-change = "($ctrl.onChangeGroups)" items = "$ctrl.edgeGroups" > < / edge-groups-selector >
< / div >
< div ng-if = "$ctrl.noGroups" class = "col-sm-12 small text-muted" >
No Edge groups are available. Head over to the < a ui-sref = "edge.groups" > Edge groups view< / a > to create one.
< / div >
< / div >
< edge-stack-deployment-type-selector
value="$ctrl.formValues.DeploymentType"
has-docker-endpoint="$ctrl.hasDockerEndpoint"
on-change="($ctrl.onChangeDeploymentType)"
>< / edge-stack-deployment-type-selector >
< div class = "form-group" >
< div class = "col-sm-12" >
< div class = "small text-muted space-right" ng-if = "$ctrl.formValues.DeploymentType === 0 && $ctrl.hasKubeEndpoint()" >
< i class = "fa fa-exclamation-triangle orange-icon" aria-hidden = "true" > < / i >
Portainer uses < a href = "https://kompose.io/" target = "_blank" > Kompose< / a > to convert your Compose manifest to a Kubernetes compliant manifest. Be wary that not all
the Compose format options are supported by Kompose at the moment.
< / div >
< / div >
< / div >
< edge-stacks-docker-compose-form ng-if = "$ctrl.formValues.DeploymentType == 0" form-values = "$ctrl.formValues" state = "$ctrl.state" > < / edge-stacks-docker-compose-form >
< edge-stacks-kube-manifest-form ng-if = "$ctrl.formValues.DeploymentType == 1" form-values = "$ctrl.formValues" state = "$ctrl.state" > < / edge-stacks-kube-manifest-form >
<!-- actions -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Actions < / div >
2021-09-09 08:38:34 +00:00
< div class = "form-group" >
< div class = "col-sm-12" >
< button
type="button"
class="btn btn-primary btn-sm"
ng-disabled="$ctrl.state.actionInProgress || $ctrl.formIsInvalid()"
ng-click="$ctrl.createStack()"
button-spinner="$ctrl.state.actionInProgress"
analytics-on
analytics-event="edge-stack-creation"
analytics-category="edge"
analytics-properties="$ctrl.buildAnalyticsProperties()"
2021-09-28 09:10:41 +00:00
data-cy="edgeStackCreate-createStackButton"
2021-09-09 08:38:34 +00:00
>
< span ng-hide = "$ctrl.state.actionInProgress" > Deploy the stack< / span >
< span ng-show = "$ctrl.state.actionInProgress" > Deployment in progress...< / span >
< / button >
2022-01-17 05:53:32 +00:00
< span class = "text-danger" ng-if = "$ctrl.state.formValidationError" style = "margin-left: 5px" >
2021-09-09 08:38:34 +00:00
{{ $ctrl.state.formValidationError }}
< / span >
< / div >
< / div >
<!-- !actions -->
< / form >
< / rd-widget-body >
< / rd-widget >
< / div >
< / div >