diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java index de77ff9444c6e..bb4c26d89f5ce 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java @@ -1034,6 +1034,7 @@ private void configureQueryResolvers(final RuntimeWiring.Builder builder) { .dataFetcher("assertion", getResolver(assertionType)) .dataFetcher("form", getResolver(formType)) .dataFetcher("view", getResolver(dataHubViewType)) + .dataFetcher("structuredProperty", getResolver(structuredPropertyType)) .dataFetcher("listPolicies", new ListPoliciesResolver(this.entityClient)) .dataFetcher("getGrantedPrivileges", new GetGrantedPrivilegesResolver()) .dataFetcher("listUsers", new ListUsersResolver(this.entityClient)) diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/CreateStructuredPropertyResolver.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/CreateStructuredPropertyResolver.java index 3be7ea505abbf..328f63b893d06 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/CreateStructuredPropertyResolver.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/CreateStructuredPropertyResolver.java @@ -83,6 +83,8 @@ public CompletableFuture get(final DataFetchingEnviron builder.setCardinality( PropertyCardinality.valueOf(input.getCardinality().toString())); } + builder.setCreated(context.getOperationContext().getAuditStamp()); + builder.setLastModified(context.getOperationContext().getAuditStamp()); MetadataChangeProposal mcp = builder.build(); _entityClient.ingestProposal(context.getOperationContext(), mcp, false); diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/UpdateStructuredPropertyResolver.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/UpdateStructuredPropertyResolver.java index 2549f303bacd9..c432281ec1684 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/UpdateStructuredPropertyResolver.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/structuredproperties/UpdateStructuredPropertyResolver.java @@ -76,6 +76,7 @@ public CompletableFuture get(final DataFetchingEnviron if (input.getNewEntityTypes() != null) { input.getNewEntityTypes().forEach(builder::addEntityType); } + builder.setLastModified(context.getOperationContext().getAuditStamp()); MetadataChangeProposal mcp = builder.build(); _entityClient.ingestProposal(context.getOperationContext(), mcp, false); diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/mappers/MapperUtils.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/mappers/MapperUtils.java index 0eb74210971d9..0d69e62c621a6 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/mappers/MapperUtils.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/mappers/MapperUtils.java @@ -3,15 +3,18 @@ import static com.linkedin.datahub.graphql.util.SearchInsightsUtil.*; import static com.linkedin.metadata.utils.SearchUtil.*; +import com.linkedin.common.AuditStamp; import com.linkedin.common.UrnArray; import com.linkedin.common.urn.Urn; import com.linkedin.data.template.StringMap; import com.linkedin.datahub.graphql.QueryContext; import com.linkedin.datahub.graphql.generated.AggregationMetadata; +import com.linkedin.datahub.graphql.generated.CorpUser; import com.linkedin.datahub.graphql.generated.EntityPath; import com.linkedin.datahub.graphql.generated.ExtraProperty; import com.linkedin.datahub.graphql.generated.FacetMetadata; import com.linkedin.datahub.graphql.generated.MatchedField; +import com.linkedin.datahub.graphql.generated.ResolvedAuditStamp; import com.linkedin.datahub.graphql.generated.SearchResult; import com.linkedin.datahub.graphql.generated.SearchSuggestion; import com.linkedin.datahub.graphql.types.common.mappers.UrnToEntityMapper; @@ -132,4 +135,13 @@ public static EntityPath mapPath(@Nullable final QueryContext context, UrnArray path.stream().map(p -> UrnToEntityMapper.map(context, p)).collect(Collectors.toList())); return entityPath; } + + public static ResolvedAuditStamp createResolvedAuditStamp(AuditStamp auditStamp) { + final ResolvedAuditStamp resolvedAuditStamp = new ResolvedAuditStamp(); + final CorpUser emptyCreatedUser = new CorpUser(); + emptyCreatedUser.setUrn(auditStamp.getActor().toString()); + resolvedAuditStamp.setActor(emptyCreatedUser); + resolvedAuditStamp.setTime(auditStamp.getTime()); + return resolvedAuditStamp; + } } diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/structuredproperty/StructuredPropertyMapper.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/structuredproperty/StructuredPropertyMapper.java index ff54131506a7c..cacb6958dc202 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/structuredproperty/StructuredPropertyMapper.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/structuredproperty/StructuredPropertyMapper.java @@ -17,6 +17,7 @@ import com.linkedin.datahub.graphql.generated.StructuredPropertyEntity; import com.linkedin.datahub.graphql.generated.TypeQualifier; import com.linkedin.datahub.graphql.types.common.mappers.util.MappingHelper; +import com.linkedin.datahub.graphql.types.mappers.MapperUtils; import com.linkedin.datahub.graphql.types.mappers.ModelMapper; import com.linkedin.entity.EntityResponse; import com.linkedin.entity.EnvelopedAspectMap; @@ -74,6 +75,13 @@ private void mapStructuredPropertyDefinition( if (gmsDefinition.hasTypeQualifier()) { definition.setTypeQualifier(mapTypeQualifier(gmsDefinition.getTypeQualifier())); } + if (gmsDefinition.getCreated() != null) { + definition.setCreated(MapperUtils.createResolvedAuditStamp(gmsDefinition.getCreated())); + } + if (gmsDefinition.getLastModified() != null) { + definition.setLastModified( + MapperUtils.createResolvedAuditStamp(gmsDefinition.getLastModified())); + } definition.setEntityTypes( gmsDefinition.getEntityTypes().stream() .map(this::createEntityTypeEntity) diff --git a/datahub-graphql-core/src/main/resources/entity.graphql b/datahub-graphql-core/src/main/resources/entity.graphql index 52e81f8094dea..a2e2fe9163f53 100644 --- a/datahub-graphql-core/src/main/resources/entity.graphql +++ b/datahub-graphql-core/src/main/resources/entity.graphql @@ -84,6 +84,11 @@ type Query { """ role(urn: String!): Role + """ + Fetch a Structured Property by primary key (urn) + """ + structuredProperty(urn: String!): StructuredPropertyEntity + """ Fetch a ERModelRelationship by primary key (urn) """ diff --git a/datahub-graphql-core/src/main/resources/properties.graphql b/datahub-graphql-core/src/main/resources/properties.graphql index dfe8468645681..6c1f910e02b0e 100644 --- a/datahub-graphql-core/src/main/resources/properties.graphql +++ b/datahub-graphql-core/src/main/resources/properties.graphql @@ -95,6 +95,16 @@ type StructuredPropertyDefinition { Whether or not this structured property is immutable """ immutable: Boolean! + + """ + Audit stamp for when this structured property was created + """ + created: ResolvedAuditStamp + + """ + Audit stamp for when this structured property was last modified + """ + lastModified: ResolvedAuditStamp } """ diff --git a/docs-website/src/pages/_components/CaseStudy/case-study.module.scss b/docs-website/src/pages/_components/CaseStudy/case-study.module.scss index a90788b9c2047..e17f1f74656dc 100644 --- a/docs-website/src/pages/_components/CaseStudy/case-study.module.scss +++ b/docs-website/src/pages/_components/CaseStudy/case-study.module.scss @@ -167,14 +167,14 @@ font-family: "Manrope"; div { - width: 70%; + width: 80%; margin: auto; font-size: 2rem; line-height: normal; font-weight: 400; } p { - width: 60%; + width: 80%; margin: auto; font-size: 1.1rem; line-height: 1.5rem; diff --git a/docs-website/src/pages/_components/Community/index.js b/docs-website/src/pages/_components/Community/index.js index 2ef6eba45092c..a4f2b2304e51e 100644 --- a/docs-website/src/pages/_components/Community/index.js +++ b/docs-website/src/pages/_components/Community/index.js @@ -74,8 +74,7 @@ const Community = () => {

- Q&A. Office Hours.  Monthly Town Hall.  Job - Postings. + Q&A.  Office Hours.  Think Tanks.  Job Postings.

Join Slack diff --git a/docs-website/src/pages/_components/Hero/hero.module.scss b/docs-website/src/pages/_components/Hero/hero.module.scss index 9e3fa5a1c516c..2484b259a32c2 100644 --- a/docs-website/src/pages/_components/Hero/hero.module.scss +++ b/docs-website/src/pages/_components/Hero/hero.module.scss @@ -83,7 +83,7 @@ margin-left: 4px; height: 1.8rem; padding-left: 2px; - padding-right: 8px; + padding-right: 6px; font-family: 'Manrope'; font-style: normal; font-weight: 400; @@ -213,6 +213,7 @@ font-size: .8rem; height: 1.2rem; padding-left: 0px; + padding-right: 4px; } } .hero__cta { diff --git a/docs-website/src/pages/_components/Hero/index.js b/docs-website/src/pages/_components/Hero/index.js index daae86c8094e7..2369c4668bfcd 100644 --- a/docs-website/src/pages/_components/Hero/index.js +++ b/docs-website/src/pages/_components/Hero/index.js @@ -24,7 +24,7 @@ import { animate, motion, useMotionValue, useTransform } from "framer-motion"; const SOLUTION_TEXTS = ["AI Governance", "Data Discovery", "AI Collaboration", "Data Governance", "Data Democratization", "Data Observability"]; -const Hero = ({}) => { +const Hero = ({ onOpenTourModal }) => { // const { colorMode } = useColorMode(); const textIndex = useMotionValue(0); const baseText = useTransform(textIndex, (latest) => SOLUTION_TEXTS[latest] || ""); @@ -71,12 +71,13 @@ const Hero = ({}) => { Book a Demo - Product Tour - + Get started with Core → diff --git a/docs-website/src/pages/_components/Trial/index.js b/docs-website/src/pages/_components/Trial/index.js index 5c0ac992d1366..0f707993c55b7 100644 --- a/docs-website/src/pages/_components/Trial/index.js +++ b/docs-website/src/pages/_components/Trial/index.js @@ -3,7 +3,7 @@ import styles from "./trial.module.scss"; import useBaseUrl from "@docusaurus/useBaseUrl"; import Link from "@docusaurus/Link"; -const Trial = () => { +const Trial = ({onOpenTourModal}) => { return (
@@ -15,7 +15,10 @@ const Trial = () => {

Book a Demo - Product Tour + Product Tour
Get started with Core →
diff --git a/docs-website/src/pages/_components/Trial/trial.module.scss b/docs-website/src/pages/_components/Trial/trial.module.scss index 64d92c9abe08c..f774bfffa3f7a 100644 --- a/docs-website/src/pages/_components/Trial/trial.module.scss +++ b/docs-website/src/pages/_components/Trial/trial.module.scss @@ -191,7 +191,7 @@ flex-direction: column; width: 90vw; min-width: 0; - margin: 2rem auto; + margin: 4rem auto; } .trial { flex-direction: column; diff --git a/docs-website/src/pages/cloud/UnifiedTabs/index.js b/docs-website/src/pages/cloud/UnifiedTabs/index.js index 7ae348885bca2..c0fbc25a8de6b 100644 --- a/docs-website/src/pages/cloud/UnifiedTabs/index.js +++ b/docs-website/src/pages/cloud/UnifiedTabs/index.js @@ -56,7 +56,7 @@ const TabbedComponent = () => { {activeTab === index && (
-
)} diff --git a/docs-website/src/pages/index.js b/docs-website/src/pages/index.js index f79875f423d47..d538831ca3dca 100644 --- a/docs-website/src/pages/index.js +++ b/docs-website/src/pages/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import Layout from "@theme/Layout"; import Link from "@docusaurus/Link"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; @@ -17,6 +17,7 @@ import Community from "./_components/Community"; import SocialMedia from "./_components/SocialMedia"; import CaseStudy from "./_components/CaseStudy"; import Trial from "./_components/Trial"; +import CloseButton from "@ant-design/icons/CloseCircleFilled"; const companyIndexes = require("../../adoptionStoriesIndexes.json"); const companies = companyIndexes.companies; @@ -33,12 +34,27 @@ function Home() { window.location.replace("/docs"); } + const [isTourModalVisible, setIsTourModalVisible] = useState(false); + const onOpenTourModal = () => { + setIsTourModalVisible(true); + }; + const onCloseTourModal = () => { + setIsTourModalVisible(false); + }; return !siteConfig.customFields.isSaas ? ( - + {isTourModalVisible ? ( +
+
+ +
+