From cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3 Mon Sep 17 00:00:00 2001 From: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:40:35 +0530 Subject: [PATCH 1/8] Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners --- .../service/util/SubscriptionUtil.java | 114 +++++++++++------- 1 file changed, 71 insertions(+), 43 deletions(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/util/SubscriptionUtil.java b/openmetadata-service/src/main/java/org/openmetadata/service/util/SubscriptionUtil.java index 7ca7e830c446..3bad33e1e210 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/util/SubscriptionUtil.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/util/SubscriptionUtil.java @@ -154,42 +154,57 @@ public static Set getOwnerOrFollowers( } private static Set getTaskAssignees( - SubscriptionDestination.SubscriptionType type, ChangeEvent event) { + SubscriptionDestination.SubscriptionCategory category, + SubscriptionDestination.SubscriptionType type, + ChangeEvent event) { Thread thread = AlertsRuleEvaluator.getThread(event); - List assignees = thread.getTask().getAssignees(); Set receiversList = new HashSet<>(); Map teams = new HashMap<>(); Map users = new HashMap<>(); Team tempTeamVar = null; User tempUserVar = null; - if (!nullOrEmpty(assignees)) { - for (EntityReference reference : assignees) { - if (Entity.USER.equals(reference.getType())) { - tempUserVar = Entity.getEntity(USER, reference.getId(), "profile", Include.NON_DELETED); - users.put(tempUserVar.getId(), tempUserVar); - } else if (TEAM.equals(reference.getType())) { - tempTeamVar = Entity.getEntity(TEAM, reference.getId(), "profile", Include.NON_DELETED); - teams.put(tempTeamVar.getId(), tempTeamVar); + + if (category.equals(SubscriptionDestination.SubscriptionCategory.ASSIGNEES)) { + List assignees = thread.getTask().getAssignees(); + if (!nullOrEmpty(assignees)) { + for (EntityReference reference : assignees) { + if (Entity.USER.equals(reference.getType())) { + tempUserVar = Entity.getEntity(USER, reference.getId(), "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + } else if (TEAM.equals(reference.getType())) { + tempTeamVar = Entity.getEntity(TEAM, reference.getId(), "profile", Include.NON_DELETED); + teams.put(tempTeamVar.getId(), tempTeamVar); + } } } - } - for (Post post : thread.getPosts()) { - tempUserVar = Entity.getEntityByName(USER, post.getFrom(), "profile", Include.NON_DELETED); - users.put(tempUserVar.getId(), tempUserVar); - List mentions = MessageParser.getEntityLinks(post.getMessage()); - for (MessageParser.EntityLink link : mentions) { - if (USER.equals(link.getEntityType())) { - tempUserVar = Entity.getEntity(link, "profile", Include.NON_DELETED); - users.put(tempUserVar.getId(), tempUserVar); - } else if (TEAM.equals(link.getEntityType())) { - tempTeamVar = Entity.getEntity(link, "profile", Include.NON_DELETED); - teams.put(tempTeamVar.getId(), tempTeamVar); + for (Post post : thread.getPosts()) { + tempUserVar = Entity.getEntityByName(USER, post.getFrom(), "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + List mentions = MessageParser.getEntityLinks(post.getMessage()); + for (MessageParser.EntityLink link : mentions) { + if (USER.equals(link.getEntityType())) { + tempUserVar = Entity.getEntity(link, "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + } else if (TEAM.equals(link.getEntityType())) { + tempTeamVar = Entity.getEntity(link, "profile", Include.NON_DELETED); + teams.put(tempTeamVar.getId(), tempTeamVar); + } } } } + if (category.equals(SubscriptionDestination.SubscriptionCategory.OWNERS)) { + try { + tempUserVar = + Entity.getEntityByName(USER, thread.getCreatedBy(), "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + } catch (Exception ex) { + LOG.warn("Thread created by unknown user: {}", thread.getCreatedBy()); + } + } + // Users receiversList.addAll(getEmailOrWebhookEndpointForUsers(users.values().stream().toList(), type)); @@ -200,7 +215,9 @@ private static Set getTaskAssignees( } public static Set handleConversationNotification( - SubscriptionDestination.SubscriptionType type, ChangeEvent event) { + SubscriptionDestination.SubscriptionCategory category, + SubscriptionDestination.SubscriptionType type, + ChangeEvent event) { Thread thread = AlertsRuleEvaluator.getThread(event); Set receiversList = new HashSet<>(); Map teams = new HashMap<>(); @@ -208,33 +225,43 @@ public static Set handleConversationNotification( Team tempTeamVar = null; User tempUserVar = null; - tempUserVar = - Entity.getEntityByName(USER, thread.getCreatedBy(), "profile", Include.NON_DELETED); - users.put(tempUserVar.getId(), tempUserVar); - List mentions = MessageParser.getEntityLinks(thread.getMessage()); - for (MessageParser.EntityLink link : mentions) { - if (USER.equals(link.getEntityType())) { - tempUserVar = Entity.getEntity(link, "profile", Include.NON_DELETED); - users.put(tempUserVar.getId(), tempUserVar); - } else if (TEAM.equals(link.getEntityType())) { - tempTeamVar = Entity.getEntity(link, "", Include.NON_DELETED); - teams.put(tempTeamVar.getId(), tempTeamVar); - } - } - for (Post post : thread.getPosts()) { - tempUserVar = Entity.getEntityByName(USER, post.getFrom(), "profile", Include.NON_DELETED); - users.put(tempUserVar.getId(), tempUserVar); - mentions = MessageParser.getEntityLinks(post.getMessage()); + if (category.equals(SubscriptionDestination.SubscriptionCategory.MENTIONS)) { + List mentions = MessageParser.getEntityLinks(thread.getMessage()); for (MessageParser.EntityLink link : mentions) { if (USER.equals(link.getEntityType())) { tempUserVar = Entity.getEntity(link, "profile", Include.NON_DELETED); users.put(tempUserVar.getId(), tempUserVar); } else if (TEAM.equals(link.getEntityType())) { - tempTeamVar = Entity.getEntity(link, "profile", Include.NON_DELETED); + tempTeamVar = Entity.getEntity(link, "", Include.NON_DELETED); teams.put(tempTeamVar.getId(), tempTeamVar); } } + + for (Post post : thread.getPosts()) { + tempUserVar = Entity.getEntityByName(USER, post.getFrom(), "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + mentions = MessageParser.getEntityLinks(post.getMessage()); + for (MessageParser.EntityLink link : mentions) { + if (USER.equals(link.getEntityType())) { + tempUserVar = Entity.getEntity(link, "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + } else if (TEAM.equals(link.getEntityType())) { + tempTeamVar = Entity.getEntity(link, "profile", Include.NON_DELETED); + teams.put(tempTeamVar.getId(), tempTeamVar); + } + } + } + } + + if (category.equals(SubscriptionDestination.SubscriptionCategory.OWNERS)) { + try { + tempUserVar = + Entity.getEntityByName(USER, thread.getCreatedBy(), "profile", Include.NON_DELETED); + users.put(tempUserVar.getId(), tempUserVar); + } catch (Exception ex) { + LOG.warn("Thread created by unknown user: {}", thread.getCreatedBy()); + } } // Users @@ -340,8 +367,9 @@ public static Set getTargetsForAlert( if (event.getEntityType().equals(THREAD)) { Thread thread = AlertsRuleEvaluator.getThread(event); switch (thread.getType()) { - case Task -> receiverUrls.addAll(getTaskAssignees(type, event)); - case Conversation -> receiverUrls.addAll(handleConversationNotification(type, event)); + case Task -> receiverUrls.addAll(getTaskAssignees(category, type, event)); + case Conversation -> receiverUrls.addAll( + handleConversationNotification(category, type, event)); // TODO: For Announcement, Immediate Consumer needs to be Notified (find information from // Lineage) } From af88b61acad196f7b2589e0c4e5f103a235fc0fc Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Wed, 12 Jun 2024 18:51:40 +0530 Subject: [PATCH 2/8] playwright: updated entity spec with custom property test (#16621) * playwright: updated entity spec with custom property test * optimise the code * fixed playwright failure * addressing comment --- .../e2e/Pages/ServiceEntity.spec.ts | 35 +++++++++++++++++ .../playwright/support/entity/EntityClass.ts | 5 ++- .../ui/playwright/utils/customProperty.ts | 39 +++++++++++++++---- 3 files changed, 71 insertions(+), 8 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ServiceEntity.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ServiceEntity.spec.ts index 9b3a3c5df98f..f9d59399923d 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ServiceEntity.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ServiceEntity.spec.ts @@ -11,6 +11,7 @@ * limitations under the License. */ import { test } from '@playwright/test'; +import { CustomPropertySupportedEntityList } from '../../constant/customProperty'; import { DatabaseClass } from '../../support/entity/DatabaseClass'; import { DatabaseSchemaClass } from '../../support/entity/DatabaseSchemaClass'; import { EntityDataClass } from '../../support/entity/EntityDataClass'; @@ -27,6 +28,7 @@ import { getToken, redirectToHomePage, } from '../../utils/common'; +import { CustomPropertyTypeByName } from '../../utils/customProperty'; const entities = [ DatabaseServiceClass, @@ -53,6 +55,7 @@ entities.forEach((EntityClass) => { await EntityDataClass.preRequisitesForTests(apiContext); await entity.create(apiContext); + await entity.prepareForTests(apiContext); await afterAction(); }); @@ -112,12 +115,44 @@ entities.forEach((EntityClass) => { await entity.inactiveAnnouncement(page); }); + // Create custom property only for supported entities + if (CustomPropertySupportedEntityList.includes(entity.endpoint)) { + const properties = Object.values(CustomPropertyTypeByName); + const titleText = properties.join(', '); + + test(`Set & Update ${titleText} Custom Property `, async ({ page }) => { + // increase timeout as it using single test for multiple steps + test.slow(true); + + await test.step(`Set ${titleText} Custom Property`, async () => { + for (const type of properties) { + await entity.setCustomProperty( + page, + entity.customPropertyValue[type].property, + entity.customPropertyValue[type].value + ); + } + }); + + await test.step(`Update ${titleText} Custom Property`, async () => { + for (const type of properties) { + await entity.updateCustomProperty( + page, + entity.customPropertyValue[type].property, + entity.customPropertyValue[type].newValue + ); + } + }); + }); + } + test(`Update displayName`, async ({ page }) => { await entity.renameEntity(page, entity.entity.name); }); test.afterAll('Cleanup', async ({ browser }) => { const { apiContext, afterAction } = await createNewPage(browser); + await entity.cleanup(apiContext); await entity.delete(apiContext); await EntityDataClass.postRequisitesForTests(apiContext); await afterAction(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts index feb571389ab2..eabacd5fc523 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts @@ -50,6 +50,7 @@ import { EntityTypeEndpoint, ENTITY_PATH } from './Entity.interface'; export class EntityClass { type: string; endpoint: EntityTypeEndpoint; + cleanupUser: (apiContext: APIRequestContext) => Promise; customPropertyValue: Record< string, @@ -78,13 +79,15 @@ export class EntityClass { this.endpoint ); - this.customPropertyValue = data; + this.customPropertyValue = data.customProperties; + this.cleanupUser = data.cleanupUser; } } async cleanup(apiContext: APIRequestContext) { // Delete custom property only for supported entities if (CustomPropertySupportedEntityList.includes(this.endpoint)) { + await this.cleanupUser(apiContext); const entitySchemaResponse = await apiContext.get( `/api/v1/metadata/types/name/${ENTITY_PATH[this.endpoint]}` ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts index 0af614ad2293..3c7f68f089a5 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts @@ -15,6 +15,7 @@ import { EntityTypeEndpoint, ENTITY_PATH, } from '../support/entity/Entity.interface'; +import { UserClass } from '../support/user/UserClass'; import { uuid } from './common'; export enum CustomPropertyType { @@ -221,7 +222,10 @@ export const validateValueForProperty = async (data: { } }; -export const getPropertyValues = (type: string) => { +export const getPropertyValues = ( + type: string, + users: Record +) => { switch (type) { case 'integer': return { @@ -272,14 +276,14 @@ export const getPropertyValues = (type: string) => { }; case 'entityReference': return { - value: 'Adam Matthews', - newValue: 'Aaron Singh', + value: users.user1, + newValue: users.user2, }; case 'entityReferenceList': return { - value: 'Aaron Johnson,Organization', - newValue: 'Aaron Warren', + value: `${users.user3},Organization`, + newValue: users.user4, }; default: @@ -315,6 +319,27 @@ export const createCustomPropertyForEntity = async ( property: CustomProperty; } >; + const users: UserClass[] = []; + // Loop to create and add 4 new users to the users array + for (let i = 0; i < 4; i++) { + const user = new UserClass(); + await user.create(apiContext); + users.push(user); + } + + // Reduce the users array to a userNames object with keys as user1, user2, etc., and values as the user's names + const userNames = users.reduce((acc, user, index) => { + acc[`user${index + 1}`] = user.getUserName(); + + return acc; + }, {}); + + // Define an asynchronous function to clean up (delete) all users in the users array + const cleanupUser = async (apiContext: APIRequestContext) => { + for (const user of users) { + await user.delete(apiContext); + } + }; for (const item of propertyList) { const customPropertyResponse = await apiContext.put( @@ -357,12 +382,12 @@ export const createCustomPropertyForEntity = async ( return { ...prev, [propertyTypeName]: { - ...getPropertyValues(propertyTypeName), + ...getPropertyValues(propertyTypeName, userNames), property: curr, }, }; }, {}); } - return customProperties; + return { customProperties, cleanupUser }; }; From 3f07e85735df5e2e45e06cf7dbc882f20955fac7 Mon Sep 17 00:00:00 2001 From: Imri Paran Date: Wed, 12 Jun 2024 17:40:32 +0200 Subject: [PATCH 3/8] MINOR: use test setup action for playwright tests (#16633) * ci: gh actions use "Setup OpenMetadata Test Environment" in playwright tests * added ingestion_dependency as input --- .../action.yml | 12 ++++++-- .../playwright-integration-tests-mysql.yml | 27 +++--------------- .../playwright-integration-tests-postgres.yml | 28 +++---------------- .github/workflows/py-tests.yml | 2 ++ 4 files changed, 20 insertions(+), 49 deletions(-) diff --git a/.github/actions/setup-openmetadata-test-environment/action.yml b/.github/actions/setup-openmetadata-test-environment/action.yml index f401eccda741..2b5ed13686e2 100644 --- a/.github/actions/setup-openmetadata-test-environment/action.yml +++ b/.github/actions/setup-openmetadata-test-environment/action.yml @@ -5,6 +5,14 @@ inputs: python-version: description: Python Version to install required: true + args: + description: Arguments to pass to run_local_docker.sh + required: false + default: "-m no-ui" + ingestion_dependency: + description: Ingestion dependency to pass to run_local_docker.sh + required: false + default: "mysql,elasticsearch,sample-data" runs: using: composite @@ -50,9 +58,9 @@ runs: - name: Start Server and Ingest Sample Data uses: nick-fields/retry@v2.8.3 env: - INGESTION_DEPENDENCY: "mysql,elasticsearch,sample-data" + INGESTION_DEPENDENCY: ${{ inputs.ingestion_dependency }} with: timeout_minutes: 60 max_attempts: 2 retry_on: error - command: ./docker/run_local_docker.sh -m no-ui + command: ./docker/run_local_docker.sh ${{ inputs.args }} diff --git a/.github/workflows/playwright-integration-tests-mysql.yml b/.github/workflows/playwright-integration-tests-mysql.yml index b80ef041b24e..3fed1326543f 100644 --- a/.github/workflows/playwright-integration-tests-mysql.yml +++ b/.github/workflows/playwright-integration-tests-mysql.yml @@ -85,31 +85,12 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Set up JDK 17 - if: steps.cache-output.outputs.exit-code == 0 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: Set up Python - uses: actions/setup-python@v4 + - name: Setup Openmetadata Test Environment + uses: ./.github/actions/setup-openmetadata-test-environment with: python-version: '3.9' - - name: Install Ubuntu dependencies - run: | - sudo apt-get update && sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ - unixodbc-dev libevent-dev python3-dev libkrb5-dev - - name: Install Python Dependencies and Generate Data Models - run: | - python3 -m venv env - source env/bin/activate - pip install --upgrade pip - sudo make install_antlr_cli - make install_dev generate install_e2e_tests - - name: Start Server and Ingest Sample Data - env: - INGESTION_DEPENDENCY: "all" - run: ./docker/run_local_docker.sh -d mysql + args: "-d mysql" + ingestion_dependency: "all" timeout-minutes: 30 - name: Run Playwright Integration Tests with browser ${{ matrix.browser-type }} env: diff --git a/.github/workflows/playwright-integration-tests-postgres.yml b/.github/workflows/playwright-integration-tests-postgres.yml index 989ba66463d3..b97652d5a747 100644 --- a/.github/workflows/playwright-integration-tests-postgres.yml +++ b/.github/workflows/playwright-integration-tests-postgres.yml @@ -85,32 +85,12 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Set up JDK 17 - if: steps.cache-output.outputs.exit-code == 0 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: Set up Python - uses: actions/setup-python@v4 + - name: Setup Openmetadata Test Environment + uses: ./.github/actions/setup-openmetadata-test-environment with: python-version: '3.9' - - name: Install Ubuntu dependencies - run: | - sudo apt-get update && sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ - unixodbc-dev libevent-dev python3-dev libkrb5-dev - - name: Install Python Dependencies and Generate Data Models - run: | - python3 -m venv env - source env/bin/activate - pip install --upgrade pip - sudo make install_antlr_cli - make install_dev generate install_e2e_tests - - name: Start Server and Ingest Sample Data - env: - INGESTION_DEPENDENCY: "all" - run: ./docker/run_local_docker.sh -d postgresql - timeout-minutes: 30 + args: "-d postgresql" + ingestion_dependency: "all" - name: Run Playwright Integration Tests with browser ${{ matrix.browser-type }} env: E2E_REDSHIFT_HOST_PORT: ${{ secrets.E2E_REDSHIFT_HOST_PORT }} diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index 125353946f56..c222d2cdfc5b 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -78,6 +78,8 @@ jobs: uses: ./.github/actions/setup-openmetadata-test-environment with: python-version: ${{ matrix.py-version}} + args: "-m no-ui" + ingestion_dependency: "mysql,elasticsearch,sample-data" - name: Run Python Tests if: ${{ matrix.py-version != '3.9' }} From 9c1ad06cebaf482b5dee101242cf02867f1b2946 Mon Sep 17 00:00:00 2001 From: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:28:15 +0530 Subject: [PATCH 4/8] Domain flaky cypress fix (#16630) * fix domain flaky cypress * fix domain cypress --- .../src/main/resources/ui/cypress/common/DomainUtils.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/DomainUtils.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/DomainUtils.ts index e26524d77dbf..cf2f20c2a3b1 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/DomainUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/DomainUtils.ts @@ -171,12 +171,6 @@ export const removeAssets = (domainObj) => { .contains(entity.term) .click(); - visitEntityDetailsPage({ - term: entity.term, - serviceName: entity.serviceName, - entity: entity.entity, - }); - cy.get('[data-testid="add-domain"]').click(); verifyResponseStatusCode('@domains', 200); cy.get('[data-testid="remove-owner"]').click(); From eb3b1cba7d65b4342a845c0ea97852648cd7ecd1 Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Wed, 12 Jun 2024 21:49:57 +0530 Subject: [PATCH 5/8] feat: entity resizable panel part 1 (#16558) * feat: entity resizable panel * chore: sync locale files * chore: update resizable panel styles * chore: comment out unused CSS transition in resizable-panels.less * chore: Update TableDetailsPageV1 component imports * chore: Update resizable panels in entity details component * feat: add resizable panel in explore page * chore: update resizable panels styling in existing components * feat: add resizable panel in glossary and glossary terms page * feat: add resizable panels in activity feed tab component * fix: tab content height for activity feed * feat: add resizable panels in domain page * feat: add resizable panels in domain page part 1 * feat: Add hideSecondPanel prop to DataProductsDetailsPage and DomainDetailsPage components * chore: hideSecondPanel on explore page if summary if not available * chore: remove unused css * feat: add resizable panel in queries component * fix: panel container height issue * refactor: Update app.less styles for entity resizable right panel container --- .../ui/src/assets/svg/ic-collapse.svg | 4 + .../ActivityFeedTab.component.tsx | 241 ++++++------ .../ActivityFeedTab/activity-feed-tab.less | 11 - .../DashboardDetails.component.tsx | 122 +++--- .../DataModels/DataModelDetails.component.tsx | 98 +++-- .../DataProductsDetailsPage.component.tsx | 51 ++- .../data-products-details-page.less | 10 - .../AddDataQualityTestV1.tsx | 9 +- .../TestSuiteStepper/TestSuiteStepper.tsx | 10 +- .../Database/TableQueries/TableQueries.tsx | 257 +++++++------ .../TableQueries/table-queries.style.less | 8 +- .../Domain/AddDomain/AddDomain.component.tsx | 10 +- .../DomainDetailsPage.component.tsx | 51 ++- .../DataProductsTab.component.tsx | 58 +-- .../DocumentationTab.component.tsx | 362 ++++++++++-------- .../ui/src/components/Domain/domain.less | 27 -- .../ExploreV1/ExploreV1.component.tsx | 75 ++-- .../components/ExploreV1/ExploreV1.test.tsx | 9 +- .../src/components/ExploreV1/exploreV1.less | 15 - .../AddGlossary/AddGlossary.component.tsx | 10 +- .../GlossaryDetails.component.tsx | 97 +++-- .../tabs/GlossaryOverviewTab.component.tsx | 175 +++++---- .../MlModelDetail/MlModelDetail.component.tsx | 108 +++--- .../PipelineDetails.component.tsx | 152 ++++---- .../AddCustomProperty/AddCustomProperty.tsx | 8 +- .../AddService/AddService.component.tsx | 8 +- .../TopicDetails/TopicDetails.component.tsx | 112 +++--- .../ResizablePanels.interface.ts | 3 +- .../ResizablePanels/ResizablePanels.tsx | 84 ++-- .../ResizablePanels/resizable-panels.less | 31 ++ .../ServiceDocPanel/service-doc-panel.less | 1 + .../ui/src/locale/languages/de-de.json | 2 + .../ui/src/locale/languages/en-us.json | 2 + .../ui/src/locale/languages/es-es.json | 2 + .../ui/src/locale/languages/fr-fr.json | 2 + .../ui/src/locale/languages/he-he.json | 2 + .../ui/src/locale/languages/ja-jp.json | 2 + .../ui/src/locale/languages/nl-nl.json | 2 + .../ui/src/locale/languages/pt-br.json | 2 + .../ui/src/locale/languages/ru-ru.json | 2 + .../ui/src/locale/languages/zh-cn.json | 2 + .../AddCustomMetricPage.tsx | 9 +- .../AddIngestionPage.component.tsx | 8 +- .../AddQueryPage/AddQueryPage.component.tsx | 10 +- .../EditLoginConfigurationPage.tsx | 8 +- .../src/pages/ContainerPage/ContainerPage.tsx | 130 ++++--- .../DatabaseDetailsPage.tsx | 100 +++-- .../DatabaseSchemaPage.component.tsx | 90 +++-- .../EditConnectionFormPage.component.tsx | 8 +- .../EditEmailConfigPage.component.tsx | 8 +- .../EditIngestionPage.component.tsx | 8 +- .../ui/src/pages/KPIPage/AddKPIPage.tsx | 10 +- .../ui/src/pages/KPIPage/EditKPIPage.tsx | 10 +- .../AddPolicyPage/AddPolicyPage.tsx | 10 +- .../RolesPage/AddRolePage/AddRolePage.tsx | 10 +- .../SearchIndexDetailsPage.tsx | 112 +++--- .../ServiceMainTabContent.tsx | 175 +++++---- .../StoredProcedure/StoredProcedurePage.tsx | 116 +++--- .../TableDetailsPageV1/TableDetailsPageV1.tsx | 143 ++++--- .../TestSuiteIngestionPage.tsx | 10 +- .../src/main/resources/ui/src/styles/app.less | 21 + .../main/resources/ui/src/styles/spacing.less | 5 + 62 files changed, 1784 insertions(+), 1454 deletions(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-collapse.svg diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-collapse.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-collapse.svg new file mode 100644 index 000000000000..ded92bc31b2d --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-collapse.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx index fd38d1600002..983ff27fc698 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx @@ -61,6 +61,7 @@ import { } from '../../../utils/EntityUtils'; import { showErrorToast } from '../../../utils/ToastUtils'; import Loader from '../../common/Loader/Loader'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import { TaskTab } from '../../Entity/Task/TaskTab/TaskTab.component'; import '../../MyData/Widgets/FeedsWidget/feeds-widget.less'; import ActivityFeedEditor from '../ActivityFeedEditor/ActivityFeedEditor'; @@ -410,118 +411,140 @@ export const ActivityFeedTab = ({ onClick={(info) => handleTabChange(info.key)} /> -
- {isTaskActiveTab && ( -
- + {isTaskActiveTab && ( +
+ { + handleUpdateTaskFilter('open'); + setActiveThread(); + }}> + {' '} + {openTasks}{' '} + {t('label.open')} + + { + handleUpdateTaskFilter('close'); + setActiveThread(); + }}> + {' '} + {closedTasks}{' '} + {t('label.closed')} + +
)} - onClick={() => { - handleUpdateTaskFilter('open'); - setActiveThread(); - }}> - {' '} - {openTasks}{' '} - {t('label.open')} -
- { - handleUpdateTaskFilter('close'); - setActiveThread(); - }}> - {' '} - {closedTasks}{' '} - {t('label.closed')} - -
- )} - - {loader} -
} - style={{ height: '2px' }} - /> -
-
- {loader} - {selectedThread && - !loading && - (activeTab !== ActivityFeedTabs.TASKS ? ( -
-
- -
- -
- - -
+ + {loader} +
} + style={{ height: '2px' }} + />
- ) : ( -
- {entityType === EntityType.TABLE ? ( - - ) : ( - - )} + ), + minWidth: 700, + flex: 0.5, + }} + hideSecondPanel={!selectedThread} + secondPanel={{ + children: ( +
+ {loader} + {selectedThread && + !loading && + (activeTab !== ActivityFeedTabs.TASKS ? ( +
+
+ +
+ +
+ + +
+
+ ) : ( +
+ {entityType === EntityType.TABLE ? ( + + ) : ( + + )} +
+ ))}
- ))} -
+ ), + minWidth: 420, + flex: 0.5, + className: 'entity-resizable-right-panel-container p-l-0', + }} + />
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/activity-feed-tab.less b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/activity-feed-tab.less index 90d1b54eb018..c99bf56fc45d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/activity-feed-tab.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/activity-feed-tab.less @@ -26,21 +26,10 @@ } .center-container { - flex: 0 0 calc(50% - @left-side-panel-width / 2); height: @entity-details-tab-height; overflow-y: scroll; } - .right-container { - flex: 0 0 calc(50% - @left-side-panel-width / 2); - border-left: @global-border; - height: @entity-details-tab-height; - overflow-y: scroll; - .activity-feed-card-container.ant-btn:hover { - color: inherit; - background-color: @white; - } - } .left-container { flex: 0 0 @left-side-panel-width; border-right: @global-border !important; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx index aa8ffa7b17da..bb2d0420b5e5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx @@ -58,6 +58,7 @@ import { withActivityFeed } from '../../AppRouter/withActivityFeed'; import { CustomPropertyTable } from '../../common/CustomPropertyTable/CustomPropertyTable'; import DescriptionV1 from '../../common/EntityDescription/DescriptionV1'; import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import { ColumnFilter } from '../../Database/ColumnFilter/ColumnFilter.component'; @@ -611,59 +612,74 @@ const DashboardDetails = ({ key: EntityTabs.DETAILS, children: ( - -
- - - {isEmpty(charts) ? ( - - ) : ( - - )} - - - - - customProperties={dashboardDetails} - dataProducts={dashboardDetails?.dataProducts ?? []} - domain={dashboardDetails?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedDashboardFQN} - entityId={dashboardDetails.id} - entityType={EntityType.DASHBOARD} - selectedTags={dashboardTags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + {isEmpty(charts) ? ( + + ) : ( +
+ )} + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={dashboardDetails} + dataProducts={dashboardDetails?.dataProducts ?? []} + domain={dashboardDetails?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedDashboardFQN} + entityId={dashboardDetails.id} + entityType={EntityType.DASHBOARD} + selectedTags={dashboardTags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DataModel/DataModels/DataModelDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DataModel/DataModels/DataModelDetails.component.tsx index 913961d7268a..cbec3997f1c9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DataModel/DataModels/DataModelDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DataModel/DataModels/DataModelDetails.component.tsx @@ -40,6 +40,7 @@ import { ActivityFeedTab } from '../../../ActivityFeed/ActivityFeedTab/ActivityF import ActivityThreadPanel from '../../../ActivityFeed/ActivityThreadPanel/ActivityThreadPanel'; import { withActivityFeed } from '../../../AppRouter/withActivityFeed'; import DescriptionV1 from '../../../common/EntityDescription/DescriptionV1'; +import ResizablePanels from '../../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../../common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../../DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import SchemaEditor from '../../../Database/SchemaEditor/SchemaEditor'; @@ -212,48 +213,61 @@ const DataModelDetails = ({ const modelComponent = useMemo(() => { return ( - -
- setIsEditDescription(false)} - onDescriptionEdit={() => setIsEditDescription(true)} - onDescriptionUpdate={onDescriptionUpdate} - onThreadLinkSelect={onThreadLinkSelect} - /> - -
- - - + + setIsEditDescription(false)} + onDescriptionEdit={() => setIsEditDescription(true)} + onDescriptionUpdate={onDescriptionUpdate} + onThreadLinkSelect={onThreadLinkSelect} + /> + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/DataProductsDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/DataProductsDetailsPage.component.tsx index 130e568c7088..2bacaa2d6ba8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/DataProductsDetailsPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/DataProductsDetailsPage.component.tsx @@ -70,6 +70,7 @@ import { } from '../../../utils/StringsUtils'; import { showErrorToast } from '../../../utils/ToastUtils'; import { ManageButtonItemLabel } from '../../common/ManageButtonContentItem/ManageButtonContentItem.component'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import { AssetSelectionModal } from '../../DataAssets/AssetsSelectionModal/AssetSelectionModal'; import { DomainTabs } from '../../Domain/DomainPage.interface'; @@ -85,7 +86,6 @@ import { AssetsOfEntity } from '../../Glossary/GlossaryTerms/tabs/AssetsTabs.int import EntityDeleteModal from '../../Modals/EntityDeleteModal/EntityDeleteModal'; import EntityNameModal from '../../Modals/EntityNameModal/EntityNameModal.component'; import StyleModal from '../../Modals/StyleModal/StyleModal.component'; -import PageLayoutV1 from '../../PageLayoutV1/PageLayoutV1'; import './data-products-details-page.less'; import { DataProductsDetailsPageProps, @@ -409,30 +409,41 @@ const DataProductsDetailsPage = ({ ), key: DataProductTabs.ASSETS, children: ( - + setAssetModelVisible(true)} + onAssetClick={handleAssetClick} + onRemoveAsset={handleAssetSave} + /> + + ), + minWidth: 800, + flex: 0.87, + }} + hideSecondPanel={!previewAsset} pageTitle={t('label.domain')} - rightPanel={ - previewAsset && ( + secondPanel={{ + children: previewAsset && ( setPreviewAsset(undefined)} /> - ) - } - rightPanelWidth={400}> - setAssetModelVisible(true)} - onAssetClick={handleAssetClick} - onRemoveAsset={handleAssetSave} - /> - + ), + minWidth: 400, + flex: 0.13, + className: 'entity-summary-resizable-right-panel-container', + }} + /> ), }, ] diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/data-products-details-page.less b/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/data-products-details-page.less index 88460ebd1e90..1c5de5f09786 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/data-products-details-page.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsDetailsPage/data-products-details-page.less @@ -29,13 +29,3 @@ } } } - -.data-product-asset-page-layout { - .page-layout-v1-vertical-scroll { - height: @domain-page-height; - padding-top: 0; - } - .summary-panel-container { - height: @domain-page-height; - } -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/AddDataQualityTest/AddDataQualityTestV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/AddDataQualityTest/AddDataQualityTestV1.tsx index 4ac2994c8b13..4051a477860e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/AddDataQualityTest/AddDataQualityTestV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/AddDataQualityTest/AddDataQualityTestV1.tsx @@ -315,14 +315,9 @@ const AddDataQualityTestV1: React.FC = ({ })} secondPanel={{ children: secondPanel, - className: 'p-md service-doc-panel', - minWidth: 60, + className: 'p-md p-t-xl', + minWidth: 400, flex: 0.4, - overlay: { - displayThreshold: 200, - header: t('label.data-profiler-metrics'), - rotation: 'counter-clockwise', - }, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteStepper/TestSuiteStepper.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteStepper/TestSuiteStepper.tsx index f11758845601..bc861b04d7fb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteStepper/TestSuiteStepper.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteStepper/TestSuiteStepper.tsx @@ -171,13 +171,9 @@ const TestSuiteStepper = () => { )} /> ), - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/TableQueries.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/TableQueries.tsx index 56cad7130230..26b08e337268 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/TableQueries.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/TableQueries.tsx @@ -71,6 +71,7 @@ import { getAddQueryPath } from '../../../utils/RouterUtils'; import { showErrorToast } from '../../../utils/ToastUtils'; import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../common/Loader/Loader'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import SortingDropDown from '../../Explore/SortingDropDown'; import SearchDropdown from '../../SearchDropdown/SearchDropdown'; import { SearchDropdownOption } from '../../SearchDropdown/SearchDropdown.interface'; @@ -531,131 +532,143 @@ const TableQueries: FC = ({ return ( -
- - - - - - - - - - - - - {addButton} - - - - - {isLoading.query ? ( - - ) : ( - <> - {queryTabBody} - {showPagination && ( + + - + + + + + + + + + + + {addButton} + + - )} - - )} - + + {isLoading.query ? ( + + ) : ( + <> + {queryTabBody} + {showPagination && ( + + + + )} + + )} + + ), + minWidth: 800, + flex: 0.87, + }} + hideSecondPanel={!selectedQuery} + secondPanel={{ + children: selectedQuery && ( + + ), + minWidth: 400, + flex: 0.13, + className: 'entity-summary-resizable-right-panel-container', + }} + /> - {selectedQuery && ( - -
- -
- - )} ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/table-queries.style.less b/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/table-queries.style.less index 5705602a6557..7450b920af4d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/table-queries.style.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/table-queries.style.less @@ -11,7 +11,6 @@ * limitations under the License. */ @import url('../../../styles/variables.less'); -@summary-panel-offset: 236px; .query-entity-button { position: absolute; @@ -40,18 +39,13 @@ } .query-right-panel { - position: sticky; - height: calc(100vh - @summary-panel-offset); - border: @global-border; + height: @entity-details-tab-height; border-top: unset; font-size: 14px; overflow-y: scroll; overflow-x: hidden; -ms-overflow-style: none; scrollbar-width: none; - .ant-drawer-content-wrapper { - box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.12); - } .ant-drawer-body { padding: unset; } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomain/AddDomain.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomain/AddDomain.component.tsx index 652e80aed4c9..156ffadf2435 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomain/AddDomain.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomain/AddDomain.component.tsx @@ -128,13 +128,9 @@ const AddDomain = () => { })} secondPanel={{ children: rightPanel, - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailsPage/DomainDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailsPage/DomainDetailsPage.component.tsx index 68e239cd91a1..b615050d718a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailsPage/DomainDetailsPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailsPage/DomainDetailsPage.component.tsx @@ -51,7 +51,6 @@ import AssetsTabs, { } from '../../../components/Glossary/GlossaryTerms/tabs/AssetsTabs.component'; import { AssetsOfEntity } from '../../../components/Glossary/GlossaryTerms/tabs/AssetsTabs.interface'; import EntityNameModal from '../../../components/Modals/EntityNameModal/EntityNameModal.component'; -import PageLayoutV1 from '../../../components/PageLayoutV1/PageLayoutV1'; import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants'; import { DE_ACTIVE_COLOR, @@ -91,6 +90,7 @@ import { } from '../../../utils/StringsUtils'; import { showErrorToast } from '../../../utils/ToastUtils'; import DeleteWidgetModal from '../../common/DeleteWidget/DeleteWidgetModal'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import { AssetSelectionModal } from '../../DataAssets/AssetsSelectionModal/AssetSelectionModal'; import { EntityDetailsObjectInterface } from '../../Explore/ExplorePage.interface'; @@ -473,30 +473,41 @@ const DomainDetailsPage = ({ ), key: DomainTabs.ASSETS, children: ( - + setAssetModelVisible(true)} + onAssetClick={handleAssetClick} + onRemoveAsset={handleAssetSave} + /> + + ), + minWidth: 800, + flex: 0.87, + }} + hideSecondPanel={!previewAsset} pageTitle={t('label.domain')} - rightPanel={ - previewAsset && ( + secondPanel={{ + children: previewAsset && ( setPreviewAsset(undefined)} /> - ) - } - rightPanelWidth={400}> - setAssetModelVisible(true)} - onAssetClick={handleAssetClick} - onRemoveAsset={handleAssetSave} - /> - + ), + minWidth: 400, + flex: 0.13, + className: 'entity-summary-resizable-right-panel-container', + }} + /> ), }, ] diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DataProductsTab/DataProductsTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DataProductsTab/DataProductsTab.component.tsx index 2d562f4f123e..59d0e6917250 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DataProductsTab/DataProductsTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DataProductsTab/DataProductsTab.component.tsx @@ -35,9 +35,9 @@ import { } from '../../../../utils/StringsUtils'; import ErrorPlaceHolder from '../../../common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../../common/Loader/Loader'; +import ResizablePanels from '../../../common/ResizablePanels/ResizablePanels'; import EntitySummaryPanel from '../../../Explore/EntitySummaryPanel/EntitySummaryPanel.component'; import ExploreSearchCard from '../../../ExploreV1/ExploreSearchCard/ExploreSearchCard'; -import PageLayoutV1 from '../../../PageLayoutV1/PageLayoutV1'; import { SourceType } from '../../../SearchedData/SearchedData.interface'; import { DataProductsTabProps } from './DataProductsTab.interface'; @@ -118,11 +118,35 @@ const DataProductsTab = forwardRef( } return ( - + {dataProducts.data.map((dataProduct) => ( + + ))} + + ), + minWidth: 800, + flex: 0.87, + }} pageTitle={t('label.domain')} - rightPanel={ - selectedCard && ( + secondPanel={{ + children: selectedCard && ( setSelectedCard(undefined)} /> - ) - }> -
- {dataProducts.data.map((dataProduct) => ( - - ))} -
-
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-summary-resizable-right-panel-container', + }} + /> ); } ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DocumentationTab/DocumentationTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DocumentationTab/DocumentationTab.component.tsx index d5a0d28bdf9b..114e3af1b281 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DocumentationTab/DocumentationTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainTabs/DocumentationTab/DocumentationTab.component.tsx @@ -44,6 +44,7 @@ import { getEntityName } from '../../../../utils/EntityUtils'; import { getEntityVersionByField } from '../../../../utils/EntityVersionUtils'; import { checkPermission } from '../../../../utils/PermissionsUtils'; import FormItemLabel from '../../../common/Form/FormItemLabel'; +import ResizablePanels from '../../../common/ResizablePanels/ResizablePanels'; import TagButton from '../../../common/TagButton/TagButton.component'; import '../../domain.less'; import { @@ -168,178 +169,207 @@ const DocumentationTab = ({ return ( - - setIsDescriptionEditable(false)} - onDescriptionEdit={() => setIsDescriptionEditable(true)} - onDescriptionUpdate={onDescriptionUpdate} - /> - - - - -
- - {t('label.owner')} - - {editOwnerPermission && domain.owner && ( - - handleUpdatedOwner(updatedUser as EntityReference) - }> - -
+ + + setIsDescriptionEditable(false)} + onDescriptionEdit={() => setIsDescriptionEditable(true)} + onDescriptionUpdate={onDescriptionUpdate} + /> + + ), + minWidth: 800, + flex: 0.75, + }} + secondPanel={{ + children: ( + + +
+ + {t('label.owner')} + + {editOwnerPermission && domain.owner && ( + + handleUpdatedOwner(updatedUser as EntityReference) + }> + +
- - {getUserNames( - domain, - editOwnerPermission || editAllPermission, - isVersionsView - )} - + + {getUserNames( + domain, + editOwnerPermission || editAllPermission, + isVersionsView + )} + - {!domain.owner && editOwnerPermission && ( - - handleUpdatedOwner(updatedUser as EntityReference) - }> - } - label={t('label.add')} - tooltip="" - /> - - )} - - -
0 ? 'm-b-xss' : '' - }`}> - - {t('label.expert-plural')} - - {editOwnerPermission && - domain.experts && - domain.experts.length > 0 && ( - - -
- -
- {editOwnerPermission && - domain.experts && - domain.experts.length === 0 && ( - - } - label={t('label.add')} - tooltip="" - /> - - )} -
- - - {type === DocumentationEntity.DOMAIN && ( -
-
- - + )} + +
+
0 + ? 'm-b-xss' + : '' + }`}> + + {t('label.expert-plural')} + + {editOwnerPermission && + domain.experts && + domain.experts.length > 0 && ( + + +
+ - +
+ {editOwnerPermission && + domain.experts && + domain.experts.length === 0 && ( + + + } + label={t('label.add')} + tooltip="" + /> + + )} +
+ - {editAllPermission && (domain as Domain).domainType && ( - -
+
+ + + - {editDomainType && ( - setEditDomainType(false)} - onSubmit={handleDomainTypeUpdate} - /> - )} - - )} - + {editAllPermission && (domain as Domain).domainType && ( + +
+ {!editDomainType && ( + + {(domain as Domain).domainType} + + )} + + {editDomainType && ( + setEditDomainType(false)} + onSubmit={handleDomainTypeUpdate} + /> + )} + + )} + + ), + minWidth: 320, + flex: 0.25, + className: 'entity-resizable-right-panel-container', + }} + /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/domain.less b/openmetadata-ui/src/main/resources/ui/src/components/Domain/domain.less index 404ef9aa9dcd..f73e3754dfb7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/domain.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/Domain/domain.less @@ -23,33 +23,6 @@ } } -.domain-page-layout { - .page-layout-v1-vertical-scroll { - height: @domain-page-height; - } - .page-layout-rightpanel { - padding-right: 0; - background-color: @white; - border: 1px solid @border-color; - border-radius: 0; - padding-left: 0; - border-top: 0; - - .summary-panel-container { - height: @domain-page-height; - } - } -} - -.domain-asset-page-layout { - .page-layout-v1-vertical-scroll { - height: @domain-page-height; - .assets-tab-container { - padding-top: 4px; - } - } -} - .domain-form-container, .add-data-product-modal { .toastui-editor { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx index 9f0b5a005fb0..f7fa18b1a060 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx @@ -56,12 +56,12 @@ import { getSelectedValuesFromQuickFilter } from '../../utils/Explore.utils'; import { getApplicationDetailsPath } from '../../utils/RouterUtils'; import searchClassBase from '../../utils/SearchClassBase'; import Loader from '../common/Loader/Loader'; +import ResizablePanels from '../common/ResizablePanels/ResizablePanels'; import { ExploreProps, ExploreQuickFilterField, ExploreSearchIndex, } from '../Explore/ExplorePage.interface'; -import PageLayoutV1 from '../PageLayoutV1/PageLayoutV1'; import SearchedData from '../SearchedData/SearchedData'; import { SearchedDataProps } from '../SearchedData/SearchedData.interface'; import './exploreV1.less'; @@ -417,13 +417,43 @@ const ExploreV1: React.FC = ({ - + + {!loading && !isElasticSearchIssue ? ( + + ) : ( + <> + )} + {loading ? : <>} + + + ), + minWidth: 600, + flex: 0.65, + }} + hideSecondPanel={ + !showSummaryPanel && !loading && !entityDetails + } pageTitle={t('label.explore')} - rightPanel={ - showSummaryPanel && - entityDetails && - !loading && ( + secondPanel={{ + children: showSummaryPanel && entityDetails && !loading && ( = ({ ['description', 'displayName'] )} /> - ) - } - rightPanelWidth={400}> - - - {!loading && !isElasticSearchIssue ? ( - - ) : ( - <> - )} - {loading ? : <>} - - - + ), + minWidth: 400, + flex: 0.35, + className: 'entity-summary-resizable-right-panel-container', + }} + /> )} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.test.tsx index f681d5e9784b..74c3fbe72846 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.test.tsx @@ -29,8 +29,13 @@ jest.mock('react-router-dom', () => ({ }), })); -jest.mock('../../components/PageLayoutV1/PageLayoutV1', () => { - return jest.fn().mockImplementation(({ children }) =>
{children}
); +jest.mock('../common/ResizablePanels/ResizablePanels', () => { + return jest.fn().mockImplementation(({ firstPanel, secondPanel }) => ( +
+
{firstPanel.children}
+
{secondPanel.children}
+
+ )); }); jest.mock('./ExploreSearchCard/ExploreSearchCard', () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/exploreV1.less b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/exploreV1.less index 6277db05881a..2678fb336435 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/exploreV1.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/exploreV1.less @@ -13,21 +13,6 @@ @import url('../../styles/variables.less'); -.explore-page-layout { - .page-layout-v1-vertical-scroll { - height: @explore-page-height; - } - .page-layout-rightpanel { - padding-right: 0 !important; - background-color: @white; - border: 1px solid @border-color; - border-right: none; - border-radius: 0; - padding-left: 0 !important; - border-top: 0; - } -} - .quick-filter-dropdown-trigger-btn { .ant-typography { color: @text-grey-muted; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossary/AddGlossary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossary/AddGlossary.component.tsx index e5302492e554..2290dfe979fc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossary/AddGlossary.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossary/AddGlossary.component.tsx @@ -301,13 +301,9 @@ const AddGlossary = ({ })} secondPanel={{ children: rightPanel, - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx index 57b315c25066..4eb1d4004255 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx @@ -28,6 +28,7 @@ import { getEntityName } from '../../../utils/EntityUtils'; import { getEntityVersionByField } from '../../../utils/EntityVersionUtils'; import { ActivityFeedTab } from '../../ActivityFeed/ActivityFeedTab/ActivityFeedTab.component'; import DescriptionV1 from '../../common/EntityDescription/DescriptionV1'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import GlossaryDetailsRightPanel from '../GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.component'; import GlossaryHeader from '../GlossaryHeader/GlossaryHeader.component'; @@ -140,47 +141,63 @@ const GlossaryDetails = ({ const detailsContent = useMemo(() => { return ( - -
- - setIsDescriptionEditable(false)} - onDescriptionEdit={() => setIsDescriptionEditable(true)} - onDescriptionUpdate={onDescriptionUpdate} - onThreadLinkSelect={onThreadLinkSelect} - /> + + + + + setIsDescriptionEditable(false)} + onDescriptionEdit={() => setIsDescriptionEditable(true)} + onDescriptionUpdate={onDescriptionUpdate} + onThreadLinkSelect={onThreadLinkSelect} + /> - - - - - + + + ), + minWidth: 800, + flex: 0.75, + }} + secondPanel={{ + children: ( + + ), + minWidth: 320, + flex: 0.25, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx index 29ce76f1bf4b..1f62d727041b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx @@ -25,6 +25,7 @@ import { getEntityVersionTags, } from '../../../../utils/EntityVersionUtils'; import DescriptionV1 from '../../../common/EntityDescription/DescriptionV1'; +import ResizablePanels from '../../../common/ResizablePanels/ResizablePanels'; import TagsContainerV2 from '../../../Tag/TagsContainerV2/TagsContainerV2'; import { DisplayType } from '../../../Tag/TagsViewer/TagsViewer.interface'; import GlossaryDetailsRightPanel from '../../GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.component'; @@ -112,89 +113,103 @@ const GlossaryOverviewTab = ({ }; return ( - - - - - setIsDescriptionEditable(false)} - onDescriptionEdit={() => setIsDescriptionEditable(true)} - onDescriptionUpdate={onDescriptionUpdate} - onThreadLinkSelect={onThreadLinkSelect} - /> - - - - {!isGlossary && ( - <> - - + + + + + setIsDescriptionEditable(false)} + onDescriptionEdit={() => setIsDescriptionEditable(true)} + onDescriptionUpdate={onDescriptionUpdate} + onThreadLinkSelect={onThreadLinkSelect} /> - - - - - - - - )} + + + {!isGlossary && ( + <> + + + + + + + + + + + )} - - - - - - - - - - - - + + + + + + + + + ), + minWidth: 800, + flex: 0.75, + }} + secondPanel={{ + children: ( + + ), + minWidth: 320, + flex: 0.25, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelDetail.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelDetail.component.tsx index dae4e3a11cd2..f85d7bc33fe3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelDetail.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelDetail.component.tsx @@ -46,6 +46,7 @@ import ActivityThreadPanel from '../../ActivityFeed/ActivityThreadPanel/Activity import { withActivityFeed } from '../../AppRouter/withActivityFeed'; import { CustomPropertyTable } from '../../common/CustomPropertyTable/CustomPropertyTable'; import DescriptionV1 from '../../common/EntityDescription/DescriptionV1'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import EntityRightPanel from '../../Entity/EntityRightPanel/EntityRightPanel'; @@ -391,51 +392,68 @@ const MlModelDetail: FC = ({ key: EntityTabs.FEATURES, children: ( - -
- - -
- - - - customProperties={mlModelDetail} - dataProducts={mlModelDetail?.dataProducts ?? []} - domain={mlModelDetail?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedMlModelFqn} - entityId={mlModelDetail.id} - entityType={EntityType.MLMODEL} - selectedTags={mlModelTags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={handleThreadLinkSelect} + + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={mlModelDetail} + dataProducts={mlModelDetail?.dataProducts ?? []} + domain={mlModelDetail?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedMlModelFqn} + entityId={mlModelDetail.id} + entityType={EntityType.MLMODEL} + selectedTags={mlModelTags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={handleThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Pipeline/PipelineDetails/PipelineDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Pipeline/PipelineDetails/PipelineDetails.component.tsx index e724e02ee269..bb1b981a554b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Pipeline/PipelineDetails/PipelineDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Pipeline/PipelineDetails/PipelineDetails.component.tsx @@ -65,6 +65,7 @@ import { withActivityFeed } from '../../AppRouter/withActivityFeed'; import { CustomPropertyTable } from '../../common/CustomPropertyTable/CustomPropertyTable'; import DescriptionV1 from '../../common/EntityDescription/DescriptionV1'; import { OwnerLabel } from '../../common/OwnerLabel/OwnerLabel.component'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import { ColumnFilter } from '../../Database/ColumnFilter/ColumnFilter.component'; @@ -591,73 +592,90 @@ const PipelineDetails = ({ key: EntityTabs.TASKS, children: ( -
- - - - - - setActiveTab(e.target.value)} - /> - - - {activeTab === PIPELINE_TASK_TABS.LIST_VIEW ? ( -
- ) : ( - tasksDAGView - )} - - - - - - customProperties={pipelineDetails} - dataProducts={pipelineDetails?.dataProducts ?? []} - domain={pipelineDetails?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={pipelineFQN} - entityId={pipelineDetails.id} - entityType={EntityType.PIPELINE} - selectedTags={tags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + + + + setActiveTab(e.target.value)} + /> + + + {activeTab === PIPELINE_TASK_TABS.LIST_VIEW ? ( +
+ ) : ( + tasksDAGView + )} + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={pipelineDetails} + dataProducts={pipelineDetails?.dataProducts ?? []} + domain={pipelineDetails?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={pipelineFQN} + entityId={pipelineDetails.id} + entityType={EntityType.PIPELINE} + selectedTags={tags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/CustomProperty/AddCustomProperty/AddCustomProperty.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/CustomProperty/AddCustomProperty/AddCustomProperty.tsx index bc2cc5e82352..c045ffe9e910 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/CustomProperty/AddCustomProperty/AddCustomProperty.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/CustomProperty/AddCustomProperty/AddCustomProperty.tsx @@ -438,12 +438,8 @@ const AddCustomProperty = () => { secondPanel={{ children: secondPanelChildren, className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/AddService/AddService.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/AddService/AddService.component.tsx index 4aee507530b7..58b0b8e180b2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/AddService/AddService.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/AddService/AddService.component.tsx @@ -315,12 +315,8 @@ const AddService = ({ /> ), className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx index f1373208d570..3f32d494fa51 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx @@ -48,6 +48,7 @@ import { CustomPropertyTable } from '../../common/CustomPropertyTable/CustomProp import DescriptionV1 from '../../common/EntityDescription/DescriptionV1'; import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder'; import QueryViewer from '../../common/QueryViewer/QueryViewer.component'; +import ResizablePanels from '../../common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import SampleDataWithMessages from '../../Database/SampleDataWithMessages/SampleDataWithMessages'; @@ -301,54 +302,69 @@ const TopicDetails: React.FC = ({ key: EntityTabs.SCHEMA, children: ( - -
- - -
- - - - customProperties={topicDetails} - dataProducts={topicDetails?.dataProducts ?? []} - domain={topicDetails?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedTopicFQN} - entityId={topicDetails.id} - entityType={EntityType.TOPIC} - selectedTags={topicTags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={topicDetails} + dataProducts={topicDetails?.dataProducts ?? []} + domain={topicDetails?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedTopicFQN} + entityId={topicDetails.id} + entityType={EntityType.TOPIC} + selectedTags={topicTags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.interface.ts index 66cdcbc0d61c..09d3342836c6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.interface.ts @@ -15,8 +15,9 @@ export interface ResizablePanelsProps { orientation?: 'vertical' | 'horizontal'; firstPanel: PanelProps; secondPanel: PanelProps; - pageTitle: string; + pageTitle?: string; hideSecondPanel?: boolean; + applyDefaultStyle?: boolean; } export interface PanelProps { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.tsx index 213b244ed067..8812c289e383 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/ResizablePanels.tsx @@ -10,9 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { Button, Tooltip } from 'antd'; import classNames from 'classnames'; -import React from 'react'; +import React, { useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { ReflexContainer, ReflexElement, ReflexSplitter } from 'react-reflex'; +import { ReactComponent as CollapseIcon } from '../../../assets/svg/ic-collapse.svg'; import DocumentTitle from '../DocumentTitle/DocumentTitle'; import PanelContainer from './PanelContainer/PanelContainer'; import './resizable-panels.less'; @@ -25,18 +28,27 @@ const ResizablePanels: React.FC = ({ secondPanel, pageTitle, hideSecondPanel = false, + applyDefaultStyle = true, }) => { + const { t } = useTranslation(); + const [isRightPanelCollapsed, setIsRightPanelCollapsed] = useState(false); + + const handleCollapse = () => { + setIsRightPanelCollapsed((prev) => !prev); + }; + const panelHeight = applyDefaultStyle ? '64px' : '4px'; + return ( <> - + {pageTitle && } + style={{ height: `calc(100vh - ${panelHeight})` }}> = ({ -
-
+ +
+ data-testid="collapse-button" + type="ghost" + onClick={handleCollapse}> + + + + {!isRightPanelCollapsed && ( +
+
+
+ )} { secondPanel.onStopResize?.(args.component.props.flex); }}> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/resizable-panels.less b/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/resizable-panels.less index 8783e54c67e3..05f0d814f410 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/resizable-panels.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ResizablePanels/resizable-panels.less @@ -247,7 +247,38 @@ h2.rotated-header { background-color: transparent !important; border-left: 1px solid @border-color; } +.splitter.collapsed { + border-left: none; +} .hidden { display: none; } + +.collapse-button { + position: absolute; + top: 8px; + left: -24px; + padding: 4px 8px; + z-index: 10; + background: white !important; + .collapse-icon { + vertical-align: middle; + width: 16px; + } +} +.collapse-button.collapsed { + position: absolute; + top: 8px; + left: auto; + right: -16px; + padding: 4px 12px; + .collapse-icon { + margin-left: 4px; + width: 20px; + } +} +.right-panel-collapsed { + flex: 0 !important; + padding: 0 !important; +} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ServiceDocPanel/service-doc-panel.less b/openmetadata-ui/src/main/resources/ui/src/components/common/ServiceDocPanel/service-doc-panel.less index a7a225b3f1cc..6fb1a73354f9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ServiceDocPanel/service-doc-panel.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ServiceDocPanel/service-doc-panel.less @@ -15,6 +15,7 @@ .service-doc-panel { background: @white; padding-bottom: 8px; + padding-top: 24px; .toastui-editor-contents { h1 { &:first-child { diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json index f24905b1a00f..43ef7fcfd7e4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "diese Aufgabe schließen", "cloud-config-source": "Cloud-Konfigurationsquelle", "code": "Code", + "collapse": "Collapse", "collapse-all": "Alle minimieren", "color": "Color", "column": "Spalte", @@ -440,6 +441,7 @@ "execution-time": "execution-time", "exit-fit-to-screen": "Vollbild verlassen", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "Alles erweitern", "expert-lowercase": "experte", "expert-plural": "experten", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 891e142d154f..9b2b802c9c3d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "closed this task", "cloud-config-source": "Cloud Config Source", "code": "Code", + "collapse": "Collapse", "collapse-all": "Collapse All", "color": "Color", "column": "Column", @@ -440,6 +441,7 @@ "execution-time": "Execution Time", "exit-fit-to-screen": "Exit fit to screen", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "Expand All", "expert-lowercase": "expert", "expert-plural": "Experts", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index ed520738b7f3..4d3f5c7c0f89 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "cerró esta tarea", "cloud-config-source": "Fuente de configuración en el cloud", "code": "Código", + "collapse": "Collapse", "collapse-all": "Contraer todo", "color": "Color", "column": "Columna", @@ -440,6 +441,7 @@ "execution-time": "Tiempo de ejecución", "exit-fit-to-screen": "Salir de la vista ajustada a la pantalla", "exit-version-history": "Salir del historial de versiones", + "expand": "Expand", "expand-all": "Expandir todo", "expert-lowercase": "experto", "expert-plural": "Expertos", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index 780bc07bf24c..e920baa2a7bd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "fermer cette tâche", "cloud-config-source": "Source de Configuration Cloud", "code": "Code", + "collapse": "Collapse", "collapse-all": "Tout Réduire", "color": "Color", "column": "Colonne", @@ -440,6 +441,7 @@ "execution-time": "execution-time", "exit-fit-to-screen": "Quitter le Mode Plein Écran", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "Développer tout", "expert-lowercase": "expert", "expert-plural": "experts", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json index 003ec04f0c08..a3202013bb82 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "סגר את המשימה הזו", "cloud-config-source": "מקור תצורת ענן", "code": "קוד", + "collapse": "Collapse", "collapse-all": "קפיצה לתחתית", "color": "צבע", "column": "עמודה", @@ -440,6 +441,7 @@ "execution-time": "Execution Time", "exit-fit-to-screen": "צא ממצב תאמת למסך", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "הרחב הכל", "expert-lowercase": "מומחה", "expert-plural": "מומחים", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index b11de733fc73..3676bc4793aa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "このタスクを終了する", "cloud-config-source": "Cloud Config Source", "code": "Code", + "collapse": "Collapse", "collapse-all": "全て折り畳む", "color": "Color", "column": "カラム", @@ -440,6 +441,7 @@ "execution-time": "execution-time", "exit-fit-to-screen": "Exit fit to screen", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "すべて展開", "expert-lowercase": "expert", "expert-plural": "Experts", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json index 466d67f69d0c..43a47056c15f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "deze taak gesloten", "cloud-config-source": "Cloud Config-bron", "code": "Code", + "collapse": "Collapse", "collapse-all": "Alles inklappen", "color": "Kleur", "column": "Kolom", @@ -440,6 +441,7 @@ "execution-time": "Uitvoeringstijd", "exit-fit-to-screen": "Scherm passend maken verlaten", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "Alles uitvouwen", "expert-lowercase": "expert", "expert-plural": "Experts", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index 6b369d07dc85..96df598c9eb8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "fechou esta tarefa", "cloud-config-source": "Fonte de Configuração na Nuvem", "code": "Código", + "collapse": "Collapse", "collapse-all": "Recolher Tudo", "color": "Cor", "column": "Coluna", @@ -440,6 +441,7 @@ "execution-time": "execution-time", "exit-fit-to-screen": "Sair do ajuste à tela", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "Expandir Tudo", "expert-lowercase": "especialista", "expert-plural": "Especialistas", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json index 79b263ed9c0b..4ce577573ea9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "закрыть задачу", "cloud-config-source": "Источник облачной конфигурации", "code": "Code", + "collapse": "Collapse", "collapse-all": "Свернуть все", "color": "Color", "column": "Столбец", @@ -440,6 +441,7 @@ "execution-time": "execution-time", "exit-fit-to-screen": "Закрыть полноэкранный режим", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "Раскрыть все", "expert-lowercase": "expert", "expert-plural": "Experts", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index 8ad47e8223dd..a8e0ce518a59 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -166,6 +166,7 @@ "closed-this-task-lowercase": "关闭此任务", "cloud-config-source": "云配置源", "code": "Code", + "collapse": "Collapse", "collapse-all": "全部折叠", "color": "Color", "column": "列", @@ -440,6 +441,7 @@ "execution-time": "execution-time", "exit-fit-to-screen": "退出适应屏幕", "exit-version-history": "Exit Version History", + "expand": "Expand", "expand-all": "全部展开", "expert-lowercase": "专家", "expert-plural": "专家", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AddCustomMetricPage/AddCustomMetricPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AddCustomMetricPage/AddCustomMetricPage.tsx index 009ffd4079ae..92b1aa4f640e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AddCustomMetricPage/AddCustomMetricPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AddCustomMetricPage/AddCustomMetricPage.tsx @@ -253,14 +253,9 @@ const AddCustomMetricPage = () => { })} secondPanel={{ children: secondPanel, - className: 'p-md service-doc-panel', - minWidth: 60, + className: 'p-md p-t-xl', flex: 0.5, - overlay: { - displayThreshold: 200, - header: t('label.data-profiler-metrics'), - rotation: 'counter-clockwise', - }, + minWidth: 400, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx index 9fb1d0aed2b1..b25b8170778f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx @@ -295,12 +295,8 @@ const AddIngestionPage = () => { secondPanel={{ children: secondPanelChildren, className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AddQueryPage/AddQueryPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AddQueryPage/AddQueryPage.component.tsx index 742d40e2ceb3..348f21e31b83 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AddQueryPage/AddQueryPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AddQueryPage/AddQueryPage.component.tsx @@ -299,13 +299,9 @@ const AddQueryPage = () => { ), - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Configuration/EditLoginConfiguration/EditLoginConfigurationPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Configuration/EditLoginConfiguration/EditLoginConfigurationPage.tsx index 10a1b5d881a3..9dd4f3e6f788 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/Configuration/EditLoginConfiguration/EditLoginConfigurationPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/Configuration/EditLoginConfiguration/EditLoginConfigurationPage.tsx @@ -217,12 +217,8 @@ const EditLoginConfiguration = () => { secondPanel={{ children: secondPanelChildren, className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx index c5f87f17678c..e6590e7c8b33 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx @@ -27,6 +27,7 @@ import { CustomPropertyTable } from '../../components/common/CustomPropertyTable import DescriptionV1 from '../../components/common/EntityDescription/DescriptionV1'; import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../components/common/Loader/Loader'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import ContainerChildren from '../../components/Container/ContainerChildren/ContainerChildren'; import ContainerDataModel from '../../components/Container/ContainerDataModel/ContainerDataModel'; @@ -558,63 +559,78 @@ const ContainerPage = () => { key: isDataModelEmpty ? EntityTabs.CHILDREN : EntityTabs.SCHEMA, children: ( -
-
- setIsEditDescription(false)} - onDescriptionEdit={() => setIsEditDescription(true)} - onDescriptionUpdate={handleUpdateDescription} - onThreadLinkSelect={onThreadLinkSelect} - /> - - {isDataModelEmpty ? ( - - ) : ( - - )} -
- - - - customProperties={containerData} - dataProducts={containerData?.dataProducts ?? []} - domain={containerData?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={ - editTagsPermission && !containerData?.deleted - } - entityFQN={decodedContainerName} - entityId={containerData?.id ?? ''} - entityType={EntityType.CONTAINER} - selectedTags={tags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={handleExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + setIsEditDescription(false)} + onDescriptionEdit={() => setIsEditDescription(true)} + onDescriptionUpdate={handleUpdateDescription} + onThreadLinkSelect={onThreadLinkSelect} + /> + + {isDataModelEmpty ? ( + + ) : ( + + )} + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={containerData} + dataProducts={containerData?.dataProducts ?? []} + domain={containerData?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={ + editTagsPermission && !containerData?.deleted + } + entityFQN={decodedContainerName} + entityId={containerData?.id ?? ''} + entityType={EntityType.CONTAINER} + selectedTags={tags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={handleExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseDetailsPage/DatabaseDetailsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseDetailsPage/DatabaseDetailsPage.tsx index 853b6462d8bb..31a2f2bdf8f1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseDetailsPage/DatabaseDetailsPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseDetailsPage/DatabaseDetailsPage.tsx @@ -34,6 +34,7 @@ import { CustomPropertyTable } from '../../components/common/CustomPropertyTable import DescriptionV1 from '../../components/common/EntityDescription/DescriptionV1'; import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../components/common/Loader/Loader'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../components/DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import { DatabaseSchemaTable } from '../../components/Database/DatabaseSchema/DatabaseSchemaTable/DatabaseSchemaTable'; @@ -511,47 +512,64 @@ const DatabaseDetails: FunctionComponent = () => { key: EntityTabs.SCHEMA, children: ( -
- - - - - - - - - - - - customProperties={database} - dataProducts={database?.dataProducts ?? []} - domain={database?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedDatabaseFQN} - entityId={database?.id ?? ''} - entityType={EntityType.DATABASE} - selectedTags={tags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={settingsUpdateHandler} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + + + + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={database} + dataProducts={database?.dataProducts ?? []} + domain={database?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedDatabaseFQN} + entityId={database?.id ?? ''} + entityType={EntityType.DATABASE} + selectedTags={tags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={settingsUpdateHandler} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx index 00a56d583823..07794591884a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx @@ -35,6 +35,7 @@ import { CustomPropertyTable } from '../../components/common/CustomPropertyTable import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../components/common/Loader/Loader'; import { PagingHandlerParams } from '../../components/common/NextPrevious/NextPrevious.interface'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../components/DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import ProfilerSettings from '../../components/Database/Profiler/ProfilerSettings/ProfilerSettings'; @@ -578,42 +579,59 @@ const DatabaseSchemaPage: FunctionComponent = () => { key: EntityTabs.TABLE, children: ( -
- - - - - customProperties={databaseSchema} - dataProducts={databaseSchema?.dataProducts ?? []} - domain={databaseSchema?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedDatabaseSchemaFQN} - entityId={databaseSchema?.id ?? ''} - entityType={EntityType.DATABASE_SCHEMA} - selectedTags={tags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={handleExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={databaseSchema} + dataProducts={databaseSchema?.dataProducts ?? []} + domain={databaseSchema?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedDatabaseSchemaFQN} + entityId={databaseSchema?.id ?? ''} + entityType={EntityType.DATABASE_SCHEMA} + selectedTags={tags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={handleExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx index 951d5f81465b..a9411645cd7c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx @@ -199,12 +199,8 @@ function EditConnectionFormPage() { /> ), className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/EditEmailConfigPage/EditEmailConfigPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/EditEmailConfigPage/EditEmailConfigPage.component.tsx index 9425c2256fc5..10ddf507e10a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/EditEmailConfigPage/EditEmailConfigPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/EditEmailConfigPage/EditEmailConfigPage.component.tsx @@ -177,12 +177,8 @@ function EditEmailConfigPage() { secondPanel={{ children: secondPanelChildren, className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx index 6442d1eadbd2..000c33d8307c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx @@ -306,12 +306,8 @@ const EditIngestionPage = () => { secondPanel={{ children: secondPanelChildren, className: 'service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx index e1849aa11f56..dda2f1bee204 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx @@ -466,13 +466,9 @@ const AddKPIPage = () => { {t('message.add-kpi-message')} ), - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/EditKPIPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/EditKPIPage.tsx index eba8229e92d3..e5897102fa25 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/EditKPIPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/EditKPIPage.tsx @@ -446,13 +446,9 @@ const EditKPIPage = () => { {t('message.add-kpi-message')} ), - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx index a6264d19343a..463fbef197f4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx @@ -210,13 +210,9 @@ const AddPolicyPage = () => { {t('message.add-policy-message')} ), - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx index 40ea6103239f..7ae0beb4ce17 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx @@ -227,13 +227,9 @@ const AddRolePage = () => { {t('message.add-role-message')} ), - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/SearchIndexDetailsPage/SearchIndexDetailsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/SearchIndexDetailsPage/SearchIndexDetailsPage.tsx index 488021bffc11..42473cc3a4a3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/SearchIndexDetailsPage/SearchIndexDetailsPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/SearchIndexDetailsPage/SearchIndexDetailsPage.tsx @@ -29,6 +29,7 @@ import DescriptionV1 from '../../components/common/EntityDescription/Description import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../components/common/Loader/Loader'; import QueryViewer from '../../components/common/QueryViewer/QueryViewer.component'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../components/DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import SampleDataWithMessages from '../../components/Database/SampleDataWithMessages/SampleDataWithMessages'; @@ -377,54 +378,69 @@ function SearchIndexDetailsPage() { key: EntityTabs.FIELDS, children: ( -
-
- - -
- - - - customProperties={searchIndexDetails} - dataProducts={searchIndexDetails?.dataProducts ?? []} - domain={searchIndexDetails?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedSearchIndexFQN} - entityId={searchIndexDetails?.id ?? ''} - entityType={EntityType.SEARCH_INDEX} - selectedTags={searchIndexTags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={searchIndexDetails} + dataProducts={searchIndexDetails?.dataProducts ?? []} + domain={searchIndexDetails?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedSearchIndexFQN} + entityId={searchIndexDetails?.id ?? ''} + entityType={EntityType.SEARCH_INDEX} + selectedTags={searchIndexTags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/ServiceDetailsPage/ServiceMainTabContent.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/ServiceDetailsPage/ServiceMainTabContent.tsx index 73986f52fa78..57c672123a03 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/ServiceDetailsPage/ServiceMainTabContent.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/ServiceDetailsPage/ServiceMainTabContent.tsx @@ -23,6 +23,7 @@ import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/Error import Loader from '../../components/common/Loader/Loader'; import NextPrevious from '../../components/common/NextPrevious/NextPrevious'; import { NextPreviousProps } from '../../components/common/NextPrevious/NextPrevious.interface'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import EntityRightPanel from '../../components/Entity/EntityRightPanel/EntityRightPanel'; import { PAGE_SIZE } from '../../constants/constants'; import { OperationPermission } from '../../context/PermissionProvider/PermissionProvider.interface'; @@ -151,83 +152,105 @@ function ServiceMainTabContent({ return ( -
- - - - - - - - + + + + + + + + + + + {t('label.deleted')} + {' '} + + + + + + {isServiceLoading ? ( + + ) : ( +
, + }} + pagination={false} + rowKey="id" + size="small" + /> + )} + {Boolean(!isNil(paging.after) || !isNil(paging.before)) && + !isEmpty(data) && ( + + )} + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ - - {t('label.deleted')} - {' '} - - - -
- - {isServiceLoading ? ( - - ) : ( -
, - }} - pagination={false} - rowKey="id" - size="small" - /> - )} - {Boolean(!isNil(paging.after) || !isNil(paging.before)) && - !isEmpty(data) && ( - - )} - - - - - - + ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/StoredProcedure/StoredProcedurePage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/StoredProcedure/StoredProcedurePage.tsx index 1ac5481765e3..6946aa139dfb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/StoredProcedure/StoredProcedurePage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/StoredProcedure/StoredProcedurePage.tsx @@ -27,6 +27,7 @@ import { CustomPropertyTable } from '../../components/common/CustomPropertyTable import DescriptionV1 from '../../components/common/EntityDescription/DescriptionV1'; import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../components/common/Loader/Loader'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../components/DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import SchemaEditor from '../../components/Database/SchemaEditor/SchemaEditor'; @@ -536,57 +537,70 @@ const StoredProcedurePage = () => { key: EntityTabs.CODE, children: ( - -
- - - - - -
- - - - customProperties={storedProcedure} - dataProducts={storedProcedure?.dataProducts ?? []} - domain={storedProcedure?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={decodedStoredProcedureFQN} - entityId={storedProcedure?.id ?? ''} - entityType={EntityType.STORED_PROCEDURE} - selectedTags={tags} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + customProperties={storedProcedure} + dataProducts={storedProcedure?.dataProducts ?? []} + domain={storedProcedure?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={decodedStoredProcedureFQN} + entityId={storedProcedure?.id ?? ''} + entityType={EntityType.STORED_PROCEDURE} + selectedTags={tags} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx index 0b044fa6e7b6..89e33e35820c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx @@ -10,6 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Col, Row, Space, Tabs, Typography } from 'antd'; import { AxiosError } from 'axios'; import classNames from 'classnames'; @@ -29,6 +30,7 @@ import DescriptionV1 from '../../components/common/EntityDescription/Description import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import Loader from '../../components/common/Loader/Loader'; import QueryViewer from '../../components/common/QueryViewer/QueryViewer.component'; +import ResizablePanels from '../../components/common/ResizablePanels/ResizablePanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import { DataAssetsHeader } from '../../components/DataAssets/DataAssetsHeader/DataAssetsHeader.component'; import TableProfiler from '../../components/Database/Profiler/TableProfiler/TableProfiler'; @@ -544,69 +546,84 @@ const TableDetailsPageV1: React.FC = () => { gutter={[0, 16]} id="schemaDetails" wrap={false}> -
-
- - -
- - - - afterSlot={ - - - - } - beforeSlot={ - !isEmpty(joinedTables) ? ( - - ) : null - } - customProperties={tableDetails} - dataProducts={tableDetails?.dataProducts ?? []} - domain={tableDetails?.domain} - editCustomAttributePermission={editCustomAttributePermission} - editTagPermission={editTagsPermission} - entityFQN={datasetFQN} - entityId={tableDetails?.id ?? ''} - entityType={EntityType.TABLE} - selectedTags={tableTags} - tablePartition={tableDetails?.tablePartition} - viewAllPermission={viewAllPermission} - onExtensionUpdate={onExtensionUpdate} - onTagSelectionChange={handleTagSelection} - onThreadLinkSelect={onThreadLinkSelect} + + + + + + ), + minWidth: 800, + flex: 0.87, + }} + secondPanel={{ + children: ( +
+ + afterSlot={ + + + + } + beforeSlot={ + !isEmpty(joinedTables) ? ( + + ) : null + } + customProperties={tableDetails} + dataProducts={tableDetails?.dataProducts ?? []} + domain={tableDetails?.domain} + editCustomAttributePermission={ + editCustomAttributePermission + } + editTagPermission={editTagsPermission} + entityFQN={datasetFQN} + entityId={tableDetails?.id ?? ''} + entityType={EntityType.TABLE} + selectedTags={tableTags} + tablePartition={tableDetails?.tablePartition} + viewAllPermission={viewAllPermission} + onExtensionUpdate={onExtensionUpdate} + onTagSelectionChange={handleTagSelection} + onThreadLinkSelect={onThreadLinkSelect} + /> +
+ ), + minWidth: 320, + flex: 0.13, + className: 'entity-resizable-right-panel-container', + }} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx index 73cdfdaf0920..092dd56f059c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx @@ -148,13 +148,9 @@ const TestSuiteIngestionPage = () => { })} secondPanel={{ children: , - className: 'p-md service-doc-panel', - minWidth: 60, - overlay: { - displayThreshold: 200, - header: t('label.setup-guide'), - rotation: 'counter-clockwise', - }, + className: 'p-md p-t-xl', + minWidth: 400, + flex: 0.3, }} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/app.less b/openmetadata-ui/src/main/resources/ui/src/styles/app.less index e520d4623a23..a92defe92576 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/app.less +++ b/openmetadata-ui/src/main/resources/ui/src/styles/app.less @@ -559,6 +559,27 @@ a[href].link-text-grey, padding: 12px 8px 0 8px; } +.reflex-container { + .entity-resizable-right-panel-container { + overflow-y: auto; + padding: 48px 8px 0 8px; + } +} + +.reflex-container { + .entity-summary-resizable-right-panel-container { + .summary-panel-container { + height: 100%; + } + .ant-drawer-content-wrapper { + padding-top: 30px; + } + z-index: 10; + overflow-y: auto; + padding: 48px 8px 0 8px; + } +} + .global-border-radius { border-radius: 10px; } diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less b/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less index a326953a2ade..878a69dbbbc6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less +++ b/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less @@ -19,6 +19,8 @@ //xs: 8px; //xss: 4px; +@padding-xl: 44px; + // Margin .m-0 { @@ -490,6 +492,9 @@ .p-l-lg { padding-left: @padding-lg; } +.p-t-xl { + padding-top: @padding-xl; +} .p-t-0 { padding-top: 0 !important; } From 328ed2bf11ee93b626e456da1b836900ab91441c Mon Sep 17 00:00:00 2001 From: IceS2 Date: Wed, 12 Jun 2024 19:32:45 +0200 Subject: [PATCH 6/8] MINOR: Fix e2e (#16627) * Fix Metabase E2E Test * Add 'debug' input to python e2e tests * Fix 'debug' default to be 'false' * Standardized all Metabase IDs to MetabaseStrId * Fix Metabase expected filtered sink mix value * Fix wrong parameter being passed to the config * Fix powerBI e2e tests * Fix one Redash e2e test * Fix checkstyle * Fix Dashboard create patch_request not using EntityReferenceList * Fix Redash E2E test value * Add logging to create patch request * Fix checkstyle and linting * Fix default debug value * Fix e2e workflow * Fix e2e workflow * Fix e2e workflow * Fix metabase and powerbi e2e values --- .github/workflows/py-cli-e2e-tests.yml | 25 +++- .../ingestion/models/patch_request.py | 108 ++++++++++-------- .../source/dashboard/dashboard_service.py | 9 +- 3 files changed, 85 insertions(+), 57 deletions(-) diff --git a/.github/workflows/py-cli-e2e-tests.yml b/.github/workflows/py-cli-e2e-tests.yml index 2f48a0ca457d..0367a29948bb 100644 --- a/.github/workflows/py-cli-e2e-tests.yml +++ b/.github/workflows/py-cli-e2e-tests.yml @@ -24,11 +24,22 @@ on: required: False default: "false" +env: + DEBUG: ${{ inputs.debug || 'false' }} + permissions: id-token: write contents: read jobs: + # Needed since env is not available on the job context: https://github.com/actions/runner/issues/2372 + check-debug: + runs-on: ubuntu-latest + outputs: + DEBUG: ${{ env.DEBUG }} + steps: + - run: echo "null" + py-cli-e2e-tests: runs-on: ubuntu-latest strategy: @@ -152,21 +163,21 @@ jobs: coverage report --rcfile ingestion/pyproject.toml --data-file .coverage.$E2E_TEST || true - name: Upload coverage artifact for Python tests - if: matrix.e2e-test == 'python' && steps.python-e2e-test.outcome == 'success' && inputs.debug == 'false' + if: matrix.e2e-test == 'python' && steps.python-e2e-test.outcome == 'success' && env.DEBUG == 'false' uses: actions/upload-artifact@v3 with: name: coverage-${{ matrix.e2e-test }} path: .coverage - name: Upload coverage artifact for CLI E2E tests - if: matrix.e2e-test != 'python' && steps.e2e-test.outcome == 'success' && inputs.debug == 'false' + if: matrix.e2e-test != 'python' && steps.e2e-test.outcome == 'success' && env.DEBUG == 'false' uses: actions/upload-artifact@v3 with: name: coverage-${{ matrix.e2e-test }} path: .coverage.${{ matrix.e2e-test }} - name: Upload tests artifact - if: steps.e2e-test.outcome == 'success' || steps.python-e2e-test.outcome == 'success' && inputs.debug == 'false' + if: steps.e2e-test.outcome == 'success' || steps.python-e2e-test.outcome == 'success' && env.DEBUG == 'false' uses: actions/upload-artifact@v3 with: name: tests-${{ matrix.e2e-test }} @@ -179,7 +190,7 @@ jobs: sudo rm -rf ${PWD}/docker-volume - name: Slack on Failure - if: steps.e2e-test.outcome != 'success' && steps.python-e2e-test.outcome != 'success' && inputs.debug == 'false' + if: steps.e2e-test.outcome != 'success' && steps.python-e2e-test.outcome != 'success' && env.DEBUG == 'false' uses: slackapi/slack-github-action@v1.23.0 with: payload: | @@ -197,8 +208,10 @@ jobs: sonar-cloud-coverage-upload: runs-on: ubuntu-latest - needs: py-cli-e2e-tests - if: inputs.debug == 'false' + needs: + - py-cli-e2e-tests + - check-debug + if: needs.check-debug.outputs.DEBUG == 'false' steps: - name: Checkout diff --git a/ingestion/src/metadata/ingestion/models/patch_request.py b/ingestion/src/metadata/ingestion/models/patch_request.py index fbf698ae54d4..7b5cd0377307 100644 --- a/ingestion/src/metadata/ingestion/models/patch_request.py +++ b/ingestion/src/metadata/ingestion/models/patch_request.py @@ -12,6 +12,8 @@ Pydantic definition for storing entities for patching """ import json +import logging +import traceback from typing import Dict, List, Optional, Tuple import jsonpatch @@ -21,6 +23,8 @@ from metadata.ingestion.ometa.mixins.patch_mixin_utils import PatchOperation from metadata.ingestion.ometa.utils import model_str +logger = logging.getLogger("metadata") + class PatchRequest(BaseModel): """ @@ -326,57 +330,63 @@ def build_patch( Returns Updated Entity """ - - # remove change descriptions from entities - if remove_change_description: - source = _remove_change_description(source) - destination = _remove_change_description(destination) - - if array_entity_fields: - _sort_array_entity_fields( - source=source, - destination=destination, - array_entity_fields=array_entity_fields, - ) - - # Get the difference between source and destination - if allowed_fields: - patch = jsonpatch.make_patch( - json.loads( - source.model_dump_json( - exclude_unset=True, - exclude_none=True, - include=allowed_fields, - ) - ), - json.loads( - destination.model_dump_json( - exclude_unset=True, - exclude_none=True, - include=allowed_fields, - ) - ), - ) - else: - patch: jsonpatch.JsonPatch = jsonpatch.make_patch( - json.loads(source.model_dump_json(exclude_unset=True, exclude_none=True)), - json.loads( - destination.model_dump_json(exclude_unset=True, exclude_none=True) - ), - ) - if not patch: + try: + # remove change descriptions from entities + if remove_change_description: + source = _remove_change_description(source) + destination = _remove_change_description(destination) + + if array_entity_fields: + _sort_array_entity_fields( + source=source, + destination=destination, + array_entity_fields=array_entity_fields, + ) + + # Get the difference between source and destination + if allowed_fields: + patch = jsonpatch.make_patch( + json.loads( + source.model_dump_json( + exclude_unset=True, + exclude_none=True, + include=allowed_fields, + ) + ), + json.loads( + destination.model_dump_json( + exclude_unset=True, + exclude_none=True, + include=allowed_fields, + ) + ), + ) + else: + patch: jsonpatch.JsonPatch = jsonpatch.make_patch( + json.loads( + source.model_dump_json(exclude_unset=True, exclude_none=True) + ), + json.loads( + destination.model_dump_json(exclude_unset=True, exclude_none=True) + ), + ) + if not patch: + return None + + # For a user editable fields like descriptions, tags we only want to support "add" operation in patch + # we will remove the other operations. + if restrict_update_fields: + updated_operations = JsonPatchUpdater.from_restrict_update_fields( + restrict_update_fields + ).update(patch) + patch.patch = updated_operations + + return patch + except Exception: + logger.debug(traceback.format_exc()) + logger.warning("Couldn't build patch for Entity.") return None - # For a user editable fields like descriptions, tags we only want to support "add" operation in patch - # we will remove the other operations. - if restrict_update_fields: - updated_operations = JsonPatchUpdater.from_restrict_update_fields( - restrict_update_fields - ).update(patch) - patch.patch = updated_operations - - return patch - def _sort_array_entity_fields( source: T, diff --git a/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py b/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py index f8d50adac61c..54b82d43523e 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py @@ -49,6 +49,7 @@ ) from metadata.generated.schema.type.entityLineage import Source as LineageSource from metadata.generated.schema.type.entityReference import EntityReference +from metadata.generated.schema.type.entityReferenceList import EntityReferenceList from metadata.generated.schema.type.usageRequest import UsageRequest from metadata.ingestion.api.delete import delete_entity_from_source from metadata.ingestion.api.models import Either, Entity @@ -621,7 +622,9 @@ def create_patch_request( type=LINEAGE_MAP[type(chart_entity)], ) ) - patch_request.new_entity.charts = charts_entity_ref_list + patch_request.new_entity.charts = EntityReferenceList( + charts_entity_ref_list + ) # For patch the datamodels need to be entity ref instead of fqn datamodel_entity_ref_list = [] @@ -636,7 +639,9 @@ def create_patch_request( type=LINEAGE_MAP[type(datamodel_entity)], ) ) - patch_request.new_entity.dataModels = datamodel_entity_ref_list + patch_request.new_entity.dataModels = EntityReferenceList( + datamodel_entity_ref_list + ) return patch_request def _get_column_lineage( From d2c23171db572c37b9ffe7b38db66bcc98e8375e Mon Sep 17 00:00:00 2001 From: Imri Paran Date: Wed, 12 Jun 2024 19:46:43 +0200 Subject: [PATCH 7/8] use setup action for playwright e2e (#16636) --- .../playwright-integration-tests-mysql.yml | 1 - .github/workflows/playwright-mysql-e2e.yml | 22 +++++-------------- .../workflows/playwright-postgresql-e2e.yml | 22 +++++-------------- 3 files changed, 10 insertions(+), 35 deletions(-) diff --git a/.github/workflows/playwright-integration-tests-mysql.yml b/.github/workflows/playwright-integration-tests-mysql.yml index 3fed1326543f..26105d2f286f 100644 --- a/.github/workflows/playwright-integration-tests-mysql.yml +++ b/.github/workflows/playwright-integration-tests-mysql.yml @@ -91,7 +91,6 @@ jobs: python-version: '3.9' args: "-d mysql" ingestion_dependency: "all" - timeout-minutes: 30 - name: Run Playwright Integration Tests with browser ${{ matrix.browser-type }} env: E2E_REDSHIFT_HOST_PORT: ${{ secrets.E2E_REDSHIFT_HOST_PORT }} diff --git a/.github/workflows/playwright-mysql-e2e.yml b/.github/workflows/playwright-mysql-e2e.yml index 0b668d0a9095..9cb4b21a677b 100644 --- a/.github/workflows/playwright-mysql-e2e.yml +++ b/.github/workflows/playwright-mysql-e2e.yml @@ -96,24 +96,12 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Set up JDK 17 - if: steps.cache-output.outputs.exit-code == 0 - uses: actions/setup-java@v3 + - name: Setup Openmetadata Test Environment + uses: ./.github/actions/setup-openmetadata-test-environment with: - java-version: "17" - distribution: "temurin" - - - name: Generating Data Models - run: | - pip install --upgrade pip - sudo make install_antlr_cli - make install_dev generate - - - name: Start Server and Ingest Sample Data - env: - INGESTION_DEPENDENCY: "all" - run: ./docker/run_local_docker.sh -d mysql - timeout-minutes: 60 + python-version: '3.9' + args: "-d mysql" + ingestion_dependency: "all" - name: Install dependencies working-directory: openmetadata-ui/src/main/resources/ui/ diff --git a/.github/workflows/playwright-postgresql-e2e.yml b/.github/workflows/playwright-postgresql-e2e.yml index b3d38ee3d26c..a22cfce66bc0 100644 --- a/.github/workflows/playwright-postgresql-e2e.yml +++ b/.github/workflows/playwright-postgresql-e2e.yml @@ -96,24 +96,12 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Set up JDK 17 - if: steps.cache-output.outputs.exit-code == 0 - uses: actions/setup-java@v3 + - name: Setup Openmetadata Test Environment + uses: ./.github/actions/setup-openmetadata-test-environment with: - java-version: "17" - distribution: "temurin" - - - name: Generating Data Models - run: | - pip install --upgrade pip - sudo make install_antlr_cli - make install_dev generate - - - name: Start Server and Ingest Sample Data - env: - INGESTION_DEPENDENCY: "all" - run: ./docker/run_local_docker.sh -d postgresql - timeout-minutes: 60 + python-version: '3.9' + args: "-d postgresql" + ingestion_dependency: "all" - name: Install dependencies working-directory: openmetadata-ui/src/main/resources/ui/ From 90d9ef639ea18ad8ee3b67c6d330e5bb5cafda99 Mon Sep 17 00:00:00 2001 From: Ayush Shah Date: Thu, 13 Jun 2024 09:01:45 +0530 Subject: [PATCH 8/8] Fix Arg for qliksense (#16626) --- .../metadata/ingestion/source/dashboard/qliksense/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/qliksense/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/qliksense/metadata.py index fea31fd155ec..ef44165cc89e 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/qliksense/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/qliksense/metadata.py @@ -324,7 +324,7 @@ def yield_dashboard_lineage_details( ) for datamodel in self.data_models or []: try: - data_model_entity = self._get_datamodel(datamodel=datamodel.id) + data_model_entity = self._get_datamodel(datamodel_id=datamodel.id) if data_model_entity: om_table = self._get_database_table( db_service_entity, datamodel=datamodel