Chore: Service Insights live update improvements and bug fixes (#22772)

* Update the common props for ServiceInsights tabs

* Fix unit test

(cherry picked from commit 04ab3b29fe7a02b0ff02eac42ad97a1308fdd62a)
This commit is contained in:
Aniket Katkar 2025-08-07 13:29:18 +05:30 committed by OpenMetadata Release Bot
parent 2813039768
commit faa7dc6e44
5 changed files with 27 additions and 2 deletions

View File

@ -42,7 +42,7 @@ export interface WorkflowStatesData {
subInstanceStates: WorkflowInstanceState[];
}
export interface ServiceInsightWidgetCommonProps {
serviceName: string;
serviceDetails: ServicesType;
workflowStatesData?: WorkflowStatesData;
}
export interface ChartsResults {

View File

@ -353,7 +353,7 @@ const ServiceInsightsTab = ({
<Widget
chartsData={getChartsDataFromWidgetName(name, chartsResults)}
isLoading={isLoading}
serviceName={serviceName}
serviceDetails={serviceDetails}
workflowStatesData={workflowStatesData}
/>
</Col>

View File

@ -74,6 +74,8 @@ export enum EntityFields {
SERVICE_NAME = 'service.name.keyword',
SUGGESTED_DESCRIPTION = 'descriptionSources.Suggested',
TAGS_LABEL_TYPE = 'tags.labelType',
TIER_LABEL_TYPE = 'tier.labelType',
CREATED_BY = 'createdBy',
}
export const EntitySourceFields: Partial<Record<EntityFields, string[]>> = {

View File

@ -50,6 +50,8 @@ describe('AdvancedSearchClassBase', () => {
'entityType',
'descriptionSources.Suggested',
'tags.labelType',
'tier.labelType',
'createdBy',
]);
});
});

View File

@ -802,6 +802,27 @@ class AdvancedSearchClassBase {
listValues: TAG_LABEL_TYPE_LIST_VALUES,
},
},
[EntityFields.TIER_LABEL_TYPE]: {
label: t('label.tier-label-type'),
type: 'select',
mainWidgetProps: this.mainWidgetProps,
valueSources: ['value'],
fieldSettings: {
listValues: TAG_LABEL_TYPE_LIST_VALUES,
},
},
[EntityFields.CREATED_BY]: {
label: t('label.created-by'),
type: 'select',
mainWidgetProps: this.mainWidgetProps,
fieldSettings: {
asyncFetch: this.autocomplete({
searchIndex: [SearchIndex.USER],
entityField: EntityFields.DISPLAY_NAME_KEYWORD,
}),
useAsyncSearch: true,
},
},
};
}