mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
* feat(cluster): Show the cluster leader * feat(cluster): Restrict leader label only to admin users * feat(kubernetes): minor UI update * feat(endpoint): move all KubernetesEndpoint related code to a single endpoint sub-folder and change few things * fix(k8s/cluster): fix conflict leftover * feat(k8s/cluster): review component leader UX * refactor(k8s/node): remove useless call to endpoints * refactor(k8s/endpoint): relocate variable declaration Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
25 lines
731 B
JavaScript
25 lines
731 B
JavaScript
angular.module('portainer.kubernetes').factory('KubernetesEndpoints', [
|
|
'$resource',
|
|
'API_ENDPOINT_ENDPOINTS',
|
|
'EndpointProvider',
|
|
function KubernetesEndpointsFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
|
'use strict';
|
|
return function (namespace) {
|
|
const url = API_ENDPOINT_ENDPOINTS + '/:endpointId/kubernetes/api/v1' + (namespace ? '/namespaces/:namespace' : '') + '/endpoints/:id';
|
|
return $resource(
|
|
url,
|
|
{
|
|
endpointId: EndpointProvider.endpointID,
|
|
namespace: namespace,
|
|
},
|
|
{
|
|
get: {
|
|
method: 'GET',
|
|
timeout: 15000,
|
|
ignoreLoadingBar: true,
|
|
},
|
|
}
|
|
);
|
|
};
|
|
},
|
|
]);
|