mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-31 05:04:39 +00:00
Fix: fixed dataset page (#623)
* Fix: fixed dataset page * fixed icon issue
This commit is contained in:
parent
ebfbd39cc2
commit
bb1da94cc8
@ -70,7 +70,7 @@ const SchemaTab: FunctionComponent<Props> = ({
|
|||||||
if (matchedColumn) {
|
if (matchedColumn) {
|
||||||
return {
|
return {
|
||||||
name: matchedColumn.name,
|
name: matchedColumn.name,
|
||||||
dataType: matchedColumn.columnDataType,
|
dataType: matchedColumn.dataType,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
@ -29,8 +29,8 @@ import { Link } from 'react-router-dom';
|
|||||||
import { getDatasetDetailsPath } from '../../constants/constants';
|
import { getDatasetDetailsPath } from '../../constants/constants';
|
||||||
import {
|
import {
|
||||||
Column,
|
Column,
|
||||||
ColumnDataType,
|
|
||||||
ColumnJoins,
|
ColumnJoins,
|
||||||
|
DataType,
|
||||||
JoinedWith,
|
JoinedWith,
|
||||||
Table,
|
Table,
|
||||||
} from '../../generated/entity/data/table';
|
} from '../../generated/entity/data/table';
|
||||||
@ -87,26 +87,26 @@ const SchemaTable: FunctionComponent<Props> = ({
|
|||||||
const rowRef = useRef<HTMLTableRowElement>(null);
|
const rowRef = useRef<HTMLTableRowElement>(null);
|
||||||
const getDataTypeString = (dataType: string): string => {
|
const getDataTypeString = (dataType: string): string => {
|
||||||
switch (upperCase(dataType)) {
|
switch (upperCase(dataType)) {
|
||||||
case ColumnDataType.String:
|
case DataType.String:
|
||||||
case ColumnDataType.Char:
|
case DataType.Char:
|
||||||
case ColumnDataType.Text:
|
case DataType.Text:
|
||||||
case ColumnDataType.Varchar:
|
case DataType.Varchar:
|
||||||
case ColumnDataType.Mediumtext:
|
case DataType.Mediumtext:
|
||||||
case ColumnDataType.Mediumblob:
|
case DataType.Mediumblob:
|
||||||
case ColumnDataType.Blob:
|
case DataType.Blob:
|
||||||
return 'varchar';
|
return 'varchar';
|
||||||
case ColumnDataType.Timestamp:
|
case DataType.Timestamp:
|
||||||
case ColumnDataType.Time:
|
case DataType.Time:
|
||||||
return 'timestamp';
|
return 'timestamp';
|
||||||
case ColumnDataType.Int:
|
case DataType.Int:
|
||||||
case ColumnDataType.Float:
|
case DataType.Float:
|
||||||
case ColumnDataType.Smallint:
|
case DataType.Smallint:
|
||||||
case ColumnDataType.Bigint:
|
case DataType.Bigint:
|
||||||
case ColumnDataType.Numeric:
|
case DataType.Numeric:
|
||||||
case ColumnDataType.Tinyint:
|
case DataType.Tinyint:
|
||||||
return 'numeric';
|
return 'numeric';
|
||||||
case ColumnDataType.Boolean:
|
case DataType.Boolean:
|
||||||
case ColumnDataType.Enum:
|
case DataType.Enum:
|
||||||
return 'boolean';
|
return 'boolean';
|
||||||
default:
|
default:
|
||||||
return dataType;
|
return dataType;
|
||||||
@ -216,9 +216,7 @@ const SchemaTable: FunctionComponent<Props> = ({
|
|||||||
return (
|
return (
|
||||||
lowerCase(column.name).includes(searchText) ||
|
lowerCase(column.name).includes(searchText) ||
|
||||||
lowerCase(column.description).includes(searchText) ||
|
lowerCase(column.description).includes(searchText) ||
|
||||||
lowerCase(getDataTypeString(column.columnDataType)).includes(
|
lowerCase(getDataTypeString(column.dataType)).includes(searchText)
|
||||||
searchText
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
setSearchedColumns(searchCols);
|
setSearchedColumns(searchCols);
|
||||||
@ -271,14 +269,14 @@ const SchemaTable: FunctionComponent<Props> = ({
|
|||||||
key={index}
|
key={index}
|
||||||
ref={columnName === column.name ? rowRef : null}>
|
ref={columnName === column.name ? rowRef : null}>
|
||||||
<td className="tw-relative tableBody-cell">
|
<td className="tw-relative tableBody-cell">
|
||||||
{getConstraintIcon(column.columnConstraint)}
|
{getConstraintIcon(column.constraint)}
|
||||||
<span>{column.name}</span>
|
<span>{column.name}</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td className="tableBody-cell">
|
<td className="tableBody-cell">
|
||||||
<span>
|
<span>
|
||||||
{column.columnDataType
|
{column.dataType
|
||||||
? lowerCase(getDataTypeString(column.columnDataType))
|
? lowerCase(getDataTypeString(column.dataType))
|
||||||
: ''}
|
: ''}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
||||||
/**
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
|
||||||
* this work for additional information regarding copyright ownership.
|
|
||||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
* (the "License"); you may not use this file except in compliance with
|
|
||||||
* the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
Loading…
x
Reference in New Issue
Block a user