Skip to content

Commit

Permalink
Fix for loading Live Monitoring View
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed May 2, 2024
1 parent 616e42e commit 9d3d086
Showing 1 changed file with 67 additions and 73 deletions.
140 changes: 67 additions & 73 deletions frontend/src/views/projectLiveMonitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,80 +267,74 @@ export function ProjectLiveMonitoring() {
</div>
</>
)}
<div className="border-b-2 pb-5 space-y-3">
<UnderpassFeatureStats
tags={tags}
hashtag={'hotosm-project-' + id}
featureType={featureType}
apiUrl={underpassConfig.API_URL}
area={areaOfInterest}
/>
<UnderpassValidationStats
tags={tags}
hashtag={'hotosm-project-' + id}
featureType={featureType}
apiUrl={underpassConfig.API_URL}
status="badgeom"
area={areaOfInterest}
/>
</div>
<div className="border-b-2 py-5 mb-4">
<form className="space-x-2">
<input
onChange={() => {
setRealtimeList(!realtimeList);
}}
name="liveListCheckbox"
type="checkbox"
/>
<label target="liveListCheckbox">Live list</label>
<input
onChange={() => {
setRealtimeMap(!realtimeMap);
}}
name="liveMapCheckbox"
type="checkbox"
/>
<label target="liveMapCheckbox">Live map</label>
<input
onChange={() => {
setListAll(!listAll);
{project && areaOfInterest && (
<><div className="border-b-2 pb-5 space-y-3">
<UnderpassFeatureStats
tags={tags}
hashtag={'hotosm-project-' + id}
featureType={featureType}
apiUrl={underpassConfig.API_URL}
area={areaOfInterest} />
<UnderpassValidationStats
tags={tags}
hashtag={'hotosm-project-' + id}
featureType={featureType}
apiUrl={underpassConfig.API_URL}
status="badgeom"
area={areaOfInterest} />
</div><div className="border-b-2 py-5 mb-4">
<form className="space-x-2">
<input
onChange={() => {
setRealtimeList(!realtimeList);
} }
name="liveListCheckbox"
type="checkbox" />
<label target="liveListCheckbox">Live list</label>
<input
onChange={() => {
setRealtimeMap(!realtimeMap);
} }
name="liveMapCheckbox"
type="checkbox" />
<label target="liveMapCheckbox">Live map</label>
<input
onChange={() => {
setListAll(!listAll);
} }
name="listAllCheckbox"
type="checkbox" />
<label target="listAllCheckbox">List all</label>
</form>
</div><UnderpassFeatureList
style={{
display: 'flex',
flexFlow: 'column',
height: '8px',
flex: '1 1 auto',
overflowY: 'auto',
}}
name="listAllCheckbox"
type="checkbox"
/>
<label target="listAllCheckbox">List all</label>
</form>
</div>
<UnderpassFeatureList
style={{
display: 'flex',
flexFlow: 'column',
height: '8px',
flex: '1 1 auto',
overflowY: 'auto',
}}
tags={tags}
hashtag={'hotosm-project-' + id}
featureType={featureType}
page={0}
area={areaOfInterest}
onSelect={(feature) => {
setCoords([feature.lat, feature.lon]);
const tags = JSON.stringify(feature.tags);
const status = feature.status;
setActiveFeature({ properties: { tags, status }, ...feature });
}}
realtime={realtimeList}
config={underpassConfig}
status={listAll ? '' : status}
orderBy="created_at"
onFetchFirstTime={(mostRecentFeature) => {
if (mostRecentFeature) {
setCoords([mostRecentFeature.lat, mostRecentFeature.lon]);
}
}}
/>
tags={tags}
hashtag={'hotosm-project-' + id}
featureType={featureType}
page={0}
area={areaOfInterest}
onSelect={(feature) => {
setCoords([feature.lat, feature.lon]);
const tags = JSON.stringify(feature.tags);
const status = feature.status;
setActiveFeature({ properties: { tags, status }, ...feature });
} }
realtime={realtimeList}
config={underpassConfig}
status={listAll ? '' : status}
orderBy="created_at"
onFetchFirstTime={(mostRecentFeature) => {
if (mostRecentFeature) {
setCoords([mostRecentFeature.lat, mostRecentFeature.lon]);
}
} } /></>
)}
</div>
</div>
</div>
Expand Down

0 comments on commit 9d3d086

Please sign in to comment.