openrca / orca-ui Goto Github PK
View Code? Open in Web Editor NEWWeb UI for OpenRCA
Home Page: https://openrca.io
License: Apache License 2.0
Web UI for OpenRCA
Home Page: https://openrca.io
License: Apache License 2.0
Add node properties to graph payload in Mock API.
Switch object name with object kind in the details box title.
Add Update
button for triggering graph reload on-demand.
Add datetime picker (bottom bar) to query the state of the graph in time. Try to reuse a picker from a library instead of writing one from scratch.
After picking a datetime, the UI should perform a request to the graph API and reload the graph visualization. The request to the API can be the same as the request used to load a regular graph.
Add an option to filter alerts by parameters, for instance namespace
or severity
.
The graph force feature costs lots of CPU ๐ฐ๐ฐ, especially for large graph structures. It makes the graph navigation inconvenient. We should make the force disabled by default and add an option to activate. For instance, a button with a pin icon to enable/disable the force.
Add a simple mock of graph API with static graph payload read from a file.
Tracking issue for items related to MVP detailing:
Layout:
Graph:
Details box:
Alerts dashboard:
Add an option to filter the entity graph by application namespace.
Filter
button./graph?namespace=<namespace>
. Consider filtering the graph on client side.The above functionality will enable answering the question:
How did the
X
application look like 13 days ago at 3 PM?
Load graph payload (nodes, links) from the Mock API.
Normalize payload into a format compatible with D3.js.
Display the obtained graph structure using current graph layout.
Due to the size of the graph, graph navigation must be improved:
Main page should display graph. Logo should redirect to graph as well.
Dockerfile that utilizes multi-stage building would be beneficial for deploying Orca UI in production environments
Add button enabling rescaling (and centering?) graph into the visible space.
Restyle the UI into a dark color scheme.
Improve the visual appearance of the graph:
The date-time picker is positioned too far on the right side of the bottom bar. After clicking it, the time selector is out of the visible space.
Graph API has been extended by time filtering option (openrca/orca#92).
The datetime picker should integrate with the API by passing additional time_point
argument in request path. Time point should be in UTC timestamp format.
Sample query:
http://localhost:5000//v1/graph?time_point=1598293127
Customize the alerts table with the following items:
Add alerts count badge next to the button in the top navbar.
According to the solution proposed in #20 (review), we should allow all CORS origins in OpenRCA API to enable seamless communication from the UI. The Flask server should be configured with a proper CORS policy. Consider using a plugin such as Flask-CORS or try to modify the headers manually.
First, let's test the fix in the Mock API. Second, we will apply a similar patch to the core repository.
Some useful materials:
Mark alert nodes with red color.
The title should be: OpenRCA Web UI
Add details box with JSON viewer for entity properties (pod name, namespace, image, volumes).
Add basic graph stats:
After changes with using orca-mock API in orca-ui, to use application in every browser CORS headers need to be present on requested source.
Here is an example error message:
Access to XMLHttpRequest at 'http://localhost:5000/v1/graph' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Now in development process browser with disabled web security option can be used. In case of Google Chrome:
google-chrome --disable-web-security --user-data-dir="/tmp/chrome-test"
Display loading animation while the graph is being fetched from the API.
Find and use a library to render a table from node JSON data into the details box.
After filtering the graph by a namespace, cluster and node objects should be included even though they do not provide the namespace
property (similarly to alerts).
Add selector enabling selecting multiple object types to show in the graph.
Prepare Docker compose for development.
The compose should contain two containers:
Mock API must be accessible for the UI application via the loopback interface.
After deployment in testbed, alerts dashboard fails with error:
TypeError: Cannot read property 'map' of undefined
at Alerts.js:26
Code:
loadData() {
axios.get(process.env.REACT_APP_BACKEND_HOST + '/v1/alerts')
.then((response) => {
const alerts = response.data.alerts.map(alert => {
alert.updated_at = new Date(1000 * alert.updated_at);
return alert;
});
...
There is no alerts
root in alerts payload:
[
{
"id": "falco-alert-attach/exec-pod-pod-arangodb-7fc5bc8fbc-bz7w2-rca",
"origin": "falco",
"name": "Attach/Exec Pod",
"message": "18:27:54.593231872: Notice Attach/Exec to pod (user=kubernetes-admin pod=arangodb-7fc5bc8fbc-bz7w2 ns=rca action=exec command=python3)",
"severity": "Notice",
"source": {
"origin": null,
"kind": null,
"properties": {
"name": null,
"namespace": "n/a"
}
},
"created_at": "1598293671",
"updated_at": "1598293683"
},
Default graph view (all namespaces, all object types) displays too many nodes. Object types should be limited to the most essential ones. Also, we should prevent creating cycles in the graph because they disturb the UX.
Let's set the default set of object types to: cluster
, node
, pod
and alert
.
The process of making the final graph structure will take some time. It would be great to held discussion in one issue.
During this process we should pay attention to many available visualization and get the best out of them. Examples shared in this issue will definitly be a good inspiration to OpenRCA final graph.
I want to share with example of Force-Directed Tree from D3.js
library. This hierarchial graph captures well network structure and visualize it in very intuitive way. We can easily extract sets of vertices forming a group in a graph.
It would be great to share your ideas and examples of network visualizations!
All .scss
or .css
files should be moved to the /src/assets
directory. In /src/components
we want only to keep React components.
Add graph visualization using D3.js with sample nodes and edges.
User should have an option to display node names in the graph. There should be a toggle button (in the bottom bar?) to enable/disable node names.
Add a new dashboard with a list of all alerts detected in the cluster.
Alert objects don't have namespace
property. When filtering the graph by namespace, alerts are not linked with the source objects. All alerts are hidden in a {}
namespace (in namespace selector).
Tracking issue for discussion regarding UI MVP.
The picture below presents the agreed design for the first iteration:
Key implementation items:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.