mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 18:59:41 +02:00
refactor(docker networks): migrate docker network detail view to react EE-2196 (#6700)
* Migrate network details to react
This commit is contained in:
parent
9650aa56c7
commit
2e0555dbca
24 changed files with 981 additions and 261 deletions
18
app/docker/containers/queries.ts
Normal file
18
app/docker/containers/queries.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { useQuery } from 'react-query';
|
||||
|
||||
import { EnvironmentId } from '@/portainer/environments/types';
|
||||
|
||||
import { getContainers, Filters } from './containers.service';
|
||||
|
||||
export function useContainers(environmentId: EnvironmentId, filters?: Filters) {
|
||||
return useQuery(
|
||||
['environments', environmentId, 'docker', 'containers', { filters }],
|
||||
() => getContainers(environmentId, filters),
|
||||
{
|
||||
meta: {
|
||||
title: 'Failure',
|
||||
message: 'Unable to get containers in network',
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue