mirror of https://github.com/portainer/portainer
fix(stack): incorrect stack name (#6587)
parent
d71d291895
commit
eaffde39f6
|
@ -65,7 +65,7 @@
|
|||
<tr ng-if="$ctrl.resourceControl.Type === $ctrl.RCTI.STACK && $ctrl.resourceType !== $ctrl.RCTS.STACK">
|
||||
<td colspan="2">
|
||||
<i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 2px"></i>
|
||||
Access control on this resource is inherited from the following stack: {{ $ctrl.resourceControl.ResourceId }}
|
||||
Access control on this resource is inherited from the following stack: {{ $ctrl.removeEndpointId($ctrl.resourceControl.ResourceId) }}
|
||||
<portainer-tooltip
|
||||
message="Access control applied on a stack is also applied on each resource in the stack."
|
||||
position="bottom"
|
||||
|
|
|
@ -56,6 +56,17 @@ angular.module('portainer.app').controller('porAccessControlPanelController', [
|
|||
});
|
||||
};
|
||||
|
||||
ctrl.removeEndpointId = function (stackName) {
|
||||
if (!stackName) {
|
||||
return stackName;
|
||||
}
|
||||
const firstUnderlineIndex = stackName.indexOf('_');
|
||||
if (firstUnderlineIndex < 0) {
|
||||
return stackName;
|
||||
}
|
||||
return stackName.substring(firstUnderlineIndex + 1);
|
||||
};
|
||||
|
||||
function validateForm() {
|
||||
ctrl.state.formValidationError = '';
|
||||
var error = '';
|
||||
|
|
Loading…
Reference in New Issue