This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 98b606275 feat(config-ui): support show expired tag in api-keys (#6314)
98b606275 is described below
commit 98b606275fca22fe6b31f5fe9ed7efe3791f4ee1
Author: 青湛 <[email protected]>
AuthorDate: Wed Oct 25 18:18:28 2023 +1300
feat(config-ui): support show expired tag in api-keys (#6314)
---
config-ui/src/routes/api-keys/api-keys.tsx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/config-ui/src/routes/api-keys/api-keys.tsx
b/config-ui/src/routes/api-keys/api-keys.tsx
index cfb8419fc..d57118d79 100644
--- a/config-ui/src/routes/api-keys/api-keys.tsx
+++ b/config-ui/src/routes/api-keys/api-keys.tsx
@@ -17,7 +17,8 @@
*/
import { useState, useMemo } from 'react';
-import { Button, Intent, InputGroup } from '@blueprintjs/core';
+import { Button, Tag, Intent, InputGroup } from '@blueprintjs/core';
+import dayjs from 'dayjs';
import API from '@/api';
import { PageHeader, Table, Dialog, FormItem, Selector, ExternalLink,
CopyText, Message } from '@/components';
@@ -107,7 +108,12 @@ export const ApiKeys = () => {
dataIndex: 'expiredAt',
key: 'expiredAt',
width: 200,
- render: (val) => (val ? formatTime(val, 'YYYY-MM-DD') : 'No
expiration'),
+ render: (val) => (
+ <div>
+ <span>{val ? formatTime(val, 'YYYY-MM-DD') : 'No
expiration'}</span>
+ {dayjs().isAfter(dayjs(val)) && <Tag style={{ marginLeft: 8
}}>Expired</Tag>}
+ </div>
+ ),
},
{
title: 'Allowed Path',