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 Nov 7, 2023
2 parents 464cac2 + 34aa08b commit ba809ac
Show file tree
Hide file tree
Showing 71 changed files with 5,853 additions and 5,003 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-ingestion-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
name: Build and Push Docker Image to Docker Hub
runs-on: ubuntu-latest
needs: setup
if: ${{ needs.setup.outputs.publish == 'true' }}
steps:
- name: Check out the repo
uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions datahub-web-react/src/app/entity/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useEntityRegistry } from '../useEntityRegistry';
import analytics, { EventType } from '../analytics';
import { decodeUrn } from './shared/utils';
import { useGetGrantedPrivilegesQuery } from '../../graphql/policy.generated';
import { Message } from '../shared/Message';
import { UnauthorizedPage } from '../authorization/UnauthorizedPage';
import { ErrorSection } from '../shared/error/ErrorSection';
import { VIEW_ENTITY_PAGE } from './shared/constants';
Expand All @@ -34,7 +33,7 @@ export const EntityPage = ({ entityType }: Props) => {
const isLineageSupported = entity.isLineageEnabled();
const isLineageMode = useIsLineageMode();
const authenticatedUserUrn = useUserContext()?.user?.urn;
const { loading, error, data } = useGetGrantedPrivilegesQuery({
const { error, data } = useGetGrantedPrivilegesQuery({
variables: {
input: {
actorUrn: authenticatedUserUrn as string,
Expand Down Expand Up @@ -71,7 +70,6 @@ export const EntityPage = ({ entityType }: Props) => {

return (
<>
{loading && <Message type="loading" content="Loading..." style={{ marginTop: '10%' }} />}
{error && <ErrorSection />}
{data && !canViewEntityPage && <UnauthorizedPage />}
{canViewEntityPage &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import ExpandingStat from '../../dataset/shared/ExpandingStat';

const StatText = styled.span`
color: ${ANTD_GRAY[8]};
@media (min-width: 1024px) {
width: 100%;
white-space: nowrap;
`;

const HelpIcon = styled(QuestionCircleOutlined)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import ExpandingStat from './ExpandingStat';

const StatText = styled.span<{ color: string }>`
color: ${(props) => props.color};
@media (min-width: 1160px) {
width: 100%;
white-space: nowrap;
`;

const PopoverContent = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React, { ReactNode, useEffect, useRef, useState } from 'react';
import styled from 'styled-components';

const ExpandingStatContainer = styled.span<{ disabled: boolean; expanded: boolean; width: string }>`
overflow: hidden;
white-space: nowrap;
width: ${(props) => props.width};
max-width: 100%;
transition: width 250ms ease;
`;

Expand All @@ -13,6 +11,7 @@ const ExpandingStat = ({
render,
}: {
disabled?: boolean;

render: (isExpanded: boolean) => ReactNode;
}) => {
const contentRef = useRef<HTMLSpanElement>(null);
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/src/app/entity/group/GroupProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import NonExistentEntityPage from '../shared/entity/NonExistentEntityPage';
const messageStyle = { marginTop: '10%' };

export enum TabType {
Assets = 'Assets',
Assets = 'Owner Of',
Members = 'Members',
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { MutationHookOptions, MutationTuple, QueryHookOptions, QueryResult } fro
import styled from 'styled-components/macro';
import { useHistory } from 'react-router';
import { EntityType, Exact } from '../../../../../types.generated';
import { Message } from '../../../../shared/Message';
import {
getEntityPath,
getOnboardingStepIdsForEntityType,
Expand Down Expand Up @@ -274,7 +273,6 @@ export const EntityProfile = <T, U>({
}}
>
<>
{loading && <Message type="loading" content="Loading..." style={{ marginTop: '10%' }} />}
{(error && <ErrorSection />) ||
(!loading && (
<CompactProfile>
Expand Down Expand Up @@ -323,7 +321,6 @@ export const EntityProfile = <T, U>({
banner
/>
)}
{loading && <Message type="loading" content="Loading..." style={{ marginTop: '10%' }} />}
{(error && <ErrorSection />) || (
<ContentContainer>
{isLineageMode ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import ShareButton from '../../../../../shared/share/ShareButton';
import { capitalizeFirstLetterOnly } from '../../../../../shared/textUtil';
import { useUserContext } from '../../../../../context/useUserContext';
import { useEntityRegistry } from '../../../../../useEntityRegistry';
import EntityHeaderLoadingSection from './EntityHeaderLoadingSection';

const TitleWrapper = styled.div`
display: flex;
Expand Down Expand Up @@ -81,7 +82,7 @@ type Props = {
};

export const EntityHeader = ({ headerDropdownItems, headerActionItems, isNameEditable, subHeader }: Props) => {
const { urn, entityType, entityData } = useEntityData();
const { urn, entityType, entityData, loading } = useEntityData();
const refetch = useRefetch();
const me = useUserContext();
const platformName = getPlatformName(entityData);
Expand All @@ -99,25 +100,32 @@ export const EntityHeader = ({ headerDropdownItems, headerActionItems, isNameEdi
<>
<HeaderContainer data-testid="entity-header-test-id">
<MainHeaderContent>
<PlatformContent />
<TitleWrapper>
<EntityName isNameEditable={canEditName} />
{entityData?.deprecation?.deprecated && (
<DeprecationPill
urn={urn}
deprecation={entityData?.deprecation}
showUndeprecate
refetch={refetch}
/>
)}
{entityData?.health && (
<EntityHealth
health={entityData.health}
baseUrl={entityRegistry.getEntityUrl(entityType, urn)}
{(loading && <EntityHeaderLoadingSection />) || (
<>
<PlatformContent />
<TitleWrapper>
<EntityName isNameEditable={canEditName} />
{entityData?.deprecation?.deprecated && (
<DeprecationPill
urn={urn}
deprecation={entityData?.deprecation}
showUndeprecate
refetch={refetch}
/>
)}
{entityData?.health && (
<EntityHealth
health={entityData.health}
baseUrl={entityRegistry.getEntityUrl(entityType, urn)}
/>
)}
</TitleWrapper>
<EntityCount
entityCount={entityCount}
displayAssetsText={entityType === EntityType.DataProduct}
/>
)}
</TitleWrapper>
<EntityCount entityCount={entityCount} displayAssetsText={entityType === EntityType.DataProduct} />
</>
)}
</MainHeaderContent>
<SideHeaderContent>
<TopButtonsWrapper>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import * as React from 'react';
import { Skeleton, Space } from 'antd';
import styled from 'styled-components';
import { ANTD_GRAY } from '../../../constants';

const ContextSkeleton = styled(Skeleton.Input)`
&& {
width: 320px;
border-radius: 4px;
background-color: ${ANTD_GRAY[3]};
}
`;

const NameSkeleton = styled(Skeleton.Input)`
&& {
width: 240px;
border-radius: 4px;
background-color: ${ANTD_GRAY[3]};
}
`;

export default function EntityHeaderLoadingSection() {
return (
<Space direction="vertical">
<ContextSkeleton active size="small" />
<NameSkeleton active size="default" />
</Space>
);
}
2 changes: 1 addition & 1 deletion datahub-web-react/src/app/entity/user/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface Props {
}

export enum TabType {
Assets = 'Assets',
Assets = 'Owner Of',
Groups = 'Groups',
}
const ENABLED_TAB_TYPES = [TabType.Assets, TabType.Groups];
Expand Down
7 changes: 2 additions & 5 deletions datahub-web-react/src/app/lineage/LineageExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useHistory } from 'react-router';
import { Button, Drawer } from 'antd';
import { InfoCircleOutlined } from '@ant-design/icons';
import styled from 'styled-components';
import { Message } from '../shared/Message';
import { useEntityRegistry } from '../useEntityRegistry';
import CompactContext from '../shared/CompactContext';
import { EntityAndType, EntitySelectParams, FetchedEntities } from './types';
Expand All @@ -18,12 +17,10 @@ import { ErrorSection } from '../shared/error/ErrorSection';
import usePrevious from '../shared/usePrevious';
import { useGetLineageTimeParams } from './utils/useGetLineageTimeParams';
import analytics, { EventType } from '../analytics';
import LineageLoadingSection from './LineageLoadingSection';

const DEFAULT_DISTANCE_FROM_TOP = 106;

const LoadingMessage = styled(Message)`
margin-top: 10%;
`;
const FooterButtonGroup = styled.div`
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -167,7 +164,7 @@ export default function LineageExplorer({ urn, type }: Props) {
return (
<>
{error && <ErrorSection />}
{loading && <LoadingMessage type="loading" content="Loading..." />}
{loading && <LineageLoadingSection />}
{!!data && (
<div>
<LineageViz
Expand Down
27 changes: 27 additions & 0 deletions datahub-web-react/src/app/lineage/LineageLoadingSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import * as React from 'react';
import styled from 'styled-components';
import { LoadingOutlined } from '@ant-design/icons';
import { ANTD_GRAY } from '../entity/shared/constants';

const Container = styled.div`
height: auto;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: rgb(250, 250, 250);
`;

const StyledLoading = styled(LoadingOutlined)`
font-size: 36px;
color: ${ANTD_GRAY[7]};
padding-bottom: 18px;
]`;

export default function LineageLoadingSection() {
return (
<Container>
<StyledLoading />
</Container>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const LineageGraphOnboardingConfig: OnboardingStep[] = [
<a
target="_blank"
rel="noreferrer noopener"
href="https://datahubproject.io/docs/lineage/lineage-feature-guide/"
href="https://datahubproject.io/docs/generated/lineage/lineage-feature-guide/"
>
here.
</a>
Expand Down
31 changes: 14 additions & 17 deletions datahub-web-react/src/app/shared/admin/HeaderLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export function HeaderLinks(props: Props) {
const showSettings = true;
const showIngestion =
isIngestionEnabled && me && me.platformPrivileges?.manageIngestion && me.platformPrivileges?.manageSecrets;
const showDomains = me?.platformPrivileges?.createDomains || me?.platformPrivileges?.manageDomains;

useUpdateEducationStepIdsAllowlist(!!showIngestion, HOME_PAGE_INGESTION_ID);

Expand Down Expand Up @@ -106,22 +105,20 @@ export function HeaderLinks(props: Props) {
<NavTitleDescription>View and modify your data dictionary</NavTitleDescription>
</Link>
</MenuItem>
{showDomains && (
<MenuItem key="1">
<Link to="/domains">
<NavTitleContainer>
<DomainIcon
style={{
fontSize: 14,
fontWeight: 'bold',
}}
/>
<NavTitleText>Domains</NavTitleText>
</NavTitleContainer>
<NavTitleDescription>Manage related groups of data assets</NavTitleDescription>
</Link>
</MenuItem>
)}
<MenuItem key="1">
<Link to="/domains">
<NavTitleContainer>
<DomainIcon
style={{
fontSize: 14,
fontWeight: 'bold',
}}
/>
<NavTitleText>Domains</NavTitleText>
</NavTitleContainer>
<NavTitleDescription>Manage related groups of data assets</NavTitleDescription>
</Link>
</MenuItem>
</Menu>
}
>
Expand Down
2 changes: 1 addition & 1 deletion docker/elasticsearch-setup/create-indices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function create_datahub_usage_event_aws_elasticsearch() {
if [ $USAGE_EVENT_STATUS -eq 200 ]; then
USAGE_EVENT_DEFINITION=$(curl "${CURL_ARGS[@]}" "$ELASTICSEARCH_URL/${PREFIX}datahub_usage_event")
# the definition is expected to contain "datahub_usage_event-000001" string
if [[ $USAGE_EVENT_DEFINITION != *"datahub_usage_event-$INDEX_SUFFIX"* ]]; then
if [[ $USAGE_EVENT_DEFINITION != *"datahub_usage_event-"* ]]; then
# ... if it doesn't, we need to drop it
echo -e "\n>>> deleting invalid datahub_usage_event ..."
curl "${CURL_ARGS[@]}" -XDELETE "$ELASTICSEARCH_URL/${PREFIX}datahub_usage_event"
Expand Down
4 changes: 2 additions & 2 deletions docker/mysql-setup/init.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- create datahub database
CREATE DATABASE IF NOT EXISTS DATAHUB_DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE DATAHUB_DB_NAME;
CREATE DATABASE IF NOT EXISTS `DATAHUB_DB_NAME` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE `DATAHUB_DB_NAME`;

-- create metadata aspect table
create table if not exists metadata_aspect_v2 (
Expand Down
16 changes: 7 additions & 9 deletions docs-website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,8 @@ module.exports = {
{
"Frontend Authentication": [
"docs/authentication/guides/jaas",
{
"OIDC Authentication": [
"docs/authentication/guides/sso/configure-oidc-react",
"docs/authentication/guides/sso/configure-oidc-react-google",
"docs/authentication/guides/sso/configure-oidc-react-okta",
"docs/authentication/guides/sso/configure-oidc-react-azure",
"docs/authentication/guides/sso/configure-oidc-behind-proxy",
],
},
"docs/authentication/guides/sso/configure-oidc-react",
"docs/authentication/guides/sso/configure-oidc-behind-proxy",
],
},
"docs/authentication/introducing-metadata-service-authentication",
Expand Down Expand Up @@ -625,6 +618,11 @@ module.exports = {
type: "doc",
id: "docs/managed-datahub/chrome-extension",
},
{
type: "doc",
id: "docs/managed-datahub/subscription-and-notification",
className: "saasOnly",
},
{
"Managed DataHub Release History": [
"docs/managed-datahub/release-notes/v_0_2_12",
Expand Down
Loading

0 comments on commit ba809ac

Please sign in to comment.