Skip to content

Commit

Permalink
Merge pull request #757 from redpanda-data/hide-internal-topics
Browse files Browse the repository at this point in the history
ui: remove internal topics from Topic.List in serverless
  • Loading branch information
rikimaru0345 authored Jul 5, 2023
2 parents b73d066 + cb2e539 commit e79376d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions frontend/src/components/pages/topics/Topic.List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Section from '../../misc/Section';
import PageContent from '../../misc/PageContent';
import { Button, Icon, Checkbox, Alert, AlertIcon } from '@redpanda-data/ui';
import { HiOutlineTrash } from 'react-icons/hi';
import { isServerless } from '../../../config';

@observer
class TopicList extends PageComponent {
Expand Down Expand Up @@ -89,7 +90,7 @@ class TopicList extends PageComponent {
if (!api.topics) return DefaultSkeleton;

let topics = api.topics;
if (uiSettings.topicList.hideInternalTopics) {
if (uiSettings.topicList.hideInternalTopics || isServerless()) {
topics = topics.filter(x => !x.isInternal && !x.topicName.startsWith('_'));
}

Expand Down Expand Up @@ -150,13 +151,15 @@ class TopicList extends PageComponent {
>
Create Topic
</Button>
<Checkbox
isChecked={!uiSettings.topicList.hideInternalTopics}
onChange={x => uiSettings.topicList.hideInternalTopics = !x.target.checked}
style={{ marginLeft: 'auto' }}
>
Show internal topics
</Checkbox>

{!isServerless() &&
<Checkbox
isChecked={!uiSettings.topicList.hideInternalTopics}
onChange={x => uiSettings.topicList.hideInternalTopics = !x.target.checked}
style={{ marginLeft: 'auto' }}>
Show internal topics
</Checkbox>
}
<this.CreateTopicModal />
</div>
<KowlTable
Expand Down

0 comments on commit e79376d

Please sign in to comment.