mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 04:15:28 +02:00
refactor(docker/services): migrate scale form to react [EE-6057] (#10208)
This commit is contained in:
parent
f7366d9788
commit
e82b34b775
19 changed files with 543 additions and 180 deletions
21
app/react/docker/services/axios/urlBuilder.ts
Normal file
21
app/react/docker/services/axios/urlBuilder.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Service } from 'docker-types/generated/1.41';
|
||||
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
|
||||
export function urlBuilder(
|
||||
endpointId: EnvironmentId,
|
||||
id?: Service['ID'],
|
||||
action?: string
|
||||
) {
|
||||
let url = `/endpoints/${endpointId}/docker/services`;
|
||||
|
||||
if (id) {
|
||||
url += `/${id}`;
|
||||
}
|
||||
|
||||
if (action) {
|
||||
url += `/${action}`;
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue