forked from microsoft/nni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from microsoft/master
pull
- Loading branch information
Showing
24 changed files
with
12,790 additions
and
11 deletions.
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
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,52 @@ | ||
{ | ||
"name": "nasnni-vis-ts", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@material-ui/core": "^4.9.3", | ||
"@material-ui/icons": "^4.9.1", | ||
"cytoscape": "^3.14.0", | ||
"cytoscape-dagre": "^2.2.2", | ||
"cytoscape-panzoom": "^2.5.3", | ||
"express": "^4.17.1", | ||
"lodash": "^4.17.15", | ||
"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": { | ||
"@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/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" | ||
}, | ||
"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.