Skip to content

Commit

Permalink
Fix some bugs (#720)
Browse files Browse the repository at this point in the history
* Publish changes to prod  (#566)

* avoid statefulsets update errors on actions runs refs #535. (#536)

* deprecate demux service. refs #538 (#540)

* add handler url from env var & other minor bug fixes (#542)

* Add missing env var to config map (#543)

* add handler url from env var & other minor bug fixes

* add missing env var

* fix: update some env vars

* fix: update some env vars

* fix: replace .env values with the previous ones

* Feat/add tx link (#545)

* feat: add tx link

* feat: remove secrets

* setup env workflow (#546)

* wip

* wip: add env files & db_data to .gitignore

* fix: remove .env files

* fix: remove .env files

* fix: delete unnecessary code

* refactor: remove unnecessary code

* fix: minimal

* Fix/rate action buttons not showing (#547)

* wip

* wip: add env files & db_data to .gitignore

* fix: remove .env files

* fix: remove .env files

* fix: delete unnecessary code

* refactor: remove unnecessary code

* fix: minimal

* fix: rate buttons not showing in certains densities

* Fix/hasura console config (#556)

* Deploy to mainnet (#544)

* avoid statefulsets update errors on actions runs refs #535. (#536)

* deprecate demux service. refs #538 (#540)

* add handler url from env var & other minor bug fixes (#542)

* Add missing env var to config map (#543)

* add handler url from env var & other minor bug fixes

* add missing env var

* fix: update some env vars

* fix: update some env vars

* fix: replace .env values with the previous ones

Co-authored-by: Andres Gomez <[email protected]>
Co-authored-by: JustinCast <[email protected]>

* wip

* wip: add env files & db_data to .gitignore

* fix: remove .env files

* fix: remove .env files

* fix: delete unnecessary code

* refactor: remove unnecessary code

* fix: minimal

* feat: voting tool revamp

* fix: remove comments

* fix: add i18n entries

* fix: bug fixes

* fix: hasura console config

Co-authored-by: Xavier <[email protected]>
Co-authored-by: Andres Gomez <[email protected]>

* Fix/add missing i18n entries (#554)

* Deploy to mainnet (#544)

* avoid statefulsets update errors on actions runs refs #535. (#536)

* deprecate demux service. refs #538 (#540)

* add handler url from env var & other minor bug fixes (#542)

* Add missing env var to config map (#543)

* add handler url from env var & other minor bug fixes

* add missing env var

* fix: update some env vars

* fix: update some env vars

* fix: replace .env values with the previous ones

Co-authored-by: Andres Gomez <[email protected]>
Co-authored-by: JustinCast <[email protected]>

* wip

* wip: add env files & db_data to .gitignore

* fix: remove .env files

* fix: remove .env files

* fix: delete unnecessary code

* refactor: remove unnecessary code

* fix: minimal

* feat: voting tool revamp

* fix: remove comments

* fix: add i18n entries

* fix: bug fixes

Co-authored-by: Xavier <[email protected]>
Co-authored-by: Andres Gomez <[email protected]>

* docs: add env example (#565)

* fix: not able to sync proxies locally (#564)

* fix: update hasura version

* fix: hasura version && other minor bug fixes

* Fix/update hasura version (#567)

* fix: remove build:staging statement

* latest changes

Co-authored-by: Andres Gomez <[email protected]>
Co-authored-by: JustinCast <[email protected]>

* Update push-master-environment.yaml (#576)

* fix(cron): update config values (#579)

* Revert "fix(cron): update config values (#579)" (#580)

This reverts commit 13ecf78.

* add(link sidebar): Add network Monitor in sidebar

* fix(design): Align BP cards in all screen resolutions

* fix(bp page): Fix broke design in bp page

* fix(voting-tool): apply changes on design

* fix(proxy-component): change cards and voting tool proxy design

* fix(vote-bp): change method got to top page

* fix(content): delete unnecessary console.log

* fix(design): delete unnecessary backgraound color

* fix(front-end): delete unnecessary code

* fix(radar-component): change radar label font size

* fix(code): delete unnecessary code

* fix(code): delete unnecessary code

* fix(code): delete unnecessary code

* fix(front-end): change size proxy cards

* fix(front-end): fix homepage design

* fix(rate-tool): fix mobile design

* fix(radar): change radar size

* fix(envar): update envar

* fix(db): add select permission to eden_rating_stats

* fix(bp-profile): delete horizontal overflow

* feat(filter): create eden top date

* fix(design): fix broke design on proxy profile

* fix(bp-profile): fix load eden rate

* fix(front-end): change button texts

Co-authored-by: Xavier <[email protected]>
Co-authored-by: Andres Gomez <[email protected]>
Co-authored-by: JustinCast <[email protected]>
Co-authored-by: Xavier Fernandez <[email protected]>
  • Loading branch information
5 people authored Aug 27, 2021
1 parent c6000e4 commit a4ae543
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ table:
select_permissions:
- permission:
columns:
- average
- bpjson
- candidate_name
- community
- development
- general_info
- infrastructure
- owner
- ratings_cntr
- bpjson
- system
- candidate_name
- total_votes
- eden_average
- eden_ratings_cntr
- average
- transparency
- infrastructure
- trustiness
- community
- development
- ratings_cntr
- general_info
filter: {}
role: anonymous
19 changes: 19 additions & 0 deletions hasura/migrations/default/1630079306181_run_sql_migration/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE OR REPLACE VIEW "public"."producers_list" AS
-- SELECT producers.owner,
-- producers.bpjson,
-- producers.system,
-- ((producers.bpjson -> 'org'::text) ->> 'candidate_name'::text) AS candidate_name,
-- (producers.system ->> 'total_votes'::text) AS total_votes,
-- ratings_stats.average,
-- ratings_stats.transparency,
-- ratings_stats.infrastructure,
-- ratings_stats.trustiness,
-- ratings_stats.community,
-- ratings_stats.development,
-- ratings_stats.ratings_cntr,
-- producers.general_info
-- FROM (producers
-- FULL JOIN ratings_stats ON (((ratings_stats.bp)::text = producers.owner))
-- FULL JOIN eden_ratings_stats ON eden_ratings_stats.bp = producers.owner);
17 changes: 17 additions & 0 deletions hasura/migrations/default/1630079306181_run_sql_migration/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE OR REPLACE VIEW "public"."producers_list" AS
SELECT producers.owner,
producers.bpjson,
producers.system,
((producers.bpjson -> 'org'::text) ->> 'candidate_name'::text) AS candidate_name,
(producers.system ->> 'total_votes'::text) AS total_votes,
ratings_stats.average,
ratings_stats.transparency,
ratings_stats.infrastructure,
ratings_stats.trustiness,
ratings_stats.community,
ratings_stats.development,
ratings_stats.ratings_cntr,
producers.general_info
FROM (producers
FULL JOIN ratings_stats ON (((ratings_stats.bp)::text = producers.owner))
FULL JOIN eden_ratings_stats ON eden_ratings_stats.bp = producers.owner);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- drop view "public"."producers_list";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop view "public"."producers_list";
21 changes: 21 additions & 0 deletions hasura/migrations/default/1630081060538_run_sql_migration/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE OR REPLACE VIEW "public"."producers_list" AS
-- SELECT producers.owner,
-- producers.bpjson,
-- producers.system,
-- ((producers.bpjson -> 'org'::text) ->> 'candidate_name'::text) AS candidate_name,
-- (producers.system ->> 'total_votes'::text) AS total_votes,
-- eden_ratings_stats.average AS eden_average,
-- eden_ratings_stats.ratings_cntr AS eden_ratings_cntr,
-- ratings_stats.average,
-- ratings_stats.transparency,
-- ratings_stats.infrastructure,
-- ratings_stats.trustiness,
-- ratings_stats.community,
-- ratings_stats.development,
-- ratings_stats.ratings_cntr,
-- producers.general_info
-- FROM (producers
-- FULL JOIN ratings_stats ON (((ratings_stats.bp)::text = producers.owner))
-- FULL JOIN eden_ratings_stats ON ((eden_ratings_stats.bp)::text = producers.owner));
19 changes: 19 additions & 0 deletions hasura/migrations/default/1630081060538_run_sql_migration/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CREATE OR REPLACE VIEW "public"."producers_list" AS
SELECT producers.owner,
producers.bpjson,
producers.system,
((producers.bpjson -> 'org'::text) ->> 'candidate_name'::text) AS candidate_name,
(producers.system ->> 'total_votes'::text) AS total_votes,
eden_ratings_stats.average AS eden_average,
eden_ratings_stats.ratings_cntr AS eden_ratings_cntr,
ratings_stats.average,
ratings_stats.transparency,
ratings_stats.infrastructure,
ratings_stats.trustiness,
ratings_stats.community,
ratings_stats.development,
ratings_stats.ratings_cntr,
producers.general_info
FROM (producers
FULL JOIN ratings_stats ON (((ratings_stats.bp)::text = producers.owner))
FULL JOIN eden_ratings_stats ON ((eden_ratings_stats.bp)::text = producers.owner));
2 changes: 1 addition & 1 deletion webapp/src/components/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const CardData = ({
{...props}
ref={ref}
state={{ owner: owner }}
to={`/block-producers/${owner}/rate`}
to={`/${pathLink}/${owner}`}
/>
))}
className={classes.btnRate}
Expand Down
5 changes: 3 additions & 2 deletions webapp/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"btnVoteBPs": "Vote",
"clearSelection": "Clear selection",
"loadMore": "Load more",
"view": "View",
"remove": "Remove",
"view": "More info",
"remove": "Remove vote",
"addToVote": "Add to vote",
"selected": "Selected",
"details": "Details",
Expand Down Expand Up @@ -81,6 +81,7 @@
"alphabetical": "Alphabetical",
"ratings": "Number of Ratings",
"generalRate": "Top Rated General",
"edenRate": "Top Rated Eden",
"infrastructure": "Top Rated Infrastructure",
"community": "Top Rated Community",
"trustiness": "Top Rated Trustiness",
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"btnVoteBPs": "Votar",
"clearSelection": "Borrar selección",
"loadMore": "Cargar más",
"view": "Ver",
"view": "Más información",
"remove": "Remover",
"addToVote": "Agregar para votar",
"selected": "Seleccionado",
Expand Down Expand Up @@ -81,6 +81,7 @@
"alphabetical": "Alfabético",
"ratings": "Número de Evaluaciones",
"generalRate": "Mayor Calificación General",
"edenRate": "Mayor Calificación Eden",
"infrastructure": "Mayor Calificación Infraestructura",
"community": "Mayor Calificación Comunidad",
"trustiness": "Mayor Calificación Confianza",
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/models/BlockProducer/blockProducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const Proxies = {
fetchPolicy: 'network-only'
})

if (edenRatings.length > 0) this.addEdenRate(edenRatings[0])
this.addEdenRate(edenRatings.length > 0 ? edenRatings[0] : null)

dispatch.isLoading.storeIsContentLoading(false)
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions webapp/src/routes/block-producers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export default AllBps
export const blockProducersDrawer = [
{ value: 'alphabetical' },
{ value: 'generalRate' },
{ value: 'edenRate' },
{ value: 'infrastructure' },
{ value: 'community' },
{ value: 'trustiness' },
Expand Down
1 change: 0 additions & 1 deletion webapp/src/routes/proxies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ const AllProxies = ({ ual }) => {
owner={_get(proxy, 'owner')}
title={_get(proxy, 'name')}
useRateButton={false}
buttonLabel={t('view')}
pathLink='proxies'
showOptions={false}
/>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/routes/proxies/proxy-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const ProxyProfile = ({ account, ual, ...props }) => {
</Grid>
{!isMobile && (
<Grid container justify='center' md={5}>
<Grid style={{ height: '200px' }} item md={12}>
<Grid style={{ height: '350px', marginTop: '-30px' }} item md={12}>
<Radar
height={sizes}
width={sizes}
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/services/bps.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const getAllBPs = ({ nameFilter = null, setBPs = () => {} } = {}) => {
transparency
ratings_cntr
general_info
eden_average
eden_ratings_cntr
}
}
`,
Expand Down Expand Up @@ -68,7 +70,6 @@ export const getAllBPs = ({ nameFilter = null, setBPs = () => {} } = {}) => {
const votesInEos = calculateEosFromVotes(
_get(bp, 'system.total_votes', 0)
)

return {
...bp,
system: {
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/utils/sortedBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export default (sortBy, blockProducers) => {
return (blockProducers || []).sort((a, b) => _sortValues(a, b, 'average'))
}

case 'edenRate': {
return (blockProducers || []).sort((a, b) =>
_sortValues(a, b, 'eden_average')
)
}

case 'infrastructure': {
return (blockProducers || []).sort((a, b) =>
_sortValues(a, b, 'system.parameters.infrastructure')
Expand Down

0 comments on commit a4ae543

Please sign in to comment.