liuxiran commented on a change in pull request #999:
URL: https://github.com/apache/apisix-dashboard/pull/999#discussion_r547572147
##########
File path: web/src/pages/Route/List.tsx
##########
@@ -90,6 +101,47 @@ const Page: React.FC = () => {
dataIndex: 'desc',
hideInSearch: true,
},
+ {
+ title: formatMessage({ id: 'component.global.label' }),
+ dataIndex: 'labels',
+ render: (_, record) => {
+ return Object.keys(record.labels || {}).map((item) => (
+ <Tag key={Math.random().toString(36).slice(2)}>
+ {item}:{record.labels[item]}
Review comment:
just to make sure that if the `labels` we got from api is a
`[key:string]:[value:string]` object, if so, the origin data structure will
lose the same key label IMHO
##########
File path: web/src/pages/Route/transform.ts
##########
@@ -35,8 +44,14 @@ export const transformStepData = ({
};
}
+ const labels = {};
+ transformLableValueToKeyValue(form1Data.labels).forEach(item => {
+ labels[item.labelKey] = item.labelValue;
Review comment:
both of them need to be posted
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]