grafana/public/views/swagger.html
Jack Westbrook cfb46c8003
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>
2024-10-16 11:10:34 +02:00

40 lines
1.4 KiB
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" />
<title>Grafana API Reference</title>
[[range $asset := .Assets.SwaggerCSSFiles]]
<link rel="stylesheet" href="[[$asset.FilePath]]" />
[[end]]
<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>
<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></script>
</body>
</html>