From df41219cd4ad6c21d6f26fb34af08ffd03ffeeee Mon Sep 17 00:00:00 2001 From: Jose Contreras Date: Wed, 27 Mar 2019 21:29:22 -0400 Subject: [PATCH 1/5] Fix Dockerfile to update update-get paths --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 99b91cb0..0f12907c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,13 @@ ENV CODEROOT=/home/docker/code ENV NGINXERR=/var/log/app/nginx.err.log ENV NGINXREQ=/var/log/app/nginx.req.log +RUN cat /etc/apt/sources.list +RUN echo "deb http://archive.debian.org/debian/ jessie main" > /etc/apt/sources.list +RUN echo "deb-src http://archive.debian.org/debian/ jessie main" >> /etc/apt/sources.list +RUN echo "deb http://security.debian.org/debian-security jessie/updates main \ + deb http://deb.debian.org/debian jessie-updates main" # Install dependencies. -RUN apt-get -qq update && apt-get install -y \ +RUN apt-get -qq -o Acquire::Check-Valid-Until=false update && apt-get install -y \ build-essential \ curl \ nginx \ -- GitLab From a935c85a2b1df260987c95fb751ae79d2c0fb698 Mon Sep 17 00:00:00 2001 From: Jose Contreras Date: Wed, 27 Mar 2019 21:41:34 -0400 Subject: [PATCH 2/5] Use values from new building service endpoint and pass to table. --- src/containers/BGroup/BGroup.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/containers/BGroup/BGroup.js b/src/containers/BGroup/BGroup.js index f321471e..8e9dc147 100644 --- a/src/containers/BGroup/BGroup.js +++ b/src/containers/BGroup/BGroup.js @@ -200,6 +200,9 @@ export class BGroup extends Component { owner_occupied: val.owner_occupied, stable_tenure_of_ownership: val.stable_tenure_of_ownership, type_of_fuel: val.type_of_fuel, + building_age: val.building_age, + pre_post_war: val.pre_post_war, + complaint_311: val.complaint_311, }; return acc; }, {}); -- GitLab From 5d975c678eff6aeaf8c7a68adc2d9749b80d3a3c Mon Sep 17 00:00:00 2001 From: Jose Contreras Date: Wed, 27 Mar 2019 21:42:11 -0400 Subject: [PATCH 3/5] Render new heat pump score fields in table. --- src/containers/BGroup/BGroupBuildingTable.js | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/containers/BGroup/BGroupBuildingTable.js b/src/containers/BGroup/BGroupBuildingTable.js index eaaf669d..d44d9181 100644 --- a/src/containers/BGroup/BGroupBuildingTable.js +++ b/src/containers/BGroup/BGroupBuildingTable.js @@ -406,6 +406,36 @@ export default class BGroupBuildingTable extends Component { {row.value} ), + }, { + Header: 'Age of Building', + filterable: true, + style: { textAlign: 'center' }, + accessor: 'building_age', + Cell: row => ( +
+ {row.value} +
+ ), + }, { + Header: 'Pre War/Post War', + filterable: true, + style: { textAlign: 'center' }, + accessor: 'pre_post_war', + Cell: row => ( +
+ {row.value} +
+ ), + }, { + Header: '# of 311 Complaints', + filterable: true, + style: { textAlign: 'center' }, + accessor: 'complaint_311', + Cell: row => ( +
+ {row.value} +
+ ), }, ], }], ...(!this.state.displayContact) ? [] : [{ @@ -779,12 +809,18 @@ export default class BGroupBuildingTable extends Component { val.fuel_type = heatPumpScores[val.building_id].type_of_fuel; val.owner_occupied = heatPumpScores[val.building_id].owner_occupied; val.stable_ownership = heatPumpScores[val.building_id].stable_tenure_of_ownership; + val.building_age = heatPumpScores[val.building_id].building_age; + val.pre_post_war = heatPumpScores[val.building_id].pre_post_war; + val.complaint_311 = heatPumpScores[val.building_id].complaint_311; } else { val.heat_pump_score = -1; val.building_proximities = -1; val.fuel_type = -1; val.owner_occupied = -1; val.stable_ownership = -1; + val.building_age = -1; + val.pre_post_war = -1; + val.complaint_311 = -1; } // Contact val.contact_account = contactAccounts[val.building_id]; -- GitLab From 984bf926adb8b7606ddfbcfeb565972452af7a04 Mon Sep 17 00:00:00 2001 From: Jose Contreras Date: Fri, 29 Mar 2019 08:21:37 -0700 Subject: [PATCH 4/5] Remove unnecessary lines in Dockerfile. --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f12907c..9dd9589f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,7 @@ ENV NGINXREQ=/var/log/app/nginx.req.log RUN cat /etc/apt/sources.list RUN echo "deb http://archive.debian.org/debian/ jessie main" > /etc/apt/sources.list RUN echo "deb-src http://archive.debian.org/debian/ jessie main" >> /etc/apt/sources.list -RUN echo "deb http://security.debian.org/debian-security jessie/updates main \ - deb http://deb.debian.org/debian jessie-updates main" + # Install dependencies. RUN apt-get -qq -o Acquire::Check-Valid-Until=false update && apt-get install -y \ build-essential \ -- GitLab From 76feec16c2c06b58dc3ec3bce8dc9f85791139a1 Mon Sep 17 00:00:00 2001 From: Jose Contreras Date: Fri, 29 Mar 2019 08:28:22 -0700 Subject: [PATCH 5/5] Remove extra flag from shouldn't be necessary. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9dd9589f..58a08df8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN echo "deb http://archive.debian.org/debian/ jessie main" > /etc/apt/sources. RUN echo "deb-src http://archive.debian.org/debian/ jessie main" >> /etc/apt/sources.list # Install dependencies. -RUN apt-get -qq -o Acquire::Check-Valid-Until=false update && apt-get install -y \ +RUN apt-get -qq update && apt-get install -y \ build-essential \ curl \ nginx \ -- GitLab