From a23bbecb4ea5d3e728709b81417a9be6feda15f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Sep 2024 08:15:00 +0000 Subject: [PATCH] Update rollup jobs and transform jobs title with total numbers of jobs (#1164) * Add number of rollup jobs in the rollup jobs title Signed-off-by: Sandeep Kumawat * Transform numbers in title Signed-off-by: Sandeep Kumawat --------- Signed-off-by: Sandeep Kumawat Co-authored-by: Sandeep Kumawat (cherry picked from commit 163ad4ea81dfb67f1884c113396faeffd62356a1) Signed-off-by: github-actions[bot] --- .../__snapshots__/CreateIndexFlyout.test.tsx.snap | 1 - public/pages/Rollups/containers/Rollups/Rollups.tsx | 10 ++++++++++ .../Transforms/containers/Transforms/Transforms.tsx | 10 ++++++++++ .../components/FlyoutFooter/FlyoutFooter.tsx | 8 +------- .../__snapshots__/FlyoutFooter.test.tsx.snap | 1 - 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/public/pages/Reindex/components/CreateIndexFlyout/__snapshots__/CreateIndexFlyout.test.tsx.snap b/public/pages/Reindex/components/CreateIndexFlyout/__snapshots__/CreateIndexFlyout.test.tsx.snap index 65b709610..920bf5b24 100644 --- a/public/pages/Reindex/components/CreateIndexFlyout/__snapshots__/CreateIndexFlyout.test.tsx.snap +++ b/public/pages/Reindex/components/CreateIndexFlyout/__snapshots__/CreateIndexFlyout.test.tsx.snap @@ -853,7 +853,6 @@ Object { - EuiIconMock diff --git a/public/pages/Rollups/containers/Rollups/Rollups.tsx b/public/pages/Rollups/containers/Rollups/Rollups.tsx index b01aa8f66..59caa254d 100644 --- a/public/pages/Rollups/containers/Rollups/Rollups.tsx +++ b/public/pages/Rollups/containers/Rollups/Rollups.tsx @@ -100,10 +100,19 @@ export class Rollups extends MDSEnabledComponent { this.getRollups = _.debounce(this.getRollups, 500, { leading: true }); } + async updateBreadCrumbs() { + if (this.state.useNewUX) { + this.context.chrome.setBreadcrumbs([ + { text: BREADCRUMBS.ROLLUPS.text.concat(` (${this.state.rollups.length})`), href: BREADCRUMBS.ROLLUPS.href }, + ]); + } + } + async componentDidMount() { const breadCrumbs = this.state.useNewUX ? [BREADCRUMBS.ROLLUPS] : [BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.ROLLUPS]; this.context.chrome.setBreadcrumbs(breadCrumbs); await this.getRollups(); + this.updateBreadCrumbs(); } async componentDidUpdate(prevProps: RollupsProps, prevState: RollupsState) { @@ -112,6 +121,7 @@ export class Rollups extends MDSEnabledComponent { if (!_.isEqual(prevQuery, currQuery)) { await this.getRollups(); } + this.updateBreadCrumbs(); } static getQueryObjectFromState({ diff --git a/public/pages/Transforms/containers/Transforms/Transforms.tsx b/public/pages/Transforms/containers/Transforms/Transforms.tsx index 3eca49a72..1b412765e 100644 --- a/public/pages/Transforms/containers/Transforms/Transforms.tsx +++ b/public/pages/Transforms/containers/Transforms/Transforms.tsx @@ -100,10 +100,19 @@ export class Transforms extends MDSEnabledComponent - + {text ? text : restore ? "Restore snapshot" : !save ? `${edit ? "Edit" : "Add"} ${action}` : save ? "Save" : "Create"} diff --git a/public/pages/VisualCreatePolicy/components/FlyoutFooter/__snapshots__/FlyoutFooter.test.tsx.snap b/public/pages/VisualCreatePolicy/components/FlyoutFooter/__snapshots__/FlyoutFooter.test.tsx.snap index c227dabf4..dac92897b 100644 --- a/public/pages/VisualCreatePolicy/components/FlyoutFooter/__snapshots__/FlyoutFooter.test.tsx.snap +++ b/public/pages/VisualCreatePolicy/components/FlyoutFooter/__snapshots__/FlyoutFooter.test.tsx.snap @@ -34,7 +34,6 @@ exports[` spec renders the component 1`] = ` - EuiIconMock