| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7a1f464 commit 97eb607
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,18 +1,17 @@ | |||
| 1 | 1 | import React, { useCallback, useEffect, useState } from 'react'; | |
| 2 | 2 | import { Form, Select, Table } from "antd"; | |
| 3 | - import { DataSourceAttributes, DataSource } from "../models/model"; | ||
| 3 | + import { DataSource } from "../models/model"; | ||
| 4 | 4 | import { fetchDataSources, fetchProjects } from "../api"; | |
| 5 | 5 | ||
| 6 | 6 | const DataSourceList: React.FC = () => { | |
| 7 | 7 | const columns = [ | |
| 8 | 8 | { | |
| 9 | 9 | title: <div style={ { userSelect: "none" } }>Name</div>, | |
| 10 | - dataIndex: 'attributes', | ||
| 11 | 10 | key: 'name', | |
| 12 | 11 | align: 'center' as 'center', | |
| 13 | 12 | width: 120, | |
| 14 | - render: (row: DataSourceAttributes) => { | ||
| 15 | - return row.name; | ||
| 13 | + render: (row: DataSource) => { | ||
| 14 | + return row.attributes.name; | ||
| 16 | 15 | }, | |
| 17 | 16 | onCell: () => { | |
| 18 | 17 | return { | |
@@ -23,13 +22,12 @@ const DataSourceList: React.FC = () => { | |||
| 23 | 22 | } | |
| 24 | 23 | }, | |
| 25 | 24 | { | |
| 26 | - title: <div style={ { userSelect: "none" } }>QualifiedName</div>, | ||
| 27 | - dataIndex: 'attributes', | ||
| 28 | - key: 'qualifiedName', | ||
| 25 | + title: <div>Type</div>, | ||
| 26 | + key: 'type', | ||
| 29 | 27 | align: 'center' as 'center', | |
| 30 | - width: 120, | ||
| 31 | - render: (row: DataSourceAttributes) => { | ||
| 32 | - return row.qualifiedName; | ||
| 28 | + width: 80, | ||
| 29 | + render: (row: DataSource) => { | ||
| 30 | + return row.attributes.type; | ||
| 33 | 31 | }, | |
| 34 | 32 | onCell: () => { | |
| 35 | 33 | return { | |
@@ -40,13 +38,44 @@ const DataSourceList: React.FC = () => { | |||
| 40 | 38 | } | |
| 41 | 39 | }, | |
| 42 | 40 | { | |
| 43 | - title: <div style={ { userSelect: "none" } }>Type</div>, | ||
| 44 | - dataIndex: 'attributes', | ||
| 45 | - key: 'attributes', | ||
| 41 | + title: <div>Path</div>, | ||
| 42 | + key: 'path', | ||
| 46 | 43 | align: 'center' as 'center', | |
| 47 | - width: 80, | ||
| 48 | - render: (row: DataSourceAttributes) => { | ||
| 49 | - return row.type; | ||
| 44 | + width: 190, | ||
| 45 | + render: (row: DataSource) => { | ||
| 46 | + return row.attributes.path; | ||
| 47 | + }, | ||
| 48 | + onCell: () => { | ||
| 49 | + return { | ||
| 50 | + style: { | ||
| 51 | + maxWidth: 120 | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | + }, | ||
| 56 | + { | ||
| 57 | + title: <div>Pre Processing</div>, | ||
| 58 | + key: 'preprocessing', | ||
| 59 | + align: 'center' as 'center', | ||
| 60 | + width: 190, | ||
| 61 | + render: (row: DataSource) => { | ||
| 62 | + return row.attributes.preprocessing; | ||
| 63 | + }, | ||
| 64 | + onCell: () => { | ||
| 65 | + return { | ||
| 66 | + style: { | ||
| 67 | + maxWidth: 120 | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + }, | ||
| 72 | + { | ||
| 73 | + title: <div>Event Timestamp Column</div>, | ||
| 74 | + key: 'eventTimestampColumn', | ||
| 75 | + align: 'center' as 'center', | ||
| 76 | + width: 190, | ||
| 77 | + render: (row: DataSource) => { | ||
| 78 | + return row.attributes.eventTimestampColumn; | ||
| 50 | 79 | }, | |
| 51 | 80 | onCell: () => { | |
| 52 | 81 | return { | |
@@ -57,13 +86,12 @@ const DataSourceList: React.FC = () => { | |||
| 57 | 86 | } | |
| 58 | 87 | }, | |
| 59 | 88 | { | |
| 60 | - title: <div style={ { userSelect: "none" } }>Path</div>, | ||
| 61 | - dataIndex: 'attributes', | ||
| 62 | - key: 'attributes', | ||
| 89 | + title: <div>Timestamp Format</div>, | ||
| 90 | + key: 'timestampFormat', | ||
| 63 | 91 | align: 'center' as 'center', | |
| 64 | 92 | width: 190, | |
| 65 | - render: (row: DataSourceAttributes) => { | ||
| 66 | - return row.path; | ||
| 93 | + render: (row: DataSource) => { | ||
| 94 | + return row.attributes.timestampFormat; | ||
| 67 | 95 | }, | |
| 68 | 96 | onCell: () => { | |
| 69 | 97 | return { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,15 +9,14 @@ const FeatureList: React.FC = () => { | |||
| 9 | 9 | const navigate = useNavigate(); | |
| 10 | 10 | const columns = [ | |
| 11 | 11 | { | |
| 12 | - title: <div style={ { userSelect: "none" } }>Name</div>, | ||
| 13 | - dataIndex: 'displayText', | ||
| 12 | + title: <div>Name</div>, | ||
| 14 | 13 | key: 'name', | |
| 15 | 14 | width: 150, | |
| 16 | 15 | render: (name: string, row: Feature) => { | |
| 17 | 16 | return ( | |
| 18 | 17 | <Button type="link" onClick={ () => { | |
| 19 | 18 | navigate(`/projects/${ project }/features/${ row.guid }`) | |
| 20 | - } }>{ name }</Button> | ||
| 19 | + } }>{ row.displayText }</Button> | ||
| 21 | 20 | ) | |
| 22 | 21 | }, | |
| 23 | 22 | onCell: () => { | |
@@ -29,11 +28,14 @@ const FeatureList: React.FC = () => { | |||
| 29 | 28 | } | |
| 30 | 29 | }, | |
| 31 | 30 | { | |
| 32 | - title: <div style={ { userSelect: "none" } }>Type</div>, | ||
| 33 | - dataIndex: 'typeName', | ||
| 31 | + title: <div>Type</div>, | ||
| 34 | 32 | key: 'type', | |
| 35 | - align: 'center' as 'center', | ||
| 36 | - width: 190, | ||
| 33 | + width: 120, | ||
| 34 | + render: (name: string, row: Feature) => { | ||
| 35 | + return ( | ||
| 36 | + <div>{ row.typeName.replace('feathr_', '').replace('_v1', '')}</div> | ||
| 37 | + ) | ||
| 38 | + }, | ||
| 37 | 39 | onCell: () => { | |
| 38 | 40 | return { | |
| 39 | 41 | style: { | |
@@ -43,9 +45,46 @@ const FeatureList: React.FC = () => { | |||
| 43 | 45 | } | |
| 44 | 46 | }, | |
| 45 | 47 | { | |
| 46 | - title: (<div style={ { userSelect: "none" } }>Action <Tooltip | ||
| 47 | - title={ <Link style={ { color: "cyan" } } to="/help">Learn more</Link> }></Tooltip></div>), | ||
| 48 | - dataIndex: 'action', | ||
| 48 | + title: <div>Transformation</div>, | ||
| 49 | + key: 'transformation', | ||
| 50 | + width: 190, | ||
| 51 | + render: (name: string, row: Feature) => { | ||
| 52 | + return ( | ||
| 53 | + <div>{ row.attributes.transformation.transformExpr ?? row.attributes.transformation.defExpr }</div> | ||
| 54 | + ) | ||
| 55 | + }, | ||
| 56 | + onCell: () => { | ||
| 57 | + return { | ||
| 58 | + style: { | ||
| 59 | + maxWidth: 120, | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + }, | ||
| 64 | + { | ||
| 65 | + title: <div>Aggregation</div>, | ||
| 66 | + key: 'aggregation', | ||
| 67 | + width: 150, | ||
| 68 | + render: (name: string, row: Feature) => { | ||
| 69 | + return ( | ||
| 70 | + <> | ||
| 71 | + <div>{ row.attributes.transformation.aggFunc && `Type: ${ row.attributes.transformation.aggFunc }` }</div> | ||
| 72 | + <div>{ row.attributes.transformation.aggFunc && `Window: ${ row.attributes.transformation.window }` }</div> | ||
| 73 | + <div>{ row.attributes.transformation.aggFunc && `Key: ${ row.attributes.key[0].keyColumn }` }</div> | ||
| 74 | + </> | ||
| 75 | + ) | ||
| 76 | + }, | ||
| 77 | + onCell: () => { | ||
| 78 | + return { | ||
| 79 | + style: { | ||
| 80 | + maxWidth: 120, | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + } | ||
| 84 | + }, | ||
| 85 | + { | ||
| 86 | + title: ( | ||
| 87 | + <div>Action <Tooltip title={ <Link style={ { color: "cyan" } } to="/help">Learn more</Link> }></Tooltip></div>), | ||
| 49 | 88 | key: 'action', | |
| 50 | 89 | align: 'center' as 'center', | |
| 51 | 90 | width: 120, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,19 +61,20 @@ export interface DataSource { | |||
| 61 | 61 | attributes: DataSourceAttributes; | |
| 62 | 62 | displayText: string; | |
| 63 | 63 | guid: string; | |
| 64 | - labels: string[]; | ||
| 65 | - name: string; | ||
| 66 | - qualifiedName: string; | ||
| 64 | + lastModifiedTS: string; | ||
| 67 | 65 | status: string; | |
| 68 | 66 | typeName: string; | |
| 69 | 67 | version: string; | |
| 70 | 68 | } | |
| 71 | 69 | ||
| 72 | 70 | export interface DataSourceAttributes { | |
| 71 | + eventTimestampColumn: string; | ||
| 73 | 72 | name: string; | |
| 74 | 73 | path: string; | |
| 74 | + preprocessing: string; | ||
| 75 | 75 | qualifiedName: string; | |
| 76 | 76 | tags: string[]; | |
| 77 | + timestampFormat: string; | ||
| 77 | 78 | type: string; | |
| 78 | 79 | } | |
| 79 | 80 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments