-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Add filter compaction UI (#4576)
- Loading branch information
Showing
9 changed files
with
285 additions
and
6,668 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
pkg/ui/react-app/src/thanos/pages/blocks/BlockFilterCompaction.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,34 @@ | ||
import React, { FC, ChangeEvent } from 'react'; | ||
import Checkbox from '../../../components/Checkbox'; | ||
import { Input } from 'reactstrap'; | ||
import styles from './blocks.module.css'; | ||
|
||
interface BlockFilterCompactionProps { | ||
id: string; | ||
defaultChecked: boolean; | ||
onChangeCheckbox: ({ target }: ChangeEvent<HTMLInputElement>) => void; | ||
onChangeInput: ({ target }: ChangeEvent<HTMLInputElement>) => void; | ||
defaultValue: string; | ||
} | ||
|
||
export const BlockFilterCompaction: FC<BlockFilterCompactionProps> = ({ | ||
id, | ||
defaultChecked, | ||
onChangeCheckbox, | ||
onChangeInput, | ||
defaultValue, | ||
}) => { | ||
return ( | ||
<div className={styles.blockFilter} style={{ marginLeft: '24px' }}> | ||
<Checkbox style={{ marginRight: '4px' }} id={id} defaultChecked={defaultChecked} onChange={onChangeCheckbox} /> | ||
<p style={{ marginRight: '4px' }}>Filter by compaction level</p> | ||
<Input | ||
type="number" | ||
style={{ width: '80px', marginBottom: '1rem' }} | ||
onChange={onChangeInput} | ||
defaultValue={defaultValue} | ||
min={0} | ||
/> | ||
</div> | ||
); | ||
}; |
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