Skip to content

Commit

Permalink
Merge branch 'main' into docs_prerequisites
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurinehate committed Nov 3, 2022
2 parents 5b3b6d5 + 0ca3383 commit 29a9d96
Show file tree
Hide file tree
Showing 19 changed files with 324 additions and 170 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Here are the companies that have officially adopted DataHub. Please feel free to
- [LinkedIn](http://linkedin.com)
- [Moloco](https://www.moloco.com/en)
- [Peloton](https://www.onepeloton.com)
- [Razer](https://www.razer.com)
- [Saxo Bank](https://www.home.saxo)
- [Stash](https://www.stash.com)
- [Shanghai HuaRui Bank](https://www.shrbank.com)
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@vx/shape": "^0.0.199",
"@vx/zoom": "^0.0.199",
"analytics": "^0.7.5",
"antd": "^4.16.0",
"antd": "4.17.4",
"apollo-link": "^1.2.14",
"apollo-link-error": "^1.1.13",
"apollo-link-http": "^1.5.17",
Expand Down
3 changes: 0 additions & 3 deletions datahub-web-react/src/app/entity/domain/DomainEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ export class DomainEntity implements Entity<Domain> {
},
{
component: SidebarOwnerSection,
properties: {
hideOwnerType: true,
},
},
]}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ class GlossaryNodeEntity implements Entity<GlossaryNode> {
},
{
component: SidebarOwnerSection,
properties: {
hideOwnerType: true,
},
},
]}
customNavBar={<GlossaryEntitiesPath />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const AddLinkModal = ({ buttonProps, refetch }: AddLinkProps) => {
},
{
type: 'url',
warningOnly: true,
message: 'This field must be a valid url.',
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ import { useEntityQueryParams } from '../../../containers/profile/utils';
import { EmbeddedListSearch } from './EmbeddedListSearch';
import { UnionType } from '../../../../../search/utils/constants';

const FILTER = 'filter';

function getParamsWithoutFilters(params: QueryString.ParsedQuery<string>) {
const paramsCopy = { ...params };
Object.keys(paramsCopy).forEach((key) => {
if (key.startsWith(FILTER)) {
delete paramsCopy[key];
}
});
return paramsCopy;
}

type Props = {
emptySearchQuery?: string | null;
fixedFilter?: FacetFilterInput | null;
Expand Down Expand Up @@ -43,7 +55,8 @@ export const EmbeddedListSearchSection = ({
const entityQueryParams = useEntityQueryParams();

const params = QueryString.parse(location.search, { arrayFormat: 'comma' });
const baseParams = { ...params, ...entityQueryParams };
const paramsWithoutFilters = getParamsWithoutFilters(params);
const baseParams = { ...entityQueryParams, ...paramsWithoutFilters };
const query: string = params?.query as string;
const page: number = params.page && Number(params.page as string) > 0 ? Number(params.page as string) : 1;
const unionType: UnionType = Number(params.unionType as any as UnionType) || UnionType.AND;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ export const OWNERSHIP_DISPLAY_TYPES = [
{
type: OwnershipType.TechnicalOwner,
name: 'Technical Owner',
description: 'Involved in the production, maintenance, or distribution of the asset.',
description: 'Involved in the production, maintenance, or distribution of the asset(s).',
},
{
type: OwnershipType.BusinessOwner,
name: 'Business Owner',
description: 'Principle stakeholders or domain experts associated with the asset.',
description: 'Principle stakeholders or domain experts associated with the asset(s).',
},
{
type: OwnershipType.DataSteward,
name: 'Data Steward',
description: 'Involved in governance of the asset.',
description: 'Involved in governance of the asset(s).',
},
{
type: OwnershipType.None,
Expand Down
10 changes: 2 additions & 8 deletions datahub-web-react/src/app/settings/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ const addDays = (days: number) => {
return `The token will expire on ${result.toLocaleDateString()} at ${result.toLocaleTimeString()}.`;
};

const addMonths = (month: number) => {
const result = new Date();
result.setMonth(result.getMonth() + month);
return `The token will expire on ${result.toLocaleDateString()} at ${result.toLocaleTimeString()}.`;
};

export const getTokenExpireDate = (duration: AccessTokenDuration) => {
switch (duration) {
case AccessTokenDuration.OneHour:
return addHours(1);
case AccessTokenDuration.OneDay:
return addDays(1);
case AccessTokenDuration.OneMonth:
return addMonths(1);
return addDays(30);
case AccessTokenDuration.ThreeMonths:
return addMonths(3);
return addDays(90);
case AccessTokenDuration.NoExpiry:
return 'This token will never expire.';
default:
Expand Down
4 changes: 2 additions & 2 deletions datahub-web-react/src/graphql/container.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ query getContainer($urn: String!) {
subTypes {
typeNames
}
entities(input: {}) {
...searchResults
entities(input: { start: 0, count: 1 }) {
total
}
container {
...entityContainer
Expand Down
3 changes: 0 additions & 3 deletions datahub-web-react/src/graphql/domain.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ query getDomain($urn: String!) {
}
}
}
entities(input: {}) {
...searchResults
}
}
}

Expand Down
Loading

0 comments on commit 29a9d96

Please sign in to comment.