feat(app): remove autocomplete on registry selector
parent
06c63899b2
commit
97ec2ddd62
|
@ -4,7 +4,6 @@ angular.module('portainer.docker').component('porImageRegistry', {
|
|||
bindings: {
|
||||
'model': '=', // must be of type PorImageRegistryModel
|
||||
'pullWarning': '<',
|
||||
'autoComplete': '<',
|
||||
'labelClass': '@',
|
||||
'inputClass': '@'
|
||||
},
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<div ng-class="$ctrl.inputClass">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="registry-name">{{$ctrl.model.Registry.URL || 'docker.io'}}</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" placeholder="e.g. myImage:myTag" required>
|
||||
<input type="text" class="form-control" aria-describedby="registry-name"
|
||||
ng-model="$ctrl.model.Image" name="image_name" placeholder="e.g. myImage:myTag" required>
|
||||
</div>
|
||||
</div>
|
||||
<label for="image_registry" class="margin-sm-top control-label text-right" ng-class="$ctrl.labelClass">
|
||||
|
|
|
@ -3,11 +3,10 @@ import _ from 'lodash-es';
|
|||
|
||||
class porImageRegistryController {
|
||||
/* @ngInject */
|
||||
constructor($async, RegistryService, DockerHubService, ImageService, Notifications) {
|
||||
constructor($async, RegistryService, DockerHubService, Notifications) {
|
||||
this.$async = $async;
|
||||
this.RegistryService = RegistryService;
|
||||
this.DockerHubService = DockerHubService;
|
||||
this.ImageService = ImageService;
|
||||
this.Notifications = Notifications;
|
||||
|
||||
this.onInit = this.onInit.bind(this);
|
||||
|
@ -15,12 +14,10 @@ class porImageRegistryController {
|
|||
|
||||
async onInit() {
|
||||
try {
|
||||
const [registries, dockerhub, availableImages] = await Promise.all([
|
||||
const [registries, dockerhub] = await Promise.all([
|
||||
this.RegistryService.registries(),
|
||||
this.DockerHubService.dockerhub(),
|
||||
this.autoComplete ? this.ImageService.images() : []
|
||||
]);
|
||||
this.availableImages = this.ImageService.getUniqueTagListFromImages(availableImages);
|
||||
this.availableRegistries = _.concat(dockerhub, registries);
|
||||
|
||||
const id = this.model.Registry.Id;
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
model="formValues.RegistryModel"
|
||||
pull-warning="formValues.alwaysPull"
|
||||
ng-if="formValues.RegistryModel.Registry"
|
||||
auto-complete="true"
|
||||
label-class="col-sm-1" input-class="col-sm-11 col-md-5"
|
||||
></por-image-registry>
|
||||
<!-- !image-and-registry -->
|
||||
|
|
|
@ -156,7 +156,6 @@
|
|||
<!-- image-and-registry -->
|
||||
<por-image-registry
|
||||
model="config.RegistryModel"
|
||||
auto-complete="true"
|
||||
label-class="col-sm-1" input-class="col-sm-11 col-md-5"
|
||||
></por-image-registry>
|
||||
<!-- !image-and-registry -->
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<!-- image-and-registry -->
|
||||
<por-image-registry
|
||||
model="formValues.RegistryModel"
|
||||
auto-complete="true"
|
||||
label-class="col-sm-1" input-class="col-sm-11 col-md-5"
|
||||
></por-image-registry>
|
||||
<!-- !image-and-registry -->
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<form class="form-horizontal">
|
||||
<por-image-registry
|
||||
model="formValues.RegistryModel"
|
||||
auto-complete="true"
|
||||
label-class="col-sm-1" input-class="col-sm-11 col-md-5"
|
||||
></por-image-registry>
|
||||
</form>
|
||||
|
|
|
@ -204,7 +204,6 @@
|
|||
<div uib-collapse="$ctrl.state.collapseContainer">
|
||||
<por-image-registry
|
||||
model="$ctrl.model.RegistryModel"
|
||||
auto-complete="true"
|
||||
label-class="col-sm-1" input-class="col-sm-11 col-md-5"
|
||||
></por-image-registry>
|
||||
<!-- command -->
|
||||
|
|
Loading…
Reference in New Issue