2021-03-24 18:27:32 +00:00
|
|
|
<!-- use registry -->
|
2022-07-11 02:05:23 +00:00
|
|
|
<div class="row">
|
2021-05-05 08:16:59 +00:00
|
|
|
<div class="form-group" ng-if="$ctrl.model.UseRegistry">
|
2023-03-07 08:09:41 +00:00
|
|
|
<label for="image_registry" class="control-label col-sm-3 col-lg-2 text-left" ng-class="$ctrl.labelClass"> Registry </label>
|
2022-07-11 02:05:23 +00:00
|
|
|
<div ng-class="$ctrl.inputClass" class="col-sm-8">
|
2021-03-24 18:27:32 +00:00
|
|
|
<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>
|
2022-07-11 02:05:23 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group" ng-if="$ctrl.model.UseRegistry">
|
2023-02-12 21:04:24 +00:00
|
|
|
<label for="image_name" ng-class="$ctrl.labelClass" class="control-label col-sm-3 col-lg-2 required text-left">Image</label>
|
2022-07-11 02:05:23 +00:00
|
|
|
<div ng-class="$ctrl.inputClass" class="col-sm-8">
|
2021-03-24 18:27:32 +00:00
|
|
|
<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 }}"
|
2022-07-11 02:05:23 +00:00
|
|
|
class="btn btn-default vertical-center"
|
2021-03-24 18:27:32 +00:00
|
|
|
title="Search image on Docker Hub"
|
|
|
|
target="_blank"
|
|
|
|
>
|
2023-03-03 01:47:10 +00:00
|
|
|
<pr-icon icon="'svg-docker'" size="'md'"></pr-icon> Search
|
2021-03-24 18:27:32 +00:00
|
|
|
</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-08-08 23:50:18 +00:00
|
|
|
<p class="text-muted ml-4"> When using advanced mode, image and repository <b>must be</b> publicly available. </p>
|
2021-03-24 18:27:32 +00:00
|
|
|
</span>
|
2023-02-12 21:04:24 +00:00
|
|
|
<label for="image_name" ng-class="$ctrl.labelClass" class="control-label col-sm-3 col-lg-2 required text-left">Image </label>
|
2022-07-11 02:05:23 +00:00
|
|
|
<div ng-class="$ctrl.inputClass" class="col-sm-8">
|
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">
|
2022-08-12 18:22:45 +00:00
|
|
|
<div class="small">
|
|
|
|
<div class="col-sm-3 col-lg-2"></div>
|
|
|
|
<div class="col-sm-8" ng-messages="$ctrl.form.image_name.$error">
|
2022-09-14 23:09:19 +00:00
|
|
|
<p class="text-warning vertical-center" ng-message="required">
|
2022-11-28 02:00:28 +00:00
|
|
|
<pr-icon icon="'alert-triangle'" mode="'warning'" class="vertical-center"></pr-icon> Image name is required.
|
2021-03-24 18:27:32 +00:00
|
|
|
<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">
|
2023-02-12 21:04:24 +00:00
|
|
|
<button type="button" class="btn btn-link btn-sm vertical-center !ml-0 p-0 hover:no-underline" ng-if="!$ctrl.model.UseRegistry" ng-click="$ctrl.model.UseRegistry = true;">
|
2022-11-28 02:00:28 +00:00
|
|
|
<pr-icon icon="'database'"> </pr-icon> Simple mode
|
2022-09-15 09:33:49 +00:00
|
|
|
</button>
|
2023-02-12 21:04:24 +00:00
|
|
|
<button type="button" class="btn btn-link btn-sm vertical-center !ml-0 p-0 hover:no-underline" ng-if="$ctrl.model.UseRegistry" ng-click="$ctrl.model.UseRegistry = false;">
|
2022-11-28 02:00:28 +00:00
|
|
|
<pr-icon icon="'globe'"> </pr-icon> Advanced mode
|
2022-09-15 09:33:49 +00:00
|
|
|
</button>
|
2021-03-24 18:27:32 +00:00
|
|
|
</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>
|