mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09: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
|
@ -1,6 +1,23 @@
|
|||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { buildUrl as buildDockerUrl } from '@/react/docker/queries/utils/build-url';
|
||||
import { buildUrl as buildDockerProxyUrl } from '@/react/docker/proxy/queries/build-url';
|
||||
|
||||
export function buildUrl(environmentId: EnvironmentId) {
|
||||
return buildDockerUrl(environmentId, 'images');
|
||||
}
|
||||
|
||||
export function buildProxyUrl(
|
||||
environmentId: EnvironmentId,
|
||||
{ id, action }: { id?: string; action?: string } = {}
|
||||
) {
|
||||
let dockerAction = '';
|
||||
if (id) {
|
||||
dockerAction += `${id}`;
|
||||
}
|
||||
|
||||
if (action) {
|
||||
dockerAction = dockerAction ? `${dockerAction}/${action}` : action;
|
||||
}
|
||||
|
||||
return buildDockerProxyUrl(environmentId, 'images', dockerAction);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue