fix(templates): show correct icon for tempate [EE-5426] (#9202)

* show correct os icon for swarm stacks

* add compose edge stack doc comment
pull/9204/head
Matt Hook 1 year ago committed by GitHub
parent 2d94f020d0
commit 91cfd2d0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1120,7 +1120,7 @@ type (
// Mandatory container/stack fields
// Template Identifier
ID TemplateID `json:"Id" example:"1"`
// Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)
// Template type. Valid values are: 1 (container), 2 (Swarm stack), 3 (Compose stack), 4 (Compose edge stack)
Type TemplateType `json:"type" example:"1"`
// Title of the template
Title string `json:"title" example:"Nginx"`

@ -14,19 +14,14 @@
{{ $ctrl.model.Title }}
</span>
<div class="space-left blocklist-item-subtitle inline-flex items-center">
<div ng-if="$ctrl.model.Type != 3" class="vertical-center">
<pr-icon ng-if="$ctrl.model.Platform === 1 || $ctrl.model.Platform === 'linux' || !$ctrl.model.Platform" icon="'svg-linux'" class="mr-1"></pr-icon>
<span ng-if="!$ctrl.model.Platform"> &amp; </span>
<pr-icon
icon="'svg-microsoft'"
ng-if="$ctrl.model.Platform === 2 || $ctrl.model.Platform === 'windows' || !$ctrl.model.Platform"
class-name="'[&>*]:flex [&>*]:items-center'"
size="'lg'"
></pr-icon>
</div>
<div ng-if="$ctrl.model.Type === 3" class="vertical-center">
<pr-icon icon="'svg-kubernetes'" size="'lg'" class="align-bottom" class-name="'[&>*]:flex [&>*]:items-center'"></pr-icon>
</div>
<pr-icon ng-if="$ctrl.model.Platform === 1 || $ctrl.model.Platform === 'linux' || !$ctrl.model.Platform" icon="'svg-linux'" class="mr-1"></pr-icon>
<span ng-if="!$ctrl.model.Platform"> &amp; </span>
<pr-icon
icon="'svg-microsoft'"
ng-if="$ctrl.model.Platform === 2 || $ctrl.model.Platform === 'windows' || !$ctrl.model.Platform"
class-name="'[&>*]:flex [&>*]:items-center'"
size="'lg'"
></pr-icon>
{{ $ctrl.typeLabel }}
</div>
</div>

Loading…
Cancel
Save