-
Notifications
You must be signed in to change notification settings - Fork 25
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
Application Layer Dashboard #523
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
+ Coverage 70.51% 70.87% +0.35%
==========================================
Files 40 48 +8
Lines 5253 5565 +312
Branches 0 45 +45
==========================================
+ Hits 3704 3944 +240
- Misses 1372 1437 +65
- Partials 177 184 +7
*This pull request uses carry forward flags. Click here to find out more.
|
01c2052
to
c01e183
Compare
"uid": "tCTkERMSk", | ||
"version": 1, | ||
"weekStart": "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a blank line
@@ -576,7 +576,7 @@ | |||
}, | |||
"id": 27, | |||
"options": { | |||
"content": "The following seven dashboards are pre-built and are recommended for network flow\nvisualization.\n\n<span style=\"color:rgb(184, 119, 217)\">Flow Records Dashboard</span> displays the flow records being captured in the selected\ntime range.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Pod Flows Dashboard</span> shows cumulative bytes and throughput of Pod-to-Pod\ntraffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-External Flows Dashboard</span> shows cumulative bytes and throughput of\ntraffic from in-cluster to out-of-cluster. The destination of such a traffic flow\nis represented by the destination IP address.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Service Flows Dashboard</span> shows cumulative bytes and throughput of\nPod-to-Service flows. The destination of such a traffic is represented by the\ndestination Service metadata.\n\n<span style=\"color:rgb(184, 119, 217)\">Node-to-Node Flows Dashboard</span> visualizes the Node-to-Node traffic, including intra-Node\nand inter-Node flows.\n\n<span style=\"color:rgb(184, 119, 217)\">Network-Policy Flows Dashboard</span> visualizes both the traffic with NetworkPolicies enforced,\nand unprotected traffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Network Topology Dashboard</span> visualizes both Pod-to-Pod and Pod-to-Service traffic via a graph.", | |||
"content": "The following eight dashboards are pre-built and are recommended for network flow\nvisualization.\n\n<span style=\"color:rgb(184, 119, 217)\">Flow Records Dashboard</span> displays the flow records being captured in the selected\ntime range.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Pod Flows Dashboard</span> shows cumulative bytes and throughput of Pod-to-Pod\ntraffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-External Flows Dashboard</span> shows cumulative bytes and throughput of\ntraffic from in-cluster to out-of-cluster. The destination of such a traffic flow\nis represented by the destination IP address.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Service Flows Dashboard</span> shows cumulative bytes and throughput of\nPod-to-Service flows. The destination of such a traffic is represented by the\ndestination Service metadata.\n\n<span style=\"color:rgb(184, 119, 217)\">Node-to-Node Flows Dashboard</span> visualizes the Node-to-Node traffic, including intra-Node\nand inter-Node flows.\n\n<span style=\"color:rgb(184, 119, 217)\">Network-Policy Flows Dashboard</span> visualizes both the traffic with NetworkPolicies enforced,\nand unprotected traffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Network Topology Dashboard</span> visualizes both Pod-to-Pod and Pod-to-Service traffic via a graph.\n\n<span style=\"color:rgb(184, 119, 217)\">Application Visibility Dashboard</span> shows cumulative bytes and throughput for L7 NetworkPolicies\nas well as corresponding HTTP values.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application Visibility Dashboard displays cumulative bytes and throughput for L7 NetworkPolicies\nas well as corresponding HTTP data.
} | ||
}, | ||
"queryType": "sql", | ||
"rawSql": "SELECT sourcePodName, sourcePodLabels, sourcePodNamespace, sourceNodeName, destinationPodName, destinationPodLabels, destinationNodeName, destinationServicePortName, octetDeltaCount FROM flows\nWHERE sourcePodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND destinationPodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND ( destinationPodName != '' OR sourcePodName != '' )\nAND octetDeltaCount != 0\nAND httpVals == ''\nAND $__timeFilter(flowEndSeconds)\nORDER BY flowEndSeconds DESC", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be based on the l7ProtocolName instead of httpvals?
@@ -60,11 +101,11 @@ | |||
} | |||
}, | |||
"queryType": "sql", | |||
"rawSql": "SELECT sourcePodName, sourcePodLabels, sourcePodNamespace, sourceNodeName, destinationPodName, destinationPodLabels, destinationNodeName, destinationServicePortName, octetDeltaCount FROM flows\nWHERE sourcePodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND destinationPodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND destinationPodName != ''\nAND sourcePodName != ''\nAND octetDeltaCount != 0\nAND $__timeFilter(flowEndSeconds)\nORDER BY flowEndSeconds DESC", | |||
"rawSql": "SELECT sourcePodName, sourcePodLabels, sourcePodNamespace, sourceNodeName, sourceIP, sourceTransportPort, destinationPodName, destinationPodLabels, destinationNodeName, destinationServicePortName, destinationIP, destinationTransportPort, octetDeltaCount, httpVals FROM flows\nWHERE sourcePodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND destinationPodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND ( destinationPodName != '' OR sourcePodName != '' )\nAND octetDeltaCount != 0\nAND httpVals != ''\nAND $__timeFilter(flowEndSeconds)\nORDER BY flowEndSeconds DESC", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
"weekStart": "" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved?
build/yamls/flow-visibility.yml
Outdated
@@ -2770,7 +2928,7 @@ data: | |||
}, | |||
"id": 27, | |||
"options": { | |||
"content": "The following seven dashboards are pre-built and are recommended for network flow\nvisualization.\n\n<span style=\"color:rgb(184, 119, 217)\">Flow Records Dashboard</span> displays the flow records being captured in the selected\ntime range.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Pod Flows Dashboard</span> shows cumulative bytes and throughput of Pod-to-Pod\ntraffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-External Flows Dashboard</span> shows cumulative bytes and throughput of\ntraffic from in-cluster to out-of-cluster. The destination of such a traffic flow\nis represented by the destination IP address.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Service Flows Dashboard</span> shows cumulative bytes and throughput of\nPod-to-Service flows. The destination of such a traffic is represented by the\ndestination Service metadata.\n\n<span style=\"color:rgb(184, 119, 217)\">Node-to-Node Flows Dashboard</span> visualizes the Node-to-Node traffic, including intra-Node\nand inter-Node flows.\n\n<span style=\"color:rgb(184, 119, 217)\">Network-Policy Flows Dashboard</span> visualizes both the traffic with NetworkPolicies enforced,\nand unprotected traffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Network Topology Dashboard</span> visualizes both Pod-to-Pod and Pod-to-Service traffic via a graph.", | |||
"content": "The following eight dashboards are pre-built and are recommended for network flow\nvisualization.\n\n<span style=\"color:rgb(184, 119, 217)\">Flow Records Dashboard</span> displays the flow records being captured in the selected\ntime range.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Pod Flows Dashboard</span> shows cumulative bytes and throughput of Pod-to-Pod\ntraffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-External Flows Dashboard</span> shows cumulative bytes and throughput of\ntraffic from in-cluster to out-of-cluster. The destination of such a traffic flow\nis represented by the destination IP address.\n\n<span style=\"color:rgb(184, 119, 217)\">Pod-to-Service Flows Dashboard</span> shows cumulative bytes and throughput of\nPod-to-Service flows. The destination of such a traffic is represented by the\ndestination Service metadata.\n\n<span style=\"color:rgb(184, 119, 217)\">Node-to-Node Flows Dashboard</span> visualizes the Node-to-Node traffic, including intra-Node\nand inter-Node flows.\n\n<span style=\"color:rgb(184, 119, 217)\">Network-Policy Flows Dashboard</span> visualizes both the traffic with NetworkPolicies enforced,\nand unprotected traffic.\n\n<span style=\"color:rgb(184, 119, 217)\">Network Topology Dashboard</span> visualizes both Pod-to-Pod and Pod-to-Service traffic via a graph.\n\n<span style=\"color:rgb(184, 119, 217)\">Application Visibility Dashboard</span> shows cumulative bytes and throughput for L7 NetworkPolicies\nas well as corresponding HTTP values.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@@ -0,0 +1,16 @@ | |||
ARG grafana_version=latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use latest and not a verified version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update to 9.1.3
@@ -0,0 +1,3 @@ | |||
{ | |||
"extends": "./.config/tsconfig.json" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are lots of generated file missing empty line. Do we have a method to avoid that? Or we should add it manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we do, I will add them manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing empty line
@@ -0,0 +1,133 @@ | |||
import React, { useMemo } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add unit test for this file to verify if the data are in our component correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes will do, working on getting tests to run locally
"scripts": { | ||
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production", | ||
"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development", | ||
"test": "jest --watch --onlyChanged", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove watch, otherwise it won't stop when we do the typescript unit test in the workflow.
710c2eb
to
ff92ef9
Compare
plugins/grafana-custom-plugins/grafana-http-table-plugin/src/components/TablePanel.test.tsx
Fixed
Show fixed
Hide fixed
This PR adds an Application Layer Dashboard to include visualizations for layer seven Network Policies and HTTP values within the flows table. Signed-off-by: Dhruv-J <[email protected]>
103c0e8
to
abe5d67
Compare
Signed-off-by: Dhruv-J <[email protected]>
} | ||
}, | ||
"queryType": "sql", | ||
"rawSql": "SELECT sourcePodName, sourcePodLabels, sourcePodNamespace, sourceNodeName, destinationPodName, destinationPodLabels, destinationNodeName, destinationServicePortName, octetDeltaCount FROM flows\nWHERE sourcePodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND destinationPodNamespace NOT IN ('kube-system', 'flow-visibility', 'flow-aggregator')\nAND ( destinationPodName != '' OR sourcePodName != '' )\nAND octetDeltaCount != 0\nAND httpVals == ''\nAND $__timeFilter(flowEndSeconds)\nORDER BY flowEndSeconds DESC", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to exclude the ns local-path-storage
, which is created in the kind cluster by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've already added that into #488, i'll remove it from this PR, don't know why it's showing up as a change
"weekStart": "" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved?
"singleQuote": true, | ||
"useTabs": false, | ||
"tabWidth": 2 | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line
plugins/grafana-custom-plugins/grafana-http-table-plugin/.config/Dockerfile
Outdated
Show resolved
Hide resolved
plugins/grafana-custom-plugins/grafana-http-table-plugin/.eslintrc
Outdated
Show resolved
Hide resolved
plugins/grafana-custom-plugins/grafana-http-table-plugin/.nvmrc
Outdated
Show resolved
Hide resolved
module.exports = { | ||
// Prettier configuration provided by Grafana scaffolding | ||
...require("./.config/.prettierrc.js") | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
plugins/grafana-custom-plugins/grafana-http-table-plugin/src/components/TablePanel.test.tsx
Outdated
Show resolved
Hide resolved
plugins/grafana-custom-plugins/grafana-http-table-plugin/src/components/TablePanel.test.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Dhruv-J <[email protected]>
@@ -0,0 +1,10 @@ | |||
import { e2e } from '@grafana/e2e'; | |||
|
|||
e2e.scenario({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this e2e test for Grafana?
cc @heanlan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we run it with automation? e.g. will github action trigger it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this, I don't think it's testing anything important, nor is it run during yarn test. @yuntanghsu thoughts?
Signed-off-by: Dhruv-J <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we would like to deploy and test the dashboard by ourselves, how should we do it? Where can we get the sample http data? Could you give some instructions?
@@ -0,0 +1,114 @@ | |||
<!-- This README file is going to be the one displayed on the Grafana.com website for your plugin. Uncomment and replace the content here before publishing. | |||
|
|||
Remove any remaining comments before publishing as these may be displayed on Grafana.com --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the first two lines of comment?
```sql | ||
SELECT httpVals | ||
FROM flows | ||
WHERE l7ProtocolName!='' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove WHERE l7ProtocolName!=''
in this query example for better clarity to external users.
Use the grafana-cli tool to install chord-panel-plugin from the commandline: | ||
|
||
```shell | ||
grafana-cli --pluginUrl https://github.com/Dhruv-J/grafana-http-table-plugin/archive/refs/tags/v2.zip plugins install theia-grafana-dependency-plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grafana-cli --pluginUrl https://github.com/Dhruv-J/grafana-http-table-plugin/archive/refs/tags/v2.zip plugins install theia-grafana-dependency-plugin | |
grafana-cli --pluginUrl https://github.com/Dhruv-J/grafana-http-table-plugin/archive/refs/tags/v2.zip plugins install theia-grafana-http-table-plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file can be removed as we are using antrea logo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this file be moved to plugins/grafana-custom-plugins/grafana-http-table-plugin/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do, I'll replace the README in plugins/grafana-custom-plugins/grafana-http-table-plugin/ with the one in /src
props.options = {}; | ||
let component = shallow(<TablePanel {...props} />); | ||
React.useLayoutEffect = React.useEffect; | ||
console.log('component text: '+component.render().text()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug log?
let component = shallow(<TablePanel {...props} />); | ||
React.useLayoutEffect = React.useEffect; | ||
console.log('component text: '+component.render().text()); | ||
let renderedHtmlString = component.render().text(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar whether we can test it in another way, rather than converting to text. Maybe @yuntanghsu can give more constructive feedback.
But if we are just checking the text content, instead of using includes
expression checking a series of substring ,can we just do expect(textContent).toEqual(expectedContent);
to check the entire string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also found there are lots of warning when using component.render().text():
at div
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at TableContainer (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/TableContainer/TableContainer.js:40:44)
at MRT_TableContainer (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_TableContainer.tsx:13:38)
at div
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at Paper (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/Paper/Paper.js:69:44)
at MRT_TablePaper (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_TablePaper.tsx:11:34)
at useRef (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_TableRoot.tsx:50:28)
at MaterialReactTable (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/MaterialReactTable.tsx:14:3)
at ThemeProvider (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/private-theming/node/ThemeProvider/ThemeProvider.js:39:5)
at ThemeProvider (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:50:5)
at ThemeProvider (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/styles/ThemeProvider.js:21:14)
at div
33 | React.useLayoutEffect = React.useEffect;
34 | // console.log('component text: '+component.render().text());
> 35 | let renderedHtmlString = component.render().text();
| ^
36 | expect(renderedHtmlString.includes('10.10.1.4:42162')).toEqual(true);
37 | expect(renderedHtmlString.includes('93.184.216.34:80')).toEqual(true);
38 | expect(renderedHtmlString.includes('example.com')).toEqual(true);
at printWarning (node_modules/react-dom/cjs/react-dom-server.node.development.js:82:30)
at error (node_modules/react-dom/cjs/react-dom-server.node.development.js:58:5)
at Object.useLayoutEffect (node_modules/react-dom/cjs/react-dom-server.node.development.js:1617:5)
at useLayoutEffect (node_modules/react/cjs/react.development.js:1524:21)
at useEventCallback (node_modules/@mui/utils/useEventCallback/useEventCallback.js:20:34)
at useRippleHandler (node_modules/@mui/material/node/ButtonBase/ButtonBase.js:160:42)
at Object.ButtonBase [as render] (node_modules/@mui/material/node/ButtonBase/ButtonBase.js:186:22)
at ReactDOMServerRenderer.render (node_modules/react-dom/cjs/react-dom-server.node.development.js:3872:44)
at ReactDOMServerRenderer.read (node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
at Object.renderToStaticMarkup (node_modules/react-dom/cjs/react-dom-server.node.development.js:4314:27)
at Object.renderToStaticMarkup [as render] (node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:835:31)
at ShallowWrapper.render (node_modules/enzyme/src/ShallowWrapper.js:1108:23)
at ShallowWrapper.call [as single] (node_modules/enzyme/src/ShallowWrapper.js:1654:21)
at ShallowWrapper.single [as html] (node_modules/enzyme/src/ShallowWrapper.js:1104:17)
at ShallowWrapper.html [as render] (node_modules/enzyme/src/ShallowWrapper.js:1120:23)
at Object.render (src/components/TablePanel.test.tsx:35:40)
console.error
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
at ButtonBase (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/ButtonBase/ButtonBase.js:95:44)
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at TableSortLabel (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/TableSortLabel/TableSortLabel.js:102:44)
at span
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at Badge (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/Badge/Badge.js:169:44)
at Tooltip (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/Tooltip/Tooltip.js:226:44)
at MRT_TableHeadCellSortLabel (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/head/MRT_TableHeadCellSortLabel.tsx:14:3)
at div
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at Box (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/system/createBox.js:31:41)
at div
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at Box (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/system/createBox.js:31:41)
at th
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at TableCell (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/TableCell/TableCell.js:108:44)
at MRT_TableHeadCell (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/head/MRT_TableHeadCell.tsx:20:37)
at tr
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at TableRow (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/TableRow/TableRow.js:70:44)
at MRT_TableHeadRow (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/head/MRT_TableHeadRow.tsx:20:3)
at thead
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at TableHead (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/TableHead/TableHead.js:44:44)
at MRT_TableHead (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/head/MRT_TableHead.tsx:14:3)
at table
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at Table (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/Table/Table.js:61:44)
at MRT_Table (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_Table.tsx:19:29)
at div
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at TableContainer (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/TableContainer/TableContainer.js:40:44)
at MRT_TableContainer (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_TableContainer.tsx:13:38)
at div
at /Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:43:23
at Paper (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/Paper/Paper.js:69:44)
at MRT_TablePaper (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_TablePaper.tsx:11:34)
at useRef (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/table/MRT_TableRoot.tsx:50:28)
at MaterialReactTable (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/material-react-table/src/MaterialReactTable.tsx:14:3)
at ThemeProvider (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/private-theming/node/ThemeProvider/ThemeProvider.js:39:5)
at ThemeProvider (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:50:5)
at ThemeProvider (/Users/hsuy/Desktop/theia/plugins/grafana-custom-plugins/grafana-http-table-plugin/node_modules/@mui/material/node/styles/ThemeProvider.js:21:14)
at div
@Dhruv-J Do you have any idea what happened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the material-ui library recommends running unit testing without the use of material-ui components in order to keep code immune to breaking due to changes within material-ui internal structure. So I can't directly check for including the table itself, so I check for the string being rendered within the html itself. @yuntanghsu I can attempt using those again, but I remember when I tried using similar solutions that false would be returned even though the text was supposedly being rendered. The warnings happen because the render() function is being called in a unit test, and so the result isn't actually visible anywhere. I looked into this issue specifically with material-ui and found that it is quite common, so people largely suppress the warning or haven't found a workaround. I'll try the clause that you mentioned and update the results within this thread.
@@ -0,0 +1,3 @@ | |||
{ | |||
"extends": "./.config/tsconfig.json" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing empty line
"name": "Antrea io" | ||
}, | ||
"logos": { | ||
"small": "img/logo.svg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not solved yet
@@ -0,0 +1,7 @@ | |||
type SeriesSize = 'sm' | 'md' | 'lg'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these options being used anywhere? I see they are passed as parameter into TablePanel
, but I don't see where users can configure them, and where do we explicitly handle their values in the source code? The name "SimpleOptions" also looks a bit too general for me to understand its usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those are default options, I'll remove them
Instructions for those wanting to deploy the solution for themselves @heanlan:
|
Signed-off-by: Dhruv-J <[email protected]>
Signed-off-by: Dhruv-J <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
Same with #488 , let's hold this PR up and take another look until all the PRs it depends on are merged.
|
||
1. Install dependencies | ||
- Clickhouse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClickHouse
"name": "Antrea io" | ||
}, | ||
"logos": { | ||
"small": "img/logo.svg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not solved yet
}, | ||
"logos": { | ||
"small": "img/logo.svg", | ||
"large": "img/logo.svg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -0,0 +1,2 @@ | |||
export interface SimpleOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to TableOptions
?
Signed-off-by: Dhruv-J <[email protected]>
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days |
This PR adds an Application Layer Dashboard to include visualizations for layer
seven Network Policies and HTTP values within the flows table. The changes
include the following:
A new dashboard named Application Layer Visibility, which contains two
panels, a Chord Panel to illustrate layer seven Network Policies, and a table
panel that shows the HTTP values for each flow.
Since the default grafana table plugin isn't able to handle nested JSON
values and aggregate them in a clean manner, this PR introduces a new plugin
called http-table-plugin that leverages the material-ui library to create a
simple table that includes the source and destination IPs and ports, with
expandable rows that show multiple HTTP value sets if a flow contains them.
This plugin is created using the updated @grafana/create-plugin tool, which
contains a .config directory for all plugin build and run configuration files.
Testing for the application layer dashboard and unit testing for the
http-table-plugin.
This PR builds upon #417, which adds additional fields for L7 visibility.