diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/error.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/error.svg index 6b799c9175a..1edc19c338b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/error.svg +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/error.svg @@ -1,12 +1,12 @@ - - - - background - - - - Layer 1 - - - - \ No newline at end of file + + + + + + + + + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BotsDetail/BotsDetail.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/BotsDetail/BotsDetail.component.tsx index 8b4fd374ca3..f69452b0102 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BotsDetail/BotsDetail.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/BotsDetail/BotsDetail.component.tsx @@ -293,15 +293,36 @@ const BotsDetail: FC = ({ const getBotsTokenExpiryDate = () => { if (botsTokenExpiry) { + // get the current date timestamp + const currentTimeStamp = Date.now(); + + const isTokenExpired = currentTimeStamp >= Number(botsTokenExpiry); + + // get the token expiry date + const tokenExpiryDate = + moment(botsTokenExpiry).format('ddd Do MMMM, YYYY'); + return (

- Expires on {moment(botsTokenExpiry).format('ddd Do MMMM, YYYY')} + {isTokenExpired + ? `Expired on ${tokenExpiryDate}` + : `Expires on ${tokenExpiryDate}`} + .

); } else { - return null; + return ( +

+ + + This token has no expiration date. + +

+ ); } };