You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2023/10/24 08:03:51 UTC

[incubator-devlake] branch feat-api-key-expired created (now b9a801a38)

This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a change to branch feat-api-key-expired
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at b9a801a38 feat(config-ui): support show expired tag in api-keys

This branch includes the following new commits:

     new b9a801a38 feat(config-ui): support show expired tag in api-keys

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-devlake] 01/01: feat(config-ui): support show expired tag in api-keys

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch feat-api-key-expired
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit b9a801a384dbe6d17ce833a29738472642d58b6f
Author: mintsweet <0x...@gmail.com>
AuthorDate: Tue Oct 24 21:03:36 2023 +1300

    feat(config-ui): support show expired tag in api-keys
---
 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',