Skip to content

Commit

Permalink
Remove unused code (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-kovoy authored Dec 17, 2021
1 parent 1ac2f89 commit 06d0515
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 357 deletions.
2 changes: 0 additions & 2 deletions web/packages/shared/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ limitations under the License.
*/

import { useState, useRef, useEffect } from 'react';
import withState from './withState';
import useAttempt from './useAttempt';
import useFavicon from './useFavicon';
import useDocTitle from './useDocTitle';
Expand All @@ -26,7 +25,6 @@ export {
useAttempt,
useAttemptNext,
useState,
withState,
useEffect,
useFavicon,
useDocTitle,
Expand Down
38 changes: 0 additions & 38 deletions web/packages/shared/hooks/withState.js

This file was deleted.

23 changes: 0 additions & 23 deletions web/packages/teleport/src/PlayerNext/BpfLogs/BpfLogs.jsx

This file was deleted.

18 changes: 0 additions & 18 deletions web/packages/teleport/src/PlayerNext/BpfLogs/index.js

This file was deleted.

84 changes: 0 additions & 84 deletions web/packages/teleport/src/PlayerNext/Player.jsx

This file was deleted.

39 changes: 0 additions & 39 deletions web/packages/teleport/src/PlayerNext/Player.story.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ limitations under the License.
import { useParams } from 'react-router';
import React from 'react';
import styled from 'styled-components';
import { withState } from 'shared/hooks';
import SplitPane from 'shared/components/SplitPane';
import { Danger } from 'design/Alert';
import { Indicator, Flex, Text, Box } from 'design';
import cfg from 'teleport/config';
import TtyPlayer, {
StatusEnum as TtyStatusEnum,
} from 'teleport/lib/term/ttyPlayer';
Expand All @@ -31,7 +29,10 @@ import Xterm from 'teleport/Player/Xterm';
import BpfPlayer from './BpfPlayer';
import SwitchMode, { ModeEnum } from './SwitchMode';

export function Player(props) {
/**
* PlayerNext is the prototype of the eBPF player
*/
export function PlayerNext(props) {
const { url, bpfEvents = [] } = props;
const tty = React.useMemo(() => {
return props.tty || new TtyPlayer(new EventProvider({ url }));
Expand Down Expand Up @@ -109,15 +110,6 @@ export function Player(props) {
);
}

export default withState(() => {
const { sid, clusterId } = useParams();
const url = cfg.getTerminalSessionUrl({ clusterId, sid });
return {
url,
sid,
};
})(Player);

const ToolBar = styled(Flex)`
border-bottom: 1px solid ${({ theme }) => theme.colors.primary.main};
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ limitations under the License.

import React from 'react';
import styled from 'styled-components';
import { Player } from './SshPlayer';
import TtyPlayer from 'teleport/lib/term/ttyPlayer';
import TtyPlayerEventProvider from 'teleport/lib/term/ttyPlayerEventProvider';
import { PlayerNext } from './PlayerNext';

export default {
title: 'Teleport/PlayerNext/SshPlayer',
title: 'Teleport/PlayerNext',
};

export const Vim = () => {
Expand Down Expand Up @@ -67,7 +67,7 @@ function useMockedEvents(loader) {
function renderMocked(mocked) {
return (
<Box>
{mocked && <Player tty={mocked.tty} bpfEvents={mocked.auditEvents} />}
{mocked && <PlayerNext tty={mocked.tty} bpfEvents={mocked.auditEvents} />}
</Box>
);
}
Expand Down
85 changes: 0 additions & 85 deletions web/packages/teleport/src/PlayerNext/PlayerTabs/PlayerTabs.jsx

This file was deleted.

20 changes: 0 additions & 20 deletions web/packages/teleport/src/PlayerNext/PlayerTabs/index.js

This file was deleted.

Loading

0 comments on commit 06d0515

Please sign in to comment.