Skip to content

Commit

Permalink
Merge branch 'linkedin:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 authored Feb 8, 2022
2 parents 5de3f56 + 306fe0b commit 9feb615
Show file tree
Hide file tree
Showing 14 changed files with 150 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void removeTermFromTarget(
}

removeTermIfExists(editableFieldInfo.getGlossaryTerms(), labelUrn);
persistAspect(targetUrn, GLOSSARY_TERM_ASPECT_NAME, editableSchemaMetadata, actor, entityService);
persistAspect(targetUrn, EDITABLE_SCHEMA_METADATA, editableSchemaMetadata, actor, entityService);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export class GlossaryTermEntity implements Entity<GlossaryTerm> {
entityType={EntityType.GlossaryTerm}
useEntityQuery={useGetGlossaryTermQuery as any}
tabs={[
{
name: 'Related Entities',
component: GlossaryRelatedEntity,
},
{
name: 'Schema',
component: SchemaTab,
Expand All @@ -73,10 +77,6 @@ export class GlossaryTermEntity implements Entity<GlossaryTerm> {
glossaryTerm?.glossaryTerm?.schemaMetadata !== null,
},
},
{
name: 'Related Entities',
component: GlossaryRelatedEntity,
},
{
name: 'Related Terms',
component: GlossayRelatedTerms,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ export default function useTagsAndTermsRenderer(
);

return (
<TagTermGroup
uneditableTags={options.showTags ? tags : null}
editableTags={options.showTags ? relevantEditableFieldInfo?.globalTags : null}
uneditableGlossaryTerms={options.showTerms ? record.glossaryTerms : null}
editableGlossaryTerms={options.showTerms ? relevantEditableFieldInfo?.glossaryTerms : null}
canRemove
buttonProps={{ size: 'small' }}
canAddTag={tagHoveredIndex === `${record.fieldPath}-${rowIndex}` && options.showTags}
canAddTerm={tagHoveredIndex === `${record.fieldPath}-${rowIndex}` && options.showTerms}
onOpenModal={() => setTagHoveredIndex(undefined)}
entityUrn={urn}
entityType={EntityType.Dataset}
entitySubresource={record.fieldPath}
refetch={refetch}
/>
<div data-testid={`schema-field-${record.fieldPath}-${options.showTags ? 'tags' : 'terms'}`}>
<TagTermGroup
uneditableTags={options.showTags ? tags : null}
editableTags={options.showTags ? relevantEditableFieldInfo?.globalTags : null}
uneditableGlossaryTerms={options.showTerms ? record.glossaryTerms : null}
editableGlossaryTerms={options.showTerms ? relevantEditableFieldInfo?.glossaryTerms : null}
canRemove
buttonProps={{ size: 'small' }}
canAddTag={tagHoveredIndex === `${record.fieldPath}-${rowIndex}` && options.showTags}
canAddTerm={tagHoveredIndex === `${record.fieldPath}-${rowIndex}` && options.showTerms}
onOpenModal={() => setTagHoveredIndex(undefined)}
entityUrn={urn}
entityType={EntityType.Dataset}
entitySubresource={record.fieldPath}
refetch={refetch}
/>
</div>
);
};
return tagAndTermRender;
Expand Down
6 changes: 5 additions & 1 deletion datahub-web-react/src/app/shared/tags/AddTagTermModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ export default function AddTagTermModal({
<Button onClick={onClose} type="text">
Cancel
</Button>
<Button onClick={onOk} disabled={selectedValue.length === 0 || disableAdd}>
<Button
data-testid="add-tag-term-from-modal-btn"
onClick={onOk}
disabled={selectedValue.length === 0 || disableAdd}
>
Add
</Button>
</>
Expand Down
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/shared/tags/TagTermGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default function TagTermGroup({
{...buttonProps}
>
<PlusOutlined />
Add Tag
<span>Add Tag</span>
</NoElementButton>
)}
{canAddTerm &&
Expand All @@ -243,7 +243,7 @@ export default function TagTermGroup({
{...buttonProps}
>
<PlusOutlined />
Add Term
<span>Add Term</span>
</NoElementButton>
)}
{showAddModal && !!entityUrn && !!entityType && (
Expand Down
1 change: 1 addition & 0 deletions metadata-ingestion/source_docs/glue.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Note that a `.` is used to denote nested fields in the YAML recipe.
| `ignore_unsupported_connectors` | | `True` | Whether to ignore unsupported connectors. If disabled, an error will be raised. |
| `emit_s3_lineage` | | `True` | Whether to emit S3-to-Glue lineage. |
| `glue_s3_lineage_direction` | | `upstream` | If `upstream`, S3 is upstream to Glue. If `downstream` S3 is downstream to Glue. |
| `extract_owners` | | `True` | When enabled, extracts ownership from Glue directly and overwrites existing owners. When disabled, ownership is left empty for datasets. |

## Compatibility

Expand Down
Loading

0 comments on commit 9feb615

Please sign in to comment.