diff --git a/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/eventFiltersAPI.ts b/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/eventFiltersAPI.ts deleted file mode 100644 index 899a54c449c..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/eventFiltersAPI.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -import { AxiosResponse } from 'axios'; -import axiosClient from '.'; -import { EventFilter, Filters } from '../generated/settings/settings'; - -const BASE_URL = '/settings'; - -export interface ActivityFeedSettings { - config_type: string; - config_value: EventFilter[]; -} - -export const getActivityFeedEventFilters = async () => { - const response = await axiosClient.get( - `${BASE_URL}/activityFeedFilterSetting` - ); - - return response.data.config_value; -}; - -export const createOrUpdateActivityFeedEventFilter = async ( - entityType: string, - payload: Filters[] -) => { - const configOptions = { - headers: { 'Content-type': 'application/json' }, - }; - const url = `${BASE_URL}/filter/${entityType}/add`; - - const response = await axiosClient.put< - Filters[], - AxiosResponse - >(url, payload, configOptions); - - return response.data.config_value; -}; - -export const updateFilters = async (data: ActivityFeedSettings) => { - const url = `${BASE_URL}`; - - const response = await axiosClient.put< - ActivityFeedSettings, - AxiosResponse - >(url, data); - - return response.data; -}; - -export const resetAllFilters = async () => { - const url = `${BASE_URL}/resetFilters`; - - const response = await axiosClient.post< - null, - AxiosResponse - >(url); - - return response.data; -}; - -export const getInitialFilters = async () => { - const url = `${BASE_URL}/bootstrappedFilters`; - - const response = await axiosClient.get(url); - - return response.data; -}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.test.tsx index 1420a2af5fc..cc2b01f1fa7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.test.tsx @@ -17,7 +17,7 @@ import { MemoryRouter } from 'react-router-dom'; import DashboardVersion from './DashboardVersion.component'; import { DashboardVersionProp } from './DashboardVersion.interface'; import { - dashboardVersionProp, + dashboardVersionProps, mockNoChartData, mockTagChangeVersion, } from './dashboardVersion.mock'; @@ -70,7 +70,7 @@ JSON.parse = jest.fn().mockReturnValue([]); describe('Test DashboardVersion page', () => { it('Checks if the page has all the proper components rendered', async () => { const { container } = render( - , + , { wrapper: MemoryRouter, } @@ -110,7 +110,7 @@ describe('Test DashboardVersion page', () => { it('Checks if the page has all the proper components rendered, if change version is related to tags', async () => { const { container } = render( { it('Checks if the page has all the proper components rendered, if the dashboard deleted is undefined', async () => { const { container } = render( , @@ -189,7 +189,7 @@ describe('Test DashboardVersion page', () => { it('If version is loading it should show loading component', async () => { const { container } = render( - , + , { wrapper: MemoryRouter, } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/dashboardVersion.mock.ts b/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/dashboardVersion.mock.ts index ca4a79aa286..c0918a459c6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/dashboardVersion.mock.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/dashboardVersion.mock.ts @@ -15,7 +15,7 @@ import { VersionData } from '../../pages/EntityVersionPage/EntityVersionPage.component'; import { DashboardVersionProp } from './DashboardVersion.interface'; -export const dashboardVersionProp = { +export const dashboardVersionProps = { version: '0.3', currentVersionData: { id: '4ee70a0c-6ec9-4c93-a91c-4a57d65bebc8', diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ExecutionStrip/ExecutionStrip.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ExecutionStrip/ExecutionStrip.tsx deleted file mode 100644 index a696e7e0fde..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ExecutionStrip/ExecutionStrip.tsx +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -import { - faChevronLeft, - faChevronRight, -} from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import classNames from 'classnames'; -import _ from 'lodash'; -import { ScrollHandle } from 'Models'; -import React, { - HTMLAttributes, - useEffect, - useLayoutEffect, - useRef, - useState, -} from 'react'; -import { Pipeline, PipelineStatus } from '../../generated/entity/data/pipeline'; -import { getDateOrTimeFromSeconds } from '../../utils/TimeUtils'; - -interface Props extends HTMLAttributes { - executions: Pipeline['pipelineStatus']; - selectedExecution: PipelineStatus; - onSelectExecution: (e: PipelineStatus) => void; -} - -const ExecutionStrip = ({ - executions, - selectedExecution, - onSelectExecution, -}: Props) => { - const tableRef = useRef(null); - const [scrollOffset, setScrollOffSet] = useState(0); - const [containerWidth, setContainerWidth] = useState(0); - const [scrollHandle, setScrollHandle] = useState({ - left: true, - right: true, - }); - - const scrollHandler = (scrlOffset: number) => { - if (tableRef.current) { - tableRef.current.scrollLeft += scrlOffset; - setScrollOffSet(tableRef.current.scrollLeft); - } - }; - - const getExecutionTooltip = (execution: PipelineStatus) => { - const executionDate = execution.timestamp as number; - const momentDate = getDateOrTimeFromSeconds(executionDate); - const momentTime = getDateOrTimeFromSeconds(executionDate, 'hh:mm a'); - - return ( - <> - {momentDate} -
- {momentTime} - - ); - }; - - useLayoutEffect(() => { - setContainerWidth( - (tableRef.current?.scrollWidth ?? 0) - - (tableRef.current?.clientWidth ?? 0) - ); - if (tableRef.current) { - scrollHandler(tableRef.current?.scrollWidth); - } - }, []); - - useEffect(() => { - const rFlag = scrollOffset !== containerWidth; - const lFlag = scrollOffset > 0; - setScrollHandle((pre) => ({ ...pre, right: rFlag, left: lFlag })); - }, [scrollOffset, containerWidth]); - - return ( -
{ - setScrollOffSet(tableRef.current?.scrollLeft ?? 0); - }}> - {scrollHandle.left ? ( - - ) : null} - {scrollHandle.right ? ( - - ) : null} -
-
-
-
-
- {getExecutionTooltip(executions || {})} -
-
onSelectExecution(executions || {})}> - -
-
-
-
-
-
- ); -}; - -export default ExecutionStrip; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryReferences/GlossaryReferences.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryReferences/GlossaryReferences.tsx deleted file mode 100644 index ffb575f2cbe..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryReferences/GlossaryReferences.tsx +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import React, { FunctionComponent, useEffect, useState } from 'react'; -import { TermReference } from '../../generated/entity/data/glossaryTerm'; -import SVGIcons, { Icons } from '../../utils/SvgUtils'; -import { Button } from '../buttons/Button/Button'; -import { Field } from '../Field/Field'; - -interface Props { - referenceList: TermReference[]; - onReferenceFieldChange: (newRefList: TermReference[]) => void; -} - -const GlossaryReferences: FunctionComponent = ({ - referenceList, - onReferenceFieldChange, -}: Props) => { - const [references, setReferences] = useState( - referenceList || [] - ); - - const handleReferenceFieldsChange = ( - i: number, - field: keyof TermReference, - value: string - ) => { - const newFormValues = [...references]; - newFormValues[i][field] = value; - onReferenceFieldChange(newFormValues); - }; - - const addReferenceFields = () => { - onReferenceFieldChange([...references, { name: '', endpoint: '' }]); - }; - - const removeReferenceFields = (i: number) => { - const newFormValues = [...references]; - newFormValues.splice(i, 1); - onReferenceFieldChange(newFormValues); - }; - - useEffect(() => { - setReferences(referenceList); - }, [referenceList]); - - return ( -
-
-

References

- -
- - {references.map((value, i) => ( -
-
- - - handleReferenceFieldsChange(i, 'name', e.target.value) - } - /> - - - - handleReferenceFieldsChange(i, 'endpoint', e.target.value) - } - /> - -
- -
- ))} -
- ); -}; - -export default GlossaryReferences; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/assets.mock.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/assets.mock.tsx deleted file mode 100644 index 0c04d99451a..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/assets.mock.tsx +++ /dev/null @@ -1,1788 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ -/* eslint-disable max-len */ - -export const MOCK_DATABASE = { - data: [ - { - id: '1efafecc-1f9b-45ce-809c-ad3c935bc3dc', - name: 'dim_address', - displayName: 'dim_address', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address', - description: - 'This dimension table contains the billing and shipping addresses of customers. You can join this table with the sales table to generate lists of the billing and shipping addresses. Customers can enter their addresses more than once, so the same address can appear in more than one row in this table. This table contains one row per customer address.', - version: 0.1, - updatedAt: 1645083582585, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/1efafecc-1f9b-45ce-809c-ad3c935bc3dc', - tableType: 'Regular', - columns: [ - { - name: 'address_id', - displayName: 'address_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: 'Unique identifier for the address.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.address_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.shop_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'first_name', - displayName: 'first_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'First name of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.first_name', - tags: [], - ordinalPosition: 3, - }, - { - name: 'last_name', - displayName: 'last_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'Last name of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.last_name', - tags: [], - ordinalPosition: 4, - }, - { - name: 'address1', - displayName: 'address1', - dataType: 'VARCHAR', - dataLength: 500, - dataTypeDisplay: 'varchar', - description: 'The first address line. For example, 150 Elgin St.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.address1', - tags: [], - ordinalPosition: 5, - }, - { - name: 'address2', - displayName: 'address2', - dataType: 'VARCHAR', - dataLength: 500, - dataTypeDisplay: 'varchar', - description: 'The second address line. For example, Suite 800.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.address2', - tags: [], - ordinalPosition: 6, - }, - { - name: 'company', - displayName: 'company', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: "The name of the customer's business, if one exists.", - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.company', - tags: [], - ordinalPosition: 7, - }, - { - name: 'city', - displayName: 'city', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The name of the city. For example, Palo Alto.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.city', - tags: [], - ordinalPosition: 8, - }, - { - name: 'region', - displayName: 'region', - dataType: 'VARCHAR', - dataLength: 512, - dataTypeDisplay: 'varchar', - description: - 'The name of the region, such as a province or state, where the customer is located. For example, Ontario or New York. This column is the same as CustomerAddress.province in the Admin API.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.region', - tags: [], - ordinalPosition: 9, - }, - { - name: 'zip', - displayName: 'zip', - dataType: 'VARCHAR', - dataLength: 10, - dataTypeDisplay: 'varchar', - description: 'The ZIP or postal code. For example, 90210.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.zip', - tags: [], - ordinalPosition: 10, - }, - { - name: 'country', - displayName: 'country', - dataType: 'VARCHAR', - dataLength: 50, - dataTypeDisplay: 'varchar', - description: 'The full name of the country. For example, Canada.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.country', - tags: [], - ordinalPosition: 11, - }, - { - name: 'phone', - displayName: 'phone', - dataType: 'VARCHAR', - dataLength: 15, - dataTypeDisplay: 'varchar', - description: 'The phone number of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_address.phone', - tags: [], - ordinalPosition: 12, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 100, - percentileRank: 36, - }, - weeklyStats: { - count: 100, - percentileRank: 36, - }, - monthlyStats: { - count: 100, - percentileRank: 36, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: '7680c97e-5879-4df2-87cb-2fc285493bd5', - name: 'dim_api_client', - displayName: 'dim_api_client', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_api_client', - description: - 'This dimension table contains a row for each channel or app that your customers use to create orders. Some examples of these include Facebook and Online Store. You can join this table with the sales table to measure channel performance.', - version: 0.1, - updatedAt: 1645083582825, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/7680c97e-5879-4df2-87cb-2fc285493bd5', - tableType: 'Regular', - columns: [ - { - name: 'api_client_id', - displayName: 'api_client_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'ID of the API client that called the Shopify API. For example, the ID for the online store is 580111.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_api_client.api_client_id', - tags: [], - ordinalPosition: 1, - }, - { - name: 'title', - displayName: 'title', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'Full name of the app or channel. For example, Point of Sale, Online Store.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_api_client.title', - tags: [], - ordinalPosition: 2, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 85, - percentileRank: 27, - }, - weeklyStats: { - count: 85, - percentileRank: 27, - }, - monthlyStats: { - count: 85, - percentileRank: 27, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: '3b90510c-95d0-46e0-abd4-9c4c123faaf3', - name: 'dim_customer', - displayName: 'dim_customer', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer', - description: - 'The dimension table contains data about your customers. The customers table contains one row per customer. It includes historical metrics (such as the total amount that each customer has spent in your store) as well as forward-looking metrics (such as the predicted number of days between future orders and the expected order value in the next 30 days). This table also includes columns that segment customers into various categories (such as new, returning, promising, at risk, dormant, and loyal), which you can use to target marketing activities.', - version: 0.1, - updatedAt: 1645083582912, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/3b90510c-95d0-46e0-abd4-9c4c123faaf3', - tableType: 'Regular', - columns: [ - { - name: 'customer_id', - displayName: 'customer_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the customer. This is the primary key column for this table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.customer_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.shop_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'average_order_size', - displayName: 'average_order_size', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - "The average amount of money that the customer spends on orders from the store. The value is formatted in the store's currency and it is calculated using the following formula: total_order_value / total_order_count.", - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.average_order_size', - tags: [], - ordinalPosition: 3, - }, - { - name: 'total_order_count', - displayName: 'total_order_count', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The total number of orders that the customer has made from this store across their lifetime.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.total_order_count', - tags: [], - ordinalPosition: 4, - }, - { - name: 'total_order_value', - displayName: 'total_order_value', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - "The total amount of money that the customer has spent on orders from the store across their lifetime. The value is formatted in the store's currency.", - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.total_order_value', - tags: [], - ordinalPosition: 5, - }, - { - name: 'first_order_date', - displayName: 'first_order_date', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'The date (ISO 8601) and time (UTC) when the customer placed their first order. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.first_order_date', - tags: [], - ordinalPosition: 6, - }, - { - name: 'last_order_date', - displayName: 'last_order_date', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'The date (ISO 8601) and time (UTC) when the customer placed their most recent order. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.last_order_date', - tags: [], - ordinalPosition: 7, - }, - { - name: 'rank', - displayName: 'rank', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - "A numeric ranking of the customer's lifetime value for the store relative to all customers.", - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.rank', - tags: [], - ordinalPosition: 8, - }, - { - name: 'new', - displayName: 'new', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true if the customer made their first order in the last 30 days. Otherwise returns false.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.new', - tags: [], - ordinalPosition: 9, - }, - { - name: 'returning', - displayName: 'returning', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true when the customer has made more than one order. Returns false when the customer has made one order only. Returns Null when the customer exists in Shopify, but they have not made any orders. For example, this column can be null because the customer provided their contact information and then abandoned the checkout. Customers can also be created manually in the Shopify admin and by apps that use the Admin API.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.returning', - tags: [], - ordinalPosition: 10, - }, - { - name: 'loyal', - displayName: 'loyal', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true when the customer has a high probability of returning, and has placed more orders than the average customer. Otherwise returns false.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.loyal', - tags: [], - ordinalPosition: 11, - }, - { - name: 'at_risk', - displayName: 'at_risk', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true for repeat customers, who have a medium probability of returning and have not placed an order in a while. Otherwise returns false.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.at_risk', - tags: [], - ordinalPosition: 12, - }, - { - name: 'dormant', - displayName: 'dormant', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true when the customer has a very low probability of returning to make another purchase. Otherwise returns false.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.dormant', - tags: [], - ordinalPosition: 13, - }, - { - name: 'promising', - displayName: 'promising', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true when the customer has a high probability of returning and becoming a loyal customer. Otherwise returns false.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.promising', - tags: [], - ordinalPosition: 14, - }, - { - name: 'predicted_average_number_of_days_between_orders', - displayName: 'predicted_average_number_of_days_between_orders', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: 'The predicated number of days between future orders.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.predicted_average_number_of_days_between_orders', - tags: [], - ordinalPosition: 15, - }, - { - name: 'expected_purchase_value_in_next_30_days', - displayName: 'expected_purchase_value_in_next_30_days', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - "The total purchase amount of the orders that the customer is expected to make in the next 30 days. The value is formatted in the store's currency.", - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.expected_purchase_value_in_next_30_days', - tags: [], - ordinalPosition: 16, - }, - { - name: 'first_name', - displayName: 'first_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The first name of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.first_name', - tags: [], - ordinalPosition: 17, - }, - { - name: 'last_name', - displayName: 'last_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The last name of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.last_name', - tags: [], - ordinalPosition: 18, - }, - { - name: 'city', - displayName: 'city', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - "The city from the customer's billing address. For example, Topeka.", - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.city', - tags: [], - ordinalPosition: 19, - }, - { - name: 'region', - displayName: 'region', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - "The name of the region, such as the province or state, from the customer's billing address. For example, Alberta, Florida. This column is the same as CustomerAddress.province in the Admin API.", - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.region', - tags: [], - ordinalPosition: 20, - }, - { - name: 'country', - displayName: 'country', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - "The country from the customer's billing address. For example, United States.", - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.country', - tags: [], - ordinalPosition: 21, - }, - { - name: 'email', - displayName: 'email', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The email of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.email', - tags: [], - ordinalPosition: 22, - }, - { - name: 'phone', - displayName: 'phone', - dataType: 'VARCHAR', - dataLength: 15, - dataTypeDisplay: 'varchar', - description: 'The phone number of the customer.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.phone', - tags: [], - ordinalPosition: 23, - }, - { - name: 'verified_email', - displayName: 'verified_email', - dataType: 'BOOLEAN', - dataLength: 15, - dataTypeDisplay: 'boolean', - description: - "Returns true when the customer's email has been verified. Otherwise returns false.", - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.verified_email', - tags: [], - ordinalPosition: 24, - }, - { - name: 'created_at', - displayName: 'created_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'The date (ISO 8601) and time (UTC) when the customer was added to the store. The format is YYYY-MM-DD HH:mm:ss (for example, 2018-02-05 17:04:01).', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.created_at', - tags: [], - ordinalPosition: 25, - }, - { - name: 'accepts_marketing', - displayName: 'accepts_marketing', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Returns true when the customer has agreed to accept marketing. Otherwise returns false.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.accepts_marketing', - tags: [], - ordinalPosition: 26, - }, - { - name: 'customer', - displayName: 'customer', - dataType: 'STRUCT', - dataTypeDisplay: - 'struct', - description: 'Customer Personal Details', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.customer', - tags: [], - ordinalPosition: 27, - children: [ - { - name: 'username', - displayName: 'username', - dataType: 'VARCHAR', - dataLength: 20, - dataTypeDisplay: 'VARCHAR(32)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.customer.username', - tags: [], - }, - { - name: 'name', - displayName: 'name', - dataType: 'VARCHAR', - dataLength: 20, - dataTypeDisplay: 'VARCHAR(32)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.customer.name', - tags: [], - }, - { - name: 'sex', - displayName: 'sex', - dataType: 'CHAR', - dataLength: 1, - dataTypeDisplay: 'CHAR(1)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.customer.sex', - tags: [], - }, - { - name: 'address', - displayName: 'address', - dataType: 'VARCHAR', - dataLength: 128, - dataTypeDisplay: 'VARCHAR(128)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.customer.address', - tags: [], - }, - { - name: 'mail', - displayName: 'mail', - dataType: 'VARCHAR', - dataLength: 64, - dataTypeDisplay: 'VARCHAR(64)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.customer.mail', - tags: [], - }, - { - name: 'birthdate', - displayName: 'birthdate', - dataType: 'VARCHAR', - dataLength: 16, - dataTypeDisplay: 'VARCHAR(16)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.customer.birthdate', - tags: [], - }, - ], - }, - { - name: 'shipping_address', - displayName: 'shipping_address', - dataType: 'ARRAY', - arrayDataType: 'STRUCT', - dataTypeDisplay: - 'array>', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_customer.shipping_address', - tags: [], - }, - { - name: 'orders', - displayName: 'orders', - dataType: 'ARRAY', - arrayDataType: 'STRUCT', - dataTypeDisplay: - 'array>', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_customer.orders', - tags: [], - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 140, - percentileRank: 64, - }, - weeklyStats: { - count: 140, - percentileRank: 64, - }, - monthlyStats: { - count: 140, - percentileRank: 64, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: '796f2d7a-9d0d-41a8-8928-fbebb2564065', - name: 'dim_location', - displayName: 'dim_location', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_location', - description: - 'The dimension table contains metrics about your Shopify POS. This table contains one row per Shopify POS location. You can use this table to generate a list of the Shopify POS locations or you can join the table with the sales table to measure sales performance.', - version: 0.1, - updatedAt: 1645083583196, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/796f2d7a-9d0d-41a8-8928-fbebb2564065', - tableType: 'Regular', - columns: [ - { - name: 'location_id', - displayName: 'location_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_location.location_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_location.shop_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'name', - displayName: 'name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'Name of the POS location as provided by the merchant. For example, 150 Elgin Street or Downtown Boutique.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_location.name', - tags: [], - ordinalPosition: 3, - }, - { - name: 'address', - displayName: 'address', - dataType: 'STRUCT', - dataTypeDisplay: - 'struct>', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_location.address', - tags: [], - children: [ - { - name: 'street_name', - displayName: 'street_name', - dataType: 'VARCHAR', - dataLength: 24, - dataTypeDisplay: 'VARCHAR(24)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_location.address.street_name', - tags: [], - }, - { - name: 'zipcode', - displayName: 'zipcode', - dataType: 'INT', - dataTypeDisplay: 'int', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_location.address.zipcode', - tags: [], - }, - { - name: 'city', - displayName: 'city', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'VARCHAR(100)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_location.address.city', - tags: [], - }, - { - name: 'country', - displayName: 'country', - dataType: 'STRUCT', - dataTypeDisplay: - 'struct', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_location.address.country', - tags: [], - children: [ - { - name: 'country_code', - displayName: 'country_code', - dataType: 'INT', - dataTypeDisplay: 'INT', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_location.address.country.country_code', - tags: [], - }, - { - name: 'country_name', - displayName: 'country_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'VARCHAR(100)', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_location.address.country.country_name', - tags: [], - }, - ], - }, - ], - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 75, - percentileRank: 9, - }, - weeklyStats: { - count: 75, - percentileRank: 9, - }, - monthlyStats: { - count: 75, - percentileRank: 9, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: '16618ed8-792e-41ba-9813-0528f3e3b2e1', - name: 'dim_product', - displayName: 'dim_product', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product', - description: - 'This dimension table contains information about each of the products in your store. This table contains one row per product. This table reflects the current state of products in your Shopify admin.', - version: 0.1, - updatedAt: 1645083583241, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/16618ed8-792e-41ba-9813-0528f3e3b2e1', - tableType: 'Regular', - columns: [ - { - name: 'product_id', - displayName: 'product_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Unique identifier for the product. This column is the primary key for this table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product.product_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product.shop_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'title', - displayName: 'title', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'Name of the product.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product.title', - tags: [], - ordinalPosition: 3, - }, - { - name: 'vendor', - displayName: 'vendor', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'Name of the manufacturer, wholesaler, or other vendor of the product.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product.vendor', - tags: [], - ordinalPosition: 4, - }, - { - name: 'created_at', - displayName: 'created_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'Date (ISO 8601) and time (UTC) when the product was added to the store. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product.created_at', - tags: [], - ordinalPosition: 5, - }, - { - name: 'deleted_at', - displayName: 'deleted_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'Date (ISO 8601) and time (UTC) when the product was deleted. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product.deleted_at', - tags: [], - ordinalPosition: 6, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 130, - percentileRank: 55, - }, - weeklyStats: { - count: 130, - percentileRank: 55, - }, - monthlyStats: { - count: 130, - percentileRank: 55, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: 'dd719ae4-aa90-4ccb-a9c8-56f8c72b1d5e', - name: 'dim_product_variant', - displayName: 'dim_product_variant', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product_variant', - description: - 'This dimension table contains current information about each of the product variants in your store. This table contains one row per product variant.', - version: 0.1, - updatedAt: 1645083583297, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/dd719ae4-aa90-4ccb-a9c8-56f8c72b1d5e', - tableType: 'Regular', - columns: [ - { - name: 'product_variant_id', - displayName: 'product_variant_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the product variant. This column is the primary key for this table.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_product_variant.product_variant_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'product_id', - displayName: 'product_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the product. This column is a foreign key reference to the product_id column in dim_product table.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_product_variant.product_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_product_variant.shop_id', - tags: [], - ordinalPosition: 3, - }, - { - name: 'title', - displayName: 'title', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The title of the product variant.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product_variant.title', - tags: [], - ordinalPosition: 4, - }, - { - name: 'barcode', - displayName: 'barcode', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'The Barcode, UPC, or ISBN number of the product variant.', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_product_variant.barcode', - tags: [], - ordinalPosition: 5, - }, - { - name: 'sku', - displayName: 'sku', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The SKU of the product variant.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product_variant.sku', - tags: [], - ordinalPosition: 6, - }, - { - name: 'price', - displayName: 'price', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - "The price of the product variant, in your store's currency.", - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product_variant.price', - tags: [], - ordinalPosition: 7, - }, - { - name: 'grams', - displayName: 'grams', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: 'Number of grams that the product variant weighs.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_product_variant.grams', - tags: [], - ordinalPosition: 8, - }, - { - name: 'created_at', - displayName: 'created_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'The date (ISO 8601) and time (UTC) when the product variant was added to the store. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_product_variant.created_at', - tags: [], - ordinalPosition: 9, - }, - { - name: 'deleted_at', - displayName: 'deleted_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'The date (ISO 8601) and time (UTC) when the product variant was deleted. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: - 'bigquery_gcp.shopify.dim_product_variant.deleted_at', - tags: [], - ordinalPosition: 10, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 35, - percentileRank: 0, - }, - weeklyStats: { - count: 35, - percentileRank: 0, - }, - monthlyStats: { - count: 35, - percentileRank: 0, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: '82172e5b-660b-4b9b-94f7-7d87431b9baa', - name: 'dim_shop', - displayName: 'dim_shop', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_shop', - description: - 'This dimension table contains online shop information. This table contains one shop per row.', - version: 0.1, - updatedAt: 1645083583382, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/82172e5b-660b-4b9b-94f7-7d87431b9baa', - tableType: 'Regular', - columns: [ - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Unique identifier for the store. This column is the primary key for this table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_shop.shop_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'name', - displayName: 'name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'Name of your store.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_shop.name', - tags: [], - ordinalPosition: 2, - }, - { - name: 'domain', - displayName: 'domain', - dataType: 'VARCHAR', - dataLength: 1000, - dataTypeDisplay: 'varchar', - description: - 'Primary domain specified for your online store. Your primary domain is the one that your customers and search engines see. For example, www.mycompany.com.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_shop.domain', - tags: [], - ordinalPosition: 3, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 195, - percentileRank: 82, - }, - weeklyStats: { - count: 195, - percentileRank: 82, - }, - monthlyStats: { - count: 195, - percentileRank: 82, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: 'e54f82e8-5bd6-4fc4-aad0-e3f729647394', - name: 'dim_staff', - displayName: 'dim_staff', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_staff', - description: - 'This dimension table contains information about the staff accounts in the store. It contains one row per staff account. Use this table to generate a list of your staff accounts, or join it with the sales, API clients and locations tables to analyze staff performance at Shopify POS locations.', - version: 0.1, - updatedAt: 1645083583419, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/e54f82e8-5bd6-4fc4-aad0-e3f729647394', - tableType: 'Regular', - columns: [ - { - name: 'user_id', - displayName: 'user_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Unique identifier for the user of your Shopify POS or your Shopify admin.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_staff.user_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_staff.shop_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'first_name', - displayName: 'first_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'First name of the staff member.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_staff.first_name', - tags: [], - ordinalPosition: 3, - }, - { - name: 'last_name', - displayName: 'last_name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'Last name of the staff member.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_staff.last_name', - tags: [], - ordinalPosition: 4, - }, - { - name: 'email', - displayName: 'email', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'Email address of the staff member.', - fullyQualifiedName: 'bigquery_gcp.shopify.dim_staff.email', - tags: [], - ordinalPosition: 5, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 75, - percentileRank: 9, - }, - weeklyStats: { - count: 75, - percentileRank: 9, - }, - monthlyStats: { - count: 75, - percentileRank: 9, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: '769c603b-002f-4481-8004-f8c7c7e5ef9e', - name: 'fact_line_item', - displayName: 'fact_line_item', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item', - description: - 'The fact table contains information about the line items in orders. Each row in the table is a line item in an order. It contains product and product variant details as they were at the time of the order. This table does not include information about returns. Join this table with the TODO fact_sales table to get the details of the product on the day it was sold. This data will match what appears on the order in your Shopify admin as well as the in the Sales reports.', - version: 0.1, - updatedAt: 1645083583467, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/769c603b-002f-4481-8004-f8c7c7e5ef9e', - tableType: 'Regular', - columns: [ - { - name: 'line_item_id', - displayName: 'line_item_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'ID of the line item. This column is the primary key for the this table.', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.line_item_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'billing_address_id', - displayName: 'billing_address_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.billing_address_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'order_id', - displayName: 'order_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'ID of the order. This column is a foreign key reference to the orders_id column in the fact_order table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.order_id', - tags: [], - ordinalPosition: 3, - }, - { - name: 'product_id', - displayName: 'product_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'ID of the product ordered, unless the line item is for shipping costs (you can add custom items using a draft order). This column is a foreign key reference to the product_id column in the dim_product table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.product_id', - tags: [], - ordinalPosition: 4, - }, - { - name: 'product_variant_id', - displayName: 'product_variant_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.product_variant_id', - tags: [], - ordinalPosition: 5, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.shop_id', - tags: [], - ordinalPosition: 6, - }, - { - name: 'name', - displayName: 'name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'Name of the line item. This name combines the product title and the variant title into the following format: product-title - variant-title. If there is no variant title, then the format is product-title. This column is the same as order.line_items.name"in the Admin API.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.name', - tags: [], - ordinalPosition: 7, - }, - { - name: 'product_title', - displayName: 'product_title', - dataType: 'VARCHAR', - dataLength: 150, - dataTypeDisplay: 'varchar', - description: - 'Name of the product ordered. This column is the same as order.line_items.title in the Admin API.', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.product_title', - tags: [], - ordinalPosition: 8, - }, - { - name: 'price', - displayName: 'price', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: 'Price of the product variant.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.price', - tags: [], - ordinalPosition: 9, - }, - { - name: 'quantity', - displayName: 'quantity', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Number of product variant items ordered in the line item.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.quantity', - tags: [], - ordinalPosition: 10, - }, - { - name: 'requires_shipping', - displayName: 'requires_shipping', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - "Whether the product variant requires fulfillment (shipping). For example, online gift cards don't require shipping.", - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.requires_shipping', - tags: [], - ordinalPosition: 11, - }, - { - name: 'taxable', - displayName: 'taxable', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: - 'Whether taxes are charged for the product variant, otherwise contains 0. For example, when the line item is a gift card, taxes are not charged.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.taxable', - tags: [], - ordinalPosition: 12, - }, - { - name: 'gift_card', - displayName: 'gift_card', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: 'Whether the product variant is a gift card.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.gift_card', - tags: [], - ordinalPosition: 13, - }, - { - name: 'grams', - displayName: 'grams', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Weight of a single unit of the product variant. Contains 0 when the product variant is a gift card.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_line_item.grams', - tags: [], - ordinalPosition: 14, - }, - { - name: 'product_vendor', - displayName: 'product_vendor', - dataType: 'VARCHAR', - dataLength: 200, - dataTypeDisplay: 'varchar', - description: - 'Name of the manufacturer, wholesaler, or other vendor of the product.', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.product_vendor', - tags: [], - ordinalPosition: 15, - }, - { - name: 'fulfillable_quantity', - displayName: 'fulfillable_quantity', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Number of product variant items in the line item that require fulfillment. Some product variants, such as gift cards and digital products, do not need to be fulfilled.', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.fulfillable_quantity', - tags: [], - ordinalPosition: 16, - }, - { - name: 'fulfillment_service', - displayName: 'fulfillment_service', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'Name of the fulfillment service provider that fulfilled (shipped) the variant ordered. Contains manual when there is no fulfillment service specified for the variant.', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_line_item.fulfillment_service', - tags: [], - ordinalPosition: 17, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 100, - percentileRank: 36, - }, - weeklyStats: { - count: 100, - percentileRank: 36, - }, - monthlyStats: { - count: 100, - percentileRank: 36, - }, - date: '2022-02-17', - }, - deleted: false, - }, - { - id: 'c3409a1b-05fb-4c42-8d04-9a71290e12b6', - name: 'fact_order', - displayName: 'fact_order', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order', - description: - 'The orders table contains information about each order in your store. Although this table is good for generating order lists and joining with the dim_customer, use the sales table instead for computing financial or other metrics.', - version: 0.1, - updatedAt: 1645083583597, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/tables/c3409a1b-05fb-4c42-8d04-9a71290e12b6', - tableType: 'Regular', - columns: [ - { - name: 'order_id', - displayName: 'order_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'Unique numeric identifier for the order across Shopify stores. In your Shopify admin, this ID is used internally. Most merchants are familiar with the other ID that appears on orders in the Shopify admin. This ID can be found in the Name column.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.order_id', - tags: [], - constraint: 'PRIMARY_KEY', - ordinalPosition: 1, - }, - { - name: 'api_client_id', - displayName: 'api_client_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the API client that called the Shopify API. This column is a foreign key reference to the api_client_id column in the dim_api_client table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.api_client_id', - tags: [], - ordinalPosition: 2, - }, - { - name: 'billing_address_id', - displayName: 'billing_address_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_order.billing_address_id', - tags: [], - ordinalPosition: 3, - }, - { - name: 'customer_id', - displayName: 'customer_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the customer. This column is a foreign key reference to the customer_id column in the dim_customer table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.customer_id', - tags: [], - ordinalPosition: 4, - }, - { - name: 'location_id', - displayName: 'location_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.location_id', - tags: [], - ordinalPosition: 5, - }, - { - name: 'shipping_address_id', - displayName: 'shipping_address_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - fullyQualifiedName: - 'bigquery_gcp.shopify.fact_order.shipping_address_id', - tags: [], - ordinalPosition: 6, - }, - { - name: 'shop_id', - displayName: 'shop_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.shop_id', - tags: [], - ordinalPosition: 7, - }, - { - name: 'user_id', - displayName: 'user_id', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The ID of the staff member who created the order. This column is a foreign key reference to the ID in the dim_staff table. This column applies to Shopify POS orders and to orders that were converted from draft orders.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.user_id', - tags: [], - ordinalPosition: 8, - }, - { - name: 'name', - displayName: 'name', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: - 'The identifier of the order that the merchant and customer sees. This is the ID that appears on the order in the Shopify admin. For example, #1001. By default, this identifier is unique to one store. If you have multiple stores, then use the order_id column to guarantee uniqueness across multiple stores.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.name', - tags: [], - ordinalPosition: 9, - }, - { - name: 'total_price', - displayName: 'total_price', - dataType: 'NUMERIC', - dataTypeDisplay: 'numeric', - description: - 'The total price of the order, including shipping and taxes. This column includes gift card sales, but does not include returns. This value may not be accurate for API-imported orders. Do not use this column for financial calculations. Instead, use the total_price column in the sales table.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.total_price', - tags: [], - ordinalPosition: 10, - }, - { - name: 'discount_code', - displayName: 'discount_code', - dataType: 'VARCHAR', - dataLength: 100, - dataTypeDisplay: 'varchar', - description: 'The discount code that was applied to the order.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.discount_code', - tags: [], - ordinalPosition: 11, - }, - { - name: 'processed_at', - displayName: 'processed_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'The date (ISO 8601) and time (UTC) when the order was created. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.processed_at', - tags: [], - ordinalPosition: 12, - }, - { - name: 'canceled_at', - displayName: 'canceled_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'If the order was canceled, then this column contains the date (ISO 8601) and time (UTC) when the order was canceled. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.canceled_at', - tags: [], - ordinalPosition: 13, - }, - { - name: 'deleted_at', - displayName: 'deleted_at', - dataType: 'TIMESTAMP', - dataTypeDisplay: 'timestamp', - description: - 'If the order was deleted, then this column contains the date (ISO 8601) and time (UTC) when the order was deleted. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01).', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.deleted_at', - tags: [], - ordinalPosition: 14, - }, - { - name: 'test', - displayName: 'test', - dataType: 'BOOLEAN', - dataTypeDisplay: 'boolean', - description: 'True when the order is a test order, False otherwise.', - fullyQualifiedName: 'bigquery_gcp.shopify.fact_order.test', - tags: [], - ordinalPosition: 15, - }, - ], - database: { - id: 'bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - type: 'database', - name: 'bigquery_gcp.shopify', - description: - 'This **mock** database contains tables related to shopify sales and orders with related dimension tables.', - displayName: 'shopify', - href: 'http://localhost:8585/api/v1/databases/bc96309d-4637-4e7c-8c4f-eb5e30dc3650', - }, - service: { - id: '31319d85-dba6-4c9a-9862-b0798e1d0b87', - type: 'databaseService', - name: 'bigquery_gcp', - description: '', - }, - serviceType: 'BigQuery', - tags: [], - usageSummary: { - dailyStats: { - count: 185, - percentileRank: 73, - }, - weeklyStats: { - count: 185, - percentileRank: 73, - }, - monthlyStats: { - count: 185, - percentileRank: 73, - }, - date: '2022-02-17', - }, - deleted: false, - }, - ], - paging: { - after: 'WXBaMSWZTWK47rFmVa2Q6GRdrAfEwCZuQ68f6auiBV4=', - total: 15, - }, -}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SlackChat/SlackChat.css b/openmetadata-ui/src/main/resources/ui/src/components/SlackChat/SlackChat.css deleted file mode 100644 index 43eab37b823..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/SlackChat/SlackChat.css +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -.slack-chat > div > div > div { - z-index: 100; -} - -.slack-chat .chatIcon { - color: white; - position: absolute; - text-align: center; - left: 50%; - top: 53%; - transform: translate(-50%, -50%); -} - -.slack-chat .bubble { - z-index: 10; - background-color: #7147e8; - box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.3); - height: 60px; - position: fixed; - right: 20px; - bottom: 20px; - width: 60px; - border-radius: 50%; - display: inline-block; - cursor: pointer; - scale: 0.75; - transition: scale 0.5s ease-in-out; -} - -.slack-chat .bubble:hover { - scale: 1; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SlackChat/SlackChat.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SlackChat/SlackChat.tsx deleted file mode 100644 index 54233e6abe3..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/SlackChat/SlackChat.tsx +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -import { faMessage } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { SlackChatConfig } from 'Models'; -import React, { FC } from 'react'; -import './SlackChat.css'; - -type Props = { - slackConfig: SlackChatConfig; -}; - -const SlackChat: FC = ({ slackConfig }) => { - const url = slackConfig.slackUrl; - - return url && url.length > 0 ? ( - - ) : null; -}; - -export default SlackChat; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetails.mock.ts b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetails.mock.ts deleted file mode 100644 index 8003705f2ba..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetails.mock.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -export const mockTeams = [ - { - id: '8754b53f-15cd-4d9a-af52-bdb3a2abff61', - name: 'Cloud_Infra', - fullyQualifiedName: 'Cloud_Infra', - displayName: 'Cloud_Infra', - description: 'This is Cloud_Infra description.', - version: 0.3, - updatedAt: 1653388025589, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/teams/8754b53f-15cd-4d9a-af52-bdb3a2abff61', - users: [], - }, - { - id: '8754b53f-15cd-4d9a-af52-bdb3a2abffss', - name: 'Customer_Support', - fullyQualifiedName: 'Customer_Support', - displayName: 'Customer_Support', - description: 'This is Customer_Support description.', - version: 0.3, - updatedAt: 1653388025589, - updatedBy: 'anonymous', - href: 'test', - users: [], - }, -]; - -export const MOCK_USER = [ - { - id: '011bdb24-90a7-4a97-ba66-24002adb2b12', - type: 'user', - name: 'aaron_johnson0', - fullyQualifiedName: 'aaron_johnson0', - displayName: 'Aaron Johnson', - deleted: false, - href: 'http://localhost:8585/api/v1/users/011bdb24-90a7-4a97-ba66-24002adb2b12', - }, - { - id: '2a31e452-2061-4517-af35-0ace16161cde', - type: 'user', - name: 'aaron_singh2', - fullyQualifiedName: 'aaron_singh2', - displayName: 'Aaron Singh', - deleted: false, - href: 'http://localhost:8585/api/v1/users/2a31e452-2061-4517-af35-0ace16161cde', - }, -]; - -export const MOCK_CURRENT_TEAM_1 = { - id: '0ccba9c2-bb41-4e8d-9add-7af8bdd8d6b8', - name: 'Cloud_Infra', - fullyQualifiedName: 'Cloud_Infra', - displayName: 'Cloud_Infra', - description: 'This is Cloud_Infra description.', - version: 0.3, - updatedAt: 1653410822537, - updatedBy: 'anonymous', - href: 'http://localhost:8585/api/v1/teams/0ccba9c2-bb41-4e8d-9add-7af8bdd8d6b8', - isJoinable: true, - changeDescription: { - fieldsAdded: [ - { - name: 'owner', - newValue: - '{"id":"9fcf9550-1571-4f79-8016-ba81a8c4a2f4","type":"user","name":"aaron_johnson0","fullyQualifiedName":"aaron_johnson0","displayName":"Aaron Johnson","deleted":false}', - }, - ], - fieldsUpdated: [], - fieldsDeleted: [], - previousVersion: 0.2, - }, - deleted: false, - defaultRoles: [ - { - id: 'fb41f804-e266-4a8e-8f3a-022c72c70033', - type: 'role', - name: 'DataConsumer', - fullyQualifiedName: 'DataConsumer', - description: - 'Users with Data Consumer role use different data assets for their day to day work.', - displayName: 'Data Consumer', - deleted: false, - href: 'http://localhost:8585/api/v1/roles/fb41f804-e266-4a8e-8f3a-022c72c70033', - }, - ], -}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/Teams.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/Teams.tsx deleted file mode 100644 index 2d02e0b94db..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/Teams.tsx +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -import { Button, Col, Row, Space, Switch, Tooltip } from 'antd'; -import { AxiosError } from 'axios'; -import React, { FC, useEffect, useMemo, useState } from 'react'; -import { - NO_PERMISSION_FOR_ACTION, - NO_PERMISSION_TO_VIEW, -} from '../../constants/HelperTextUtil'; -import { Team } from '../../generated/entity/teams/team'; -import jsonData from '../../jsons/en'; -import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils'; -import { showErrorToast } from '../../utils/ToastUtils'; -import ErrorPlaceHolder from '../common/error-with-placeholder/ErrorPlaceHolder'; -import { usePermissionProvider } from '../PermissionProvider/PermissionProvider'; -import { - OperationPermission, - ResourceEntity, -} from '../PermissionProvider/PermissionProvider.interface'; -import TeamHierarchy from './TeamHierarchy'; -import './teams.less'; - -interface TeamsProps { - showDeletedTeam: boolean; - onShowDeletedTeamChange: (checked: boolean) => void; - data: Team[]; - onAddTeamClick: (value: boolean) => void; - onTeamExpand: ( - loading?: boolean, - parentTeam?: string, - updateChildNode?: boolean - ) => void; -} - -const Teams: FC = ({ - data, - showDeletedTeam, - onShowDeletedTeamChange, - onAddTeamClick, - onTeamExpand, -}) => { - const { getResourcePermission } = usePermissionProvider(); - const [resourcePermissions, setResourcePermissions] = - useState(DEFAULT_ENTITY_PERMISSION); - - const filteredData = useMemo( - () => - data.filter( - (d) => - (showDeletedTeam && d.deleted) || (!showDeletedTeam && !d.deleted) - ), - [data, showDeletedTeam] - ); - - const fetchPermissions = async () => { - try { - const perms = await getResourcePermission(ResourceEntity.TEAM); - setResourcePermissions(perms); - } catch (error) { - showErrorToast( - error as AxiosError, - jsonData['api-error-messages']['fetch-user-permission-error'] - ); - } - }; - - useEffect(() => { - fetchPermissions(); - }, []); - - return resourcePermissions.ViewAll || resourcePermissions.ViewBasic ? ( - - - - - - Deleted Teams - - - - - - - - - - - ) : ( - - - -

{NO_PERMISSION_TO_VIEW}

-
- -
- ); -}; - -export default Teams; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/Card/CardV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/Card/CardV1.tsx deleted file mode 100644 index 64fb270f0d1..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/Card/CardV1.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2022 Collate. - * 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. - */ - -import { Card } from 'antd'; -import { lowerCase } from 'lodash'; -import React, { HTMLAttributes } from 'react'; -interface CardProps extends HTMLAttributes { - id: string; - heading?: string; - classes?: string; -} - -const CardV1 = ({ children, id, heading, classes, style }: CardProps) => { - return ( - - {heading ?
{heading}
: ''} -
{children}
-
- ); -}; - -export default CardV1; diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx index 774847d2e8d..691a4466c9e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx @@ -20,7 +20,7 @@ import { diffWordsWithSpace, } from 'diff'; import { t } from 'i18next'; -import { isUndefined, uniqueId } from 'lodash'; +import { isUndefined, toString, uniqueId } from 'lodash'; import React, { Fragment } from 'react'; import ReactDOMServer from 'react-dom/server'; import { EntityField } from '../constants/Feeds.constants'; @@ -82,39 +82,39 @@ export const getDescriptionDiff = ( newDescription: string | undefined, latestDescription: string | undefined ) => { - if (!isUndefined(newDescription) || !isUndefined(oldDescription)) { - const diffArr = diffWords(oldDescription ?? '', newDescription ?? ''); - - const result = diffArr.map((diff) => { - if (diff.added) { - return ReactDOMServer.renderToString( - - {diff.value} - - ); - } - if (diff.removed) { - return ReactDOMServer.renderToString( - - {diff.value} - - ); - } - - return ReactDOMServer.renderToString( - - {diff.value} - - ); - }); - - return result.join(''); - } else { + if (isUndefined(newDescription) || isUndefined(oldDescription)) { return latestDescription || ''; } + + const diffArr = diffWords(toString(oldDescription), toString(newDescription)); + + const result = diffArr.map((diff) => { + if (diff.added) { + return ReactDOMServer.renderToString( + + {diff.value} + + ); + } + if (diff.removed) { + return ReactDOMServer.renderToString( + + {diff.value} + + ); + } + + return ReactDOMServer.renderToString( + + {diff.value} + + ); + }); + + return result.join(''); }; export const getTagsDiff = (