mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
Integrate a migration-detector middleware
This attempts to detect if there are migrations in-progress and will force display an interstitial page in the process that attempts to load the index page every 10s until it succeeds. This is only attached in production settings so the development environment can proceed even if the migrations haven't been applied yet
This commit is contained in:
@@ -25,6 +25,8 @@ const APP_ENTRY = path.join(SOURCE_PATH, 'app.js');
|
||||
const VENDOR_ENTRY = path.join(SOURCE_PATH, 'vendor.js');
|
||||
const INDEX_ENTRY = path.join(CLIENT_PATH, 'index.template.ejs');
|
||||
const INDEX_OUTPUT = path.join(UI_PATH, 'templates/ui/index.html');
|
||||
const INSTALL_RUNNING_ENTRY = path.join(CLIENT_PATH, 'installing.template.ejs')
|
||||
const INSTALL_RUNNING_OUTPUT = path.join(UI_PATH, 'templates/ui/installing.html');
|
||||
const THEME_ENTRY = path.join(LIB_PATH, 'theme', 'index.less');
|
||||
const OUTPUT = 'js/[name].[hash].js';
|
||||
const CHUNKS = ['vendor', 'app'];
|
||||
@@ -168,6 +170,19 @@ let base = {
|
||||
moduleA.files.sort((fileA, fileB) => fileA.includes('js') ? -1 : 1)
|
||||
moduleB.files.sort((fileA, fileB) => fileA.includes('js') ? -1 : 1)
|
||||
|
||||
return moduleA.names[0] === 'vendor' ? -1 : 1
|
||||
}
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
alwaysWriteToDisk: true,
|
||||
template: INSTALL_RUNNING_ENTRY,
|
||||
filename: INSTALL_RUNNING_OUTPUT,
|
||||
inject: false,
|
||||
chunks: CHUNKS,
|
||||
chunksSortMode: (moduleA, moduleB) => {
|
||||
moduleA.files.sort((fileA, fileB) => fileA.includes('js') ? -1 : 1)
|
||||
moduleB.files.sort((fileA, fileB) => fileA.includes('js') ? -1 : 1)
|
||||
|
||||
return moduleA.names[0] === 'vendor' ? -1 : 1
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user