Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improvements to the test run events (#2405)
* fix: improvements to the test run events * PR comment updates
- Loading branch information
Showing
5 changed files
with
90 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,57 @@ | ||
import {Typography} from 'antd'; | ||
import {capitalize} from 'lodash'; | ||
import {useSettingsValues} from 'providers/SettingsValues/SettingsValues.provider'; | ||
import {IPropsEvent} from './RunEvent'; | ||
import * as S from './RunEvents.styled'; | ||
|
||
const RunEventPolling = ({event}: IPropsEvent) => ( | ||
<S.EventContainer> | ||
<S.Dot $logLevel={event.logLevel} /> | ||
<Typography.Title level={3}>{event.title}</Typography.Title> | ||
<Typography.Text>{event.description}</Typography.Text> | ||
{!!event.polling && ( | ||
<S.Content> | ||
<S.Column> | ||
<S.InfoIcon /> | ||
<div> | ||
<Typography.Title level={3}>Number of spans collected:</Typography.Title> | ||
<Typography.Text>{event.polling.periodic.numberSpans}</Typography.Text> | ||
</div> | ||
</S.Column> | ||
<S.Column> | ||
<S.InfoIcon /> | ||
<div> | ||
<Typography.Title level={3}>Iteration number:</Typography.Title> | ||
<Typography.Text>{event.polling.periodic.numberIterations}</Typography.Text> | ||
</div> | ||
</S.Column> | ||
</S.Content> | ||
)} | ||
</S.EventContainer> | ||
); | ||
const RunEventPolling = ({event}: IPropsEvent) => { | ||
const { | ||
pollingProfile: { | ||
strategy, | ||
periodic: {retryDelay = '', timeout = ''}, | ||
}, | ||
} = useSettingsValues(); | ||
|
||
return ( | ||
<S.EventContainer> | ||
<S.Dot $logLevel={event.logLevel} /> | ||
<Typography.Title level={3}>{event.title}</Typography.Title> | ||
<Typography.Text>{event.description}</Typography.Text> | ||
{!!event.polling && ( | ||
<S.Content> | ||
<S.Column> | ||
<S.InfoIcon /> | ||
<div> | ||
<Typography.Title level={3}>Polling profile configuration:</Typography.Title> | ||
<S.Column> | ||
<Typography.Text>{capitalize(strategy)} strategy</Typography.Text> | ||
</S.Column> | ||
<S.Column> | ||
<Typography.Text>{retryDelay} of retry delay</Typography.Text> | ||
</S.Column> | ||
<S.Column> | ||
<Typography.Text>{timeout} of timeout</Typography.Text> | ||
</S.Column> | ||
</div> | ||
</S.Column> | ||
<S.Column> | ||
<S.InfoIcon /> | ||
<div> | ||
<Typography.Title level={3}>Number of spans collected:</Typography.Title> | ||
<Typography.Text>{event.polling.periodic.numberSpans}</Typography.Text> | ||
</div> | ||
</S.Column> | ||
<S.Column> | ||
<S.InfoIcon /> | ||
<div> | ||
<Typography.Title level={3}>Iteration number:</Typography.Title> | ||
<Typography.Text>{event.polling.periodic.numberIterations}</Typography.Text> | ||
</div> | ||
</S.Column> | ||
</S.Content> | ||
)} | ||
</S.EventContainer> | ||
); | ||
}; | ||
|
||
export default RunEventPolling; |