mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-06 04:26:57 +00:00
This commit is contained in:
parent
451b96e15e
commit
91ea0110f6
@ -381,7 +381,7 @@ const Entitylineage: FunctionComponent<{ entityLineage: EntityLineage }> = ({
|
||||
</ReactFlow>
|
||||
</ReactFlowProvider>
|
||||
) : (
|
||||
<div className="tw-flex tw-justify-center tw-font-medium tw-items-center tw-border tw-border-main tw-rounded-md tw-p-8">
|
||||
<div className="tw-mt-4 tw-ml-4 tw-flex tw-justify-center tw-font-medium tw-items-center tw-border tw-border-main tw-rounded-md tw-p-8">
|
||||
No Lineage data available
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -235,7 +235,7 @@ const ManageTab: FunctionComponent<Props> = ({
|
||||
showSearchBar
|
||||
dropDownList={listOwners}
|
||||
groupType="tab"
|
||||
listGroups={['Users', 'Teams']}
|
||||
listGroups={['Teams', 'Users']}
|
||||
value={owner}
|
||||
onSelect={handleOwnerSelection}
|
||||
/>
|
||||
|
||||
@ -72,28 +72,30 @@ const TableProfiler = ({ tableProfiles, columns }: Props) => {
|
||||
<td
|
||||
className="tw-relative tableBody-cell"
|
||||
data-testid="tableBody-cell">
|
||||
<span
|
||||
className="tw-mr-2 tw-cursor-pointer"
|
||||
onClick={() =>
|
||||
setExpandedColumn((prevState) => ({
|
||||
name: col.name,
|
||||
isExpanded:
|
||||
prevState.name === col.name
|
||||
? !prevState.isExpanded
|
||||
: true,
|
||||
}))
|
||||
}>
|
||||
{expandedColumn.name === col.name ? (
|
||||
expandedColumn.isExpanded ? (
|
||||
<i className="fas fa-caret-down" />
|
||||
<p className="tw-flex">
|
||||
<span
|
||||
className="tw-mr-2 tw-cursor-pointer"
|
||||
onClick={() =>
|
||||
setExpandedColumn((prevState) => ({
|
||||
name: col.name,
|
||||
isExpanded:
|
||||
prevState.name === col.name
|
||||
? !prevState.isExpanded
|
||||
: true,
|
||||
}))
|
||||
}>
|
||||
{expandedColumn.name === col.name ? (
|
||||
expandedColumn.isExpanded ? (
|
||||
<i className="fas fa-caret-down" />
|
||||
) : (
|
||||
<i className="fas fa-caret-right" />
|
||||
)
|
||||
) : (
|
||||
<i className="fas fa-caret-right" />
|
||||
)
|
||||
) : (
|
||||
<i className="fas fa-caret-right" />
|
||||
)}
|
||||
</span>
|
||||
{col.name}
|
||||
)}
|
||||
</span>
|
||||
<span>{col.name}</span>
|
||||
</p>
|
||||
</td>
|
||||
<td
|
||||
className="tw-relative tableBody-cell profiler-graph"
|
||||
@ -196,7 +198,7 @@ const TableProfiler = ({ tableProfiles, columns }: Props) => {
|
||||
})}
|
||||
</table>
|
||||
) : (
|
||||
<div className="tw-flex tw-justify-center tw-font-medium tw-items-center tw-border tw-border-main tw-rounded-md tw-p-8">
|
||||
<div className="tw-mt-4 tw-ml-4 tw-flex tw-justify-center tw-font-medium tw-items-center tw-border tw-border-main tw-rounded-md tw-p-8">
|
||||
No profiler data available
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -34,7 +34,18 @@ const DropDownList: FunctionComponent<DropDownListProp> = ({
|
||||
const isMounted = useRef<boolean>(false);
|
||||
const [searchedList, setSearchedList] = useState(dropDownList);
|
||||
const [searchText, setSearchText] = useState(searchString);
|
||||
const [activeTab, setActiveTab] = useState<number>(1);
|
||||
|
||||
const setCurrentTabOnMount = () => {
|
||||
const selectedItem = dropDownList.find((l) => l.value === value);
|
||||
let index = 0;
|
||||
if (selectedItem) {
|
||||
index = listGroups.indexOf(selectedItem.group as string);
|
||||
}
|
||||
|
||||
return index >= 0 ? index + 1 : 1;
|
||||
};
|
||||
|
||||
const [activeTab, setActiveTab] = useState<number>(setCurrentTabOnMount());
|
||||
|
||||
const getTabClasses = (tab: number, activeTab: number) => {
|
||||
return 'tw-gh-tabs' + (activeTab === tab ? ' active' : '');
|
||||
@ -70,15 +81,6 @@ const DropDownList: FunctionComponent<DropDownListProp> = ({
|
||||
);
|
||||
};
|
||||
|
||||
const setCurrentTabOnMount = () => {
|
||||
const owner = dropDownList.find((l) => l.value === value);
|
||||
if (owner) {
|
||||
const index = listGroups.indexOf(owner.group as string);
|
||||
|
||||
setActiveTab(index >= 0 ? index + 1 : 1);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setSearchText(searchString);
|
||||
}, [searchString]);
|
||||
@ -108,8 +110,8 @@ const DropDownList: FunctionComponent<DropDownListProp> = ({
|
||||
}, [searchText]);
|
||||
|
||||
useEffect(() => {
|
||||
setActiveTab(setCurrentTabOnMount());
|
||||
isMounted.current = true;
|
||||
setCurrentTabOnMount();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user