-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add port number support Signed-off-by: msivasubramaniaan <[email protected]> * addressed review comments Signed-off-by: msivasubramaniaan <[email protected]> * fix lint errors Signed-off-by: msivasubramaniaan <[email protected]> * port number type changed Signed-off-by: msivasubramaniaan <[email protected]> * revert portnumber type change Signed-off-by: msivasubramaniaan <[email protected]> --------- Signed-off-by: msivasubramaniaan <[email protected]>
- Loading branch information
1 parent
b1ef719
commit 760a1c0
Showing
16 changed files
with
391 additions
and
227 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,33 @@ | ||
/*----------------------------------------------------------------------------------------------- | ||
* Copyright (c) Red Hat, Inc. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
*-----------------------------------------------------------------------------------------------*/ | ||
import { TextField } from '@mui/material'; | ||
import * as React from 'react'; | ||
|
||
export type PortNumberInputProps = { | ||
portNumber: number, | ||
isPortNumberFieldValid: boolean, | ||
portNumberErrorMessage: string, | ||
setPortNumber: React.Dispatch<React.SetStateAction<number>> | ||
}; | ||
|
||
export function PortNumberInput(props: PortNumberInputProps) { | ||
return ( | ||
<TextField fullWidth | ||
id='portnumber' | ||
variant='outlined' | ||
label='Port' | ||
type='number' | ||
value={props.portNumber} | ||
error={!props.isPortNumberFieldValid} | ||
helperText={props.portNumberErrorMessage} | ||
onChange={(e) => { | ||
window.vscodeApi.postMessage({ | ||
action: 'validatePortNumber', | ||
data: e.target.value | ||
}); | ||
props.setPortNumber(parseInt(e.target.value, 10)); | ||
}} /> | ||
); | ||
} |
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
Oops, something went wrong.