-
Notifications
You must be signed in to change notification settings - Fork 67
/
AnalyzerResult.tsx
47 lines (42 loc) 路 1.64 KB
/
AnalyzerResult.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import BetaBadge from 'components/BetaBadge/BetaBadge';
import Link from 'components/Link';
import {COMMUNITY_SLACK_URL, OCTOLIINT_ISSUE_URL} from 'constants/Common.constants';
import LinterResult from 'models/LinterResult.model';
import {useSettingsValues} from 'providers/SettingsValues/SettingsValues.provider';
import * as S from './AnalyzerResult.styled';
import Empty from './Empty';
import GlobalResult from './GlobalResult';
import Plugins from './Plugins';
interface IProps {
result: LinterResult;
}
const AnalyzerResult = ({result: {score, minimumScore, plugins = [], passed}}: IProps) => {
const {linter} = useSettingsValues();
return (
<S.Container>
<S.Title level={2}>
Analyzer Results <BetaBadge />
</S.Title>
<S.Description>
The Tracetest Analyzer is a plugin based framework used to analyze OpenTelemetry traces to help teams improve
their instrumentation data, find potential problems and provide tips to fix the problems.{' '}
{linter.enabled && (
<>
It can be globally disabled for all tests in <Link to="/settings?tab=analyzer">the settings page</Link>.{' '}
</>
)}
We value your feedback on this beta release. Share your thoughts on <a href={COMMUNITY_SLACK_URL}>Slack</a> or
add them to this <a href={OCTOLIINT_ISSUE_URL}>Issue</a>.
</S.Description>
{plugins.length ? (
<>
<GlobalResult score={score} minimumScore={minimumScore} allRulesPassed={passed} />
<Plugins plugins={plugins} />
</>
) : (
<Empty />
)}
</S.Container>
);
};
export default AnalyzerResult;