Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for link and dataset size and the hashtags #252

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/.env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ REACT_APP_CONNECT_ID=
REACT_APP_TM_API=https://tasking-manager-tm4-production-api.hotosm.org/api/v2/projects/PROJECT_ID/tasks/
REACT_APP_ENV=Dev
REACT_APP_API_BASE=http://127.0.0.1:8000/api/v1
REACT_APP_PREDICTOR_API_BASE=http://127.0.0.1:8001
REACT_APP_PREDICTOR_API_BASE=http://127.0.0.1:8001
REACT_APP_HASHTAG_PREFIX="#fAIr;#hotosm-fAIr"
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const TrainingsList = (props) => {

if (res.error) setError(res.error.response.statusText);
else {
// console.log("gettraining", res.data);
//console.log("gettraining", res.data);

return res.data;
}
Expand Down Expand Up @@ -123,17 +123,11 @@ const TrainingsList = (props) => {
},
},
{
field: "c",
field: "chips_length",
headerName: "DS size",
flex: 1,
renderCell: (params) => {
if (params.row.status === "FINISHED")
return (
<TrainingSize
datasetId={props.datasetId}
trainingId={params.row.id}
></TrainingSize>
);
return <>{`${params.value === 0 ? "" : params.value}`}</>;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/Layout/Feedback/FeedbackAOI.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ const FeedbackAOI = (props) => {
props.sourceImagery
? "custom:" + props.sourceImagery
: "Bing"
}&disable_features=boundaries&gpx=https://fair-dev.hotosm.org/api/v1/feedback-aoi/gpx/${
}&disable_features=boundaries&gpx=${
process.env.REACT_APP_API_BASE
}/feedback-aoi/gpx/${
layer.id
}&map=10.70/18.9226/81.6991`;
console.log(url);
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/Layout/Start/Prediction/Prediction.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ const Prediction = () => {
loadurl.searchParams.set("top", bounds._northEast.lat);
loadurl.searchParams.set("left", bounds._southWest.lng);
loadurl.searchParams.set("right", bounds._northEast.lng);
loadurl.searchParams.set(
"changeset_hashtags",
process.env.REACT_APP_HASHTAG_PREFIX
);
const loadResponse = await fetch(loadurl);

if (!josmResponse.ok) {
Expand Down
17 changes: 10 additions & 7 deletions frontend/src/components/Layout/TrainingDS/DatasetEditor/AOI.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ const AOI = (props) => {
props.oamImagery
? "custom:" + props.oamImagery.url
: "Bing"
}&datasets=fbRoads,msBuildings&disable_features=boundaries&map=16.00/17.9253/120.4841&gpx=&gpx=https://fair-dev.hotosm.org/api/v1/aoi/gpx/${
}&datasets=fbRoads,msBuildings&disable_features=boundaries&map=16.00/17.9253/120.4841&gpx=&gpx=${
process.env.REACT_APP_API_BASE
}/aoi/gpx/${
layer.aoiId
}`,
"_blank",
Expand Down Expand Up @@ -275,9 +277,9 @@ const AOI = (props) => {
props.oamImagery
? "custom:" + props.oamImagery.url
: "Bing"
}&disable_features=boundaries&gpx=https://fair-dev.hotosm.org/api/v1/aoi/gpx/${
layer.aoiId
}&map=10.70/18.9226/81.6991`,
}&disable_features=boundaries&gpx=${
process.env.REACT_APP_API_BASE
}/aoi/gpx/${layer.aoiId}&map=10.70/18.9226/81.6991`,
"_blank",
"noreferrer"
);
Expand All @@ -286,7 +288,8 @@ const AOI = (props) => {
{/* <MapTwoTone /> */}
<img
alt="OSM logo"
className="osm-logo-small" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/256px-Openstreetmap_logo.svg.png"
className="osm-logo-small"
src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/256px-Openstreetmap_logo.svg.png"
/>
</IconButton>
</Tooltip>
Expand Down Expand Up @@ -365,8 +368,8 @@ const AOI = (props) => {
</Demo>
{props.mapLayers && props.mapLayers.length === 0 && (
<Typography variant="body1" component="h2">
No TAs yet, start creating one by clicking Draw a rectangle, 3rd down at the top
left of the image/map
No TAs yet, start creating one by clicking Draw a rectangle, 3rd
down at the top left of the image/map
</Typography>
)}
</Grid>
Expand Down