Skip to content

Commit

Permalink
Merge pull request openshift#7594 from sahil143/odc-5165
Browse files Browse the repository at this point in the history
Bug 1908868: add empty state message for Event sources and Chanels
  • Loading branch information
openshift-merge-robot authored Dec 18, 2020
2 parents 92e8bd7 + a58c629 commit 3bca859
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { MultiListPage } from '@console/internal/components/factory';
import { RowFilter } from '@console/internal/components/filter-toolbar';
import { K8sResourceKind, referenceFor, referenceForModel } from '@console/internal/module/k8s';
Expand All @@ -9,6 +10,7 @@ import {
import ChannelList from './ChannelList';

const ChannelListPage: React.FC<React.ComponentProps<typeof MultiListPage>> = (props) => {
const { t } = useTranslation();
const { loaded: modelsLoaded, eventSourceChannels } = useChannelModels();
const flatten = (resources) =>
modelsLoaded
Expand Down Expand Up @@ -59,6 +61,7 @@ const ChannelListPage: React.FC<React.ComponentProps<typeof MultiListPage>> = (p
return (
<MultiListPage
{...props}
label={t('knative-plugin~Channels')}
flatten={flatten}
resources={resources}
rowFilters={channelRowFilter}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { MultiListPage } from '@console/internal/components/factory';
import { K8sResourceKind, referenceFor, referenceForModel } from '@console/internal/module/k8s';
import { RowFilter } from '@console/internal/components/filter-toolbar';
Expand All @@ -9,6 +10,7 @@ import {
} from '../../../utils/fetch-dynamic-eventsources-utils';

const EventSourceListPage: React.FC<React.ComponentProps<typeof MultiListPage>> = (props) => {
const { t } = useTranslation();
const { loaded: modelsLoaded, eventSourceModels } = useEventSourceModels();
const flatten = (resources) =>
modelsLoaded
Expand Down Expand Up @@ -58,6 +60,7 @@ const EventSourceListPage: React.FC<React.ComponentProps<typeof MultiListPage>>
return (
<MultiListPage
{...props}
label={t('knative-plugin~Event Sources')}
rowFilters={eventSourceRowFilters}
flatten={flatten}
resources={resources}
Expand Down

0 comments on commit 3bca859

Please sign in to comment.