fix the tags not showing in database update tags (#12547)

This commit is contained in:
Ashish Gupta 2023-07-24 11:12:11 +05:30 committed by GitHub
parent 94166aeb84
commit a38b297ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 2 deletions

View File

@ -691,6 +691,7 @@ const DatabaseDetails: FunctionComponent = () => {
entityType={EntityType.DATABASE}
fqn={database?.fullyQualifiedName ?? ''}
onFeedUpdate={getEntityFeedCount}
onUpdateEntityDetails={getDetailsByFQN}
/>
</ActivityFeedProvider>
),

View File

@ -672,7 +672,7 @@ const ServiceDetailsPage: FunctionComponent = () => {
setServiceDetails(response);
} catch (err) {
// Error
showErrorToast(err as AxiosError);
}
},
[serviceDetails, serviceCategory]

View File

@ -341,6 +341,7 @@ function ServiceMainTabContent({
entityType={entityType}
permission={editTagsPermission}
selectedTags={tags}
showTaskHandler={false}
tagType={TagSource.Classification}
onSelectionChange={handleTagSelection}
/>
@ -349,6 +350,7 @@ function ServiceMainTabContent({
entityType={entityType}
permission={editTagsPermission}
selectedTags={tags}
showTaskHandler={false}
tagType={TagSource.Glossary}
onSelectionChange={handleTagSelection}
/>

View File

@ -13,6 +13,7 @@
import { Container } from 'generated/entity/data/container';
import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel';
import { Database } from 'generated/entity/data/database';
import { DatabaseSchema } from 'generated/entity/data/databaseSchema';
import { Dashboard } from '../../generated/entity/data/dashboard';
import { Mlmodel } from '../../generated/entity/data/mlmodel';
@ -27,6 +28,7 @@ export type EntityData =
| Pipeline
| Mlmodel
| Container
| Database
| DatabaseSchema
| DashboardDataModel;

View File

@ -0,0 +1,16 @@
/*
* Copyright 2023 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 { TabSpecificField } from 'enums/entity.enum';
export const DatabaseFields = `${TabSpecificField.TAGS}, ${TabSpecificField.OWNER}`;

View File

@ -31,7 +31,10 @@ import {
TaskActionMode,
} from 'pages/TasksPage/TasksPage.interface';
import { getDashboardByFqn } from 'rest/dashboardAPI';
import { getDatabaseSchemaDetailsByFQN } from 'rest/databaseAPI';
import {
getDatabaseDetailsByFQN,
getDatabaseSchemaDetailsByFQN,
} from 'rest/databaseAPI';
import { getDataModelDetailsByFQN } from 'rest/dataModelsAPI';
import { getUserSuggestions } from 'rest/miscAPI';
import { getMlModelByFQN } from 'rest/mlModelAPI';
@ -62,6 +65,7 @@ import {
defaultFields as DashboardFields,
fetchCharts,
} from './DashboardDetailsUtils';
import { DatabaseFields } from './Database/DatabaseDetails.utils';
import { defaultFields as DatabaseSchemaFields } from './DatabaseSchemaDetailsUtils';
import { defaultFields as DataModelFields } from './DataModelsUtils';
import { defaultFields as TableFields } from './DatasetDetailsUtils';
@ -407,6 +411,15 @@ export const fetchEntityDetail = (
break;
case EntityType.DATABASE:
getDatabaseDetailsByFQN(entityFQN, DatabaseFields)
.then((res) => {
setEntityData(res);
})
.catch((err: AxiosError) => showErrorToast(err));
break;
case EntityType.DATABASE_SCHEMA:
getDatabaseSchemaDetailsByFQN(entityFQN, DatabaseSchemaFields)
.then((res) => {