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:
parent
ecd603db8c
commit
400a80c07d
19 changed files with 2602 additions and 1669 deletions
|
@ -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' })
|
||||
),
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue