Skip to content

Commit 9fe12b9

Browse files
committed
fix: break long URL lines in 6-server.js to satisfy eslint max-len
1 parent 961e20a commit 9fe12b9

2 files changed

Lines changed: 63 additions & 14 deletions

File tree

package-lock.json

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

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

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,14 @@ class GraphServer extends GraphLoadSave {
8888
}
8989

9090
build() {
91-
const url = `${EXECUTION_ENGINE_URL}/build/${this.superState.uploadedDirName}?fetch=${this.superState.graphs[this.superState.curGraphIndex].fileName.split('.')[0]}&unlock=${this.superState.unlockCheck}&docker=${this.superState.dockerCheck}&maxtime=${this.superState.maxTime}&params=${this.superState.params}&octave=${this.superState.octave}`;
91+
const graphName = this.superState.graphs[
92+
this.superState.curGraphIndex].fileName.split('.')[0];
93+
const url = `${EXECUTION_ENGINE_URL}/build/${this.superState.uploadedDirName}`
94+
+ `?fetch=${graphName}&unlock=${this.superState.unlockCheck}`
95+
+ `&docker=${this.superState.dockerCheck}`
96+
+ `&maxtime=${this.superState.maxTime}`
97+
+ `&params=${this.superState.params}`
98+
+ `&octave=${this.superState.octave}`;
9299
this.serverAction('post', url, {
93100
built: false, ran: true, debugged: true, cleared: false, stopped: false, destroyed: true,
94101
}, (res) => {
@@ -97,35 +104,48 @@ class GraphServer extends GraphLoadSave {
97104
}
98105

99106
debug() {
100-
const url = `${EXECUTION_ENGINE_URL}/debug/${this.superState.graphs[this.superState.curGraphIndex].fileName.split('.')[0]}`;
107+
const graphName = this.superState.graphs[
108+
this.superState.curGraphIndex].fileName.split('.')[0];
109+
const url = `${EXECUTION_ENGINE_URL}/debug/${graphName}`;
101110
this.serverAction('post', url, {
102111
built: false, ran: false, debugged: false, cleared: true, stopped: true, destroyed: true,
103112
});
104113
}
105114

106115
run() {
107-
const url = `${EXECUTION_ENGINE_URL}/run/${this.superState.graphs[this.superState.curGraphIndex].fileName.split('.')[0]}`;
116+
const graphName = this.superState.graphs[
117+
this.superState.curGraphIndex].fileName.split('.')[0];
118+
const url = `${EXECUTION_ENGINE_URL}/run/${graphName}`;
108119
this.serverAction('post', url, {
109120
built: false, ran: false, debugged: false, cleared: true, stopped: true, destroyed: true,
110121
});
111122
}
112123

113124
clear() {
114-
const url = `${EXECUTION_ENGINE_URL}/clear/${this.superState.graphs[this.superState.curGraphIndex].fileName.split('.')[0]}?unlock=${this.superState.unlockCheck}&maxtime=${this.superState.maxTime}&params=${this.superState.params}`;
125+
const graphName = this.superState.graphs[
126+
this.superState.curGraphIndex].fileName.split('.')[0];
127+
const url = `${EXECUTION_ENGINE_URL}/clear/${graphName}`
128+
+ `?unlock=${this.superState.unlockCheck}`
129+
+ `&maxtime=${this.superState.maxTime}`
130+
+ `&params=${this.superState.params}`;
115131
this.serverAction('post', url, {
116132
built: false, ran: true, debugged: true, cleared: false, stopped: true, destroyed: true,
117133
});
118134
}
119135

120136
stop() {
121-
const url = `${EXECUTION_ENGINE_URL}/stop/${this.superState.graphs[this.superState.curGraphIndex].fileName.split('.')[0]}`;
137+
const graphName = this.superState.graphs[
138+
this.superState.curGraphIndex].fileName.split('.')[0];
139+
const url = `${EXECUTION_ENGINE_URL}/stop/${graphName}`;
122140
this.serverAction('post', url, {
123141
built: false, ran: false, debugged: false, cleared: true, stopped: false, destroyed: true,
124142
});
125143
}
126144

127145
destroy() {
128-
const url = `${EXECUTION_ENGINE_URL}/destroy/${this.superState.graphs[this.superState.curGraphIndex].fileName.split('.')[0]}`;
146+
const graphName = this.superState.graphs[
147+
this.superState.curGraphIndex].fileName.split('.')[0];
148+
const url = `${EXECUTION_ENGINE_URL}/destroy/${graphName}`;
129149
this.serverAction('delete', url, {
130150
built: true, ran: false, debugged: false, cleared: false, stopped: false, destroyed: false,
131151
});
@@ -137,7 +157,9 @@ class GraphServer extends GraphLoadSave {
137157
autoClose: false,
138158
});
139159
// this.dispatcher({ type: T.SET_LOGS, payload: false });
140-
Axios.post(`${EXECUTION_ENGINE_URL}/library/${this.superState.uploadedDirName}?filename=${fileName}&path=${this.superState.library}`)
160+
const url = `${EXECUTION_ENGINE_URL}/library/${this.superState.uploadedDirName}`
161+
+ `?filename=${fileName}&path=${this.superState.library}`;
162+
Axios.post(url)
141163
.then((res) => { // eslint-disable-next-line
142164
toast.info(res.data['message'])
143165
toast.dismiss(toastId);

0 commit comments

Comments
 (0)