1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-09 07:45:22 +02:00

refactor(docker/configs): remove EndpointProvider [EE-5746] (#9198)

This commit is contained in:
Chaim Lev-Ari 2023-08-31 22:11:57 +02:00 committed by GitHub
parent cd3c6e3089
commit 1b0fd60115
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 23 deletions

View file

@ -6,7 +6,8 @@ angular.module('portainer.docker').controller('ConfigController', [
'$state',
'ConfigService',
'Notifications',
function ($scope, $transition$, $state, ConfigService, Notifications) {
'endpoint',
function ($scope, $transition$, $state, ConfigService, Notifications, endpoint) {
$scope.resourceType = ResourceControlType.Config;
$scope.onUpdateResourceControlSuccess = function () {
@ -14,7 +15,7 @@ angular.module('portainer.docker').controller('ConfigController', [
};
$scope.removeConfig = function removeConfig(configId) {
ConfigService.remove(configId)
ConfigService.remove(endpoint.Id, configId)
.then(function success() {
Notifications.success('Success', 'Configuration successfully removed');
$state.go('docker.configs', {});
@ -25,7 +26,7 @@ angular.module('portainer.docker').controller('ConfigController', [
};
function initView() {
ConfigService.config($transition$.params().id)
ConfigService.config(endpoint.Id, $transition$.params().id)
.then(function success(data) {
$scope.config = data;
})