mirror of https://github.com/grafana/grafana
Frontend: Extract CSS imports into files (#94655)
* build(webpack): extract css imports into files including node_modules * feat(webassets): add cssfiles to entrypoint assets for extracted css files * feat(views): add entrypoint css link tags to html templates * feat(webassets): set CDN prefix for CSS files * test(webassets): trim down sample-assets-manifest, fix failing snapshot tests * Update pkg/api/webassets/webassets_test.go Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> * build(webpack): remove css module loader --------- Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>pull/94531/head
parent
65fc7cf004
commit
cfb46c8003
File diff suppressed because it is too large
Load Diff
@ -1,44 +1,39 @@ |
||||
<!DOCTYPE html> |
||||
<!doctype html> |
||||
<html lang="en"> |
||||
<head> |
||||
[[ if and .CSPEnabled .IsDevelopmentEnv ]] |
||||
<!-- Cypress overwrites CSP headers in HTTP requests, so this is required for e2e tests--> |
||||
<meta http-equiv="Content-Security-Policy" content="[[.CSPContent]]" /> |
||||
[[ end ]] |
||||
<meta charset="utf-8" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
||||
<meta name="viewport" content="width=device-width" /> |
||||
<meta name="theme-color" content="#000" /> |
||||
|
||||
<head> |
||||
[[ if and .CSPEnabled .IsDevelopmentEnv ]] |
||||
<!-- Cypress overwrites CSP headers in HTTP requests, so this is required for e2e tests--> |
||||
<meta http-equiv="Content-Security-Policy" content="[[.CSPContent]]"/> |
||||
[[ end ]] |
||||
<meta charset="utf-8" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
||||
<meta name="viewport" content="width=device-width" /> |
||||
<meta name="theme-color" content="#000" /> |
||||
<title>Grafana API Reference</title> |
||||
|
||||
<title>Grafana API Reference</title> |
||||
[[range $asset := .Assets.SwaggerCSSFiles]] |
||||
<link rel="stylesheet" href="[[$asset.FilePath]]" /> |
||||
[[end]] |
||||
|
||||
<link rel="stylesheet" href="[[.Assets.Light]]" /> |
||||
<link rel="stylesheet" href="[[.Assets.Light]]" /> |
||||
|
||||
<link rel="icon" type="image/png" href="[[.FavIcon]]" /> |
||||
<link rel="apple-touch-icon" sizes="180x180" href="[[.AppleTouchIcon]]" /> |
||||
<link rel="mask-icon" href="[[.Assets.ContentDeliveryURL]]public/img/grafana_mask_icon.svg" color="#F05A28" /> |
||||
</head> |
||||
<link rel="icon" type="image/png" href="[[.FavIcon]]" /> |
||||
<link rel="apple-touch-icon" sizes="180x180" href="[[.AppleTouchIcon]]" /> |
||||
<link rel="mask-icon" href="[[.Assets.ContentDeliveryURL]]public/img/grafana_mask_icon.svg" color="#F05A28" /> |
||||
</head> |
||||
|
||||
<body> |
||||
<noscript> |
||||
You need to enable JavaScript to run this app. |
||||
</noscript> |
||||
<script nonce="[[$.Nonce]]"> |
||||
[[if .Assets.ContentDeliveryURL]] |
||||
window.public_cdn_path = '[[.Assets.ContentDeliveryURL]]public/build/'; |
||||
<body> |
||||
<noscript> You need to enable JavaScript to run this app. </noscript> |
||||
<script nonce="[[$.Nonce]]"> |
||||
[[if .Assets.ContentDeliveryURL]] |
||||
window.public_cdn_path = '[[.Assets.ContentDeliveryURL]]public/build/'; |
||||
[[end]] |
||||
</script> |
||||
<div id="root"></div> |
||||
[[range $asset := .Assets.Swagger]] |
||||
<script nonce="[[$.Nonce]]" src="[[$asset.FilePath]]" type="text/javascript"></script> |
||||
[[end]] |
||||
</script> |
||||
<div id="root"></div> |
||||
[[range $asset := .Assets.Swagger]] |
||||
<script |
||||
nonce="[[$.Nonce]]" |
||||
src="[[$asset.FilePath]]" |
||||
type="text/javascript" |
||||
></script> |
||||
[[end]] |
||||
<script> |
||||
</script> |
||||
</body> |
||||
|
||||
</html> |
||||
<script></script> |
||||
</body> |
||||
</html> |
||||
|
||||
Loading…
Reference in new issue