fix(stacks): orphaned stacks readonly [EE-4085] (#7552)

* fix(stacks): orphaned stacks readonly [EE-4085]

* correctly handle stack type in controller
pull/7566/head
itsconquest 2022-08-25 10:27:12 +12:00 committed by GitHub
parent e2789ab354
commit 27095ede22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -486,6 +486,8 @@ angular.module('portainer.app').controller('StackController', [
const orphanedRunning = $transition$.params().orphanedRunning == 'true';
$scope.orphanedRunning = orphanedRunning;
$scope.stackType = parseInt($transition$.params().type, 10);
if (external || (orphaned && orphanedRunning)) {
loadExternalStack(stackName);
}
@ -496,10 +498,6 @@ angular.module('portainer.app').controller('StackController', [
}
$scope.composeSyntaxMaxVersion = endpoint.ComposeSyntaxMaxVersion;
$scope.stackType = parseInt($transition$.params().type, 10);
$scope.editorReadOnly = !Authentication.hasAuthorizations(['PortainerStackUpdate']);
}
initView();