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

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new a37ad6846d [INLONG-9368][Dashboard] Creation time or other time 
display in an easily readable format (#9382)
a37ad6846d is described below

commit a37ad6846d57dfc9ac65cb68668101f644126119
Author: Lizhen <[email protected]>
AuthorDate: Sun Dec 3 20:57:48 2023 +0800

    [INLONG-9368][Dashboard] Creation time or other time display in an easily 
readable format (#9382)
---
 inlong-dashboard/src/plugins/groups/common/GroupDefaultInfo.ts   | 5 ++++-
 inlong-dashboard/src/plugins/streams/common/StreamDefaultInfo.ts | 5 ++++-
 inlong-dashboard/src/plugins/sync/common/SyncDefaultInfo.ts      | 5 ++++-
 inlong-dashboard/src/ui/pages/ClusterTags/index.tsx              | 3 ++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/inlong-dashboard/src/plugins/groups/common/GroupDefaultInfo.ts 
b/inlong-dashboard/src/plugins/groups/common/GroupDefaultInfo.ts
index b2ef6d18b0..65009e3d47 100644
--- a/inlong-dashboard/src/plugins/groups/common/GroupDefaultInfo.ts
+++ b/inlong-dashboard/src/plugins/groups/common/GroupDefaultInfo.ts
@@ -24,6 +24,7 @@ import i18n from '@/i18n';
 import UserSelect from '@/ui/components/UserSelect';
 import { statusList, genStatusTag } from './status';
 import { groups, defaultValue } from '..';
+import { timestampFormat } from '@/core/utils';
 
 const { I18nMap, I18n } = DataWithBackend;
 const { FieldList, FieldDecorator } = RenderRow;
@@ -120,7 +121,9 @@ export class GroupDefaultInfo implements DataWithBackend, 
RenderRow, RenderList
   @I18n('basic.Status')
   readonly status: string;
 
-  @ColumnDecorator()
+  @ColumnDecorator({
+    render: text => timestampFormat(text),
+  })
   @I18n('basic.CreateTime')
   readonly createTime: string;
 
diff --git a/inlong-dashboard/src/plugins/streams/common/StreamDefaultInfo.ts 
b/inlong-dashboard/src/plugins/streams/common/StreamDefaultInfo.ts
index ef66263806..5ed27f3c5c 100644
--- a/inlong-dashboard/src/plugins/streams/common/StreamDefaultInfo.ts
+++ b/inlong-dashboard/src/plugins/streams/common/StreamDefaultInfo.ts
@@ -24,6 +24,7 @@ import i18n from '@/i18n';
 import EditableTable from '@/ui/components/EditableTable';
 import { fieldTypes as sourceFieldsTypes } from 
'@/plugins/sinks/common/sourceFields';
 import { statusList, genStatusTag } from './status';
+import { timestampFormat } from '@/core/utils';
 
 const { I18nMap, I18n } = DataWithBackend;
 const { FieldList, FieldDecorator } = RenderRow;
@@ -79,7 +80,9 @@ export class StreamDefaultInfo implements DataWithBackend, 
RenderRow, RenderList
   @I18n('basic.Modifier')
   readonly modifier: string;
 
-  @ColumnDecorator()
+  @ColumnDecorator({
+    render: text => timestampFormat(text),
+  })
   @I18n('basic.CreateTime')
   readonly createTime: string;
 
diff --git a/inlong-dashboard/src/plugins/sync/common/SyncDefaultInfo.ts 
b/inlong-dashboard/src/plugins/sync/common/SyncDefaultInfo.ts
index 8f6fd7ca77..6423e9ffb0 100644
--- a/inlong-dashboard/src/plugins/sync/common/SyncDefaultInfo.ts
+++ b/inlong-dashboard/src/plugins/sync/common/SyncDefaultInfo.ts
@@ -23,6 +23,7 @@ import { RenderList } from '@/plugins/RenderList';
 import i18n from '@/i18n';
 import UserSelect from '@/ui/components/UserSelect';
 import { genStatusTag, statusList } from './status';
+import { timestampFormat } from '@/core/utils';
 
 const { I18nMap, I18n } = DataWithBackend;
 const { FieldList, FieldDecorator } = RenderRow;
@@ -134,7 +135,9 @@ export class SyncDefaultInfo implements DataWithBackend, 
RenderRow, RenderList {
   @I18n('basic.Status')
   readonly status: string;
 
-  @ColumnDecorator()
+  @ColumnDecorator({
+    render: text => timestampFormat(text),
+  })
   @I18n('basic.CreateTime')
   readonly createTime: string;
 
diff --git a/inlong-dashboard/src/ui/pages/ClusterTags/index.tsx 
b/inlong-dashboard/src/ui/pages/ClusterTags/index.tsx
index b91c40d12c..c9e1ecf9ce 100644
--- a/inlong-dashboard/src/ui/pages/ClusterTags/index.tsx
+++ b/inlong-dashboard/src/ui/pages/ClusterTags/index.tsx
@@ -40,6 +40,7 @@ import ClusterList from './ClusterList';
 import TagDetailModal from './TagDetailModal';
 import styles from './index.module.less';
 import { State } from '@/core/stores';
+import { timestampFormat } from '@/core/utils';
 
 const Comp: React.FC = () => {
   const [options, setOptions] = useState({
@@ -255,7 +256,7 @@ const Comp: React.FC = () => {
                 {currentTag.modifier}
               </Descriptions.Item>
               <Descriptions.Item 
label={i18n.t('pages.ClusterTags.ModifyTime')}>
-                {currentTag.modifyTime}
+                {timestampFormat(currentTag.modifyTime)}
               </Descriptions.Item>
             </Descriptions>
           </Card>

Reply via email to