This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
NAS visualization #2085
Merged
+12,767
−1
Merged
NAS visualization #2085
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
297d781
first version of sdk
ultmaster 245d51c
update
ultmaster bb78db5
update
ultmaster 334cebd
update
ultmaster 267a0cf
update
ultmaster d6da7c5
update
ultmaster c48cb1b
update
ultmaster 1922cee
update
ultmaster 3851102
update
ultmaster e94319f
update
ultmaster 70838d4
update
ultmaster f4c5ce9
remove unused dependencies
ultmaster bf2064a
restore webui yarn.lock
ultmaster bd39af0
update
ultmaster e6cfe4b
add comments
ultmaster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "nasnni-vis-ts", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@bardit/cytoscape-expand-collapse": "^2.0.3", | ||
"@material-ui/core": "^4.9.3", | ||
"@material-ui/icons": "^4.9.1", | ||
"@testing-library/jest-dom": "^4.2.4", | ||
"@testing-library/react": "^9.3.2", | ||
"@testing-library/user-event": "^7.1.2", | ||
"@types/cytoscape": "^3.14.0", | ||
"@types/d3-graphviz": "^2.6.3", | ||
"@types/dagre-d3": "^0.4.39", | ||
"@types/graphlib-dot": "^0.6.1", | ||
"@types/jest": "^24.0.0", | ||
"@types/lodash": "^4.14.149", | ||
"@types/node": "^12.0.0", | ||
"@types/react": "^16.9.0", | ||
"@types/react-dom": "^16.9.0", | ||
"cytoscape": "^3.14.0", | ||
"cytoscape-cola": "^2.3.0", | ||
"cytoscape-dagre": "^2.2.2", | ||
"cytoscape-expand-collapse": "^3.2.0", | ||
"cytoscape-panzoom": "^2.5.3", | ||
"d3": "^5.15.0", | ||
"d3-graphviz": "^2.6.1", | ||
"d3-selection": "^1.4.1", | ||
"dagre-d3": "^0.6.4", | ||
"express": "^4.17.1", | ||
"gojs": "^2.1.9", | ||
"graphlib-dot": "^0.6.4", | ||
"lodash": "^4.17.15", | ||
"protobufjs": "^6.8.8", | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0", | ||
"react-scripts": "3.4.0", | ||
"typeface-roboto": "^0.0.75", | ||
"typescript": "~3.7.2" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"eject": "react-scripts eject", | ||
"backend": "node server.js" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/d3": "^5.7.2", | ||
"@types/d3-array": "^2.0.0", | ||
"@types/d3-scale": "^2.1.1", | ||
"@types/d3-selection": "^1.4.1" | ||
}, | ||
"proxy": "http://localhost:8080" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/icon.png" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<title>NNI NAS Board</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
|
||
You can add webfonts, meta tags, or analytics to this file. | ||
The build step will place the bundled scripts into the <body> tag. | ||
|
||
To begin the development, run `npm start` or `yarn start`. | ||
To create a production bundle, use `npm run build` or `yarn build`. | ||
--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const express = require('express'); | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const app = express(); | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const port = argv.port || 8080; | ||
const logdir = argv.logdir || './mockdata'; | ||
|
||
app.use(express.static(path.join(__dirname, 'build'))); | ||
app.get('/', (req, res) => { | ||
res.sendFile(path.join(__dirname, 'build', 'index.html')); | ||
}); | ||
app.get('/refresh', (req, res) => { | ||
const graph = fs.readFileSync(path.join(logdir, 'graph.json'), 'utf8'); | ||
const log = fs.readFileSync(path.join(logdir, 'log'), 'utf-8') | ||
.split('\n') | ||
.filter(Boolean) | ||
.map(JSON.parse); | ||
res.send({ | ||
'graph': JSON.parse(graph), | ||
'log': log, | ||
}); | ||
}); | ||
|
||
app.listen(port, '0.0.0.0', () => { | ||
console.log(`NNI NAS board is running on port ${port}, logdir is ${logdir}.`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
svg { | ||
overflow: hidden; | ||
} | ||
|
||
.node { | ||
white-space: nowrap; | ||
} | ||
|
||
.node.input rect, .node.output rect { | ||
fill: #9d0f0f; | ||
} | ||
|
||
.node.hub rect { | ||
fill: #0f309d; | ||
} | ||
|
||
.node.blob rect { | ||
fill: #0F9D58; | ||
} | ||
|
||
.node text { | ||
fill: #fff; | ||
font-family: "Roboto", "Helvetica", "Arial", sans-serif; | ||
font-weight: 500; | ||
} | ||
|
||
.cluster rect { | ||
stroke: #333; | ||
fill: #000; | ||
fill-opacity: 0.1; | ||
stroke-width: 1.5px; | ||
} | ||
|
||
.edgePath path.path { | ||
stroke: #333; | ||
stroke-width: 1.5px; | ||
fill: none; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
some of this dependencies maybe could put into devDependencies
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.
It's in future item:
Clean up unused dependencies.