mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
refactor(docker/containers): migrate networks table to react [EE-4665] (#10069)
This commit is contained in:
parent
776f6a62c3
commit
b15812a74d
28 changed files with 632 additions and 259 deletions
20
app/react/docker/networks/queries/buildUrl.ts
Normal file
20
app/react/docker/networks/queries/buildUrl.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
|
||||
import { buildUrl as buildDockerUrl } from '../../proxy/queries/build-url';
|
||||
import { NetworkId } from '../types';
|
||||
|
||||
export function buildUrl(
|
||||
environmentId: EnvironmentId,
|
||||
{ id, action }: { id?: NetworkId; action?: string } = {}
|
||||
) {
|
||||
let baseUrl = 'networks';
|
||||
if (id) {
|
||||
baseUrl += `/${id}`;
|
||||
}
|
||||
|
||||
if (action) {
|
||||
baseUrl += `/${action}`;
|
||||
}
|
||||
|
||||
return buildDockerUrl(environmentId, baseUrl);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue