Skip to content

Commit

Permalink
fix plugins display in list of routes (apache#2704)
Browse files Browse the repository at this point in the history
Co-authored-by: litesun <[email protected]>
  • Loading branch information
2 people authored and Baoyuantop committed Mar 22, 2023
1 parent 89cca2b commit d41405e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/src/pages/Route/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ const Page: React.FC = () => {
{
title: formatMessage({ id: 'component.global.labels' }),
dataIndex: 'labels',
width: 240,
render: (_, record) => {
return Object.keys(record.labels || {})
.filter((item) => item !== 'API_VERSION')
Expand Down Expand Up @@ -550,6 +551,13 @@ const Page: React.FC = () => {
{
title: formatMessage({ id: 'menu.plugin' }),
dataIndex: 'plugins',
width: 240,
render: (_, record) => {
const plugins = record.plugins || {};
return Object.keys(plugins).length > 0
? Object.keys(plugins).map((key) => <Tag key={key}>{key}</Tag>)
: '-';
},
},
];

Expand Down
1 change: 1 addition & 0 deletions web/src/pages/Route/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ declare namespace RouteModule {
create_time: number;
update_time: number;
status: number;
plugins: Record<string, any>;
};

type RouteStatus = 0 | 1;
Expand Down

0 comments on commit d41405e

Please sign in to comment.