mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
fix(docker): remove prepended slash by default on container names [EE-3592] (#8195)
* remove prepended slash by default if present * trimcontainername still needed
This commit is contained in:
parent
bfc610c192
commit
f9bbe000fb
4 changed files with 13 additions and 11 deletions
|
@ -338,7 +338,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
var container = $scope.formValues.NetworkContainer;
|
||||
var containerName = container;
|
||||
if (container && typeof container === 'object') {
|
||||
containerName = $filter('trimcontainername')(container.Names[0]);
|
||||
containerName = container.Names[0];
|
||||
}
|
||||
var networkMode = mode;
|
||||
if (containerName) {
|
||||
|
@ -987,7 +987,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
if (!oldContainer) {
|
||||
return;
|
||||
}
|
||||
return ContainerService.renameContainer(oldContainer.Id, oldContainer.Names[0].substring(1));
|
||||
return ContainerService.renameContainer(oldContainer.Id, oldContainer.Names[0]);
|
||||
}
|
||||
|
||||
function confirmCreateContainer(container) {
|
||||
|
@ -1033,7 +1033,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
}
|
||||
|
||||
function renameContainer() {
|
||||
return ContainerService.renameContainer(oldContainer.Id, oldContainer.Names[0].substring(1) + '-old');
|
||||
return ContainerService.renameContainer(oldContainer.Id, oldContainer.Names[0] + '-old');
|
||||
}
|
||||
|
||||
function pullImageIfNeeded() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue