From 4ba3b667adb779ce47b7108d027f889e017f1d03 Mon Sep 17 00:00:00 2001 From: Jesus Vilar Date: Tue, 21 Oct 2025 13:40:43 +0200 Subject: [PATCH 1/6] chore: add overrides and dependencies --- awx/ui/.npmrc | 6 + awx/ui/config/webpack.config.js | 23 +- awx/ui/config/webpackDevServer.config.js | 74 ++-- awx/ui/package-lock.json | 140 +++++- awx/ui/package.json | 4 + .../public/static/css/ascender_gradient.css | 23 - awx/ui/src/App.js | 39 +- awx/ui/src/ascender.css | 11 - .../src/components/AppContainer/BrandLogo.js | 22 +- .../src/components/Background/Background.js | 13 - .../components/Background/Background.test.js | 17 - awx/ui/src/components/Background/index.js | 1 - .../src/components/FormLayout/FormLayout.js | 8 +- .../Schedule/ScheduleList/ScheduleListItem.js | 3 +- .../components/ScreenHeader/ScreenHeader.js | 5 +- awx/ui/src/index.js | 13 +- awx/ui/src/patternfly-overrides.css | 406 ++++++++++++++++++ awx/ui/src/screens/Dashboard/shared/Count.js | 7 +- awx/ui/src/screens/Setting/SettingList.js | 7 +- 19 files changed, 674 insertions(+), 148 deletions(-) delete mode 100644 awx/ui/src/components/Background/Background.js delete mode 100644 awx/ui/src/components/Background/Background.test.js delete mode 100644 awx/ui/src/components/Background/index.js create mode 100644 awx/ui/src/patternfly-overrides.css diff --git a/awx/ui/.npmrc b/awx/ui/.npmrc index c42da845..f7410ede 100644 --- a/awx/ui/.npmrc +++ b/awx/ui/.npmrc @@ -1 +1,7 @@ engine-strict = true +@ctrliq:registry=https://npm.pkg.github.com +# - generate a new GitHub token (classic) with the read:packages scope (https://github.com/settings/tokens/new) +# - copy the token and set it as an environment variable in your shell +# export NPM_TOKEN=ghp_your_token_here +# (you can also add it to your ~/.bashrc, ~/.zshrc, etc. if you want it to be persistent) +//npm.pkg.github.com/:_authToken=${NPM_TOKEN} \ No newline at end of file diff --git a/awx/ui/config/webpack.config.js b/awx/ui/config/webpack.config.js index 2ec0c72e..b6a1afdf 100644 --- a/awx/ui/config/webpack.config.js +++ b/awx/ui/config/webpack.config.js @@ -222,12 +222,13 @@ module.exports = function (webpackEnv) { publicPath: paths.publicUrlOrPath, // Point sourcemap entries to original disk location (format as URL on Windows) devtoolModuleFilenameTemplate: isEnvProduction - ? info => + ? (info) => path .relative(paths.appSrc, info.absoluteResourcePath) .replace(/\\/g, '/') : isEnvDevelopment && - (info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')), + ((info) => + path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')), }, cache: { type: 'filesystem', @@ -237,7 +238,7 @@ module.exports = function (webpackEnv) { buildDependencies: { defaultWebpack: ['webpack/lib/'], config: [__filename], - tsconfig: [paths.appTsConfig, paths.appJsConfig].filter(f => + tsconfig: [paths.appTsConfig, paths.appJsConfig].filter((f) => fs.existsSync(f) ), }, @@ -307,8 +308,8 @@ module.exports = function (webpackEnv) { // `web` extension prefixes have been added for better support // for React Native Web. extensions: paths.moduleFileExtensions - .map(ext => `.${ext}`) - .filter(ext => useTypeScript || !ext.includes('ts')), + .map((ext) => `.${ext}`) + .filter((ext) => useTypeScript || !ext.includes('ts')), alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ @@ -419,7 +420,7 @@ module.exports = function (webpackEnv) { }, ], ], - + plugins: [ isEnvDevelopment && shouldUseReactRefresh && @@ -453,7 +454,7 @@ module.exports = function (webpackEnv) { cacheDirectory: true, // See #6846 for context on why cacheCompression is disabled cacheCompression: false, - + // Babel sourcemaps are needed for debugging into node_modules // code. Without the options below, debuggers like VSCode // show incorrect code and set breakpoints on the wrong lines. @@ -543,6 +544,10 @@ module.exports = function (webpackEnv) { 'sass-loader' ), }, + { + test: /\.(woff|woff2|eot|ttf|otf)$/i, + type: 'asset/resource', + }, // "file" loader makes sure those assets get served by WebpackDevServer. // When you `import` an asset, you get its (virtual) filename. // In production, they would get copied to the `build` folder. @@ -566,7 +571,7 @@ module.exports = function (webpackEnv) { { message: /source-map-loader/, module: /node_modules\/rrule/, - } + }, ], plugins: [ // Generates an `index.html` file with the