Skip to content

Commit e5a02ee

Browse files
committed
octave added in options
1 parent e644637 commit e5a02ee

4 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/component/modals/OptionsModal.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import './optionsModal.css';
66
const OptionsModal = ({ superState, dispatcher }) => {
77
const [unlock, setUnlock] = useState(false);
88
const [docker, setDocker] = useState(false);
9+
const [octave, setOctave] = useState(false);
910
const [param, setParam] = useState('');
1011
const [maxT, setmaxT] = useState('');
1112
const close = () => {
@@ -18,6 +19,7 @@ const OptionsModal = ({ superState, dispatcher }) => {
1819
docker,
1920
maxT,
2021
param,
22+
octave,
2123
},
2224
},
2325
);
@@ -26,7 +28,9 @@ const OptionsModal = ({ superState, dispatcher }) => {
2628
const handleDockerChange = () => {
2729
setDocker(!docker);
2830
};
29-
31+
const handleOctaveChange = () => {
32+
setOctave(!octave);
33+
};
3034
const handleUnlockChange = () => {
3135
setUnlock(!unlock);
3236
};
@@ -45,6 +49,10 @@ const OptionsModal = ({ superState, dispatcher }) => {
4549
Docker
4650
<input type="checkbox" checked={docker} onChange={handleDockerChange} />
4751
</label>
52+
<label htmlFor="Octave" className="main-div-comp">
53+
Octave
54+
<input type="checkbox" checked={octave} onChange={handleOctaveChange} />
55+
</label>
4856
<label htmlFor="Unlock" className="main-div-comp">
4957
Unlock
5058
<input type="checkbox" checked={unlock} onChange={handleUnlockChange} />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class GraphServer extends GraphLoadSave {
6969
build() {
7070
// TODO
7171
this.dispatcher({ type: T.SET_LOADER, payload: true });
72-
Axios.post(`http://127.0.0.1:5000/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}`)
72+
Axios.post(`http://127.0.0.1:5000/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}`)
7373
.then((res) => { // eslint-disable-next-line
7474
toast.success(res.data['message'])
7575
this.dispatcher({ type: T.SET_LOADER, payload: false });

src/reducer/initialState.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const initialState = {
3434
dockerCheck: false,
3535
unlockCheck: false,
3636
loader: false,
37+
octave: false,
3738
};
3839

3940
const initialGraphState = {

src/reducer/reducer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ const reducer = (state, action) => {
165165
unlockCheck: action.payload.unlock,
166166
params: action.payload.param,
167167
maxTime: action.payload.maxT,
168+
octave: action.payload.octave,
168169
};
169170
}
170171

0 commit comments

Comments
 (0)