chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { COMPOSE_STACK_NAME_LABEL } from '@/react/constants';
|
||||
|
||||
import { useContainers } from '../../containers/queries/useContainers';
|
||||
|
||||
export function useComposeStackContainers(
|
||||
{
|
||||
environmentId,
|
||||
stackName,
|
||||
}: { environmentId: EnvironmentId | undefined; stackName: string },
|
||||
{
|
||||
autoRefreshRate,
|
||||
enabled,
|
||||
}: { autoRefreshRate?: number; enabled?: boolean } = {}
|
||||
) {
|
||||
return useContainers(environmentId, {
|
||||
filters: {
|
||||
label: [`${COMPOSE_STACK_NAME_LABEL}=${stackName}`],
|
||||
},
|
||||
autoRefreshRate,
|
||||
enabled,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user