-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* metric source comp * screens * screens after merge master * link const --------- Co-authored-by: Eduard Zaidler <zaidler@skbkontur.ru>
- Loading branch information
1 parent
a5880f6
commit 966a9e6
Showing
3 changed files
with
44 additions
and
36 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,31 @@ | ||
import React from "react"; | ||
import { Gapped, Radio, RadioGroup } from "@skbkontur/react-ui"; | ||
import TriggerSource from "../../Domain/Trigger"; | ||
import { Link } from "@skbkontur/react-ui/components/Link"; | ||
|
||
interface Props { | ||
triggerSource?: TriggerSource; | ||
onSourceChange: (value: TriggerSource) => void; | ||
} | ||
|
||
const remoteTriggerLink = | ||
"http://moira.readthedocs.io/en/latest/user_guide/advanced.html#data-source"; | ||
|
||
export const MetricSourceSelect: React.FC<Props> = ({ triggerSource, onSourceChange }) => { | ||
return ( | ||
<RadioGroup<TriggerSource> | ||
name="data-source" | ||
defaultValue={triggerSource} | ||
onValueChange={onSourceChange} | ||
> | ||
<Gapped vertical gap={10}> | ||
<Radio value={TriggerSource.GRAPHITE_LOCAL}> Local (default)</Radio> | ||
<Radio value={TriggerSource.GRAPHITE_REMOTE}> | ||
Graphite Remote. Be careful, it may cause | ||
<Link href={remoteTriggerLink}>extra load</Link> | ||
</Radio> | ||
<Radio value={TriggerSource.PROMETHEUS_REMOTE}> Prometheus Remote </Radio> | ||
</Gapped> | ||
</RadioGroup> | ||
); | ||
}; |
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