-
Notifications
You must be signed in to change notification settings - Fork 8
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
UI Refactor #75
UI Refactor #75
Conversation
- Change column name to follow standard conventions - Uncomment population charts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some several points to review
@@ -66,7 +66,7 @@ CREATE MATERIALIZED VIEW public.mv_flood_event_road_district_summary AS | |||
), flooded_count_selection AS ( | |||
SELECT a.flood_event_id, | |||
a.district_id, | |||
sum(a.road_type_count) AS flooded_flooded_road_count, | |||
sum(a.road_type_count) AS flooded_road_count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standardize column name to follow conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @lucernae it was because that's from the db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I also fix it in the db side, because it's confusing and make the frontend code difficult to understand. The db should not make the frontend job harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh okay cool, yeah at that time, I thought it would take a long time to change the db so I just adjusted the front end according to db
// this.population_village_summaries = new PopulationVillageSummaryCollection(); | ||
// this.population_district_summaries = new PopulationDistrictSummaryCollection(); | ||
// this.population_subdistrict_summaries = new PopulationSubDistrictSummaryCollection(); | ||
this.population_village_summaries = new PopulationVillageSummaryCollection(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncomment Population collections. It is now available
that.roadDistrictStats = data; | ||
if (that.roadVillageStats !== null && that.roadDistrictStats !== null && that.roadSubDistrictStats !== null) { | ||
that.fetchRoadStatisticData('district', that.selected_forecast.id, true); | ||
that.populationDistrictStats = data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo
@@ -176,7 +176,7 @@ define([ | |||
|
|||
let total_vulnerability_score = data['total_vulnerability_score'] ? data['total_vulnerability_score'].toFixed(2): 0; | |||
$('#vulnerability-score-' + element).html(total_vulnerability_score); | |||
$('#'+ element +'-count').html(data['flooded_flooded_road_count']); | |||
$('#'+ element +'-count').html(data['flooded_road_count']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use standard column name conventions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @lucernae that name is from the db? is db using that name now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I saw the frontend is using weird column name, so I check back if the backend actually have those name. It have those, so I fixed it in the backend too.
436ef0d
to
32de370
Compare
MV Summary for roads refactor
Use GWC endpoint
Address issue: #48
Apparently we don't use GWC endpoint in the frontend.
This commit uses GWC endpoint and include
tiled: true
options in a WMS requests.