Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flow-ui dependencies, enable CSP and embed google fonts #3880

Merged
merged 2 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ Main (unreleased)

- Update OracleDB Exporter dependency to 0.5.0 (@schmikei)

- Embed Google Fonts on Flow UI (@jkroepke)

- Enable Content-Security-Policies on Flow UI (@jkroepke)

- Update azure-metrics-exporter to v0.0.0-20230502203721-b2bfd97b5313 (@kgeckhart)

### Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion web/ui/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_BASE_URL=
GENERATE_SOURCEMAP=false
GENERATE_SOURCEMAP=false
43 changes: 24 additions & 19 deletions web/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,46 @@
"name": "grafana-agent",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-regular-svg-icons": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@grafana/ui": "^9.3.2",
"@tanstack/react-query": "^4.20.4",
"d3": "^7.6.1",
"d3-dag": "^0.11.4",
"@grafana/ui": "^9.5.2",
"@tanstack/react-query": "^4.29.5",
"d3": "^7.8.4",
"d3-dag": "^0.11.5",
"d3-zoom": "^3.0.0",
"normalize.css": "^8.0.1",
"prismjs": "^1.28.0",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.11.1",
"react-syntax-highlighter": "^15.5.0",
"react-table": "^7.8.0",
"typescript": "^4.4.2"
"typescript": "^5.0.4"
},
"devDependencies": {
"@types/d3": "^7.4.0",
"@types/d3-zoom": "^3.0.1",
"@types/d3-zoom": "^3.0.2",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/node": "^16.7.13",
"@types/node": "^20.1.3",
"@types/prettier": "^2.7.2",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@types/react-syntax-highlighter": "^15.5.6",
"@types/react-table": "^7.7.12",
"eslint-config-prettier": "^8.5.0",
"@types/react-table": "^7.7.14",
"eslint": "^8.40.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"prettier": "^2.7.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"prettier": "^2.8.8",
"react-scripts": "5.0.1"
},
"resolutions": {
"react-scripts/@svgr/webpack": "^8.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
Expand All @@ -52,7 +56,8 @@
"printWidth": 125
},
"browserslist": [
">0.2%",
">0.5%",
"firefox esr",
"not dead",
"not ie <= 11",
"not op_mini all"
Expand Down
6 changes: 1 addition & 5 deletions web/ui/public/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'">
<base href="%REACT_APP_BASE_URL%/" target="_top" />

<meta charset="utf-8" />
Expand All @@ -16,11 +17,6 @@
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>Grafana Agent</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 2 additions & 0 deletions web/ui/src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('./static/fonts.css');

html, body, #root {
height: 100%;
}
Expand Down
113 changes: 113 additions & 0 deletions web/ui/src/static/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/* roboto-100 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: url('./fonts/roboto-v30-latin-100.woff2') format('woff2')x
}
/* roboto-100italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
src: url('./fonts/roboto-v30-latin-100italic.woff2') format('woff2')
}
/* roboto-300 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: url('./fonts/roboto-v30-latin-300.woff2') format('woff2')
}
/* roboto-300italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
src: url('./fonts/roboto-v30-latin-300italic.woff2') format('woff2')
}
/* roboto-regular - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('./fonts/roboto-v30-latin-regular.woff2') format('woff2')
}
/* roboto-italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
src: url('./fonts/roboto-v30-latin-italic.woff2') format('woff2')
}
/* roboto-500 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: url('./fonts/roboto-v30-latin-500.woff2') format('woff2')
}
/* roboto-500italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
src: url('./fonts/roboto-v30-latin-500italic.woff2') format('woff2')
}
/* roboto-700 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: url('./fonts/roboto-v30-latin-700.woff2') format('woff2')
}
/* roboto-700italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
src: url('./fonts/roboto-v30-latin-700italic.woff2') format('woff2')
}
/* roboto-900 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
src: url('./fonts/roboto-v30-latin-900.woff2') format('woff2')
}
/* roboto-900italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
src: url('./fonts/roboto-v30-latin-900italic.woff2') format('woff2')
}

/* fira-code-regular - latin */
@font-face {
font-display: swap;
font-family: 'Fira Code';
font-style: normal;
font-weight: 400;
src: url('./fonts/fira-code-v21-latin-regular.woff2') format('woff2')
}
/* fira-code-500 - latin */
@font-face {
font-display: swap;
font-family: 'Fira Code';
font-style: normal;
font-weight: 500;
src: url('./fonts/fira-code-v21-latin-500.woff2') format('woff2')
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading