mirror of
https://github.com/portainer/portainer.git
synced 2025-08-01 20:05:23 +02:00
refactor(environments): remove endpoints cache [DTD-100] (#6408)
This commit is contained in:
parent
9ef2e27aae
commit
37d4a80769
51 changed files with 155 additions and 353 deletions
|
@ -6,24 +6,24 @@ angular.module('portainer.agent').factory('HostBrowserService', HostBrowserServi
|
|||
function HostBrowserServiceFactory(Browse, Upload, API_ENDPOINT_ENDPOINTS, StateManager) {
|
||||
return { ls, get, delete: deletePath, rename, upload };
|
||||
|
||||
function ls(path) {
|
||||
return Browse.ls({ path: path }).$promise;
|
||||
function ls(endpointId, path) {
|
||||
return Browse.ls({ endpointId, path: path }).$promise;
|
||||
}
|
||||
|
||||
function get(path) {
|
||||
return Browse.get({ path: path }).$promise;
|
||||
function get(endpointId, path) {
|
||||
return Browse.get({ endpointId, path: path }).$promise;
|
||||
}
|
||||
|
||||
function deletePath(path) {
|
||||
return Browse.delete({ path: path }).$promise;
|
||||
function deletePath(endpointId, path) {
|
||||
return Browse.delete({ endpointId, path: path }).$promise;
|
||||
}
|
||||
|
||||
function rename(path, newPath) {
|
||||
function rename(endpointId, path, newPath) {
|
||||
const payload = {
|
||||
CurrentFilePath: path,
|
||||
NewFilePath: newPath,
|
||||
};
|
||||
return Browse.rename({}, payload).$promise;
|
||||
return Browse.rename({ endpointId }, payload).$promise;
|
||||
}
|
||||
|
||||
function upload(endpointId, Path, file, onProgress) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue