-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: fe: logs pipelines severity parsing processor (#4149)
- Loading branch information
1 parent
4644b1c
commit 112783d
Showing
5 changed files
with
200 additions
and
27 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...tend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/FormFields/CSVInput.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,25 @@ | ||
import { Input, InputProps } from 'antd'; | ||
import { ChangeEventHandler, useState } from 'react'; | ||
|
||
function CSVInput({ value, onChange, ...otherProps }: InputProps): JSX.Element { | ||
const [inputValue, setInputValue] = useState( | ||
((value as string[]) || []).join(', '), | ||
); | ||
|
||
const onChangeHandler = (onChange as unknown) as (v: string[]) => void; | ||
|
||
const onInputChange: ChangeEventHandler<HTMLInputElement> = (e) => { | ||
const newValue = e.target.value; | ||
setInputValue(newValue); | ||
|
||
if (onChangeHandler) { | ||
const splitValues = newValue.split(',').map((v) => v.trim()); | ||
onChangeHandler(splitValues); | ||
} | ||
}; | ||
|
||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
return <Input value={inputValue} onChange={onInputChange} {...otherProps} />; | ||
} | ||
|
||
export default CSVInput; |
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
27 changes: 27 additions & 0 deletions
27
frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.scss
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,27 @@ | ||
|
||
.processor-form-container { | ||
position: relative; | ||
width: 100%; | ||
|
||
display: flex; | ||
flex-wrap: wrap | ||
} | ||
|
||
.processor-field-container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-start; | ||
padding: 0rem; | ||
gap: 1rem; | ||
width: 100%; | ||
} | ||
|
||
.compact-processor-field-container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-start; | ||
padding: 0rem; | ||
min-width: 40%; | ||
flex-grow: 1; | ||
margin-left: 2.5rem; | ||
} |
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