-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supported class base tab in databaseSchema
- Loading branch information
1 parent
df48ebd
commit 4c75d5a
Showing
6 changed files
with
324 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
openmetadata-ui/src/main/resources/ui/src/utils/DatabaseSchemaClassBase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright 2024 Collate. | ||
* Licensed 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. | ||
*/ | ||
import { TabsProps } from 'antd'; | ||
import { EntityTags, PagingResponse } from 'Models'; | ||
import { PagingHandlerParams } from '../components/common/NextPrevious/NextPrevious.interface'; | ||
import { EntityTabs } from '../enums/entity.enum'; | ||
import { DatabaseSchema } from '../generated/entity/data/databaseSchema'; | ||
import { Table } from '../generated/entity/data/table'; | ||
import { ThreadType } from '../generated/entity/feed/thread'; | ||
import { FeedCounts } from '../interface/feed.interface'; | ||
import { getDataBaseSchemaPageBaseTabs } from './DatabaseSchemaDetailsUtils'; | ||
|
||
export interface DatabaseSchemaPageTabProps { | ||
feedCount: FeedCounts; | ||
tableData: PagingResponse<Table[]>; | ||
activeTab: EntityTabs; | ||
currentTablesPage: number; | ||
databaseSchema: DatabaseSchema; | ||
description: string; | ||
editDescriptionPermission: boolean; | ||
isEdit: boolean; | ||
showDeletedTables: boolean; | ||
tableDataLoading: boolean; | ||
editCustomAttributePermission: boolean; | ||
editTagsPermission: boolean; | ||
decodedDatabaseSchemaFQN: string; | ||
tags: any[]; | ||
viewAllPermission: boolean; | ||
storedProcedureCount: number; | ||
handleExtensionUpdate: (schema: DatabaseSchema) => Promise<void>; | ||
handleTagSelection: (selectedTags: EntityTags[]) => Promise<void>; | ||
onThreadLinkSelect: (link: string, threadType?: ThreadType) => void; | ||
tablePaginationHandler: ({ | ||
cursorType, | ||
currentPage, | ||
}: PagingHandlerParams) => void; | ||
onEditCancel: () => void; | ||
onDescriptionEdit: () => void; | ||
onDescriptionUpdate: (updatedHTML: string) => Promise<void>; | ||
handleShowDeletedTables: (value: boolean) => void; | ||
getEntityFeedCount: () => void; | ||
fetchDatabaseSchemaDetails: () => Promise<void>; | ||
handleFeedCount: (data: FeedCounts) => void; | ||
} | ||
|
||
class DatabaseSchemaClassBase { | ||
public getDatabaseSchemaPageTabs( | ||
databaseSchemaTabData: DatabaseSchemaPageTabProps | ||
): TabsProps['items'] { | ||
return getDataBaseSchemaPageBaseTabs(databaseSchemaTabData); | ||
} | ||
} | ||
|
||
const databaseSchemaClassBase = new DatabaseSchemaClassBase(); | ||
|
||
export default databaseSchemaClassBase; | ||
export { DatabaseSchemaClassBase }; |
17 changes: 0 additions & 17 deletions
17
openmetadata-ui/src/main/resources/ui/src/utils/DatabaseSchemaDetailsUtils.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.