1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-06 14:25:31 +02:00

refactor(access-control): create access-control-panel component [EE-2345] (#6486)

This commit is contained in:
Chaim Lev-Ari 2022-03-16 08:35:32 +02:00 committed by GitHub
parent 07294c19bb
commit f63b07bbb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 2053 additions and 1518 deletions

View file

@ -56,5 +56,12 @@
</div>
<!-- access-control-panel -->
<por-access-control-panel ng-if="secret" resource-id="secret.Id" resource-control="secret.ResourceControl" resource-type="'secret'"> </por-access-control-panel>
<access-control-panel
ng-if="secret"
resource-id="secret.Id"
resource-control="secret.ResourceControl"
resource-type="resourceType"
on-update-success="(onUpdateResourceControlSuccess)"
>
</access-control-panel>
<!-- !access-control-panel -->

View file

@ -1,3 +1,5 @@
import { ResourceControlType } from '@/portainer/access-control/types';
angular.module('portainer.docker').controller('SecretController', [
'$scope',
'$transition$',
@ -5,6 +7,12 @@ angular.module('portainer.docker').controller('SecretController', [
'SecretService',
'Notifications',
function ($scope, $transition$, $state, SecretService, Notifications) {
$scope.resourceType = ResourceControlType.Secret;
$scope.onUpdateResourceControlSuccess = function () {
$state.reload();
};
$scope.removeSecret = function removeSecret(secretId) {
SecretService.remove(secretId)
.then(function success() {