Skip to content

Commit

Permalink
Merge branch 'datahub-project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Apr 4, 2024
2 parents bed014c + fa139a5 commit a379d35
Show file tree
Hide file tree
Showing 11 changed files with 681 additions and 28 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ project.ext.externalDependency = [
'springActuator': "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion",
'swaggerAnnotations': 'io.swagger.core.v3:swagger-annotations:2.2.15',
'swaggerCli': 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.46',
'swaggerCore': 'io.swagger.core.v3:swagger-core:2.2.7',
'springBootAutoconfigureJdk11': 'org.springframework.boot:spring-boot-autoconfigure:2.7.18',
'testng': 'org.testng:testng:7.8.0',
'testContainers': 'org.testcontainers:testcontainers:' + testContainersVersion,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Icon from '@ant-design/icons/lib/components/Icon';
import React from 'react';
import React, { useState } from 'react';
import Highlight from 'react-highlighter';
import { Typography } from 'antd';
import { Button, Typography } from 'antd';
import styled from 'styled-components';
import { ValueColumnData } from './types';
import { ANTD_GRAY } from '../../constants';
Expand Down Expand Up @@ -30,14 +30,27 @@ const IconWrapper = styled.span`
margin-right: 4px;
`;

const StyledButton = styled(Button)`
margin-top: 2px;
`;

interface Props {
value: ValueColumnData;
isRichText?: boolean;
filterText?: string;
}

const MAX_CHARACTERS = 200;

export default function StructuredPropertyValue({ value, isRichText, filterText }: Props) {
const entityRegistry = useEntityRegistry();
const [showMore, setShowMore] = useState(false);

const toggleShowMore = () => {
setShowMore(!showMore);
};

const valueAsString = value?.value?.toString() ?? '';

return (
<ValueText>
Expand All @@ -60,7 +73,16 @@ export default function StructuredPropertyValue({ value, isRichText, filterText
{isRichText ? (
<MarkdownViewer source={value.value as string} />
) : (
<Highlight search={filterText}>{value.value?.toString()}</Highlight>
<>
<Highlight search={filterText}>
{showMore ? valueAsString : valueAsString?.substring(0, MAX_CHARACTERS)}
</Highlight>
{valueAsString?.length > MAX_CHARACTERS && (
<StyledButton type="link" onClick={toggleShowMore}>
{showMore ? 'Show less' : 'Show more'}
</StyledButton>
)}
</>
)}
</>
)}
Expand Down
1 change: 1 addition & 0 deletions docs-website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ module.exports = {
},
{
"Managed DataHub Release History": [
"docs/managed-datahub/release-notes/v_0_3_1",
"docs/managed-datahub/release-notes/v_0_2_16",
"docs/managed-datahub/release-notes/v_0_2_15",
"docs/managed-datahub/release-notes/v_0_2_14",
Expand Down
16 changes: 16 additions & 0 deletions docs/managed-datahub/release-notes/v_0_3_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# v0.3.1
---

Release Availability Date
---
8-Apr-2024

Recommended CLI/SDK
---
- `v0.13.1.2` with release notes at https://github.com/acryldata/datahub/releases/tag/v0.13.1.2

If you are using an older CLI/SDK version then please upgrade it. This applies for all CLI/SDK usages, if you are using it through your terminal, github actions, airflow, in python SDK somewhere, Java SKD etc. This is a strong recommendation to upgrade as we keep on pushing fixes in the CLI and it helps us support you better.

## Release Changelog
---
- Since `v0.2.16` these changes from OSS DataHub https://github.com/datahub-project/datahub/compare/55bc955304c4c192c04a0393a47355a295f5770a...57de905c66b6992aefb2051708fa83898fa82cec have been pulled in.
6 changes: 6 additions & 0 deletions entity-registry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@ dependencies {
testAnnotationProcessor externalDependency.lombok
testImplementation externalDependency.classGraph

testImplementation externalDependency.swaggerCore
testImplementation spec.product.pegasus.dataAvro
testImplementation('io.acryl:json-schema-avro:0.2.2') {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}

}
compileTestJava.dependsOn tasks.getByPath(':entity-registry:custom-test-model:modelDeploy')
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ public MergedEntityRegistry apply(EntityRegistry patchEntityRegistry)
validationResult.validationFailures.stream().collect(Collectors.joining("\n"))));
}

// Merge Aspect Specs
// (Fixed issue where custom defined aspects are not included in the API specification.)
//
if (!patchEntityRegistry.getAspectSpecs().isEmpty()) {
_aspectNameToSpec.putAll(patchEntityRegistry.getAspectSpecs());
}

// Merge Entity Specs
for (Map.Entry<String, EntitySpec> e2Entry : patchEntityRegistry.getEntitySpecs().entrySet()) {
if (entityNameToSpec.containsKey(e2Entry.getKey())) {
Expand Down
Loading

0 comments on commit a379d35

Please sign in to comment.