-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(frontend): FE Improvements for the Test View (#3613)
* adding async functionality * chore(frontend): DAG improvements * chore(frontend): DAG improvements * chore(frontend): fixing spinner styles * chore(frontend): fixing spinner styles * feat(frontend): fixing tests * chore(frontend): fixing spinner styles * chore(frontend): FE Improvements for the Test View * chore(frontend): reverting editor changes * chore(frontend): Adding memoization for useComplete hook * chore(frontend): Adding Search Service usage * chore(frontend): cleanup
- Loading branch information
Showing
13 changed files
with
82 additions
and
51 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Model, TTestSchemas} from '../types/Common.types'; | ||
|
||
export type TRawSearchSpansResult = TTestSchemas['SearchSpansResult']; | ||
type SearchSpansResult = Model< | ||
TRawSearchSpansResult, | ||
{ | ||
spanIds: string[]; | ||
spansIds?: undefined; | ||
} | ||
>; | ||
|
||
const defaultSearchSpansResult: TRawSearchSpansResult = { | ||
spansIds: [], | ||
}; | ||
|
||
function SearchSpansResult({spansIds = []} = defaultSearchSpansResult): SearchSpansResult { | ||
return { | ||
spanIds: spansIds, | ||
}; | ||
} | ||
|
||
export default SearchSpansResult; |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {uniqBy} from 'lodash'; | ||
import {createSelector} from '@reduxjs/toolkit'; | ||
import {RootState} from 'redux/store'; | ||
import AssertionSelectors from './Assertion.selectors'; | ||
import SpanSelectors from './Span.selectors'; | ||
|
||
const stateSelector = (state: RootState) => state; | ||
const paramsSelector = (state: RootState, testId: string, runId: number) => ({ | ||
testId, | ||
runId, | ||
}); | ||
|
||
export const selectSelectorAttributeList = createSelector(stateSelector, paramsSelector, (state, {testId, runId}) => | ||
AssertionSelectors.selectAllAttributeList(state, testId, runId) | ||
); | ||
|
||
export const selectExpressionAttributeList = createSelector( | ||
stateSelector, | ||
paramsSelector, | ||
SpanSelectors.selectMatchedSpans, | ||
(state, {testId, runId}, spanIds) => { | ||
const attributeList = AssertionSelectors.selectAttributeList(state, testId, runId, spanIds); | ||
|
||
return uniqBy(attributeList, 'key'); | ||
} | ||
); |
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