diff --git a/datahub-web/@datahub/data-models/addon/entity/base-entity.ts b/datahub-web/@datahub/data-models/addon/entity/base-entity.ts index ba2b9b3438..8186db6dcb 100644 --- a/datahub-web/@datahub/data-models/addon/entity/base-entity.ts +++ b/datahub-web/@datahub/data-models/addon/entity/base-entity.ts @@ -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'; @@ -515,7 +516,9 @@ export abstract class BaseEntity { */ async readLikes(): Promise { 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 || []); } } @@ -553,7 +556,9 @@ export abstract class BaseEntity { */ async readFollows(): Promise { 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 || []); } diff --git a/datahub-web/@datahub/data-models/addon/entity/dataset/dataset-entity.ts b/datahub-web/@datahub/data-models/addon/entity/dataset/dataset-entity.ts index bf5c3048b2..74e610b05d 100644 --- a/datahub-web/@datahub/data-models/addon/entity/dataset/dataset-entity.ts +++ b/datahub-web/@datahub/data-models/addon/entity/dataset/dataset-entity.ts @@ -208,6 +208,12 @@ export class DatasetEntity extends BaseEntity { 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 diff --git a/datahub-web/@datahub/data-models/addon/entity/feature/fields.ts b/datahub-web/@datahub/data-models/addon/entity/feature/fields.ts index 8833fee218..e8f93ca116 100644 --- a/datahub-web/@datahub/data-models/addon/entity/feature/fields.ts +++ b/datahub-web/@datahub/data-models/addon/entity/feature/fields.ts @@ -135,7 +135,7 @@ export const fields: Array = [ 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 diff --git a/datahub-web/@datahub/data-models/addon/entity/person/render-props.ts b/datahub-web/@datahub/data-models/addon/entity/person/render-props.ts index 424fcabd3f..abb995c4af 100644 --- a/datahub-web/@datahub/data-models/addon/entity/person/render-props.ts +++ b/datahub-web/@datahub/data-models/addon/entity/person/render-props.ts @@ -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' diff --git a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/date.d.ts b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/date.d.ts index c7989d9b72..0673304be5 100644 --- a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/date.d.ts +++ b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/date.d.ts @@ -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; diff --git a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/icon.d.ts b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/icon.d.ts index 440cea181c..707afdfb82 100644 --- a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/icon.d.ts +++ b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/icon.d.ts @@ -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; diff --git a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/link.d.ts b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/link.d.ts index a5a9f7e9ad..47eefa56a5 100644 --- a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/link.d.ts +++ b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/link.d.ts @@ -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 diff --git a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/tag.d.ts b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/tag.d.ts index 6a4443184a..fab2c828f0 100644 --- a/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/tag.d.ts +++ b/datahub-web/@datahub/data-models/types/search/custom-search-result-property-component/tag.d.ts @@ -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; diff --git a/datahub-web/@datahub/datasets-core/addon/components/datasets/containers/dataset-main.ts b/datahub-web/@datahub/datasets-core/addon/components/datasets/containers/dataset-main.ts index 79f522f2eb..e9914d6c25 100644 --- a/datahub-web/@datahub/datasets-core/addon/components/datasets/containers/dataset-main.ts +++ b/datahub-web/@datahub/datasets-core/addon/components/datasets/containers/dataset-main.ts @@ -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'; diff --git a/datahub-web/@datahub/datasets-core/app/styles/datasets-core/tables/_all.scss b/datahub-web/@datahub/datasets-core/app/styles/datasets-core/tables/_all.scss index 4088849609..ebca3d9ac4 100644 --- a/datahub-web/@datahub/datasets-core/app/styles/datasets-core/tables/_all.scss +++ b/datahub-web/@datahub/datasets-core/app/styles/datasets-core/tables/_all.scss @@ -1,4 +1,3 @@ -@import 'compliance-annotations/all'; @import 'export-policy/all'; @import 'purge-policy/all'; @import 'dataset-groups/all'; diff --git a/datahub-web/@datahub/datasets-core/package.json b/datahub-web/@datahub/datasets-core/package.json index 65c44c35bb..dce3cdaf4a 100644 --- a/datahub-web/@datahub/datasets-core/package.json +++ b/datahub-web/@datahub/datasets-core/package.json @@ -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", diff --git a/datahub-web/@datahub/datasets-core/tsconfig.json b/datahub-web/@datahub/datasets-core/tsconfig.json index 2d1a7c8e3b..a003a19c25 100644 --- a/datahub-web/@datahub/datasets-core/tsconfig.json +++ b/datahub-web/@datahub/datasets-core/tsconfig.json @@ -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"], @@ -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/**/*", diff --git a/datahub-web/@datahub/institutional-memory/.editorconfig b/datahub-web/@datahub/institutional-memory/.editorconfig deleted file mode 100644 index 219985c228..0000000000 --- a/datahub-web/@datahub/institutional-memory/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/datahub-web/@datahub/institutional-memory/.ember-cli b/datahub-web/@datahub/institutional-memory/.ember-cli deleted file mode 100644 index d22923b92c..0000000000 --- a/datahub-web/@datahub/institutional-memory/.ember-cli +++ /dev/null @@ -1,4 +0,0 @@ -{ - "disableAnalytics": false, - "port": 9007 -} diff --git a/datahub-web/@datahub/institutional-memory/.gitignore b/datahub-web/@datahub/institutional-memory/.gitignore deleted file mode 100644 index c40a1b2aba..0000000000 --- a/datahub-web/@datahub/institutional-memory/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ - -# misc -/.env* -/.pnp* -/.sass-cache -/connect.lock -/coverage/ -/libpeerconnection.log -/npm-debug.log* -/testem.log -/yarn-error.log - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/datahub-web/@datahub/institutional-memory/.npmignore b/datahub-web/@datahub/institutional-memory/.npmignore deleted file mode 100644 index bd09adff92..0000000000 --- a/datahub-web/@datahub/institutional-memory/.npmignore +++ /dev/null @@ -1,32 +0,0 @@ -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ - -# misc -/.bowerrc -/.editorconfig -/.ember-cli -/.env* -/.eslintignore -/.eslintrc.js -/.git/ -/.gitignore -/.template-lintrc.js -/.travis.yml -/.watchmanconfig -/bower.json -/config/ember-try.js -/CONTRIBUTING.md -/ember-cli-build.js -/testem.js -/tests/ -/yarn.lock -.gitkeep - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/datahub-web/@datahub/institutional-memory/.travis.yml b/datahub-web/@datahub/institutional-memory/.travis.yml deleted file mode 100644 index d10bed4d28..0000000000 --- a/datahub-web/@datahub/institutional-memory/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -language: node_js -node_js: - # we recommend testing addons with the same minimum supported node version as Ember CLI - # so that your addon works for all apps - - '10' - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - yarn: true - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -branches: - only: - - master - # npm version tags - - /^v\d+\.\d+\.\d+/ - -jobs: - fail_fast: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - - include: - # runs linting and tests with current locked deps - - - stage: 'Tests' - name: 'Tests' - install: - - yarn install --non-interactive - script: - - yarn lint:hbs - - yarn lint:js - - yarn test - - - name: 'Floating Dependencies' - script: - - yarn test - - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - stage: 'Additional Tests' - env: EMBER_TRY_SCENARIO=ember-lts-2.18 - - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - - env: EMBER_TRY_SCENARIO=ember-release - - env: EMBER_TRY_SCENARIO=ember-beta - - env: EMBER_TRY_SCENARIO=ember-canary - - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --no-lockfile --non-interactive - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/datahub-web/@datahub/institutional-memory/.watchmanconfig b/datahub-web/@datahub/institutional-memory/.watchmanconfig deleted file mode 100644 index e7834e3e4f..0000000000 --- a/datahub-web/@datahub/institutional-memory/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp", "dist"] -} diff --git a/datahub-web/@datahub/institutional-memory/CONTRIBUTING.md b/datahub-web/@datahub/institutional-memory/CONTRIBUTING.md deleted file mode 100644 index 7d90b57eea..0000000000 --- a/datahub-web/@datahub/institutional-memory/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# How To Contribute - -## Installation - -* `git clone ` -* `cd shared-entity` -* `yarn install` - -## Linting - -* `yarn lint:hbs` -* `yarn lint:js` -* `yarn lint:js --fix` - -## Running tests - -* `ember test` – Runs the test suite on the current Ember version -* `ember test --server` – Runs the test suite in "watch mode" -* `ember try:each` – Runs the test suite against multiple Ember versions - -## Running the dummy application - -* `ember serve` -* Visit the dummy application at [http://localhost:4200](http://localhost:4200). - -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file diff --git a/datahub-web/@datahub/institutional-memory/LICENSE.md b/datahub-web/@datahub/institutional-memory/LICENSE.md deleted file mode 100644 index 0d02ed0266..0000000000 --- a/datahub-web/@datahub/institutional-memory/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2020 LinkedIn - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/datahub-web/@datahub/institutional-memory/README.md b/datahub-web/@datahub/institutional-memory/README.md deleted file mode 100644 index c0e460cea9..0000000000 --- a/datahub-web/@datahub/institutional-memory/README.md +++ /dev/null @@ -1,29 +0,0 @@ -@datahub/institutional-memory -============================================================================== - -An addon that provides a feature to other entities that tracks user provided data about those entities - - -Compatibility ------------------------------------------------------------------------------- - -* Ember.js v2.18 or above -* Ember CLI v2.13 or above - - -Usage ------------------------------------------------------------------------------- - -TBD - - -Contributing ------------------------------------------------------------------------------- - -See the [Contributing](CONTRIBUTING.md) guide for details. - - -License ------------------------------------------------------------------------------- - -This project is licensed under the [Apache License](LICENSE.md). diff --git a/datahub-web/@datahub/institutional-memory/addon/.gitkeep b/datahub-web/@datahub/institutional-memory/addon/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/app/.gitkeep b/datahub-web/@datahub/institutional-memory/app/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/containers/tab.js b/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/containers/tab.js deleted file mode 100644 index 26d0bce2c0..0000000000 --- a/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/containers/tab.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/institutional-memory/components/institutional-memory/containers/tab'; diff --git a/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/wiki/url-list.js b/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/wiki/url-list.js deleted file mode 100644 index 3cd20a5369..0000000000 --- a/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/wiki/url-list.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/institutional-memory/components/institutional-memory/wiki/url-list'; diff --git a/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/wiki/url-list/add-dialog.js b/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/wiki/url-list/add-dialog.js deleted file mode 100644 index eb095d9498..0000000000 --- a/datahub-web/@datahub/institutional-memory/app/components/institutional-memory/wiki/url-list/add-dialog.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/institutional-memory/components/institutional-memory/wiki/url-list/add-dialog'; diff --git a/datahub-web/@datahub/institutional-memory/app/styles/institutional-memory.scss b/datahub-web/@datahub/institutional-memory/app/styles/institutional-memory.scss deleted file mode 100644 index 15134adeb6..0000000000 --- a/datahub-web/@datahub/institutional-memory/app/styles/institutional-memory.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'institutional-memory/all'; diff --git a/datahub-web/@datahub/institutional-memory/config/ember-try.js b/datahub-web/@datahub/institutional-memory/config/ember-try.js deleted file mode 100644 index a619971407..0000000000 --- a/datahub-web/@datahub/institutional-memory/config/ember-try.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; - -const getChannelURL = require('ember-source-channel-url'); - -module.exports = function() { - return Promise.all([getChannelURL('release'), getChannelURL('beta'), getChannelURL('canary')]).then(urls => { - return { - useYarn: true, - scenarios: [ - { - name: 'ember-lts-2.18', - env: { - EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }) - }, - npm: { - devDependencies: { - '@ember/jquery': '^0.5.1', - 'ember-source': '~2.18.0' - } - } - }, - { - name: 'ember-lts-3.4', - npm: { - devDependencies: { - 'ember-source': '~3.4.0' - } - } - }, - { - name: 'ember-release', - npm: { - devDependencies: { - 'ember-source': urls[0] - } - } - }, - { - name: 'ember-beta', - npm: { - devDependencies: { - 'ember-source': urls[1] - } - } - }, - { - name: 'ember-canary', - npm: { - devDependencies: { - 'ember-source': urls[2] - } - } - }, - // The default `.travis.yml` runs this scenario via `yarn test`, - // not via `ember try`. It's still included here so that running - // `ember try:each` manually or from a customized CI config will run it - // along with all the other scenarios. - { - name: 'ember-default', - npm: { - devDependencies: {} - } - }, - { - name: 'ember-default-with-jquery', - env: { - EMBER_OPTIONAL_FEATURES: JSON.stringify({ - 'jquery-integration': true - }) - }, - npm: { - devDependencies: { - '@ember/jquery': '^0.5.1' - } - } - } - ] - }; - }); -}; diff --git a/datahub-web/@datahub/institutional-memory/config/environment.js b/datahub-web/@datahub/institutional-memory/config/environment.js deleted file mode 100644 index 9707ea62a7..0000000000 --- a/datahub-web/@datahub/institutional-memory/config/environment.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function(/* environment, appConfig */) { - return {}; -}; diff --git a/datahub-web/@datahub/institutional-memory/ember-cli-build.js b/datahub-web/@datahub/institutional-memory/ember-cli-build.js deleted file mode 100644 index d9648581d6..0000000000 --- a/datahub-web/@datahub/institutional-memory/ember-cli-build.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -module.exports = function(defaults) { - const app = new EmberAddon(defaults, { - // Add options here - }); - - /* - This build file specifies the options for the dummy test app of this - addon, located in `/tests/dummy` - This build file does *not* influence how the addon or the app using it - behave. You most likely want to be modifying `./index.js` or app's build file - */ - - return app.toTree(); -}; diff --git a/datahub-web/@datahub/institutional-memory/index.js b/datahub-web/@datahub/institutional-memory/index.js deleted file mode 100644 index ac65e94b66..0000000000 --- a/datahub-web/@datahub/institutional-memory/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = { - name: require('./package').name, - isDevelopingAddon: () => true -}; diff --git a/datahub-web/@datahub/institutional-memory/package.json b/datahub-web/@datahub/institutional-memory/package.json deleted file mode 100644 index c049983333..0000000000 --- a/datahub-web/@datahub/institutional-memory/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "@datahub/institutional-memory", - "version": "0.0.0", - "description": "An addon that provides a feature to other entities that tracks user provided data about those entities", - "keywords": [ - "ember-addon" - ], - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build --environment=production", - "start": "ember serve", - "test": "ember test", - "test:all": "ember try:each", - "prepublishOnly": "ember ts:precompile", - "postpublish": "ember ts:clean" - }, - "dependencies": { - "@datahub/data-models": "0.0.0", - "@datahub/shared": "0.0.0", - "@datahub/utils": "0.0.0", - "@fortawesome/ember-fontawesome": "^0.1.13", - "@nacho-ui/animations": "^0.0.38", - "@nacho-ui/core": "^0.0.38", - "@nacho-ui/table": "^0.0.38", - "@types/ember-resolver": "^5.0.7", - "ember-cli-babel": "^7.17.2", - "ember-cli-htmlbars": "^4.2.2", - "ember-cli-typescript": "^3.1.3", - "ember-concurrency": "^1.1.2", - "ember-inflector": "^3.0.0", - "ember-modal-dialog": "^3.0.0-beta.0", - "ember-moment": "^8.0.0" - }, - "devDependencies": { - "@babel/core": "^7.8.4", - "@datahub/metadata-types": "0.0.0", - "@ember/optional-features": "^1.3.0", - "@glimmer/component": "^1.0.0", - "@glimmer/tracking": "^1.0.0", - "@types/ember": "^3.1.1", - "@types/ember-qunit": "^3.4.7", - "@types/ember__test-helpers": "^0.7.9", - "@types/qunit": "^2.9.0", - "@types/rsvp": "^4.0.3", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.3", - "ember-cli": "~3.16.0", - "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-inject-live-reload": "^2.0.2", - "ember-cli-mirage": "^0.4.15", - "ember-cli-moment-shim": "^3.7.1", - "ember-cli-sass": "^10.0.0", - "ember-cli-sri": "^2.1.1", - "ember-cli-typescript-blueprints": "^3.0.0", - "ember-cli-uglify": "^3.0.0", - "ember-cli-update": "^0.52.1", - "ember-decorators": "^6.0.0", - "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.1", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", - "ember-resolver": "^7.0.0", - "ember-source": "~3.16.3", - "ember-source-channel-url": "^2.0.1", - "ember-truth-helpers": "^2.1.0", - "ember-try": "^1.4.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.1", - "sass": "^1.21.0", - "typescript": "^3.9.3" - }, - "engines": { - "node": "10.* || >= 12" - }, - "ember": { - "edition": "octane" - }, - "ember-addon": { - "configPath": "tests/dummy/config" - } -} diff --git a/datahub-web/@datahub/institutional-memory/testem.js b/datahub-web/@datahub/institutional-memory/testem.js deleted file mode 100644 index 3c17a8b75d..0000000000 --- a/datahub-web/@datahub/institutional-memory/testem.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../configs/testem-base'); diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/app.js b/datahub-web/@datahub/institutional-memory/tests/dummy/app/app.js deleted file mode 100644 index d8e2088b6b..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/app.js +++ /dev/null @@ -1,12 +0,0 @@ -import Application from '@ember/application'; -import Resolver from 'ember-resolver'; -import loadInitializers from 'ember-load-initializers'; -import config from './config/environment'; - -export default class App extends Application { - modulePrefix = config.modulePrefix; - podModulePrefix = config.podModulePrefix; - Resolver = Resolver; -} - -loadInitializers(App, config.modulePrefix); diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/components/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/dummy/app/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/config/environment.d.ts b/datahub-web/@datahub/institutional-memory/tests/dummy/app/config/environment.d.ts deleted file mode 100644 index 6d84647d27..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/config/environment.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable @typescript-eslint/no-use-before-define */ -export default config; - -/** - * Type declarations for - * import config from './config/environment' - * - * For now these need to be managed by the developer - * since different ember addons can materialize new entries. - */ -declare const config: { - environment: 'development' | 'test' | 'production'; - modulePrefix: string; - podModulePrefix: string; - locationType: string; - rootURL: string; - APP: { - // Alternate value for notifications service toast delay, used in test runs - notificationsTimeout?: number; - }; -}; diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/controllers/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/dummy/app/controllers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/helpers/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/dummy/app/helpers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/index.html b/datahub-web/@datahub/institutional-memory/tests/dummy/app/index.html deleted file mode 100644 index 61400b20f5..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - Dummy - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/models/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/router.js b/datahub-web/@datahub/institutional-memory/tests/dummy/app/router.js deleted file mode 100644 index e8837b5587..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/router.js +++ /dev/null @@ -1,20 +0,0 @@ -import EmberRouter from '@ember/routing/router'; -import config from './config/environment'; - -export default class Router extends EmberRouter { - location = config.locationType; - rootURL = config.rootURL; -} - -Router.map(function() { - this.route('wiki'); - this.route('testcomponents'); - // TODO: [META-11856] This is here as the acceptance test for the wiki tab throws an error because - // this package has no concept of the user profile page, but the avatar links to such page. Should - // be improved when we revamp how testing is done - this.route('user', function() { - this.route('profile', { path: '/:user_id' }, function() { - this.route('tab', { path: '/:tab_selected' }); - }); - }); -}); diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/styles/app.scss b/datahub-web/@datahub/institutional-memory/tests/dummy/app/styles/app.scss deleted file mode 100644 index 16b3d25510..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/styles/app.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import 'nacho-core'; -@import 'datahub-utils'; -@import 'nacho-table'; - -@import 'institutional-memory'; - -.test-container { - width: $max-container-width; -} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/application.hbs b/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/application.hbs deleted file mode 100644 index e2147cab02..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/application.hbs +++ /dev/null @@ -1 +0,0 @@ -{{outlet}} \ No newline at end of file diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/components/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/config/environment.js b/datahub-web/@datahub/institutional-memory/tests/dummy/config/environment.js deleted file mode 100644 index 43938b91a0..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/config/environment.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -module.exports = function(environment) { - const ENV = { - modulePrefix: 'dummy', - environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. 'with-controller': true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false - } - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - } - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - ENV.RAISE_ON_DEPRECATION = false; - ENV.LOG_STACKTRACE_ON_DEPRECATION = false; - - ENV.APP.rootElement = '#ember-testing'; - ENV.APP.autoboot = false; - ENV.APP.notificationsTimeout = 1; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/config/optional-features.json b/datahub-web/@datahub/institutional-memory/tests/dummy/config/optional-features.json deleted file mode 100644 index b26286e2ec..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/config/optional-features.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "application-template-wrapper": false, - "default-async-observers": true, - "jquery-integration": false, - "template-only-glimmer-components": true -} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/config/targets.js b/datahub-web/@datahub/institutional-memory/tests/dummy/config/targets.js deleted file mode 100644 index 846c7180bb..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/config/targets.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions']; - -const isCI = !!process.env.CI; -const isProduction = process.env.EMBER_ENV === 'production'; - -if (isCI || isProduction) { - browsers.push('ie 11'); -} - -module.exports = { - browsers -}; diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/config.ts b/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/config.ts deleted file mode 100644 index 253b2ca9c0..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IMirageServer } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated'; -import { getInstitutionalMemory, postInstitutionalMemory } from 'dummy/mirage/helpers/institutional-memory'; -import { IFollowsAspect } from '@datahub/metadata-types/types/aspects/social-actions'; - -export default function(this: IMirageServer): void { - this.get('/pokemons/:urn/institutionalmemory', getInstitutionalMemory); - this.post('/pokemons/:urn/institutionalmemory', postInstitutionalMemory); - // TODO Mirage for follows: https://jira01.corp.linkedin.com:8443/browse/META-11926 - this.get( - '/api/v2/pokemons/pikachu:urn/follows', - (): IFollowsAspect => ({ - followers: [ - { follower: { corpUser: 'aketchum' } }, - { follower: { corpUser: 'misty' } }, - { follower: { corpUser: 'brock' } } - ] - }) - ); -} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/scenarios/default.ts b/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/scenarios/default.ts deleted file mode 100644 index 6c48c743b3..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/scenarios/default.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IMirageServer } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated'; - -export default function(server: IMirageServer) { - server.createList('institutionalMemory', 2); -} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/scenarios/test.ts b/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/scenarios/test.ts deleted file mode 100644 index f9d45ca0b9..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/scenarios/test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IMirageServer } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated'; - -export default function(server: IMirageServer) { - server.createList('institutionalMemory', 2, 'static'); -} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/serializers/application.ts b/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/serializers/application.ts deleted file mode 100644 index 6224ab8c99..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/serializers/application.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { JSONAPISerializer } from 'ember-cli-mirage'; - -export default JSONAPISerializer.extend({}); diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/public/robots.txt b/datahub-web/@datahub/institutional-memory/tests/dummy/public/robots.txt deleted file mode 100644 index f5916452e5..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/datahub-web/@datahub/institutional-memory/tests/helpers/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/helpers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/index.html b/datahub-web/@datahub/institutional-memory/tests/index.html deleted file mode 100644 index 5209b85232..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Dummy Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/datahub-web/@datahub/institutional-memory/tests/integration/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/integration/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tests/test-helper.js b/datahub-web/@datahub/institutional-memory/tests/test-helper.js deleted file mode 100644 index 0382a848dd..0000000000 --- a/datahub-web/@datahub/institutional-memory/tests/test-helper.js +++ /dev/null @@ -1,8 +0,0 @@ -import Application from '../app'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); diff --git a/datahub-web/@datahub/institutional-memory/tests/unit/.gitkeep b/datahub-web/@datahub/institutional-memory/tests/unit/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/tsconfig.json b/datahub-web/@datahub/institutional-memory/tsconfig.json deleted file mode 100644 index e5295adcfa..0000000000 --- a/datahub-web/@datahub/institutional-memory/tsconfig.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "extends": "../../configs/tsconfig-base", - "compilerOptions": { - "baseUrl": ".", - "rootDir": "../../", - "alwaysStrict": false, - "paths": { - "dummy/mirage/*": ["tests/dummy/mirage/*", "../../@datahub/data-models/tests/dummy/mirage/*"], - "dummy/tests/*": ["tests/*", "../../@datahub/data-models/tests/*"], - "dummy/*": [ - "tests/dummy/app/*", - "app/*", - "../../@datahub/data-models/tests/dummy/app/*", - "../../@datahub/data-models/tests/app/*" - ], - "@datahub/institutional-memory": ["addon"], - "@datahub/institutional-memory/*": ["addon/*"], - "@datahub/institutional-memory/test-support": ["addon-test-support"], - "@datahub/institutional-memory/test-support/*": ["addon-test-support/*"], - "@datahub/utils": ["../../@datahub/utils/addon"], - "@datahub/utils/*": ["../../@datahub/utils/addon/*"], - "@datahub/data-models": ["../../@datahub/data-models/addon"], - "@datahub/data-models/*": ["../../@datahub/data-models/addon/*"], - "@datahub/shared": ["../../@datahub/shared/addon"], - "@datahub/shared/*": ["../../@datahub/shared/addon/*"], - "@datahub/metadata-types": ["../../@datahub/metadata-types/addon"], - "@datahub/metadata-types/*": ["../../@datahub/metadata-types/addon/*"], - "*": ["types/*"] - } - }, - "include": [ - "app/**/*", - "addon/**/*", - "tests/**/*", - "types/**/*", - "test-support/**/*", - "addon-test-support/**/*", - "../../@datahub/data-models/addon/**/*", - "../../@datahub/data-models/types/**/*", - "../../@datahub/data-models/tests/**/*", - "../../@datahub/metadata-types/addon/**/*", - "../../@datahub/metadata-types/types/**/*", - "../../@datahub/utils/addon/**/*", - "../../@datahub/utils/types/**/*", - "../../@datahub/shared/addon/**/*", - "../../@datahub/shared/types/**/*", - "../../@datahub/shared/tests/**/*" - ] -} diff --git a/datahub-web/@datahub/institutional-memory/types/dummy/index.d.ts b/datahub-web/@datahub/institutional-memory/types/dummy/index.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/institutional-memory/types/global.d.ts b/datahub-web/@datahub/institutional-memory/types/global.d.ts deleted file mode 100644 index 99d83c4bad..0000000000 --- a/datahub-web/@datahub/institutional-memory/types/global.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Types for compiled templates -declare module '@datahub/institutional-memory/templates/*' { - import { TemplateFactory } from 'htmlbars-inline-precompile'; - const tmpl: TemplateFactory; - export default tmpl; -} diff --git a/datahub-web/@datahub/institutional-memory/vendor/.gitkeep b/datahub-web/@datahub/institutional-memory/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/.editorconfig b/datahub-web/@datahub/search/.editorconfig deleted file mode 100644 index 219985c228..0000000000 --- a/datahub-web/@datahub/search/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/datahub-web/@datahub/search/.ember-cli b/datahub-web/@datahub/search/.ember-cli deleted file mode 100644 index ee64cfed2a..0000000000 --- a/datahub-web/@datahub/search/.ember-cli +++ /dev/null @@ -1,9 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false -} diff --git a/datahub-web/@datahub/search/.gitignore b/datahub-web/@datahub/search/.gitignore deleted file mode 100644 index c40a1b2aba..0000000000 --- a/datahub-web/@datahub/search/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ - -# misc -/.env* -/.pnp* -/.sass-cache -/connect.lock -/coverage/ -/libpeerconnection.log -/npm-debug.log* -/testem.log -/yarn-error.log - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/datahub-web/@datahub/search/.npmignore b/datahub-web/@datahub/search/.npmignore deleted file mode 100644 index bd09adff92..0000000000 --- a/datahub-web/@datahub/search/.npmignore +++ /dev/null @@ -1,32 +0,0 @@ -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ - -# misc -/.bowerrc -/.editorconfig -/.ember-cli -/.env* -/.eslintignore -/.eslintrc.js -/.git/ -/.gitignore -/.template-lintrc.js -/.travis.yml -/.watchmanconfig -/bower.json -/config/ember-try.js -/CONTRIBUTING.md -/ember-cli-build.js -/testem.js -/tests/ -/yarn.lock -.gitkeep - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/datahub-web/@datahub/search/.travis.yml b/datahub-web/@datahub/search/.travis.yml deleted file mode 100644 index d10bed4d28..0000000000 --- a/datahub-web/@datahub/search/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -language: node_js -node_js: - # we recommend testing addons with the same minimum supported node version as Ember CLI - # so that your addon works for all apps - - '10' - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - yarn: true - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -branches: - only: - - master - # npm version tags - - /^v\d+\.\d+\.\d+/ - -jobs: - fail_fast: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - - include: - # runs linting and tests with current locked deps - - - stage: 'Tests' - name: 'Tests' - install: - - yarn install --non-interactive - script: - - yarn lint:hbs - - yarn lint:js - - yarn test - - - name: 'Floating Dependencies' - script: - - yarn test - - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - stage: 'Additional Tests' - env: EMBER_TRY_SCENARIO=ember-lts-2.18 - - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - - env: EMBER_TRY_SCENARIO=ember-release - - env: EMBER_TRY_SCENARIO=ember-beta - - env: EMBER_TRY_SCENARIO=ember-canary - - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --no-lockfile --non-interactive - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/datahub-web/@datahub/search/.watchmanconfig b/datahub-web/@datahub/search/.watchmanconfig deleted file mode 100644 index e7834e3e4f..0000000000 --- a/datahub-web/@datahub/search/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp", "dist"] -} diff --git a/datahub-web/@datahub/search/LICENSE.md b/datahub-web/@datahub/search/LICENSE.md deleted file mode 100644 index 0d02ed0266..0000000000 --- a/datahub-web/@datahub/search/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2020 LinkedIn - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/datahub-web/@datahub/search/README.md b/datahub-web/@datahub/search/README.md deleted file mode 100644 index 7d24e219b0..0000000000 --- a/datahub-web/@datahub/search/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Search Addon for DataHub -============================================================================== - -This addon contains all the components and code related to search. This addon is not meant to be shared with other projects and should only be used in DataHub project. diff --git a/datahub-web/@datahub/search/addon/.gitkeep b/datahub-web/@datahub/search/addon/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/app/.gitkeep b/datahub-web/@datahub/search/app/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/date.js b/datahub-web/@datahub/search/app/components/custom-search-result-property-component/date.js deleted file mode 100644 index 947dba8202..0000000000 --- a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/date.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/search/components/custom-search-result-property-component/date'; diff --git a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/icon.js b/datahub-web/@datahub/search/app/components/custom-search-result-property-component/icon.js deleted file mode 100644 index a6c17ea651..0000000000 --- a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/icon.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/search/components/custom-search-result-property-component/icon'; diff --git a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/link.js b/datahub-web/@datahub/search/app/components/custom-search-result-property-component/link.js deleted file mode 100644 index b944da3667..0000000000 --- a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/link.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/search/components/custom-search-result-property-component/link'; diff --git a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/tag.js b/datahub-web/@datahub/search/app/components/custom-search-result-property-component/tag.js deleted file mode 100644 index 03b15d3908..0000000000 --- a/datahub-web/@datahub/search/app/components/custom-search-result-property-component/tag.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/search/components/custom-search-result-property-component/tag'; diff --git a/datahub-web/@datahub/search/app/services/search.js b/datahub-web/@datahub/search/app/services/search.js deleted file mode 100644 index f2aa7532fd..0000000000 --- a/datahub-web/@datahub/search/app/services/search.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '@datahub/search/services/search'; diff --git a/datahub-web/@datahub/search/config/ember-try.js b/datahub-web/@datahub/search/config/ember-try.js deleted file mode 100644 index a619971407..0000000000 --- a/datahub-web/@datahub/search/config/ember-try.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; - -const getChannelURL = require('ember-source-channel-url'); - -module.exports = function() { - return Promise.all([getChannelURL('release'), getChannelURL('beta'), getChannelURL('canary')]).then(urls => { - return { - useYarn: true, - scenarios: [ - { - name: 'ember-lts-2.18', - env: { - EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }) - }, - npm: { - devDependencies: { - '@ember/jquery': '^0.5.1', - 'ember-source': '~2.18.0' - } - } - }, - { - name: 'ember-lts-3.4', - npm: { - devDependencies: { - 'ember-source': '~3.4.0' - } - } - }, - { - name: 'ember-release', - npm: { - devDependencies: { - 'ember-source': urls[0] - } - } - }, - { - name: 'ember-beta', - npm: { - devDependencies: { - 'ember-source': urls[1] - } - } - }, - { - name: 'ember-canary', - npm: { - devDependencies: { - 'ember-source': urls[2] - } - } - }, - // The default `.travis.yml` runs this scenario via `yarn test`, - // not via `ember try`. It's still included here so that running - // `ember try:each` manually or from a customized CI config will run it - // along with all the other scenarios. - { - name: 'ember-default', - npm: { - devDependencies: {} - } - }, - { - name: 'ember-default-with-jquery', - env: { - EMBER_OPTIONAL_FEATURES: JSON.stringify({ - 'jquery-integration': true - }) - }, - npm: { - devDependencies: { - '@ember/jquery': '^0.5.1' - } - } - } - ] - }; - }); -}; diff --git a/datahub-web/@datahub/search/config/environment.d.ts b/datahub-web/@datahub/search/config/environment.d.ts deleted file mode 100644 index 3951075c5e..0000000000 --- a/datahub-web/@datahub/search/config/environment.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare const config: { - environment: 'development' | 'test' | 'production'; - modulePrefix: string; - podModulePrefix: string; - locationType: string; - rootURL: string; - APP: { - // Alternate value for notifications service toast delay, used in test runs - notificationsTimeout?: number; - }; -}; - -export default config; diff --git a/datahub-web/@datahub/search/config/environment.js b/datahub-web/@datahub/search/config/environment.js deleted file mode 100644 index 9707ea62a7..0000000000 --- a/datahub-web/@datahub/search/config/environment.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function(/* environment, appConfig */) { - return {}; -}; diff --git a/datahub-web/@datahub/search/ember-cli-build.js b/datahub-web/@datahub/search/ember-cli-build.js deleted file mode 100644 index d9648581d6..0000000000 --- a/datahub-web/@datahub/search/ember-cli-build.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -module.exports = function(defaults) { - const app = new EmberAddon(defaults, { - // Add options here - }); - - /* - This build file specifies the options for the dummy test app of this - addon, located in `/tests/dummy` - This build file does *not* influence how the addon or the app using it - behave. You most likely want to be modifying `./index.js` or app's build file - */ - - return app.toTree(); -}; diff --git a/datahub-web/@datahub/search/index.js b/datahub-web/@datahub/search/index.js deleted file mode 100644 index ac65e94b66..0000000000 --- a/datahub-web/@datahub/search/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = { - name: require('./package').name, - isDevelopingAddon: () => true -}; diff --git a/datahub-web/@datahub/search/package.json b/datahub-web/@datahub/search/package.json deleted file mode 100644 index effaf4e17c..0000000000 --- a/datahub-web/@datahub/search/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "@datahub/search", - "version": "0.0.0", - "description": "Search addon for DataHub", - "keywords": [ - "ember-addon" - ], - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build --environment=production", - "start": "ember serve", - "test": "ember test", - "test:all": "ember try:each", - "prepublishOnly": "ember ts:precompile", - "postpublish": "ember ts:clean" - }, - "dependencies": { - "@datahub/data-models": "^0.0.0", - "@datahub/metadata-types": "^0.0.0", - "@datahub/shared": "^0.0.0", - "@datahub/utils": "^0.0.0", - "@fortawesome/ember-fontawesome": "^0.1.13", - "@fortawesome/free-regular-svg-icons": "^5.9.0", - "@fortawesome/free-solid-svg-icons": "^5.9.0", - "@nacho-ui/pill": "^0.0.38", - "@types/ember-resolver": "^5.0.7", - "ember-cli-babel": "^7.17.2", - "ember-cli-htmlbars": "^4.2.2", - "ember-cli-string-helpers": "^4.0.5", - "ember-cli-typescript": "^3.1.3" - }, - "devDependencies": { - "@babel/core": "^7.8.4", - "@ember/optional-features": "^1.3.0", - "@glimmer/component": "^1.0.0", - "@glimmer/tracking": "^1.0.0", - "@types/ember": "^3.1.1", - "@types/ember-qunit": "^3.4.7", - "@types/ember-test-helpers": "^1.0.5", - "@types/ember-testing-helpers": "^0.0.3", - "@types/ember__test-helpers": "^0.7.9", - "@types/qunit": "^2.9.0", - "@types/rsvp": "^4.0.3", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.3", - "ember-cli": "~3.16.0", - "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-inject-live-reload": "^2.0.2", - "ember-cli-sri": "^2.1.1", - "ember-cli-typescript-blueprints": "^3.0.0", - "ember-cli-uglify": "^3.0.0", - "ember-cli-update": "^0.52.1", - "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.1", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", - "ember-resolver": "^7.0.0", - "ember-source": "~3.16.3", - "ember-source-channel-url": "^2.0.1", - "ember-try": "^1.4.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.1", - "typescript": "^3.9.3" - }, - "engines": { - "node": "10.* || >= 12" - }, - "ember": { - "edition": "octane" - }, - "ember-addon": { - "configPath": "tests/dummy/config" - } -} diff --git a/datahub-web/@datahub/search/testem.js b/datahub-web/@datahub/search/testem.js deleted file mode 100644 index 3c17a8b75d..0000000000 --- a/datahub-web/@datahub/search/testem.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../configs/testem-base'); diff --git a/datahub-web/@datahub/search/tests/dummy/app/app.ts b/datahub-web/@datahub/search/tests/dummy/app/app.ts deleted file mode 100644 index d8e2088b6b..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/app/app.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Application from '@ember/application'; -import Resolver from 'ember-resolver'; -import loadInitializers from 'ember-load-initializers'; -import config from './config/environment'; - -export default class App extends Application { - modulePrefix = config.modulePrefix; - podModulePrefix = config.podModulePrefix; - Resolver = Resolver; -} - -loadInitializers(App, config.modulePrefix); diff --git a/datahub-web/@datahub/search/tests/dummy/app/components/.gitkeep b/datahub-web/@datahub/search/tests/dummy/app/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/app/config/environment.d.ts b/datahub-web/@datahub/search/tests/dummy/app/config/environment.d.ts deleted file mode 100644 index 3951075c5e..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/app/config/environment.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare const config: { - environment: 'development' | 'test' | 'production'; - modulePrefix: string; - podModulePrefix: string; - locationType: string; - rootURL: string; - APP: { - // Alternate value for notifications service toast delay, used in test runs - notificationsTimeout?: number; - }; -}; - -export default config; diff --git a/datahub-web/@datahub/search/tests/dummy/app/controllers/.gitkeep b/datahub-web/@datahub/search/tests/dummy/app/controllers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/app/helpers/.gitkeep b/datahub-web/@datahub/search/tests/dummy/app/helpers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/app/index.html b/datahub-web/@datahub/search/tests/dummy/app/index.html deleted file mode 100644 index 61400b20f5..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/app/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - Dummy - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/datahub-web/@datahub/search/tests/dummy/app/models/.gitkeep b/datahub-web/@datahub/search/tests/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/app/router.ts b/datahub-web/@datahub/search/tests/dummy/app/router.ts deleted file mode 100644 index b0aca2421b..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/app/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -import EmberRouter from '@ember/routing/router'; -import config from './config/environment'; - -export default class Router extends EmberRouter { - location = config.locationType; - rootURL = config.rootURL; -} - -Router.map(function(): void {}); diff --git a/datahub-web/@datahub/search/tests/dummy/app/routes/.gitkeep b/datahub-web/@datahub/search/tests/dummy/app/routes/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/app/styles/app.scss b/datahub-web/@datahub/search/tests/dummy/app/styles/app.scss deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/app/templates/application.hbs b/datahub-web/@datahub/search/tests/dummy/app/templates/application.hbs deleted file mode 100644 index 5230580f82..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/app/templates/application.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to Ember

- -{{outlet}} \ No newline at end of file diff --git a/datahub-web/@datahub/search/tests/dummy/app/templates/components/.gitkeep b/datahub-web/@datahub/search/tests/dummy/app/templates/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/dummy/config/environment.js b/datahub-web/@datahub/search/tests/dummy/config/environment.js deleted file mode 100644 index 43938b91a0..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/config/environment.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -module.exports = function(environment) { - const ENV = { - modulePrefix: 'dummy', - environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. 'with-controller': true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false - } - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - } - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - ENV.RAISE_ON_DEPRECATION = false; - ENV.LOG_STACKTRACE_ON_DEPRECATION = false; - - ENV.APP.rootElement = '#ember-testing'; - ENV.APP.autoboot = false; - ENV.APP.notificationsTimeout = 1; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/datahub-web/@datahub/search/tests/dummy/config/optional-features.json b/datahub-web/@datahub/search/tests/dummy/config/optional-features.json deleted file mode 100644 index b26286e2ec..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/config/optional-features.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "application-template-wrapper": false, - "default-async-observers": true, - "jquery-integration": false, - "template-only-glimmer-components": true -} diff --git a/datahub-web/@datahub/search/tests/dummy/config/targets.js b/datahub-web/@datahub/search/tests/dummy/config/targets.js deleted file mode 100644 index 846c7180bb..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/config/targets.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions']; - -const isCI = !!process.env.CI; -const isProduction = process.env.EMBER_ENV === 'production'; - -if (isCI || isProduction) { - browsers.push('ie 11'); -} - -module.exports = { - browsers -}; diff --git a/datahub-web/@datahub/search/tests/dummy/public/robots.txt b/datahub-web/@datahub/search/tests/dummy/public/robots.txt deleted file mode 100644 index f5916452e5..0000000000 --- a/datahub-web/@datahub/search/tests/dummy/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/datahub-web/@datahub/search/tests/helpers/.gitkeep b/datahub-web/@datahub/search/tests/helpers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/index.html b/datahub-web/@datahub/search/tests/index.html deleted file mode 100644 index 5209b85232..0000000000 --- a/datahub-web/@datahub/search/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Dummy Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/datahub-web/@datahub/search/tests/integration/.gitkeep b/datahub-web/@datahub/search/tests/integration/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tests/test-helper.ts b/datahub-web/@datahub/search/tests/test-helper.ts deleted file mode 100644 index 8e58a19207..0000000000 --- a/datahub-web/@datahub/search/tests/test-helper.ts +++ /dev/null @@ -1,8 +0,0 @@ -import Application from 'dummy/app'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); diff --git a/datahub-web/@datahub/search/tests/unit/.gitkeep b/datahub-web/@datahub/search/tests/unit/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/search/tsconfig.json b/datahub-web/@datahub/search/tsconfig.json deleted file mode 100644 index 6a334cb2ee..0000000000 --- a/datahub-web/@datahub/search/tsconfig.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "extends": "../../configs/tsconfig-base", - "compilerOptions": { - "baseUrl": ".", - "rootDir": "../../", - "paths": { - "dummy/mirage/*": ["tests/dummy/mirage/*", "../../@datahub/data-models/tests/dummy/mirage/*"], - "dummy/tests/*": ["tests/*", "../../@datahub/data-models/tests/*"], - "dummy/*": [ - "tests/dummy/app/*", - "app/*", - "../../@datahub/data-models/tests/dummy/app/*", - "../../@datahub/data-models/tests/app/*" - ], - "@datahub/search": ["addon"], - "@datahub/search/*": ["addon/*"], - "@datahub/search/test-support": ["addon-test-support"], - "@datahub/search/test-support/*": ["addon-test-support/*"], - "@datahub/data-models": ["../../@datahub/data-models/addon"], - "@datahub/data-models/*": ["../../@datahub/data-models/addon/*"], - "@datahub/metadata-types/": ["../../@datahub/metadata-types/addon"], - "@datahub/metadata-types/*": ["../../@datahub/metadata-types/addon/*"], - "@datahub/shared/": ["../../@datahub/shared/addon"], - "@datahub/shared/*": ["../../@datahub/shared/addon/*"], - "@datahub/utils/": ["../../@datahub/utils/addon"], - "@datahub/utils/*": ["../../@datahub/utils/addon/*"], - "*": ["types/*"] - } - }, - "include": [ - "app/**/*", - "addon/**/*", - "tests/**/*", - "types/**/*", - "test-support/**/*", - "addon-test-support/**/*", - "../../@datahub/utils/addon/**/*", - "../../@datahub/utils/types/**/*", - "../../@datahub/data-models/addon/**/*", - "../../@datahub/data-models/tests/**/*", - "../../@datahub/data-models/types/**/*", - "../../@datahub/metadata-types/addon/**/*", - "../../@datahub/metadata-types/types/**/*", - "../../@datahub/shared/addon/**/*", - "../../@datahub/shared/types/**/*", - "../../@datahub/shared/tests/**/*" - ] -} diff --git a/datahub-web/@datahub/search/types/dummy/index.d.ts b/datahub-web/@datahub/search/types/dummy/index.d.ts deleted file mode 100644 index bfa534e702..0000000000 --- a/datahub-web/@datahub/search/types/dummy/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'dummy/app'; diff --git a/datahub-web/@datahub/search/types/global.d.ts b/datahub-web/@datahub/search/types/global.d.ts deleted file mode 100644 index 624326b0e7..0000000000 --- a/datahub-web/@datahub/search/types/global.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Types for compiled templates -declare module '@datahub/search/templates/*' { - import { TemplateFactory } from 'htmlbars-inline-precompile'; - const tmpl: TemplateFactory; - export default tmpl; -} diff --git a/datahub-web/@datahub/search/types/modules/ember-load-initializers.d.ts b/datahub-web/@datahub/search/types/modules/ember-load-initializers.d.ts deleted file mode 100644 index 7b4672f61a..0000000000 --- a/datahub-web/@datahub/search/types/modules/ember-load-initializers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'ember-load-initializers' { - import Application from '@ember/application'; - - export default function(app: typeof Application, prefix: string): void; -} diff --git a/datahub-web/@datahub/search/vendor/.gitkeep b/datahub-web/@datahub/search/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/datahub-web/@datahub/shared/addon/components/entity-page/entity-header/tag.ts b/datahub-web/@datahub/shared/addon/components/entity-page/entity-header/tag.ts index 4cfc74e253..f2f907b843 100644 --- a/datahub-web/@datahub/shared/addon/components/entity-page/entity-header/tag.ts +++ b/datahub-web/@datahub/shared/addon/components/entity-page/entity-header/tag.ts @@ -2,12 +2,18 @@ import Component from '@ember/component'; // @ts-ignore: Ignore import of compiled template import template from '../../../templates/components/entity-page/entity-header/tag'; import { layout, tagName } from '@ember-decorators/component'; +import { computed } from '@ember/object'; @layout(template) @tagName('') export default class EntityHeaderTag extends Component { baseClass = 'entity-pill'; + /** + * optional. Tooltip message if needed + */ + tooltip?: string; + /** * value can have the string which to show or a boolean to say whether we should show this tag * in this case, options.text must be defined @@ -18,6 +24,7 @@ export default class EntityHeaderTag extends Component { * returns the text to display for this tag. * text can come from the value or an option in options */ + @computed('value') get text(): string | undefined { const { value, options } = this; if (typeof this.value === 'boolean' && value && options && options.text) { diff --git a/datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/containers/tab.ts b/datahub-web/@datahub/shared/addon/components/institutional-memory/containers/tab.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/containers/tab.ts rename to datahub-web/@datahub/shared/addon/components/institutional-memory/containers/tab.ts diff --git a/datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/wiki/url-list.ts b/datahub-web/@datahub/shared/addon/components/institutional-memory/wiki/url-list.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/wiki/url-list.ts rename to datahub-web/@datahub/shared/addon/components/institutional-memory/wiki/url-list.ts diff --git a/datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/wiki/url-list/add-dialog.ts b/datahub-web/@datahub/shared/addon/components/institutional-memory/wiki/url-list/add-dialog.ts similarity index 95% rename from datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/wiki/url-list/add-dialog.ts rename to datahub-web/@datahub/shared/addon/components/institutional-memory/wiki/url-list/add-dialog.ts index 688a31f2f2..3b030fe07d 100644 --- a/datahub-web/@datahub/institutional-memory/addon/components/institutional-memory/wiki/url-list/add-dialog.ts +++ b/datahub-web/@datahub/shared/addon/components/institutional-memory/wiki/url-list/add-dialog.ts @@ -3,7 +3,7 @@ import Component from '@ember/component'; import template from '../../../../templates/components/institutional-memory/wiki/url-list/add-dialog'; import { layout, classNames } from '@ember-decorators/component'; import { action } from '@ember/object'; -import { baseTableClass } from '@datahub/institutional-memory/components/institutional-memory/wiki/url-list'; +import { baseTableClass } from '@datahub/shared/components/institutional-memory/wiki/url-list'; import { setProperties } from '@ember/object'; import { noop } from 'lodash'; diff --git a/datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/date.hbs b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/date.hbs similarity index 100% rename from datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/date.hbs rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/date.hbs diff --git a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/date.ts b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/date.ts similarity index 69% rename from datahub-web/@datahub/search/addon/components/custom-search-result-property-component/date.ts rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/date.ts index 5de944cb9b..bf9e8fbbd7 100644 --- a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/date.ts +++ b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/date.ts @@ -1,16 +1,11 @@ -import Component from '@ember/component'; -// @ts-ignore: Ignore import of compiled template -import template from '../../templates/components/custom-search-result-property-component/date'; +import Component from '@glimmer/component'; import { computed } from '@ember/object'; -import { layout, tagName } from '@ember-decorators/component'; import { ICustomSearchResultPropertyComponentDate } from '@datahub/data-models/types/search/custom-search-result-property-component/date'; /** * Component to render field as formatted dates. */ -@tagName('') -@layout(template) -export default class CustomSearchResultPropertyComponentDate extends Component { +export default class CustomSearchResultPropertyComponentDate extends Component<{ /** * number value of the date */ @@ -20,14 +15,14 @@ export default class CustomSearchResultPropertyComponentDate extends Component { * options passed from search should specify format */ options?: ICustomSearchResultPropertyComponentDate['options']; - +}> { /** * Sometimes BE returns time in seconds instead of MS. * this will transform the date to something moment will accept */ - @computed('value') + @computed('args.value') get fixedValue(): number | undefined { - const { options, value } = this; + const { options, value } = this.args; if (options && typeof value !== 'undefined' && options.inSeconds) { return value * 1000; } diff --git a/datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/icon.hbs b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/icon.hbs similarity index 100% rename from datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/icon.hbs rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/icon.hbs diff --git a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/icon.ts b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/icon.ts similarity index 67% rename from datahub-web/@datahub/search/addon/components/custom-search-result-property-component/icon.ts rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/icon.ts index 95e5addec0..3d7c00c1e9 100644 --- a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/icon.ts +++ b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/icon.ts @@ -1,16 +1,11 @@ -import Component from '@ember/component'; -// @ts-ignore: Ignore import of compiled template -import template from '../../templates/components/custom-search-result-property-component/icon'; -import { layout, tagName } from '@ember-decorators/component'; +import Component from '@glimmer/component'; import { DataModelEntity } from '@datahub/data-models/constants/entity'; import { ICustomSearchResultPropertyComponentIcon } from '@datahub/data-models/types/search/custom-search-result-property-component/icon'; /** * Component to render field as icons. Normally used in the header of a search result */ -@tagName('') -@layout(template) -export default class CustomSearchResultPropertyComponentSearchIcon extends Component { +export default class CustomSearchResultPropertyComponentSearchIcon extends Component<{ /** * The entity that we want to get the property from */ @@ -25,4 +20,4 @@ export default class CustomSearchResultPropertyComponentSearchIcon extends Compo * Options for this component */ options?: ICustomSearchResultPropertyComponentIcon['options']; -} +}> {} diff --git a/datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/link.hbs b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/link.hbs similarity index 100% rename from datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/link.hbs rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/link.hbs diff --git a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/link.ts b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/link.ts similarity index 63% rename from datahub-web/@datahub/search/addon/components/custom-search-result-property-component/link.ts rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/link.ts index 85e8d3736a..94bf9bf31d 100644 --- a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/link.ts +++ b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/link.ts @@ -1,16 +1,11 @@ -import Component from '@ember/component'; -// @ts-ignore: Ignore import of compiled template -import template from '../../templates/components/custom-search-result-property-component/link'; +import Component from '@glimmer/component'; import { DataModelEntity } from '@datahub/data-models/constants/entity'; -import { layout, tagName } from '@ember-decorators/component'; import { ICustomSearchResultPropertyComponentLink } from '@datahub/data-models/types/search/custom-search-result-property-component/link'; /** * Component to render external links */ -@tagName('') -@layout(template) -export default class CustomSearchResultPropertyComponentSearchLink extends Component { +export default class CustomSearchResultPropertyComponentSearchLink extends Component<{ /** * The entity that we want to get the property from */ @@ -20,4 +15,4 @@ export default class CustomSearchResultPropertyComponentSearchLink extends Compo * Options for this component */ options?: ICustomSearchResultPropertyComponentLink['options']; -} +}> {} diff --git a/datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/tag.hbs b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/tag.hbs similarity index 100% rename from datahub-web/@datahub/search/addon/templates/components/custom-search-result-property-component/tag.hbs rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/tag.hbs diff --git a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/tag.ts b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/tag.ts similarity index 63% rename from datahub-web/@datahub/search/addon/components/custom-search-result-property-component/tag.ts rename to datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/tag.ts index 2967595737..74eabadf22 100644 --- a/datahub-web/@datahub/search/addon/components/custom-search-result-property-component/tag.ts +++ b/datahub-web/@datahub/shared/addon/components/search/custom-search-result-property-component/tag.ts @@ -1,30 +1,27 @@ -import Component from '@ember/component'; -// @ts-ignore: Ignore import of compiled template -import template from '../../templates/components/custom-search-result-property-component/tag'; -import { layout, tagName } from '@ember-decorators/component'; +import Component from '@glimmer/component'; import { ICustomSearchResultPropertyComponentTag } from '@datahub/data-models/types/search/custom-search-result-property-component/tag'; -/** - * This is a wrapper for nacho-pill that accepts options - */ -@layout(template) -@tagName('') -export default class CustomSearchResultPropertyComponentSearchTag extends Component { - baseClass = 'entity-pill'; - +export default class CustomSearchResultPropertyComponentSearchTag extends Component<{ /** * value can have the string which to show or a boolean to say whether we should show this tag * in this case, options.text must be defined */ value?: string | boolean; + /** + * Options that this component accept + */ + options?: ICustomSearchResultPropertyComponentTag['options']; +}> { + baseClass = 'entity-pill'; + /** * returns the text to display for this tag. * text can come from the value or an option in options */ get text(): string | undefined { - const { value, options } = this; - if (typeof this.value === 'boolean' && value && options && options.text) { + const { value, options } = this.args; + if (typeof value === 'boolean' && value && options && options.text) { return options.text; } if (typeof value === 'string' && value.length > 0) { @@ -33,9 +30,4 @@ export default class CustomSearchResultPropertyComponentSearchTag extends Compon return undefined; } - - /** - * Options that this component accept - */ - options?: ICustomSearchResultPropertyComponentTag['options']; } diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/helpers/institutional-memory.ts b/datahub-web/@datahub/shared/addon/mirage-addon/helpers/institutional-memory.ts similarity index 92% rename from datahub-web/@datahub/institutional-memory/tests/dummy/mirage/helpers/institutional-memory.ts rename to datahub-web/@datahub/shared/addon/mirage-addon/helpers/institutional-memory.ts index 5e744541e1..15d6e123aa 100644 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/helpers/institutional-memory.ts +++ b/datahub-web/@datahub/shared/addon/mirage-addon/helpers/institutional-memory.ts @@ -1,5 +1,5 @@ import { IFunctionRouteHandler, IMirageRequest } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated'; -import { IMirageInstitutionalMemorySchema } from '../types/schema'; +import { IMirageInstitutionalMemorySchema } from '../../../tests/dummy/mirage/types/schema'; import { IInstitutionalMemory } from '@datahub/metadata-types/types/aspects/institutional-memory'; /** diff --git a/datahub-web/@datahub/search/addon/services/search.ts b/datahub-web/@datahub/shared/addon/services/search.ts similarity index 100% rename from datahub-web/@datahub/search/addon/services/search.ts rename to datahub-web/@datahub/shared/addon/services/search.ts diff --git a/datahub-web/@datahub/shared/addon/templates/components/entity-page/entity-header/tag.hbs b/datahub-web/@datahub/shared/addon/templates/components/entity-page/entity-header/tag.hbs index 4cf3fbe390..34c74c57d6 100644 --- a/datahub-web/@datahub/shared/addon/templates/components/entity-page/entity-header/tag.hbs +++ b/datahub-web/@datahub/shared/addon/templates/components/entity-page/entity-header/tag.hbs @@ -1,6 +1,7 @@ {{#if this.text}} diff --git a/datahub-web/@datahub/institutional-memory/addon/templates/components/institutional-memory/containers/tab.hbs b/datahub-web/@datahub/shared/addon/templates/components/institutional-memory/containers/tab.hbs similarity index 100% rename from datahub-web/@datahub/institutional-memory/addon/templates/components/institutional-memory/containers/tab.hbs rename to datahub-web/@datahub/shared/addon/templates/components/institutional-memory/containers/tab.hbs diff --git a/datahub-web/@datahub/institutional-memory/addon/templates/components/institutional-memory/wiki/url-list.hbs b/datahub-web/@datahub/shared/addon/templates/components/institutional-memory/wiki/url-list.hbs similarity index 100% rename from datahub-web/@datahub/institutional-memory/addon/templates/components/institutional-memory/wiki/url-list.hbs rename to datahub-web/@datahub/shared/addon/templates/components/institutional-memory/wiki/url-list.hbs diff --git a/datahub-web/@datahub/institutional-memory/addon/templates/components/institutional-memory/wiki/url-list/add-dialog.hbs b/datahub-web/@datahub/shared/addon/templates/components/institutional-memory/wiki/url-list/add-dialog.hbs similarity index 100% rename from datahub-web/@datahub/institutional-memory/addon/templates/components/institutional-memory/wiki/url-list/add-dialog.hbs rename to datahub-web/@datahub/shared/addon/templates/components/institutional-memory/wiki/url-list/add-dialog.hbs diff --git a/datahub-web/@datahub/search/addon/utils/entities.ts b/datahub-web/@datahub/shared/addon/utils/search/entities.ts similarity index 100% rename from datahub-web/@datahub/search/addon/utils/entities.ts rename to datahub-web/@datahub/shared/addon/utils/search/entities.ts diff --git a/datahub-web/@datahub/search/addon/utils/search-results.ts b/datahub-web/@datahub/shared/addon/utils/search/search-results.ts similarity index 97% rename from datahub-web/@datahub/search/addon/utils/search-results.ts rename to datahub-web/@datahub/shared/addon/utils/search/search-results.ts index c1a8ca7d1f..0f2ea1802b 100644 --- a/datahub-web/@datahub/search/addon/utils/search-results.ts +++ b/datahub-web/@datahub/shared/addon/utils/search/search-results.ts @@ -4,7 +4,7 @@ import { IDataModelEntitySearchResult } from '@datahub/data-models/types/entity/search'; import { IFacetCounts, IFacetsCounts } from '@datahub/data-models/types/entity/facets'; -import { IAggregationMetadata } from '@datahub/search/types/api/entity'; +import { IAggregationMetadata } from '@datahub/shared/types/search/entity'; import { DataModelEntity } from '@datahub/data-models/constants/entity'; /** diff --git a/datahub-web/@datahub/shared/app/components/institutional-memory/containers/tab.js b/datahub-web/@datahub/shared/app/components/institutional-memory/containers/tab.js new file mode 100644 index 0000000000..58c77a7422 --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/institutional-memory/containers/tab.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/institutional-memory/containers/tab'; diff --git a/datahub-web/@datahub/shared/app/components/institutional-memory/wiki/url-list.js b/datahub-web/@datahub/shared/app/components/institutional-memory/wiki/url-list.js new file mode 100644 index 0000000000..623d522229 --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/institutional-memory/wiki/url-list.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/institutional-memory/wiki/url-list'; diff --git a/datahub-web/@datahub/shared/app/components/institutional-memory/wiki/url-list/add-dialog.js b/datahub-web/@datahub/shared/app/components/institutional-memory/wiki/url-list/add-dialog.js new file mode 100644 index 0000000000..9db6131892 --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/institutional-memory/wiki/url-list/add-dialog.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/institutional-memory/wiki/url-list/add-dialog'; diff --git a/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/date.js b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/date.js new file mode 100644 index 0000000000..284d0d0b48 --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/date.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/search/custom-search-result-property-component/date'; diff --git a/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/icon.js b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/icon.js new file mode 100644 index 0000000000..896a666fb5 --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/icon.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/search/custom-search-result-property-component/icon'; diff --git a/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/link.js b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/link.js new file mode 100644 index 0000000000..c868dc9ae2 --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/link.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/search/custom-search-result-property-component/link'; diff --git a/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/tag.js b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/tag.js new file mode 100644 index 0000000000..846ae5c14d --- /dev/null +++ b/datahub-web/@datahub/shared/app/components/search/custom-search-result-property-component/tag.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/components/search/custom-search-result-property-component/tag'; diff --git a/datahub-web/@datahub/shared/app/services/search.js b/datahub-web/@datahub/shared/app/services/search.js new file mode 100644 index 0000000000..b3bb3bbfea --- /dev/null +++ b/datahub-web/@datahub/shared/app/services/search.js @@ -0,0 +1 @@ +export { default } from '@datahub/shared/services/search'; diff --git a/datahub-web/@datahub/shared/app/styles/datahub-shared.scss b/datahub-web/@datahub/shared/app/styles/datahub-shared.scss index 14d3ce86df..4423165eb0 100644 --- a/datahub-web/@datahub/shared/app/styles/datahub-shared.scss +++ b/datahub-web/@datahub/shared/app/styles/datahub-shared.scss @@ -18,3 +18,4 @@ @import 'browse-nav/all'; @import 'foxie/all'; @import 'lists/all'; +@import 'institutional-memory/all'; diff --git a/datahub-web/@datahub/institutional-memory/app/styles/institutional-memory/_all.scss b/datahub-web/@datahub/shared/app/styles/institutional-memory/_all.scss similarity index 100% rename from datahub-web/@datahub/institutional-memory/app/styles/institutional-memory/_all.scss rename to datahub-web/@datahub/shared/app/styles/institutional-memory/_all.scss diff --git a/datahub-web/@datahub/institutional-memory/app/styles/institutional-memory/_links.scss b/datahub-web/@datahub/shared/app/styles/institutional-memory/_links.scss similarity index 100% rename from datahub-web/@datahub/institutional-memory/app/styles/institutional-memory/_links.scss rename to datahub-web/@datahub/shared/app/styles/institutional-memory/_links.scss diff --git a/datahub-web/@datahub/institutional-memory/tests/acceptance/tab-test.ts b/datahub-web/@datahub/shared/tests/acceptance/institutional-memory/tab-test.ts similarity index 84% rename from datahub-web/@datahub/institutional-memory/tests/acceptance/tab-test.ts rename to datahub-web/@datahub/shared/tests/acceptance/institutional-memory/tab-test.ts index 881d291785..8358c1bd79 100644 --- a/datahub-web/@datahub/institutional-memory/tests/acceptance/tab-test.ts +++ b/datahub-web/@datahub/shared/tests/acceptance/institutional-memory/tab-test.ts @@ -1,10 +1,9 @@ import { module, test } from 'qunit'; import { visit, currentURL, find, findAll, click, waitFor, fillIn } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; -import testScenario from 'dummy/mirage/scenarios/test'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import { IMirageTestContext } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated'; -import { baseTableClass } from '@datahub/institutional-memory/components/institutional-memory/wiki/url-list'; +import { baseTableClass } from '@datahub/shared/components/institutional-memory/wiki/url-list'; import { stubService } from '@datahub/utils/test-helpers/stub-service'; module('Acceptance | tab', function(hooks): void { @@ -23,7 +22,8 @@ module('Acceptance | tab', function(hooks): void { test('testing institutional-memory tab container', async function(this: IMirageTestContext, assert) { const server = this.server; - testScenario(server); + + server.createList('institutionalMemory', 2, 'static'); stubService('notifications', { notify: null @@ -33,7 +33,7 @@ module('Acceptance | tab', function(hooks): void { assert.equal(currentURL(), '/wiki'); assert.equal(findAll(rowClass).length, 2, 'Renders 2 rows as expected'); assert.equal( - find(`${rowClass}:first-child ${authorClass}`)!.textContent!.trim(), + find(`${rowClass}:first-child ${authorClass}`)?.textContent?.trim(), firstRowAuthor, 'Renders author of a link as expected' ); @@ -42,7 +42,7 @@ module('Acceptance | tab', function(hooks): void { assert.equal(findAll(rowClass).length, 1, 'Delete action removed a row'); assert.equal( - find(`${rowClass}:first-child ${authorClass}`)!.textContent!.trim(), + find(`${rowClass}:first-child ${authorClass}`)?.textContent?.trim(), secondRowAuthor, 'Remaining author was the second one' ); @@ -62,12 +62,12 @@ module('Acceptance | tab', function(hooks): void { assert.equal(findAll(rowClass).length, 2, 'We have two links again'); assert.equal( - find(`${rowClass}:nth-child(2) ${authorClass}`)!.textContent!.trim(), + find(`${rowClass}:nth-child(2) ${authorClass}`)?.textContent?.trim(), 'pikachu', 'Renders the new row as expected' ); assert.equal( - find(`${rowClass}:nth-child(2) ${baseClass}__description-info`)!.textContent!.trim(), + find(`${rowClass}:nth-child(2) ${baseClass}__description-info`)?.textContent?.trim(), 'some description', 'Renders descriptions as expected' ); diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/components/change-management/change-log-search-provider.ts b/datahub-web/@datahub/shared/tests/dummy/app/components/change-management/change-log-search-provider.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/components/change-management/change-log-search-provider.ts rename to datahub-web/@datahub/shared/tests/dummy/app/components/change-management/change-log-search-provider.ts diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/components/search/containers/entity-task-container.ts b/datahub-web/@datahub/shared/tests/dummy/app/components/search/containers/entity-task-container.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/components/search/containers/entity-task-container.ts rename to datahub-web/@datahub/shared/tests/dummy/app/components/search/containers/entity-task-container.ts diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/models/pokemon.ts b/datahub-web/@datahub/shared/tests/dummy/app/models/pokemon.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/models/pokemon.ts rename to datahub-web/@datahub/shared/tests/dummy/app/models/pokemon.ts diff --git a/datahub-web/@datahub/shared/tests/dummy/app/router.ts b/datahub-web/@datahub/shared/tests/dummy/app/router.ts index ca9687d4e7..2623490e12 100644 --- a/datahub-web/@datahub/shared/tests/dummy/app/router.ts +++ b/datahub-web/@datahub/shared/tests/dummy/app/router.ts @@ -13,4 +13,14 @@ Router.map(function(): void { this.route('lineage', function() { this.route('urn', { path: '/:urn' }); }); + this.route('wiki'); + this.route('testcomponents'); + // TODO: [META-11856] This is here as the acceptance test for the wiki tab throws an error because + // this package has no concept of the user profile page, but the avatar links to such page. Should + // be improved when we revamp how testing is done + this.route('user', function() { + this.route('profile', { path: '/:user_id' }, function() { + this.route('tab', { path: '/:tab_selected' }); + }); + }); }); diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/testcomponents.ts b/datahub-web/@datahub/shared/tests/dummy/app/routes/testcomponents.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/testcomponents.ts rename to datahub-web/@datahub/shared/tests/dummy/app/routes/testcomponents.ts diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/wiki.ts b/datahub-web/@datahub/shared/tests/dummy/app/routes/wiki.ts similarity index 80% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/wiki.ts rename to datahub-web/@datahub/shared/tests/dummy/app/routes/wiki.ts index e6174a5891..4ba6c94ea8 100644 --- a/datahub-web/@datahub/institutional-memory/tests/dummy/app/routes/wiki.ts +++ b/datahub-web/@datahub/shared/tests/dummy/app/routes/wiki.ts @@ -1,5 +1,5 @@ import Route from '@ember/routing/route'; -import { Pokemon } from 'dummy/models/pokemon'; +import { Pokemon } from '../models/pokemon'; export default class Wiki extends Route { model(): { testEntity: Pokemon } { diff --git a/datahub-web/@datahub/shared/tests/dummy/app/styles/app.scss b/datahub-web/@datahub/shared/tests/dummy/app/styles/app.scss index c8a9d82780..85acebb9e3 100644 --- a/datahub-web/@datahub/shared/tests/dummy/app/styles/app.scss +++ b/datahub-web/@datahub/shared/tests/dummy/app/styles/app.scss @@ -10,3 +10,7 @@ display: flex; justify-content: space-between; } + +.test-container { + width: $max-container-width; +} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/components/search/containers/entity-task-container.hbs b/datahub-web/@datahub/shared/tests/dummy/app/templates/components/containers/entity-task-container.hbs similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/components/search/containers/entity-task-container.hbs rename to datahub-web/@datahub/shared/tests/dummy/app/templates/components/containers/entity-task-container.hbs diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/testcomponents.hbs b/datahub-web/@datahub/shared/tests/dummy/app/templates/testcomponents.hbs similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/testcomponents.hbs rename to datahub-web/@datahub/shared/tests/dummy/app/templates/testcomponents.hbs diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/wiki.hbs b/datahub-web/@datahub/shared/tests/dummy/app/templates/wiki.hbs similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/app/templates/wiki.hbs rename to datahub-web/@datahub/shared/tests/dummy/app/templates/wiki.hbs diff --git a/datahub-web/@datahub/shared/tests/dummy/mirage/config.ts b/datahub-web/@datahub/shared/tests/dummy/mirage/config.ts index b35cd142fc..3da7585660 100644 --- a/datahub-web/@datahub/shared/tests/dummy/mirage/config.ts +++ b/datahub-web/@datahub/shared/tests/dummy/mirage/config.ts @@ -1,5 +1,10 @@ -import { Server, Request } from 'ember-cli-mirage'; +import { Server, Request, HandlerFunction } from 'ember-cli-mirage'; import { setup } from '@datahub/shared/mirage-addon/mirage-config'; +import { + getInstitutionalMemory, + postInstitutionalMemory +} from '@datahub/shared/mirage-addon/helpers/institutional-memory'; +import { IFollowsAspect } from '@datahub/metadata-types/types/aspects/social-actions'; /** * Default handler for Mirage config @@ -16,4 +21,19 @@ export default function(this: Server): void { this.get('/features/snapshots/:urns', function(_schema: unknown, request: Request) { return (request.params.urns as string).split(';').map((urn: string) => ({ urn })); }); + + this.namespace = ''; + this.get('/pokemons/:urn/institutionalmemory', (getInstitutionalMemory as unknown) as HandlerFunction); + this.post('/pokemons/:urn/institutionalmemory', (postInstitutionalMemory as unknown) as HandlerFunction); + // TODO Mirage for follows: https://jira01.corp.linkedin.com:8443/browse/META-11926 + this.get( + '/api/v2/pokemons/pikachu:urn/follows', + (): IFollowsAspect => ({ + followers: [ + { follower: { corpUser: 'aketchum' } }, + { follower: { corpUser: 'misty' } }, + { follower: { corpUser: 'brock' } } + ] + }) + ); } diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/factories/institutional-memory.ts b/datahub-web/@datahub/shared/tests/dummy/mirage/factories/institutional-memory.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/mirage/factories/institutional-memory.ts rename to datahub-web/@datahub/shared/tests/dummy/mirage/factories/institutional-memory.ts diff --git a/datahub-web/@datahub/shared/tests/dummy/mirage/scenarios/default.ts b/datahub-web/@datahub/shared/tests/dummy/mirage/scenarios/default.ts index 53a0b41e2d..dfb83a6955 100644 --- a/datahub-web/@datahub/shared/tests/dummy/mirage/scenarios/default.ts +++ b/datahub-web/@datahub/shared/tests/dummy/mirage/scenarios/default.ts @@ -1 +1,5 @@ -export default function(): void {} +import { IMirageServer } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated'; + +export default function(server: IMirageServer): void { + server.createList('institutionalMemory', 2, 'static'); +} diff --git a/datahub-web/@datahub/institutional-memory/tests/dummy/mirage/types/schema.ts b/datahub-web/@datahub/shared/tests/dummy/mirage/types/schema.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/dummy/mirage/types/schema.ts rename to datahub-web/@datahub/shared/tests/dummy/mirage/types/schema.ts diff --git a/datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/containers/tab-test.ts b/datahub-web/@datahub/shared/tests/integration/components/institutional-memory/containers/tab-test.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/containers/tab-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/institutional-memory/containers/tab-test.ts diff --git a/datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/wiki/url-list-test.ts b/datahub-web/@datahub/shared/tests/integration/components/institutional-memory/wiki/url-list-test.ts similarity index 92% rename from datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/wiki/url-list-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/institutional-memory/wiki/url-list-test.ts index f1594a6c8d..c3a358cc35 100644 --- a/datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/wiki/url-list-test.ts +++ b/datahub-web/@datahub/shared/tests/integration/components/institutional-memory/wiki/url-list-test.ts @@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, find, findAll, click } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import { IInstitutionalMemory } from '@datahub/metadata-types/types/aspects/institutional-memory'; -import { baseTableClass } from '@datahub/institutional-memory/components/institutional-memory/wiki/url-list'; +import { baseTableClass } from '@datahub/shared/components/institutional-memory/wiki/url-list'; import { InstitutionalMemory } from '@datahub/data-models/models/aspects/institutional-memory'; import { stubService } from '@datahub/utils/test-helpers/stub-service'; @@ -44,7 +44,7 @@ module('Integration | Component | institutional-memory/wiki/url-list', function( assert.equal(findAll(`${baseClass} .nacho-table__row`).length, 2, 'Renders 2 rows as expected'); assert.equal( - find(`${baseClass} .nacho-table__row:first-child td:first-child`)!.textContent!.trim(), + find(`${baseClass} .nacho-table__row:first-child td:first-child`)?.textContent?.trim(), 'aketchum', 'Renders author of a link as expected' ); @@ -54,7 +54,7 @@ module('Integration | Component | institutional-memory/wiki/url-list', function( 'Renders a link for the user if a username/urn has been given' ); - const removeAction = (linkObject: InstitutionalMemory) => { + const removeAction = (linkObject: InstitutionalMemory): void => { assert.equal(linkObject.url, 'https://www.serebii.net/pokedex-sm/133.shtml', 'Remove action works as expected'); }; diff --git a/datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/wiki/url-list/add-dialog-test.ts b/datahub-web/@datahub/shared/tests/integration/components/institutional-memory/wiki/url-list/add-dialog-test.ts similarity index 100% rename from datahub-web/@datahub/institutional-memory/tests/integration/components/institutional-memory/wiki/url-list/add-dialog-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/institutional-memory/wiki/url-list/add-dialog-test.ts diff --git a/datahub-web/@datahub/shared/tests/integration/components/lineage/lineage-main-test.ts b/datahub-web/@datahub/shared/tests/integration/components/lineage/lineage-main-test.ts index 0091c35fba..ad0a6a3e87 100644 --- a/datahub-web/@datahub/shared/tests/integration/components/lineage/lineage-main-test.ts +++ b/datahub-web/@datahub/shared/tests/integration/components/lineage/lineage-main-test.ts @@ -15,6 +15,7 @@ module('Integration | Component | lineage/lineage-main', function(hooks) { setupHandlerRegistrations(hooks); test('error case', async function(this: MirageTestContext, assert) { + this.server.namespace = '/api/v2'; this.server.get('/lineage/graph/:urn', () => 'failure', 500); // force Mirage to error await render(hbs``); diff --git a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-date-test.ts b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-date-test.ts similarity index 86% rename from datahub-web/@datahub/search/tests/integration/components/search/bricks/search-date-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-date-test.ts index 8ba818310b..cd73952dd5 100644 --- a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-date-test.ts +++ b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-date-test.ts @@ -18,7 +18,7 @@ module('Integration | Component | custom-search-result-property-component/date', format: 'MM/DD/YYYY, hh:mm a' } }); - await render(hbs``); + await render(hbs``); assert.equal(this.element.textContent && this.element.textContent.trim(), '11/28/2018, 06:42 pm'); }); diff --git a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-icon-test.ts b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-icon-test.ts similarity index 74% rename from datahub-web/@datahub/search/tests/integration/components/search/bricks/search-icon-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-icon-test.ts index f230e794dc..4b275df91f 100644 --- a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-icon-test.ts +++ b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-icon-test.ts @@ -14,7 +14,9 @@ module('Integration | Component | custom-search-result-property-component/icon', iconName: 'certificate' } }); - await render(hbs``); + await render( + hbs`` + ); assert.dom('.fa-certificate').exists(); }); @@ -26,7 +28,9 @@ module('Integration | Component | custom-search-result-property-component/icon', iconName: 'certificate' } }); - await render(hbs``); + await render( + hbs`` + ); assert.dom('.fa-certificate').doesNotExist(); }); diff --git a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-link-test.ts b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-link-test.ts similarity index 85% rename from datahub-web/@datahub/search/tests/integration/components/search/bricks/search-link-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-link-test.ts index e5dff39174..bdb9555d0f 100644 --- a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-link-test.ts +++ b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-link-test.ts @@ -24,7 +24,9 @@ module('Integration | Component | custom-search-result-property-component/link', this.set('entity', entity); this.set('options', options); - await render(hbs``); + await render( + hbs`` + ); assert.equal(this.element.textContent && this.element.textContent.trim(), 'View in a nice place'); }); diff --git a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-tag-test.ts b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-tag-test.ts similarity index 85% rename from datahub-web/@datahub/search/tests/integration/components/search/bricks/search-tag-test.ts rename to datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-tag-test.ts index 0442399208..1e122e1a54 100644 --- a/datahub-web/@datahub/search/tests/integration/components/search/bricks/search-tag-test.ts +++ b/datahub-web/@datahub/shared/tests/integration/components/search/custom-search-result-property-component/search-tag-test.ts @@ -13,7 +13,9 @@ module('Integration | Component | custom-search-result-property-component/tag', }; this.set('value', 'testValue'); this.set('options', mockOptions); - await render(hbs``); + await render( + hbs`` + ); assert.ok(this.element, 'Initial render is without errors'); assert.equal(findAll('.nacho-pill').length, 1, 'Renders a pill with the right class1'); @@ -25,7 +27,9 @@ module('Integration | Component | custom-search-result-property-component/tag', test('it renders correctly when titleize and modifiers are absent', async function(assert): Promise { this.set('value', 'testValue'); this.set('options', {}); - await render(hbs``); + await render( + hbs`` + ); assert.ok(this.element, 'Initial render is without errors'); assert.equal(findAll('.nacho-pill').length, 1, 'Renders a pill with the right class'); diff --git a/datahub-web/@datahub/search/types/api/entity.d.ts b/datahub-web/@datahub/shared/types/search/entity.d.ts similarity index 100% rename from datahub-web/@datahub/search/types/api/entity.d.ts rename to datahub-web/@datahub/shared/types/search/entity.d.ts diff --git a/datahub-web/@datahub/utils/addon/api/shared.ts b/datahub-web/@datahub/utils/addon/api/shared.ts index dc8164f3db..39ffeab0f3 100644 --- a/datahub-web/@datahub/utils/addon/api/shared.ts +++ b/datahub-web/@datahub/utils/addon/api/shared.ts @@ -34,6 +34,7 @@ export enum ApiStatus { */ export enum ApiResponseStatus { Ok = 200, + BadRequest = 400, NotFound = 404, UnAuthorized = 401, InternalServerError = 500 @@ -58,7 +59,8 @@ const isApiStatusError = (e: Error) => (apiResponseStatus: ApiResponseStatus): b * @param {Error} e * @return {boolean} */ -export const isNotFoundApiError = (e: Error): boolean => isApiStatusError(e)(ApiResponseStatus.NotFound); +export const isNotFoundApiError = (e: Error): boolean => + isApiStatusError(e)(ApiResponseStatus.NotFound) || isApiStatusError(e)(ApiResponseStatus.BadRequest); /** * Checks that a server response status is a server exception diff --git a/datahub-web/packages/data-portal/app/components/nacho/nacho-tab-cacher.ts b/datahub-web/@datahub/utils/addon/components/nacho/nacho-tab-cacher.ts similarity index 74% rename from datahub-web/packages/data-portal/app/components/nacho/nacho-tab-cacher.ts rename to datahub-web/@datahub/utils/addon/components/nacho/nacho-tab-cacher.ts index 944f0688a8..fa192d5632 100644 --- a/datahub-web/packages/data-portal/app/components/nacho/nacho-tab-cacher.ts +++ b/datahub-web/@datahub/utils/addon/components/nacho/nacho-tab-cacher.ts @@ -1,7 +1,8 @@ import Component from '@ember/component'; -import { tagName } from '@ember-decorators/component'; +import { tagName, layout } from '@ember-decorators/component'; import { set } from '@ember/object'; - +// @ts-ignore: Ignore import of compiled template +import template from '../../templates/components/nacho/nacho-tab-cacher'; /** * This component will lazy load when demanded its content. Lazy load means that it will not yield * until currentTab === id. Once that happens, content won't be deleted or rerendered @@ -12,32 +13,33 @@ import { set } from '@ember/object'; * id: string (this tab id) * */ +@layout(template) @tagName('') export default class NachoTabPager extends Component { /** * if you want lazy load behavior */ - lazyLoad: boolean; + lazyLoad?: boolean; /** * actual string value of the selected current tab's id */ - currentTab: string; + currentTab?: string; /** * this tab id */ - id: string; + id?: string; /** * internal flag to say whether this tab has been already rendered */ - cached: boolean; + cached?: boolean; /** * Hook to check current tab and cache accondingly */ - didReceiveAttrs() { + didReceiveAttrs(): void { const { id, currentTab } = this; if (id === currentTab) { set(this, 'cached', true); diff --git a/datahub-web/packages/data-portal/app/templates/components/nacho/nacho-tab-cacher.hbs b/datahub-web/@datahub/utils/addon/templates/components/nacho/nacho-tab-cacher.hbs similarity index 100% rename from datahub-web/packages/data-portal/app/templates/components/nacho/nacho-tab-cacher.hbs rename to datahub-web/@datahub/utils/addon/templates/components/nacho/nacho-tab-cacher.hbs diff --git a/datahub-web/@datahub/utils/app/components/nacho/nacho-tab-cacher.js b/datahub-web/@datahub/utils/app/components/nacho/nacho-tab-cacher.js new file mode 100644 index 0000000000..38b1e523f0 --- /dev/null +++ b/datahub-web/@datahub/utils/app/components/nacho/nacho-tab-cacher.js @@ -0,0 +1 @@ +export { default } from '@datahub/utils/components/nacho/nacho-tab-cacher'; diff --git a/datahub-web/@datahub/utils/tests/integration/components/nacho/nacho-tab-cacher-test.ts b/datahub-web/@datahub/utils/tests/integration/components/nacho/nacho-tab-cacher-test.ts new file mode 100644 index 0000000000..21b42cfc14 --- /dev/null +++ b/datahub-web/@datahub/utils/tests/integration/components/nacho/nacho-tab-cacher-test.ts @@ -0,0 +1,95 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render, settled } from '@ember/test-helpers'; +import hbs from 'htmlbars-inline-precompile'; +import { getTextNoSpaces } from '@datahub/utils/test-helpers/dom-helpers'; +import { setProperties } from '@ember/object'; +import { TestContext } from 'ember-test-helpers'; + +interface INachoTabCacherTest { + lazyRender: boolean; + id: string; + currentTab: string; + content: unknown; +} + +type IMyTestContext = INachoTabCacherTest & TestContext; + +const initTest = async ( + test: IMyTestContext, + overrides: Partial +): Promise<{ getNCalls: () => number }> => { + let getterCalls = 0; + setProperties(test, { + lazyRender: false, + id: 'one', + currentTab: 'two', + content: { + get text(): string { + getterCalls += 1; + return 'somecontenthere'; + } + }, + ...overrides + }); + + await render(hbs` + {{#nacho/nacho-tab-cacher + lazyRender=lazyRender + id=id + currentTab=currentTab + }} + {{content.text}} + {{/nacho/nacho-tab-cacher}} + `); + + return { + getNCalls(): number { + return getterCalls; + } + }; +}; + +module('Integration | Component | nacho/nacho-tab-cacher', function(hooks): void { + setupRenderingTest(hooks); + + test('it renders lazy render off', async function(this: IMyTestContext, assert) { + const myTestApi = await initTest(this, { lazyRender: false }); + assert.equal(getTextNoSpaces(this), 'somecontenthere', 'No lazy render should render initially'); + + setProperties(this, { + currentTab: 'one' + }); + + await settled(); + assert.equal(getTextNoSpaces(this), 'somecontenthere', 'No lazy render should always show'); + + setProperties(this, { + currentTab: 'two' + }); + + await settled(); + assert.equal(getTextNoSpaces(this), 'somecontenthere', 'No lazy render should always show'); + assert.equal(myTestApi.getNCalls(), 1, 'No rerenders'); + }); + + test('it renders lazy render on', async function(this: IMyTestContext, assert) { + const myTestApi = await initTest(this, { lazyRender: true }); + assert.equal(getTextNoSpaces(this), '', 'Lazy render should not render initially'); + + setProperties(this, { + currentTab: 'one' + }); + + await settled(); + assert.equal(getTextNoSpaces(this), 'somecontenthere', 'Lazy render should render'); + + setProperties(this, { + currentTab: 'two' + }); + + await settled(); + assert.equal(getTextNoSpaces(this), 'somecontenthere', 'Lazy render should cache'); + assert.equal(myTestApi.getNCalls(), 1, 'Getter happens only once'); + }); +}); diff --git a/datahub-web/@nacho-ui/nacho-pill/addon/components/nacho-pill.ts b/datahub-web/@nacho-ui/nacho-pill/addon/components/nacho-pill.ts index af415128c7..d6d873d129 100644 --- a/datahub-web/@nacho-ui/nacho-pill/addon/components/nacho-pill.ts +++ b/datahub-web/@nacho-ui/nacho-pill/addon/components/nacho-pill.ts @@ -35,6 +35,11 @@ export default class NachoPill extends Component { */ state!: PillState; + /** + * tooltip message if needed for a tooltip + */ + tooltip?: string; + /** * Determines the CSS classes that must be applied to the pill based on the determination of * various properties passed into this component diff --git a/datahub-web/@nacho-ui/nacho-pill/addon/templates/components/nacho-pill.hbs b/datahub-web/@nacho-ui/nacho-pill/addon/templates/components/nacho-pill.hbs index 2c5bc5ba67..76b6ae5ac1 100644 --- a/datahub-web/@nacho-ui/nacho-pill/addon/templates/components/nacho-pill.hbs +++ b/datahub-web/@nacho-ui/nacho-pill/addon/templates/components/nacho-pill.hbs @@ -2,4 +2,8 @@ {{yield (hash pill=this)}} {{else}} {{text}} + + {{#if @tooltip}} + + {{/if}} {{/if}} diff --git a/datahub-web/@nacho-ui/nacho-pill/app/styles/nacho-pill-styles/_pill-standard.scss b/datahub-web/@nacho-ui/nacho-pill/app/styles/nacho-pill-styles/_pill-standard.scss index efbf862e92..023cd5a55e 100644 --- a/datahub-web/@nacho-ui/nacho-pill/app/styles/nacho-pill-styles/_pill-standard.scss +++ b/datahub-web/@nacho-ui/nacho-pill/app/styles/nacho-pill-styles/_pill-standard.scss @@ -3,6 +3,10 @@ line-height: item-spacing(5); cursor: pointer; + .ember-tooltip { + font-weight: fw(normal, 3); + } + &--small { font-size: fs(small); line-height: 18px; diff --git a/datahub-web/packages/data-portal/app/components/datasets/containers/dataset-relationship-levels.ts b/datahub-web/packages/data-portal/app/components/datasets/containers/dataset-relationship-levels.ts index 8633cd4e45..93011c9e69 100644 --- a/datahub-web/packages/data-portal/app/components/datasets/containers/dataset-relationship-levels.ts +++ b/datahub-web/packages/data-portal/app/components/datasets/containers/dataset-relationship-levels.ts @@ -38,13 +38,10 @@ export default class DatasetRelationshipLevels extends Component { ): IterableIterator> { const currentNode = this.graphDb.nodesById[id]; if (currentNode) { - let payload: IDatasetEntity | undefined = currentNode.payload?.dataset; - if (payload?.hasOwnProperty('dataset')) { - payload = ((payload as unknown) as { dataset: IDatasetEntity }).dataset; - } - const method = upstream ? readUpstreamDatasetsByUrn : readDownstreamDatasetsByUrn; - const nodes = ((yield method(payload?.uri || '')) as unknown) as Array; + const nodes = ((yield method( + (currentNode.payload && currentNode.payload.dataset.uri) || '' + )) as unknown) as Array; nodes.forEach((node): INode => this.graphDb.addNode(node, currentNode, upstream)); this.graphDb.setNodeAttrs(id, { loaded: true diff --git a/datahub-web/packages/data-portal/app/components/search/containers/entity-task-container.ts b/datahub-web/packages/data-portal/app/components/search/containers/entity-task-container.ts index 6f64340440..e4a80e3656 100644 --- a/datahub-web/packages/data-portal/app/components/search/containers/entity-task-container.ts +++ b/datahub-web/packages/data-portal/app/components/search/containers/entity-task-container.ts @@ -14,7 +14,7 @@ import { debounce } from '@ember/runloop'; import { IDataModelEntitySearchResult, ISearchDataWithMetadata } from '@datahub/data-models/types/entity/search'; import { DataModelEntity, DataModelName, DataModelEntityInstance } from '@datahub/data-models/constants/entity'; import { DatasetEntity } from '@datahub/data-models/entity/dataset/dataset-entity'; -import { ISearchEntityApiParams, IEntitySearchResult } from '@datahub/search/types/api/entity'; +import { ISearchEntityApiParams, IEntitySearchResult } from '@datahub/shared/types/search/entity'; import { alias } from '@ember/object/computed'; import { containerDataSource } from '@datahub/utils/api/data-source'; import { inject as service } from '@ember/service'; @@ -33,7 +33,7 @@ import { searchResultItemIndex, searchResultMetasToFacetCounts, withResultMetadata -} from '@datahub/search/utils/search-results'; +} from '@datahub/shared/utils/search/search-results'; import { assertComponentPropertyNotUndefined } from '@datahub/utils/decorators/assert'; @containerDataSource('searchTask', ['keyword', 'page', 'facets', 'entity']) diff --git a/datahub-web/packages/data-portal/app/components/search/containers/multi-entity-task-container.ts b/datahub-web/packages/data-portal/app/components/search/containers/multi-entity-task-container.ts index c547d8cd80..1f1d7ed85e 100644 --- a/datahub-web/packages/data-portal/app/components/search/containers/multi-entity-task-container.ts +++ b/datahub-web/packages/data-portal/app/components/search/containers/multi-entity-task-container.ts @@ -8,7 +8,7 @@ import { action, setProperties, computed } from '@ember/object'; import { inject as service } from '@ember/service'; import { containerDataSource } from '@datahub/utils/api/data-source'; import { noop } from 'lodash'; -import { isSearchable } from '@datahub/search/utils/entities'; +import { isSearchable } from '@datahub/shared/utils/search/entities'; import { zipObject, mapValues } from 'lodash'; import FoxieService from '@datahub/shared/services/foxie'; import { UserFunctionType } from '@datahub/shared/constants/foxie/user-function-type'; diff --git a/datahub-web/packages/data-portal/app/components/search/containers/search-box.ts b/datahub-web/packages/data-portal/app/components/search/containers/search-box.ts index 86856fa5a1..5bf5e341fc 100644 --- a/datahub-web/packages/data-portal/app/components/search/containers/search-box.ts +++ b/datahub-web/packages/data-portal/app/components/search/containers/search-box.ts @@ -1,6 +1,6 @@ import Component from '@ember/component'; import { inject as service } from '@ember/service'; -import SearchService from '@datahub/search/services/search'; +import SearchService from '@datahub/shared/services/search'; import { alias } from '@ember/object/computed'; import { grammarProcessingSteps, typeaheadQueryProcessor } from 'datahub-web/utils/parsers/autocomplete'; import { ISuggestionGroup } from 'datahub-web/utils/parsers/autocomplete/types'; diff --git a/datahub-web/packages/data-portal/app/components/search/search-box.ts b/datahub-web/packages/data-portal/app/components/search/search-box.ts index c7f070987c..e101aebeaa 100644 --- a/datahub-web/packages/data-portal/app/components/search/search-box.ts +++ b/datahub-web/packages/data-portal/app/components/search/search-box.ts @@ -16,7 +16,7 @@ import titleize from '@nacho-ui/core/utils/strings/titleize'; import { stringListOfEntities } from '@datahub/data-models/entity/utils/entities'; import { ETaskPromise } from '@datahub/utils/types/concurrency'; import DataModelsService from '@datahub/data-models/services/data-models'; -import { isSearchable } from '@datahub/search/utils/entities'; +import { isSearchable } from '@datahub/shared/utils/search/entities'; /** * Presentation component that renders a search box */ diff --git a/datahub-web/packages/data-portal/app/components/search/search-result.ts b/datahub-web/packages/data-portal/app/components/search/search-result.ts index 3629d70e57..71370ecd2a 100644 --- a/datahub-web/packages/data-portal/app/components/search/search-result.ts +++ b/datahub-web/packages/data-portal/app/components/search/search-result.ts @@ -1,7 +1,7 @@ import Component from '@ember/component'; import { classNames } from '@ember-decorators/component'; import { inject as service } from '@ember/service'; -import Search from '@datahub/search/services/search'; +import Search from '@datahub/shared/services/search'; import { action, computed } from '@ember/object'; import { DataModelEntityInstance } from '@datahub/data-models/constants/entity'; import { ISearchResultMetadata } from '@datahub/data-models/types/entity/search'; diff --git a/datahub-web/packages/data-portal/app/routes/datasets/dataset.ts b/datahub-web/packages/data-portal/app/routes/datasets/dataset.ts index 1f659c9bcc..d4ccbeb537 100644 --- a/datahub-web/packages/data-portal/app/routes/datasets/dataset.ts +++ b/datahub-web/packages/data-portal/app/routes/datasets/dataset.ts @@ -2,7 +2,7 @@ import Route from '@ember/routing/route'; import Notifications from '@datahub/utils/services/notifications'; import { refreshModelForQueryParams } from '@datahub/utils/routes/refresh-model-for-query-params'; import { inject as service } from '@ember/service'; -import Search from '@datahub/search/services/search'; +import Search from '@datahub/shared/services/search'; import { getDatasetUrnParts } from '@datahub/data-models/entity/dataset/utils/urn'; import { DatasetPlatform } from '@datahub/metadata-types/constants/entity/dataset/platform'; /** diff --git a/datahub-web/packages/data-portal/app/routes/search.ts b/datahub-web/packages/data-portal/app/routes/search.ts index 596af889db..01af430c7f 100644 --- a/datahub-web/packages/data-portal/app/routes/search.ts +++ b/datahub-web/packages/data-portal/app/routes/search.ts @@ -3,7 +3,7 @@ import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-rout import { refreshModelForQueryParams } from '@datahub/utils/routes/refresh-model-for-query-params'; import { action, setProperties, set } from '@ember/object'; import { inject as service } from '@ember/service'; -import SearchService from '@datahub/search/services/search'; +import SearchService from '@datahub/shared/services/search'; import SearchController from 'datahub-web/controllers/search'; import Transition from '@ember/routing/-private/transition'; import { DatasetEntity } from '@datahub/data-models/entity/dataset/dataset-entity'; diff --git a/datahub-web/packages/data-portal/app/styles/app.scss b/datahub-web/packages/data-portal/app/styles/app.scss index 33c406b0ea..415fe014d1 100644 --- a/datahub-web/packages/data-portal/app/styles/app.scss +++ b/datahub-web/packages/data-portal/app/styles/app.scss @@ -18,7 +18,6 @@ @import 'nacho-button'; @import 'nacho-dropdown'; @import 'datasets-core'; -@import 'institutional-memory'; @import 'user-entity'; @import 'components/all'; diff --git a/datahub-web/packages/data-portal/app/styles/layout/_dataset.scss b/datahub-web/packages/data-portal/app/styles/layout/_dataset.scss index 1e408d4633..ab334e1353 100644 --- a/datahub-web/packages/data-portal/app/styles/layout/_dataset.scss +++ b/datahub-web/packages/data-portal/app/styles/layout/_dataset.scss @@ -8,6 +8,10 @@ align-items: center; margin-top: item-spacing(5); margin-bottom: item-spacing(5); + + .nacho-pill { + margin-right: item-spacing(1); + } } .dataset-name { diff --git a/datahub-web/packages/data-portal/app/templates/components/datasets/dataset-header.hbs b/datahub-web/packages/data-portal/app/templates/components/datasets/dataset-header.hbs index 3137949777..246d2c4ef9 100644 --- a/datahub-web/packages/data-portal/app/templates/components/datasets/dataset-header.hbs +++ b/datahub-web/packages/data-portal/app/templates/components/datasets/dataset-header.hbs @@ -5,34 +5,29 @@ {{@entity.name}} - {{#if @entity.removed}} - - REMOVED + - - - {{/if}} + - {{#if datasetContainsPersonalData}} - - PII + - - + - {{/if}} - - {{#if @entity.deprecated}} - - - - DEPRECATED - - - - - - {{/if}}
diff --git a/datahub-web/packages/data-portal/app/typings/app/services.d.ts b/datahub-web/packages/data-portal/app/typings/app/services.d.ts index 9be030b935..886e029aa6 100644 --- a/datahub-web/packages/data-portal/app/typings/app/services.d.ts +++ b/datahub-web/packages/data-portal/app/typings/app/services.d.ts @@ -3,7 +3,7 @@ import CurrentUser from '@datahub/shared/services/current-user'; import Metrics from 'ember-metrics'; import BannerService from 'datahub-web/services/banners'; import HotKeys from 'datahub-web/services/hot-keys'; -import Search from '@datahub/search/services/search'; +import Search from '@datahub/shared/services/search'; declare module '@ember/service' { // eslint-disable-next-line @typescript-eslint/interface-name-prefix diff --git a/datahub-web/packages/data-portal/app/utils/api/search/search.ts b/datahub-web/packages/data-portal/app/utils/api/search/search.ts index 5f33d068ca..0f383e58dd 100644 --- a/datahub-web/packages/data-portal/app/utils/api/search/search.ts +++ b/datahub-web/packages/data-portal/app/utils/api/search/search.ts @@ -5,7 +5,7 @@ import { IFacetsSelectionsArray, IFacetSelections } from '@datahub/data-models/types/entity/facets'; -import { ISearchEntityApiParams, IEntitySearchResult } from '@datahub/search/types/api/entity'; +import { ISearchEntityApiParams, IEntitySearchResult } from '@datahub/shared/types/search/entity'; import { getApiRoot, ApiVersion } from '@datahub/utils/api/shared'; import buildUrl from '@datahub/utils/api/build-url'; diff --git a/datahub-web/packages/data-portal/package.json b/datahub-web/packages/data-portal/package.json index 115ee10ded..1e29c254ef 100644 --- a/datahub-web/packages/data-portal/package.json +++ b/datahub-web/packages/data-portal/package.json @@ -85,9 +85,7 @@ "dependencies": { "@datahub/data-models": "0.0.0", "@datahub/datasets-core": "0.0.1", - "@datahub/institutional-memory": "0.0.0", "@datahub/metadata-types": "0.0.0", - "@datahub/search": "0.0.0", "@datahub/shared": "0.0.0", "@datahub/user": "0.0.0", "@datahub/utils": "0.0.0", diff --git a/datahub-web/packages/data-portal/tsconfig.json b/datahub-web/packages/data-portal/tsconfig.json index 4c1cfda8c3..9111f4089e 100644 --- a/datahub-web/packages/data-portal/tsconfig.json +++ b/datahub-web/packages/data-portal/tsconfig.json @@ -71,12 +71,6 @@ "@datahub/shared/*": [ "../../@datahub/shared/addon/*" ], - "@datahub/search": [ - "../../@datahub/search/addon" - ], - "@datahub/search/*": [ - "../../@datahub/search/addon/*" - ], "@nacho-ui/core": [ "../../@nacho-ui/nacho-core/addon" ], @@ -96,8 +90,6 @@ "../../@datahub/metadata-types/types/**/*", "../../@datahub/utils/addon/**/*", "../../@datahub/utils/types/**/*", - "../../@datahub/search/addon/**/*", - "../../@datahub/search/types/**/*", "../../@datahub/shared/addon/**/*", "../../@datahub/shared/types/**/*", "../../@datahub/shared/tests/**/*",