mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-24 23:34:51 +00:00
Merge remote-tracking branch 'origin/1.9.10' into 1.9.10
This commit is contained in:
commit
45195b48ec
@ -116,6 +116,7 @@ export default forwardRef<
|
||||
className={classNames('w-full cursor-pointer hashtag-item', {
|
||||
'bg-grey-2': index === selectedIndex,
|
||||
})}
|
||||
data-testid={`hash-mention-${item.label}`}
|
||||
direction="vertical"
|
||||
id={`hashtag-item-${item.id}`}
|
||||
key={item.id}
|
||||
|
||||
@ -17,8 +17,8 @@ import tippy, { Instance, Props } from 'tippy.js';
|
||||
import { EntityType } from '../../../../enums/entity.enum';
|
||||
import { SearchIndex } from '../../../../enums/search.enum';
|
||||
import { searchData } from '../../../../rest/miscAPI';
|
||||
import { getEntityBreadcrumbs } from '../../../../utils/EntityUtils';
|
||||
import { buildMentionLink } from '../../../../utils/FeedUtils';
|
||||
import searchClassBase from '../../../../utils/SearchClassBase';
|
||||
import { ExtensionRef } from '../../BlockEditor.interface';
|
||||
import HashList from './HashList';
|
||||
|
||||
@ -45,7 +45,7 @@ export const hashtagSuggestion = () => ({
|
||||
hit._source.fullyQualifiedName ?? ''
|
||||
),
|
||||
type: hit._source.entityType,
|
||||
breadcrumbs: getEntityBreadcrumbs(
|
||||
breadcrumbs: searchClassBase.getEntityBreadcrumbs(
|
||||
hit._source,
|
||||
hit._source.entityType as EntityType,
|
||||
false
|
||||
|
||||
@ -206,13 +206,6 @@ const TeamDetailsV1 = ({
|
||||
navigate({ search: Qs.stringify({ activeTab: key }) });
|
||||
};
|
||||
|
||||
const { editUserPermission } = useMemo(() => {
|
||||
return {
|
||||
editUserPermission:
|
||||
entityPermissions.EditAll || entityPermissions.EditUsers,
|
||||
};
|
||||
}, [entityPermissions]);
|
||||
|
||||
/**
|
||||
* Take user id as input to find out the user data and set it for delete
|
||||
* @param id - user id
|
||||
@ -620,12 +613,12 @@ const TeamDetailsV1 = ({
|
||||
);
|
||||
|
||||
const teamsTableRender = useMemo(() => {
|
||||
let addUserButtonTitle = editUserPermission
|
||||
let addTeamButtonTitle = entityPermissions.Create
|
||||
? t('label.add-entity', { entity: t('label.team') })
|
||||
: t('message.no-permission-for-action');
|
||||
|
||||
if (isTeamDeleted) {
|
||||
addUserButtonTitle = t(
|
||||
addTeamButtonTitle = t(
|
||||
'message.this-action-is-not-allowed-for-deleted-entities'
|
||||
);
|
||||
}
|
||||
@ -651,11 +644,11 @@ const TeamDetailsV1 = ({
|
||||
}}
|
||||
/>
|
||||
</Typography.Paragraph>
|
||||
<Tooltip placement="top" title={addUserButtonTitle}>
|
||||
<Tooltip placement="top" title={addTeamButtonTitle}>
|
||||
<Button
|
||||
ghost
|
||||
data-testid="add-placeholder-button"
|
||||
disabled={!editUserPermission || isTeamDeleted}
|
||||
disabled={!entityPermissions.Create || isTeamDeleted}
|
||||
icon={<PlusOutlined />}
|
||||
type="primary"
|
||||
onClick={handleAddTeamButtonClick}>
|
||||
|
||||
@ -149,6 +149,10 @@ export const buildMentionLink = (entityType: string, entityFqn: string) => {
|
||||
const classificationFqn = Fqn.split(entityFqn);
|
||||
|
||||
return `${document.location.protocol}//${document.location.host}/tags/${classificationFqn[0]}`;
|
||||
} else if (entityType === EntityType.KNOWLEDGE_PAGE) {
|
||||
return `${document.location.protocol}//${
|
||||
document.location.host
|
||||
}/knowledge-center/${getEncodedFqn(entityFqn)}`;
|
||||
}
|
||||
|
||||
return `${document.location.protocol}//${
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user