Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend): Pushing internal consolidation of modules to open source #1835

Merged
merged 1 commit into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions datahub-web/@datahub/data-models/addon/entity/base-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
removeFollowForEntity
} from '@datahub/data-models/api/common/social-actions';
import { DataModelName } from '@datahub/data-models/constants/entity';
import { getDefaultIfNotFoundError } from '@datahub/utils/api/error';
import { isArray } from '@ember/array';
import { noop } from 'lodash';

Expand Down Expand Up @@ -515,7 +516,9 @@ export abstract class BaseEntity<T extends {} | IBaseEntity> {
*/
async readLikes(): Promise<void> {
if (this.allowedSocialActions.like) {
const likeActions = await readLikesForEntity(this.displayName as DataModelName, this.urn).catch(() => []);
const likeActions = await readLikesForEntity(this.displayName as DataModelName, this.urn).catch(
getDefaultIfNotFoundError([])
);
set(this, 'likedByActions', likeActions || []);
}
}
Expand Down Expand Up @@ -553,7 +556,9 @@ export abstract class BaseEntity<T extends {} | IBaseEntity> {
*/
async readFollows(): Promise<void> {
if (this.allowedSocialActions.follow) {
const followActions = await readFollowsForEntity(this.displayName as DataModelName, this.urn).catch(() => []);
const followActions = await readFollowsForEntity(this.displayName as DataModelName, this.urn).catch(
getDefaultIfNotFoundError([])
);

set(this, 'followedByActions', followActions || []);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ export class DatasetEntity extends BaseEntity<Com.Linkedin.Dataset.Dataset> {
return platformName as DatasetPlatform | undefined;
}

/**
* Platform native type, for example it can be TABLE or VIEW for Hive.
*/
@reads('entity.platformNativeType')
platformNativeType?: Com.Linkedin.Dataset.Dataset['platformNativeType'];

/**
* Reference to the data entity's native name, should not be something that is editable but gives us a
* more human readable form for the dataset vs the urn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const fields: Array<ISearchEntityRenderProps> = [
example: 'Public, Private, Deprecated, Public_Production',
minAutocompleteFetchLength: 0,
tagComponent: {
name: 'custom-search-result-property-component/tag',
name: 'search/custom-search-result-property-component/tag',
options: {
state: 'neutral-inverse',
titleize: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const getRenderProps = (): IEntityRenderProps & { entityPage: IEntityRend
desc: '',
example: '',
tagComponent: {
name: 'custom-search-result-property-component/tag',
name: 'search/custom-search-result-property-component/tag',
options: {
state: 'alert',
text: 'Inactive'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Interface for component that renders a formatted date
*/
export interface ICustomSearchResultPropertyComponentDate {
name: 'custom-search-result-property-component/date';
name: 'search/custom-search-result-property-component/date';
options: {
// moment format
format: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Interface for component that renders an icon
*/
export interface ICustomSearchResultPropertyComponentIcon {
name: 'custom-search-result-property-component/icon';
name: 'search/custom-search-result-property-component/icon';
options: {
// Name of the icon
iconName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Interface for component that renders an external link
*/
export interface ICustomSearchResultPropertyComponentLink {
name: 'custom-search-result-property-component/link';
name: 'search/custom-search-result-property-component/link';
options: {
/**
* property from entity that will return a ILink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Interface for component that renders a tag
*/
export interface ICustomSearchResultPropertyComponentTag {
name: 'custom-search-result-property-component/tag';
name: 'search/custom-search-result-property-component/tag';
options: {
// should be type PillState but it is not exposed in nacho-ui
state: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { task } from 'ember-concurrency';
import { ETaskPromise } from '@datahub/utils/types/concurrency';
import DataModelsService from '@datahub/data-models/services/data-models';
import { isNotFoundApiError } from '@datahub/utils/api/shared';
import Search from '@datahub/search/services/search';
import Search from '@datahub/shared/services/search';
import { ISearchEntityRenderProps } from '@datahub/data-models/types/search/search-entity-render-prop';
import { IAppConfig, IConfigurator } from '@datahub/shared/types/configurator/configurator';
import { TabProperties, DatasetTab } from '@datahub/data-models/constants/entity/dataset/tabs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import 'compliance-annotations/all';
@import 'export-policy/all';
@import 'purge-policy/all';
@import 'dataset-groups/all';
1 change: 0 additions & 1 deletion datahub-web/@datahub/datasets-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"dependencies": {
"@datahub/data-models": "0.0.0",
"@datahub/metadata-types": "0.0.0",
"@datahub/search": "0.0.0",
"@datahub/utils": "0.0.0",
"@fortawesome/ember-fontawesome": "^0.1.13",
"@fortawesome/free-regular-svg-icons": "^5.9.0",
Expand Down
4 changes: 0 additions & 4 deletions datahub-web/@datahub/datasets-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"@datahub/data-models/*": ["../../@datahub/data-models/addon/*"],
"@datahub/data-models/tests": ["../../@datahub/data-models/tests/*"],
"@datahub/data-models/tests/*": ["../../@datahub/data-models/tests/*"],
"@datahub/search": ["../../@datahub/search/addon"],
"@datahub/search/*": ["../../@datahub/search/addon/*"],
"@datahub/shared": ["../../@datahub/shared/addon"],
"@datahub/shared/*": ["../../@datahub/shared/addon/*"],
"@datahub/metadata-types": ["../../@datahub/metadata-types/addon"],
Expand All @@ -42,8 +40,6 @@
"../../@datahub/data-models/addon/**/*",
"../../@datahub/data-models/types/**/*",
"../../@datahub/data-models/tests/**/*",
"../../@datahub/search/addon/**/*",
"../../@datahub/search/types/**/*",
"../../@datahub/shared/addon/**/*",
"../../@datahub/shared/types/**/*",
"../../@datahub/shared/tests/**/*",
Expand Down
20 changes: 0 additions & 20 deletions datahub-web/@datahub/institutional-memory/.editorconfig

This file was deleted.

4 changes: 0 additions & 4 deletions datahub-web/@datahub/institutional-memory/.ember-cli

This file was deleted.

25 changes: 0 additions & 25 deletions datahub-web/@datahub/institutional-memory/.gitignore

This file was deleted.

32 changes: 0 additions & 32 deletions datahub-web/@datahub/institutional-memory/.npmignore

This file was deleted.

67 changes: 0 additions & 67 deletions datahub-web/@datahub/institutional-memory/.travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions datahub-web/@datahub/institutional-memory/.watchmanconfig

This file was deleted.

26 changes: 0 additions & 26 deletions datahub-web/@datahub/institutional-memory/CONTRIBUTING.md

This file was deleted.

13 changes: 0 additions & 13 deletions datahub-web/@datahub/institutional-memory/LICENSE.md

This file was deleted.

29 changes: 0 additions & 29 deletions datahub-web/@datahub/institutional-memory/README.md

This file was deleted.

Empty file.
Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading