Skip to content

Commit

Permalink
Repair broken types.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Oct 2, 2020
1 parent e302a02 commit 33ef0ad
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ describe('PingList component', () => {
to: 'now',
}}
getPings={jest.fn()}
pruneJourneysCallback={jest.fn()}
lastRefresh={123}
loading={false}
locations={[]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const PingListComponent = (props: Props) => {
}, [expandedIdsToRemove, expandedRows]);

const expandedCheckGroups = pings
.filter((p) => Object.keys(expandedRows).some((f) => p.docId === f))
.filter((p: Ping) => Object.keys(expandedRows).some((f) => p.docId === f))
.map(({ monitor: { check_group: cg } }) => cg);
const expandedCheckGroupsStr = JSON.stringify(expandedCheckGroups);
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export const BrowserExpandedRow: React.FC<BrowserExpandedRowProps> = ({ checkGro
}, [dispatch, checkGroup]);

const journeys = useSelector(journeySelector);
console.log(journeys);
const journey = journeys[checkGroup];
const journey = journeys[checkGroup ?? ''];

return <BrowserExpandedRowComponent checkGroup={checkGroup} journey={journey} />;
};
Expand Down
5 changes: 4 additions & 1 deletion x-pack/plugins/uptime/public/state/reducers/journey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ interface JourneyKVP {

const initialState: JourneyKVP = {};

type Payload = FetchJourneyStepsParams & SyntheticsJourneyApiResponse & GetJourneyFailPayload;
type Payload = FetchJourneyStepsParams &
SyntheticsJourneyApiResponse &
GetJourneyFailPayload &
string[];

export const journeyReducer = handleActions<JourneyKVP, Payload>(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('state selectors', () => {
newAlert: { data: null, loading: false },
anomalyAlertDeletion: { data: null, loading: false },
},
journeys: [],
journeys: {},
};

it('selects base path from state', () => {
Expand Down

0 comments on commit 33ef0ad

Please sign in to comment.