2021-03-24 18:27:32 +00:00
|
|
|
<!-- use registry -->
|
2021-05-05 08:16:59 +00:00
|
|
|
<div>
|
|
|
|
<div class="form-group" ng-if="$ctrl.model.UseRegistry">
|
2022-01-17 05:53:32 +00:00
|
|
|
<label for="image_registry" class="control-label text-left" ng-class="$ctrl.labelClass"> Registry </label>
|
2021-03-24 18:27:32 +00:00
|
|
|
<div ng-class="$ctrl.inputClass">
|
|
|
|
<select
|
2021-10-19 01:54:53 +00:00
|
|
|
ng-options="registry as registry.Name for registry in $ctrl.registries track by registry.Id"
|
2021-03-24 18:27:32 +00:00
|
|
|
ng-model="$ctrl.model.Registry"
|
|
|
|
id="image_registry"
|
|
|
|
class="form-control"
|
2021-09-24 01:00:55 +00:00
|
|
|
data-cy="component-registrySelect"
|
2021-03-24 18:27:32 +00:00
|
|
|
></select>
|
|
|
|
</div>
|
|
|
|
<label for="image_name" ng-class="$ctrl.labelClass" class="margin-sm-top control-label text-left">Image</label>
|
|
|
|
<div ng-class="$ctrl.inputClass" class="margin-sm-top">
|
|
|
|
<div class="input-group">
|
|
|
|
<span class="input-group-addon" id="registry-name">{{ $ctrl.displayedRegistryURL() }}</span>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
aria-describedby="registry-name"
|
|
|
|
uib-typeahead="image for image in $ctrl.availableImages | filter:$viewValue | limitTo:5"
|
|
|
|
ng-model="$ctrl.model.Image"
|
|
|
|
name="image_name"
|
2021-10-14 12:42:10 +00:00
|
|
|
placeholder="e.g. my-image:my-tag"
|
2021-03-24 18:27:32 +00:00
|
|
|
ng-change="$ctrl.onImageChange()"
|
|
|
|
required
|
2021-08-26 00:05:28 +00:00
|
|
|
data-cy="component-imageInput"
|
2021-03-24 18:27:32 +00:00
|
|
|
/>
|
|
|
|
<span ng-if="$ctrl.isDockerHubRegistry()" class="input-group-btn">
|
|
|
|
<a
|
|
|
|
href="https://hub.docker.com/search?type=image&q={{ $ctrl.model.Image | trimshasum | trimversiontag }}"
|
|
|
|
class="btn btn-default"
|
|
|
|
title="Search image on Docker Hub"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
<i class="fab fa-docker"></i> Search
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- ! use registry -->
|
|
|
|
<!-- don't use registry -->
|
|
|
|
<div ng-if="!$ctrl.model.UseRegistry">
|
|
|
|
<div class="form-group">
|
|
|
|
<span class="small">
|
2022-01-17 05:53:32 +00:00
|
|
|
<p class="text-muted" style="margin-left: 15px">
|
|
|
|
<i class="fa fa-exclamation-circle blue-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
2021-03-24 18:27:32 +00:00
|
|
|
When using advanced mode, image and repository <b>must be</b> publicly available.
|
|
|
|
</p>
|
|
|
|
</span>
|
|
|
|
<label for="image_name" ng-class="$ctrl.labelClass" class="control-label text-left">Image </label>
|
|
|
|
<div ng-class="$ctrl.inputClass">
|
2021-10-14 12:42:10 +00:00
|
|
|
<input type="text" class="form-control" ng-model="$ctrl.model.Image" name="image_name" placeholder="e.g. registry:port/my-image:my-tag" required />
|
2021-03-24 18:27:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- ! don't use registry -->
|
|
|
|
<!-- info message -->
|
|
|
|
<div class="form-group" ng-show="$ctrl.form.image_name.$invalid">
|
|
|
|
<div class="col-sm-12 small text-warning">
|
|
|
|
<div ng-messages="$ctrl.form.image_name.$error">
|
|
|
|
<p ng-message="required">
|
|
|
|
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Image name is required.
|
|
|
|
<span ng-if="$ctrl.canPull">Tag must be specified otherwise Portainer will pull all tags associated to the image.</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- ! info message -->
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<p>
|
|
|
|
<a class="small interactive" ng-if="!$ctrl.model.UseRegistry" ng-click="$ctrl.model.UseRegistry = true;">
|
|
|
|
<i class="fa fa-database space-right" aria-hidden="true"></i> Simple mode
|
|
|
|
</a>
|
|
|
|
<a class="small interactive" ng-if="$ctrl.model.UseRegistry" ng-click="$ctrl.model.UseRegistry = false;">
|
|
|
|
<i class="fa fa-globe space-right" aria-hidden="true"></i> Advanced mode
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-transclude></div>
|
|
|
|
|
|
|
|
<por-image-registry-rate-limits
|
2021-07-14 09:15:21 +00:00
|
|
|
ng-if="$ctrl.checkRateLimits && $ctrl.isDockerHubRegistry()"
|
2021-03-24 18:27:32 +00:00
|
|
|
endpoint="$ctrl.endpoint"
|
2021-07-14 09:15:21 +00:00
|
|
|
registry="$ctrl.model.Registry"
|
2021-03-24 18:27:32 +00:00
|
|
|
set-validity="$ctrl.setValidity"
|
|
|
|
is-authenticated="$ctrl.model.Registry.Authentication"
|
|
|
|
is-admin="$ctrl.isAdmin"
|
2021-07-14 09:15:21 +00:00
|
|
|
registry-id="$ctrl.model.Registry.Id"
|
2021-03-24 18:27:32 +00:00
|
|
|
>
|
|
|
|
</por-image-registry-rate-limits>
|
|
|
|
</div>
|