Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Connect hosts to api #27

Merged
merged 5 commits into from
Feb 19, 2019
Merged

Conversation

jtomasek
Copy link
Member

@jtomasek jtomasek commented Feb 14, 2019

Populates HostsTable with actual data from API.

Work in progress

  • needs to add reselect for cached selectors
  • needs to add loading status tracking
  • clean up HostsExample from App.tsx

Depends on #22

@jtomasek jtomasek force-pushed the connectHostsToAPI branch 2 times, most recently from 5a99676 to 5af96ec Compare February 15, 2019 11:53
@@ -1,3 +1,9 @@
export interface Host {
id: string;
name: string;
ip: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The types of the fields of Host should match whatever the server returns.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

</Fragment>
);
interface Props {
hostRows: string[][];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a more concrete type here instead of string[][]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const HostsTable: FC = (): JSX.Element => {
const headerStyle = { position: 'sticky', top: 0, background: 'white' };
interface Props {
hostRows: string[][];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

flofuchs
flofuchs previously approved these changes Feb 18, 2019
Jiri Tomasek added 4 commits February 18, 2019 13:34
Fix the selectors to be based on RootState,
Add getHostTableRows selector and test
Remove HostsExample referendes from App.tsx
@jtomasek
Copy link
Member Author

Rebased on top of master

Copy link
Contributor

@honza honza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@flofuchs flofuchs merged commit b877873 into openshift-assisted:master Feb 19, 2019
@jtomasek jtomasek deleted the connectHostsToAPI branch February 19, 2019 11:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants