mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 23:35:31 +02:00
refactor(access-control): create access-control-panel component [EE-2345] (#6486)
This commit is contained in:
parent
07294c19bb
commit
f63b07bbb9
109 changed files with 2053 additions and 1518 deletions
|
@ -59,7 +59,14 @@
|
|||
</div>
|
||||
|
||||
<!-- access-control-panel -->
|
||||
<por-access-control-panel ng-if="config" resource-id="config.Id" resource-control="config.ResourceControl" resource-type="'config'"> </por-access-control-panel>
|
||||
<access-control-panel
|
||||
ng-if="config"
|
||||
resource-id="config.Id"
|
||||
resource-control="config.ResourceControl"
|
||||
resource-type="resourceType"
|
||||
on-update-success="(onUpdateResourceControlSuccess)"
|
||||
>
|
||||
</access-control-panel>
|
||||
<!-- !access-control-panel -->
|
||||
|
||||
<div class="row" ng-if="config">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ResourceControlType } from '@/portainer/access-control/types';
|
||||
|
||||
angular.module('portainer.docker').controller('ConfigController', [
|
||||
'$scope',
|
||||
'$transition$',
|
||||
|
@ -5,6 +7,12 @@ angular.module('portainer.docker').controller('ConfigController', [
|
|||
'ConfigService',
|
||||
'Notifications',
|
||||
function ($scope, $transition$, $state, ConfigService, Notifications) {
|
||||
$scope.resourceType = ResourceControlType.Config;
|
||||
|
||||
$scope.onUpdateResourceControlSuccess = function () {
|
||||
$state.reload();
|
||||
};
|
||||
|
||||
$scope.removeConfig = function removeConfig(configId) {
|
||||
ConfigService.remove(configId)
|
||||
.then(function success() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue