From 773ec4ec4d7fff61aaffa82212392a12418bfcd8 Mon Sep 17 00:00:00 2001 From: Greg Back Date: Wed, 3 Feb 2021 18:12:58 -0500 Subject: [PATCH 1/2] Use newfeed.service config for all newsfeeds Prior to this change, the main `kibana` newsfeed would respect the `newsfeed.service.urlRoot` config setting, but other feeds like `kibana-analytics` would not. This made it difficult to test new feed items using a local server. --- src/plugins/newsfeed/public/plugin.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/newsfeed/public/plugin.tsx b/src/plugins/newsfeed/public/plugin.tsx index ae11009bcfd9e..b6e1a21222bb8 100644 --- a/src/plugins/newsfeed/public/plugin.tsx +++ b/src/plugins/newsfeed/public/plugin.tsx @@ -51,7 +51,10 @@ export class NewsfeedPublicPlugin return { createNewsFeed$: (endpoint: NewsfeedApiEndpoint) => { const config = Object.assign({}, this.config, { - service: { pathTemplate: `/${endpoint}/v{VERSION}.json` }, + service: { + pathTemplate: `/${endpoint}/v{VERSION}.json`, + urlRoot: this.config.service.urlRoot, + }, }); return this.fetchNewsfeed(core, config); }, From 98e3783ce1cbfd0338c191644fa6c77564e07a2f Mon Sep 17 00:00:00 2001 From: Greg Back <1045796+gtback@users.noreply.github.com> Date: Thu, 4 Feb 2021 10:30:11 -0500 Subject: [PATCH 2/2] Update src/plugins/newsfeed/public/plugin.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alejandro Fernández Haro --- src/plugins/newsfeed/public/plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/newsfeed/public/plugin.tsx b/src/plugins/newsfeed/public/plugin.tsx index a9cd40a7ff30a..a788b3c4d0b59 100644 --- a/src/plugins/newsfeed/public/plugin.tsx +++ b/src/plugins/newsfeed/public/plugin.tsx @@ -52,8 +52,8 @@ export class NewsfeedPublicPlugin createNewsFeed$: (endpoint: NewsfeedApiEndpoint) => { const config = Object.assign({}, this.config, { service: { + ...this.config.service, pathTemplate: `/${endpoint}/v{VERSION}.json`, - urlRoot: this.config.service.urlRoot, }, }); return this.fetchNewsfeed(core, config);