diff --git a/web/packages/teleport/src/config.ts b/web/packages/teleport/src/config.ts index 75627a2290361..9ed5f81675e30 100644 --- a/web/packages/teleport/src/config.ts +++ b/web/packages/teleport/src/config.ts @@ -246,7 +246,6 @@ const cfg = { databasesPath: `/v1/webapi/sites/:clusterId/databases?searchAsRoles=:searchAsRoles?&limit=:limit?&startKey=:startKey?&query=:query?&search=:search?&sort=:sort?`, desktopsPath: `/v1/webapi/sites/:clusterId/desktops?searchAsRoles=:searchAsRoles?&limit=:limit?&startKey=:startKey?&query=:query?&search=:search?&sort=:sort?`, - desktopServicesPath: `/v1/webapi/sites/:clusterId/desktopservices?searchAsRoles=:searchAsRoles?&limit=:limit?&startKey=:startKey?&query=:query?&search=:search?&sort=:sort?`, desktopPath: `/v1/webapi/sites/:clusterId/desktops/:desktopName`, desktopWsAddr: 'wss://:fqdn/v1/webapi/sites/:clusterId/desktops/:desktopName/connect/ws?username=:username', @@ -851,13 +850,6 @@ const cfg = { }); }, - getDesktopServicesUrl(clusterId: string, params: UrlResourcesParams) { - return generateResourcePath(cfg.api.desktopServicesPath, { - clusterId, - ...params, - }); - }, - getDesktopUrl(clusterId: string, desktopName: string) { return generatePath(cfg.api.desktopPath, { clusterId, desktopName }); }, diff --git a/web/packages/teleport/src/services/desktops/desktops.ts b/web/packages/teleport/src/services/desktops/desktops.ts index 28ae88d04b3a4..d96bbe1907f37 100644 --- a/web/packages/teleport/src/services/desktops/desktops.ts +++ b/web/packages/teleport/src/services/desktops/desktops.ts @@ -20,9 +20,9 @@ import api from 'teleport/services/api'; import cfg, { UrlResourcesParams } from 'teleport/config'; import { ResourcesResponse } from 'teleport/services/agents'; -import { makeDesktop, makeDesktopService } from './makeDesktop'; +import { makeDesktop } from './makeDesktop'; -import type { Desktop, WindowsDesktopService } from './types'; +import type { Desktop } from './types'; class DesktopService { fetchDesktops( @@ -41,24 +41,6 @@ class DesktopService { }); } - fetchDesktopServices( - clusterId: string, - params: UrlResourcesParams, - signal?: AbortSignal - ): Promise> { - return api - .get(cfg.getDesktopServicesUrl(clusterId, params), signal) - .then(json => { - const items = json?.items || []; - - return { - agents: items.map(makeDesktopService), - startKey: json?.startKey, - totalCount: json?.totalCount, - }; - }); - } - fetchDesktop(clusterId: string, desktopPath: string) { return api .get(cfg.getDesktopUrl(clusterId, desktopPath)) diff --git a/web/packages/teleport/src/services/desktops/makeDesktop.ts b/web/packages/teleport/src/services/desktops/makeDesktop.ts index ca21d97213703..45426ada31de1 100644 --- a/web/packages/teleport/src/services/desktops/makeDesktop.ts +++ b/web/packages/teleport/src/services/desktops/makeDesktop.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import type { Desktop, WindowsDesktopService } from './types'; +import type { Desktop } from './types'; export function makeDesktop(json): Desktop { const { os, name, addr, host_id, requiresRequest } = json; @@ -35,17 +35,3 @@ export function makeDesktop(json): Desktop { requiresRequest, }; } - -export function makeDesktopService(json): WindowsDesktopService { - const { name, hostname, addr } = json; - - const labels = json.labels || []; - - return { - kind: 'windows_desktop_service', - hostname, - addr, - labels, - name, - }; -} diff --git a/web/packages/teleport/src/services/desktops/types.ts b/web/packages/teleport/src/services/desktops/types.ts index f48b81d397eb2..dc5cae739090c 100644 --- a/web/packages/teleport/src/services/desktops/types.ts +++ b/web/packages/teleport/src/services/desktops/types.ts @@ -36,22 +36,3 @@ export type Desktop = { host_addr?: string; requiresRequest?: boolean; }; - -// DesktopService is a Windows Desktop Service. -export type WindowsDesktopService = { - kind: 'windows_desktop_service'; - // Name is name (uuid) of the windows desktop service. - name: string; - // Hostname is the hostname of the windows desktop service. - hostname: string; - // Addr is the network address the desktop service can be reached at. - addr: string; - // Labels. - labels: ResourceLabel[]; -}; - -export type WindowsDesktopServicesResponse = { - desktopServices: WindowsDesktopService[]; - startKey?: string; - totalCount?: number; -};