diff --git a/scheduler/src/filters/not-found.filter.ts b/scheduler/src/filters/not-found.filter.ts index 3da070e0ca..9910ab84ef 100644 --- a/scheduler/src/filters/not-found.filter.ts +++ b/scheduler/src/filters/not-found.filter.ts @@ -25,12 +25,30 @@ if (!fs.existsSync(indexHtmlPath)) { const indexHtmlContent = fs.readFileSync(indexHtmlPath, { encoding: 'utf8' }); const newIndexHtmlPath = path.join(staticDir, 'shell', 'index-new.html'); -const { UC_PUBLIC_URL = '', ENABLE_BIGDATA = '', ENABLE_EDGE = '' } = process.env; +const { + UC_PUBLIC_URL = '', + ENABLE_BIGDATA = '', + ENABLE_EDGE = '', + TERMINUS_KEY = '', + TERMINUS_TA_ENABLE = false, + TERMINUS_TA_URL = '', + TERMINUS_TA_COLLECTOR_URL = '', +} = process.env; -const newContent = indexHtmlContent.replace( +let newContent = indexHtmlContent.replace( '', ``, ); +if (TERMINUS_TA_ENABLE) { + const taContent = ` + +`; + newContent = indexHtmlContent.replace('', taContent); +} fs.writeFileSync(newIndexHtmlPath, newContent, { encoding: 'utf8' }); @Catch(NotFoundException) diff --git a/shell/app/views/index.ejs b/shell/app/views/index.ejs index 6d728c6835..36d96fd52a 100644 --- a/shell/app/views/index.ejs +++ b/shell/app/views/index.ejs @@ -13,16 +13,7 @@ - <%if(htmlWebpackPlugin.options.isProd) {%> - - - <%}%> +