Skip to content

Conversation

TheGostKasper
Copy link
Contributor

It fixes #1276

Show list of Pipelines

image

[Test coverage]
  • Render list of pipelines
  • Search by pipeline name
  • write a helper fn(s) for
    • getTableInfo
    • sortTableByColumn
    • searchTableByValue

Copy link
Contributor

@jpellizzari jpellizzari left a comment

Choose a reason for hiding this comment

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

No blockers for me. Some of the larger styling changes make me a tad nervous though.

@@ -57,7 +59,7 @@ const GlobalStyle = createGlobalStyle`
display: flex;
flex-direction: column;
margin: 0;

overflow:hidden;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is potentially a larger change. Was something scrolling that should not have been?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nah, this should be removed .

marginLeft: small,
paddingRight: medium,
paddingLeft: medium,
borderRadius: xs,
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit worried here. I wouldn't expect this needed to be changed. Can you elaborate @TheGostKasper ?

Copy link
Contributor Author

@TheGostKasper TheGostKasper Aug 31, 2022

Choose a reason for hiding this comment

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

This will align the alert wit other alerts and content in the pages, It's the same as AlertListErrors .

image

image

<ContentWrapper loading={isLoading} errorMessage={error?.message}>
{data?.pipelines && (
<TableWrapper id="pipelines-list">
<FilterableTable
Copy link
Contributor

Choose a reason for hiding this comment

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

What about a URLAddressableTable here? That would allow the user to create bookmarks. I think that is already exported from Core.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know anything about URLAddressableTable 🤔 and i can't find it in Core, Can you walk me through it ?

);
};

export const useCountPipelines = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We may be able to compose useCountPipelines from useListPipelines:

export const useListPipelines = () => {
  const pipelinsService = usePipelines();
  return useQuery<ListPipelinesResponse, Error>(
    [LIST_PIPLINES_KEY],
    () => pipelinsService.ListPipelines({}),
    { retry: false },
  );
};

export const useCountPipelines() {
  const { data } = useListPipelines()

  return data?.pipelines.length 
}

We could also use a selector pattern as well, but composing here will reduce some duplication.

@TheGostKasper TheGostKasper merged commit 53c0d8d into main Sep 1, 2022
@TheGostKasper TheGostKasper deleted the 1267-listing-piplines branch September 1, 2022 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show list of pipelines
3 participants