From 0b27220a87a2a35283b0777e8c684717907510b8 Mon Sep 17 00:00:00 2001 From: Ashera Silva Date: Wed, 7 Feb 2024 15:54:28 +0530 Subject: [PATCH 1/2] Fix developer portal not starting with npm start --- .../webapp/site/public/theme/userTheme.json | 2 +- .../src/main/webapp/webpack.config.js | 4 +++ .../publisher/src/main/webapp/jest.config.js | 1 - .../src/main/webapp/publisher/index.html | 1 - .../webapp/site/public/conf/userThemes.js | 26 ------------------- .../webapp/site/public/pages/index.jsp.hbs | 1 - 6 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 portals/publisher/src/main/webapp/site/public/conf/userThemes.js diff --git a/portals/devportal/src/main/webapp/site/public/theme/userTheme.json b/portals/devportal/src/main/webapp/site/public/theme/userTheme.json index f21b19a644c..60294e60fd0 100644 --- a/portals/devportal/src/main/webapp/site/public/theme/userTheme.json +++ b/portals/devportal/src/main/webapp/site/public/theme/userTheme.json @@ -4,4 +4,4 @@ "active": false } } -} \ No newline at end of file +} diff --git a/portals/devportal/src/main/webapp/webpack.config.js b/portals/devportal/src/main/webapp/webpack.config.js index 8a04b73863c..c85d959062b 100755 --- a/portals/devportal/src/main/webapp/webpack.config.js +++ b/portals/devportal/src/main/webapp/webpack.config.js @@ -86,6 +86,10 @@ module.exports = function (env, argv) { target: 'https://localhost:9443/devportal', secure: false, }, + '/site/public/theme': { + target: 'https://localhost:9443/devportal', + secure: false, + }, '/api/am': { target: 'https://localhost:9443', secure: false, diff --git a/portals/publisher/src/main/webapp/jest.config.js b/portals/publisher/src/main/webapp/jest.config.js index f4aed14e72f..42e395cf268 100644 --- a/portals/publisher/src/main/webapp/jest.config.js +++ b/portals/publisher/src/main/webapp/jest.config.js @@ -36,7 +36,6 @@ module.exports = { '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/source/Tests/Unit/__mocks__/fileMock.js', '\\.(css|less)$': '/source/Tests/Unit/__mocks__/styleMock.js', - userCustomThemes: '/site/public/conf/userThemes.js', '^Config$': '/site/public/conf/settings.json', '^MaterialIcons$': '/site/public/fonts/iconfont/MaterialIcons.js', '^monaco-editor$': '/node_modules/react-monaco-editor', diff --git a/portals/publisher/src/main/webapp/publisher/index.html b/portals/publisher/src/main/webapp/publisher/index.html index 143beb36aaf..39d53205f66 100644 --- a/portals/publisher/src/main/webapp/publisher/index.html +++ b/portals/publisher/src/main/webapp/publisher/index.html @@ -17,7 +17,6 @@
- diff --git a/portals/publisher/src/main/webapp/site/public/conf/userThemes.js b/portals/publisher/src/main/webapp/site/public/conf/userThemes.js deleted file mode 100644 index f5b636623f9..00000000000 --- a/portals/publisher/src/main/webapp/site/public/conf/userThemes.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * IMPORTANT: This file only contains theme JSS of the Publisher app, Don't add other configuration parameters here. - * This theme file is an extension of material-ui default theme https://material-ui.com/customization/default-theme/ - * Application related configurations are located in `site/public/theme/settings.json` - */ -const userThemes = { - light(theme) { - return ( - { - overrides: { - MuiRadio: { - colorSecondary: { - '&$checked': { color: theme.palette.primary.main }, - '&$disabled': { - color: theme.palette.action.disabled, - }, - }, - }, - }, - } - ); - }, -}; -if (typeof module !== 'undefined') { - module.exports = userThemes; // Added for tests -} diff --git a/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs b/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs index 70b1ca93d6f..50fef8b5c37 100644 --- a/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs +++ b/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs @@ -51,7 +51,6 @@ - + diff --git a/portals/publisher/src/main/webapp/site/public/conf/userThemes.js b/portals/publisher/src/main/webapp/site/public/conf/userThemes.js new file mode 100644 index 00000000000..f5b636623f9 --- /dev/null +++ b/portals/publisher/src/main/webapp/site/public/conf/userThemes.js @@ -0,0 +1,26 @@ +/** + * IMPORTANT: This file only contains theme JSS of the Publisher app, Don't add other configuration parameters here. + * This theme file is an extension of material-ui default theme https://material-ui.com/customization/default-theme/ + * Application related configurations are located in `site/public/theme/settings.json` + */ +const userThemes = { + light(theme) { + return ( + { + overrides: { + MuiRadio: { + colorSecondary: { + '&$checked': { color: theme.palette.primary.main }, + '&$disabled': { + color: theme.palette.action.disabled, + }, + }, + }, + }, + } + ); + }, +}; +if (typeof module !== 'undefined') { + module.exports = userThemes; // Added for tests +} diff --git a/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs b/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs index 50fef8b5c37..70b1ca93d6f 100644 --- a/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs +++ b/portals/publisher/src/main/webapp/site/public/pages/index.jsp.hbs @@ -51,6 +51,7 @@ +