@@ -15,27 +15,30 @@ import './ExternalTable.scss';
15
15
16
16
const b = cn ( 'ydb-external-table-info' ) ;
17
17
18
- const prepareExternalTableSummary = (
19
- data : TEvDescribeSchemeResult ,
20
- pathToDataSource : string ,
21
- ) : InfoViewerItem [ ] => {
18
+ const prepareExternalTableSummary = ( data : TEvDescribeSchemeResult , pathToDataSource : string ) => {
22
19
const { CreateStep} = data . PathDescription ?. Self || { } ;
23
20
const { SourceType, DataSourcePath} = data . PathDescription ?. ExternalTableDescription || { } ;
24
21
25
22
const dataSourceName = DataSourcePath ?. split ( '/' ) . pop ( ) ;
26
23
27
- return [
24
+ const info : InfoViewerItem [ ] = [
28
25
{ label : i18n ( 'external-objects.source-type' ) , value : SourceType } ,
29
- formatCommonItem ( 'CreateStep' , CreateStep ) ,
30
- {
31
- label : i18n ( 'external-objects.data-source' ) ,
32
- value : DataSourcePath && (
33
- < span title = { DataSourcePath } >
34
- < LinkWithIcon title = { dataSourceName || '' } url = { pathToDataSource } />
35
- </ span >
36
- ) ,
37
- } ,
38
26
] ;
27
+
28
+ if ( Number ( CreateStep ) ) {
29
+ info . push ( formatCommonItem ( 'CreateStep' , CreateStep ) ) ;
30
+ }
31
+
32
+ info . push ( {
33
+ label : i18n ( 'external-objects.data-source' ) ,
34
+ value : DataSourcePath && (
35
+ < span title = { DataSourcePath } >
36
+ < LinkWithIcon title = { dataSourceName || '' } url = { pathToDataSource } />
37
+ </ span >
38
+ ) ,
39
+ } ) ;
40
+
41
+ return info ;
39
42
} ;
40
43
41
44
const prepareExternalTableInfo = (
0 commit comments