This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v9] Backport Teleport Connect (1 of 5) (#762)
* Add more tests to Teleterm (#601) * add more tests to Teleterm * Update command for generating gRPC files for Teleterm * Add cluster context switching (#624) * Add connections switcher (#647) * Add keyboard support to `Connections` popover (#651) * Add clusters picker (#668) * Improve identity picker (#670) * Reformat commandLauncher.ts * Remove command palette commands from command launcher The way their `run` function works conflicts with the new implementation (it directly changes quickInputService's state), so we remove that in this commit to have less to deal with in upcoming commits. * Show autocomplete suggestions in command bar This commit does not support actually choosing any suggestion yet, just showing them in the UI. * Remove code related to empty command bar item Our new code isn't going to show anything when there are no matches. * Remove old pickers, rename Item to Suggestion * Autocomplete commands and ssh logins * Ignore case for autocomplete * Automatically append @ after ssh login suggestion * QuickInputService.getAutocomplete: Return no-match on empty suggestions This required adding all those mocks to the tests so that the returned suggestions in some of the tests are not empty. * Autocomplete ssh hostnames * Open command bar commands in new local shell * Append space after picking command suggestion * Adjust how showing & hiding autocomplete works in command bar 1. Pressing Esc while suggestions are shown should first close the suggestions and the second press should actually exit the input. 2. Picking a suggestion should close the autocomplete if we didn't append anything to the token (see comment for details). 3. Typing something in the command bar should always show the autocomplete in case there are suggestions to show. Also remove unused call to setInputValue. * Fix opening new terminal when there's no active document * useQuickInput: Rename serviceQuickInput to quickInputService * Include command to run in AutocompleteResult * Create DocumentTshNode after executing "tsh ssh" in command bar * Update teleterm styles (#674) * Remove leftover cruft from quick pickers * Launch unsupported invocations of tsh ssh in local shell * add simple empty state to pickers * adjust `QuickInput` to match designs * always show active item in `QuickInputList` * make middle part of `TopBar` central Co-authored-by: Grzegorz Zdunek <[email protected]> Co-authored-by: Grzegorz Zdunek <[email protected]>
- Loading branch information
1 parent
fbe0904
commit 20bf8e2
Showing
128 changed files
with
5,086 additions
and
1,595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React, { ReactNode, useEffect } from 'react'; | ||
import { useAppContext } from 'teleterm/ui/appContextProvider'; | ||
|
||
interface AppInitializerProps { | ||
children?: ReactNode; | ||
} | ||
|
||
export function AppInitializer(props: AppInitializerProps) { | ||
const ctx = useAppContext(); | ||
useEffect(() => { | ||
const { rootClusterUri } = ctx.statePersistenceService.getWorkspaces(); | ||
if (rootClusterUri) { | ||
ctx.workspacesService.setActiveWorkspace(rootClusterUri); | ||
} | ||
}, []); | ||
|
||
return <>{props.children}</>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/teleterm/src/ui/DocumentCluster/ClusterResources/renderLabelCell.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import { makeLabelTag } from 'teleport/components/formatters'; | ||
import { Cell } from 'design/DataTable'; | ||
import { Label as SingleLabel } from 'design'; | ||
import { Label } from 'teleport/types'; | ||
|
||
export function renderLabelCell<T extends { labelsList: Label[] }>(props: T) { | ||
const labels = props.labelsList.map(makeLabelTag); | ||
const $labels = labels.map(label => ( | ||
<SingleLabel mb="1" mr="1" key={label} kind="secondary"> | ||
{label} | ||
</SingleLabel> | ||
)); | ||
|
||
return <Cell>{$labels}</Cell>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.