Skip to content

Commit

Permalink
updates to get server working
Browse files Browse the repository at this point in the history
  • Loading branch information
rmdocherty committed Jul 29, 2024
1 parent 70d0f75 commit 41ba315
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ fig2 copy.py
*.png
*.npy

.vscode
frontend/node_modules
frontend/dist
*.kra
deploy
deploy*/
deploy.sh
.vscode
deploy.zip

tests/tmp.py
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.5.0",
"license": "MIT",
"scripts": {
"build": "yarn run clean-dist && webpack --config=configs/webpack/prod.js && mv dist/*.wasm dist/js",
"build": "yarn run clean-dist && webpack --config=configs/webpack/prod.js",
"clean-dist": "rimraf dist/*",
"lint": "eslint './src/**/*.{js,ts,tsx}' --quiet",
"start": "yarn run start-dev",
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import "./assets/scss/App.scss";
import 'bootstrap/dist/css/bootstrap.min.css';

const PATH = "http://127.0.0.1:5000";
const PF_ENDPOINT = PATH + "/phasefraction";
//const PATH = "http://localhost:7071/api";
//const PATH = "https://representative.azurewebsites.net/api"
const PF_ENDPOINT = PATH + "/phasefraction"
//const PF_ENDPOINT = "https://representativity.azurewebsites.net/phasefraction"

//const REPR_ENDPOINT = PATH + "/repr";
const REPR_ENDPOINT = PATH + "/repr";

const MAX_FILE_SIZE_BYTES = 1024 * 1024 * 500; // 500MB
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/NormalSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const NormalSlider = () => {
<div style={{ width: '100%' }}>
<canvas style={{ width: '70%', marginLeft: '15%', marginBottom: '0.5em' }} width={CANVAS_WIDTH} height={CANVAS_HEIGHT} ref={canvasRef} />
<InputGroup style={{ width: '70%', marginLeft: '15%' }}> {/*style={{ width: '70%', marginLeft: '15%' }}*/}
<InputGroup.Text>Confidence in Phase Fraction Bounds (%):</InputGroup.Text>
<InputGroup.Text>Confidence in p.f. bounds (%):</InputGroup.Text>

<Form.Control type="number" min={0} max={100} value={selectedConf} step={0.5} onChange={(e) => setConf(e)} width={1} size="sm"></Form.Control>
<Form.Range min={80} max={100} value={selectedConf} step={0.1} onChange={(e) => setConf(e)} />
Expand Down
1 change: 0 additions & 1 deletion representativity/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def representativity(request) -> Response:
"pf_1d": result["pf_1d"],
"cum_sum_sum": result["cum_sum_sum"],
}
print(out)

response = Response(json.dumps(out), status=200)
return response
Expand Down

0 comments on commit 41ba315

Please sign in to comment.