1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

fix(docker): pass endpoint to registry field (#5365)

This commit is contained in:
Chaim Lev-Ari 2021-08-12 14:28:25 +03:00 committed by GitHub
parent 456995353b
commit f990617a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 6 deletions

View file

@ -7,7 +7,7 @@ angular.module('portainer.docker').controller('ImageController', [
'$scope',
'$transition$',
'$state',
'endpoint',
'Authentication',
'ImageService',
'ImageHelper',
'RegistryService',
@ -16,14 +16,34 @@ angular.module('portainer.docker').controller('ImageController', [
'ModalService',
'FileSaver',
'Blob',
function ($async, $q, $scope, $transition$, $state, endpoint, ImageService, ImageHelper, RegistryService, Notifications, HttpRequestHelper, ModalService, FileSaver, Blob) {
'endpoint',
function (
$async,
$q,
$scope,
$transition$,
$state,
Authentication,
ImageService,
ImageHelper,
RegistryService,
Notifications,
HttpRequestHelper,
ModalService,
FileSaver,
Blob,
endpoint
) {
$scope.endpoint = endpoint;
$scope.isAdmin = Authentication.isAdmin();
$scope.formValues = {
RegistryModel: new PorImageRegistryModel(),
};
$scope.state = {
exportInProgress: false,
pullImageValidity: false,
};
$scope.sortType = 'Order';
@ -40,6 +60,11 @@ angular.module('portainer.docker').controller('ImageController', [
$('#layer-command-' + layerId + '-full').toggle();
};
$scope.setPullImageValidity = setPullImageValidity;
function setPullImageValidity(validity) {
$scope.state.pullImageValidity = validity;
}
$scope.tagImage = function () {
const registryModel = $scope.formValues.RegistryModel;