mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 06:19:41 +02:00
refactor(containers): migrate create view to react [EE-2307] (#9175)
This commit is contained in:
parent
bc0050a7b4
commit
d970f0e2bc
71 changed files with 2612 additions and 1399 deletions
17
app/react/docker/agent/queries/build-url.ts
Normal file
17
app/react/docker/agent/queries/build-url.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
|
||||
export function buildAgentUrl(
|
||||
environmentId: EnvironmentId,
|
||||
apiVersion: number,
|
||||
action: string
|
||||
) {
|
||||
let url = `/endpoints/${environmentId}/agent/docker`;
|
||||
|
||||
if (apiVersion > 1) {
|
||||
url += `/v${apiVersion}`;
|
||||
}
|
||||
|
||||
url += `/${action}`;
|
||||
|
||||
return url;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue