From 0cf5bbcee6410b5bfdfc6fcda18905804d8ce08a Mon Sep 17 00:00:00 2001 From: Aleksandr Gorodetskii Date: Mon, 14 Aug 2023 15:03:01 +0300 Subject: [PATCH 1/2] GUI Library: redundand loadTree requests --fixed --- client/src/components/special/Breadcrumbs.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/client/src/components/special/Breadcrumbs.js b/client/src/components/special/Breadcrumbs.js index 8a5659962f..15649049d0 100644 --- a/client/src/components/special/Breadcrumbs.js +++ b/client/src/components/special/Breadcrumbs.js @@ -271,12 +271,4 @@ export default class Breadcrumbs extends React.Component { ); } - - componentWillReceiveProps (nextProps) { - if (`${this.props.id}` !== `${nextProps.id}` || this.props.type !== nextProps.type) { - (async () => { - await this.props.pipelinesLibrary.fetch(); - })(); - } - } } From 2d2e85afc7a665b062c13b4a7005e2976588e585 Mon Sep 17 00:00:00 2001 From: Aleksandr Gorodetskii Date: Tue, 15 Aug 2023 15:06:58 +0300 Subject: [PATCH 2/2] GUI Library: update pipelineLibrary after folder rename to fix breadcrumbs stale data --- client/src/components/pipelines/browser/Folder.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/components/pipelines/browser/Folder.js b/client/src/components/pipelines/browser/Folder.js index fa960751db..1d2581df22 100644 --- a/client/src/components/pipelines/browser/Folder.js +++ b/client/src/components/pipelines/browser/Folder.js @@ -694,7 +694,10 @@ export default class Folder extends localization.LocalizedReactComponent { message.error(request.error, 5); } else { this.closeRenameFolderDialog(); - await this.props.folder.fetch(); + await Promise.all([ + this.props.pipelinesLibrary.fetch(), + this.props.folder.fetch() + ]); if (this.props.onReloadTree) { this.props.onReloadTree(!this._currentFolder.folder.parentId); } @@ -718,7 +721,10 @@ export default class Folder extends localization.LocalizedReactComponent { message.error(request.error, 5); } else { this.closeRenameFolderDialog(); - await this.props.folder.fetch(); + await Promise.all([ + this.props.pipelinesLibrary.fetch(), + this.props.folder.fetch() + ]); if (this.props.onReloadTree) { this.props.onReloadTree(!this._currentFolder.folder.parentId); }