2022-06-20 07:48:41 +00:00
|
|
|
import angular from 'angular';
|
2022-11-13 08:10:18 +00:00
|
|
|
import { FeatureId } from '@/react/portainer/feature-flags/enums';
|
2022-06-20 07:48:41 +00:00
|
|
|
|
|
|
|
angular.module('portainer.kubernetes').controller('KubernetesSecurityConstraintController', [
|
|
|
|
'$scope',
|
|
|
|
'EndpointProvider',
|
|
|
|
'EndpointService',
|
|
|
|
function ($scope, EndpointProvider, EndpointService) {
|
|
|
|
$scope.limitedFeaturePodSecurityPolicy = FeatureId.POD_SECURITY_POLICY_CONSTRAINT;
|
|
|
|
$scope.state = {
|
|
|
|
viewReady: false,
|
|
|
|
actionInProgress: false,
|
|
|
|
};
|
|
|
|
|
|
|
|
async function initView() {
|
|
|
|
const endpointID = EndpointProvider.endpointID();
|
|
|
|
EndpointService.endpoint(endpointID).then((endpoint) => {
|
|
|
|
$scope.endpoint = endpoint;
|
|
|
|
$scope.state.viewReady = true;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
initView();
|
|
|
|
},
|
|
|
|
]);
|