Skip to content

Commit 23f3773

Browse files
committed
issue #59 fixed sample url added
1 parent e2f0813 commit 23f3773

3 files changed

Lines changed: 87 additions & 6 deletions

File tree

package-lock.json

Lines changed: 73 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@testing-library/jest-dom": "^5.11.4",
99
"@testing-library/react": "^11.1.0",
1010
"@testing-library/user-event": "^12.1.10",
11+
"axios": "^1.2.4",
1112
"chokidar": "^3.5.3",
1213
"cytoscape": "^3.19.0",
1314
"cytoscape-edgehandles": "^3.6.0",

src/graph-builder/graph-core/6-server.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Axios from 'axios';
12
import { actionType as T } from '../../reducer';
23
import GraphLoadSave from './5-load-save';
34
// import {
@@ -66,31 +67,43 @@ class GraphServer extends GraphLoadSave {
6667

6768
build() {
6869
// TODO
70+
Axios.post(`http://127.0.0.1:5000/build/sample?fetch=${this.getGraphML()}&apikey=${this.id}`)
71+
.then(() => { });
6972
if (this.serverID);
7073
}
7174

7275
debug() {
7376
// TODO
77+
Axios.post('http://127.0.0.1:5000/debug/sample')
78+
.then(() => { });
7479
if (this.serverID);
7580
}
7681

7782
run() {
7883
// TODO
84+
Axios.post('http://127.0.0.1:5000/run/sample')
85+
.then(() => { });
7986
if (this.serverID);
8087
}
8188

8289
clear() {
8390
// TODO
91+
Axios.post('http://127.0.0.1:5000/clear/sample')
92+
.then(() => { });
8493
if (this.serverID);
8594
}
8695

8796
stop() {
8897
// TODO
98+
Axios.post('http://127.0.0.1:5000/stop/sample')
99+
.then(() => { });
89100
if (this.serverID);
90101
}
91102

92103
destroy() {
93104
// TODO
105+
Axios.post('http://127.0.0.1:5000/destroy/sample')
106+
.then(() => { });
94107
if (this.serverID);
95108
}
96109

0 commit comments

Comments
 (0)