1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

chore(deps): upgrade to msw v2 [EE-6489] (#10911)

This commit is contained in:
Chaim Lev-Ari 2024-01-04 16:57:21 +07:00 committed by GitHub
parent ecd603db8c
commit 400a80c07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 2602 additions and 1669 deletions

View file

@ -1,21 +1,19 @@
import { DefaultBodyType, PathParams, rest } from 'msw';
import { http, HttpResponse } from 'msw';
import { SystemInfo, SystemVersion } from 'docker-types/generated/1.41';
export const dockerHandlers = [
rest.get<DefaultBodyType, PathParams, SystemInfo>(
http.get<never, never, SystemInfo>(
'/api/endpoints/:endpointId/docker/info',
(req, res, ctx) =>
res(
ctx.json({
Plugins: { Authorization: [], Log: [], Network: [], Volume: [] },
MemTotal: 0,
NCPU: 0,
Runtimes: { runc: { path: 'runc' } },
})
)
() =>
HttpResponse.json({
Plugins: { Authorization: [], Log: [], Network: [], Volume: [] },
MemTotal: 0,
NCPU: 0,
Runtimes: { runc: { path: 'runc' } },
})
),
rest.get<DefaultBodyType, PathParams, SystemVersion>(
http.get<never, never, SystemVersion>(
'/api/endpoints/:endpointId/docker/version',
(req, res, ctx) => res(ctx.json({ ApiVersion: '1.24' }))
() => HttpResponse.json({ ApiVersion: '1.24' })
),
];