From 40e2953189a3b3471e10bdc178978c4cb5b291fc Mon Sep 17 00:00:00 2001 From: Kawika Avilla Date: Mon, 30 Aug 2021 21:33:03 -0700 Subject: [PATCH] [1.x][Build] build:types and uiFramework run successfully Allowing for the following builds to complete successfully: * `yarn build:types` * `yarn uiFramework:build` * `yarn uiFramework:start` Not positive about the expected results when running uiFramework:start but it seems to be on par with the legacy 7.10.2 version. Issue resolved: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/680 Backport PR: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/734 Signed-off-by: Kawika Avilla --- .../src/components/guide_nav/_guide_nav.scss | 5 +++-- .../doc_site/src/components/guide_nav/guide_nav.js | 4 ++-- .../osd-ui-framework/doc_site/webpack.config.js | 14 +++++++++++++- .../common/field_formats/field_formats_registry.ts | 4 ++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/packages/osd-ui-framework/doc_site/src/components/guide_nav/_guide_nav.scss b/packages/osd-ui-framework/doc_site/src/components/guide_nav/_guide_nav.scss index 33d51806d0f0..a0bfd08957e8 100644 --- a/packages/osd-ui-framework/doc_site/src/components/guide_nav/_guide_nav.scss +++ b/packages/osd-ui-framework/doc_site/src/components/guide_nav/_guide_nav.scss @@ -80,9 +80,10 @@ font-size: 14px; } - .guideNav__elasticLogo { + // TODO: [RENAMEME] replacement background-image might be needed + .guideNav__opensearchLogo { position: absolute; - background-image: url("images/elastic-logo.svg"); + background-image: url("images/react-logo.svg"); width: 106px; height: 36px; background-repeat: no-repeat; diff --git a/packages/osd-ui-framework/doc_site/src/components/guide_nav/guide_nav.js b/packages/osd-ui-framework/doc_site/src/components/guide_nav/guide_nav.js index acf69610b875..d97bbb75a811 100644 --- a/packages/osd-ui-framework/doc_site/src/components/guide_nav/guide_nav.js +++ b/packages/osd-ui-framework/doc_site/src/components/guide_nav/guide_nav.js @@ -172,8 +172,8 @@ export class GuideNav extends Component { {this.renderPagination()} diff --git a/packages/osd-ui-framework/doc_site/webpack.config.js b/packages/osd-ui-framework/doc_site/webpack.config.js index ddbffa209d4d..1b80a331e46a 100644 --- a/packages/osd-ui-framework/doc_site/webpack.config.js +++ b/packages/osd-ui-framework/doc_site/webpack.config.js @@ -64,7 +64,19 @@ module.exports = { }, { test: /\.scss$/, - loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'], + loaders: [ + 'style-loader', + 'css-loader', + { + loader: 'postcss-loader', + options: { + config: { + path: require.resolve('@osd/optimizer/postcss.config.js'), + }, + }, + }, + 'sass-loader', + ], exclude: /node_modules/, }, { diff --git a/src/plugins/data/common/field_formats/field_formats_registry.ts b/src/plugins/data/common/field_formats/field_formats_registry.ts index 5260d9b1e21e..07e59d2dd7e2 100644 --- a/src/plugins/data/common/field_formats/field_formats_registry.ts +++ b/src/plugins/data/common/field_formats/field_formats_registry.ts @@ -182,7 +182,7 @@ export class FieldFormatsRegistry { return new ConcreteFieldFormat(params, this.getConfig); }, - (formatId: FieldFormatId, params: Record) => + (formatId: FieldFormatId, params: Record = {}) => JSON.stringify({ formatId, ...params, @@ -222,7 +222,7 @@ export class FieldFormatsRegistry { */ getDefaultInstanceCacheResolver( fieldType: OSD_FIELD_TYPES, - esTypes: OPENSEARCH_FIELD_TYPES[] + esTypes?: OPENSEARCH_FIELD_TYPES[] ): string { // @ts-ignore return Array.isArray(esTypes) && esTypes.indexOf(fieldType) === -1