Skip to content

Commit 56543a4

Browse files
committed
WIP
1 parent e93992c commit 56543a4

File tree

15 files changed

+690
-330
lines changed

15 files changed

+690
-330
lines changed

govtool/backend/app/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ startApp vvaConfig = do
8282
settings =
8383
setPort vvaPort
8484
$ setHost vvaHost
85-
$ setTimeout 60 -- 60 seconds timeout
85+
$ setTimeout 120 -- 120 seconds timeout
8686
$ setBeforeMainLoop
8787
( Text.hPutStrLn stderr $
8888
Text.pack
@@ -117,7 +117,7 @@ startApp vvaConfig = do
117117
, dRepListCache
118118
, networkMetricsCache
119119
}
120-
connectionPool <- createPool (connectPostgreSQL (encodeUtf8 (dbSyncConnectionString $ getter vvaConfig))) close 1 1 60
120+
connectionPool <- createPool (connectPostgreSQL (encodeUtf8 (dbSyncConnectionString $ getter vvaConfig))) close 10 10 120
121121
let appEnv = AppEnv {vvaConfig=vvaConfig, vvaCache=cacheEnv, vvaConnectionPool=connectionPool }
122122
server' <- mkVVAServer appEnv
123123
runSettings settings server'
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"dbsyncconfig" : {
3-
"host" : "localhost",
4-
"dbname" : "cexplorer",
5-
"user" : "postgres",
6-
"password" : "postgres",
7-
"port" : 5432
8-
},
9-
"port" : 9999,
10-
"host" : "localhost",
11-
"cachedurationseconds": 20,
12-
"sentrydsn": "https://username:[email protected]/id",
13-
"sentryenv": "dev"
2+
"dbsyncconfig": {
3+
"host": "localhost",
4+
"dbname": "cexplorer_preview",
5+
"user": "postgres",
6+
"password": "postgres",
7+
"port": 5432
8+
},
9+
"port": 9999,
10+
"host": "localhost",
11+
"cachedurationseconds": 20,
12+
"sentrydsn": "https://username:[email protected]/id",
13+
"sentryenv": "dev"
1414
}

govtool/backend/sql/list-proposals.sql

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,30 @@ SELECT
4242
json_build_object('Reward Address', stake_address.view, 'Amount', treasury_withdrawal.amount)
4343

4444
when gov_action_proposal.type::text = 'InfoAction' then
45-
json_build_object()
45+
json_build_object('data', gov_action_proposal.description)
4646

4747
when gov_action_proposal.type::text = 'HardForkInitiation' then
4848
json_build_object(
4949
'major', (gov_action_proposal.description->'contents'->1->>'major')::int,
5050
'minor', (gov_action_proposal.description->'contents'->1->>'minor')::int
5151
)
52+
53+
when gov_action_proposal.type::text = 'NoConfidence' then
54+
json_build_object('data', gov_action_proposal.description->'contents')
55+
56+
when gov_action_proposal.type::text = 'ParameterChange' then
57+
json_build_object('data', gov_action_proposal.description->'contents')
58+
59+
when gov_action_proposal.type::text = 'NewConstitution' then
60+
json_build_object(
61+
'anchor', gov_action_proposal.description->'contents'->1->'anchor'
62+
)
63+
64+
when gov_action_proposal.type::text = 'UpdateCommittee' then
65+
json_build_object(
66+
'tag', gov_action_proposal.description->>'tag',
67+
'contents', gov_action_proposal.description->'contents'
68+
)
5269
else
5370
null
5471
end

govtool/frontend/junit-report.xml

Lines changed: 154 additions & 216 deletions
Large diffs are not rendered by default.

govtool/frontend/src/components/molecules/DataMissingHeader.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
import { Box, SxProps } from "@mui/material";
22

33
import { Typography } from "@atoms";
4-
import { Share } from "@molecules";
54
import { MetadataValidationStatus } from "@models";
65
import { getMetadataDataMissingStatusTranslation } from "@/utils";
76

87
type DataMissingHeaderProps = {
98
isDataMissing: MetadataValidationStatus | null;
10-
shareLink?: string;
119
title?: string;
1210
titleStyle?: SxProps;
1311
};
1412

1513
export const DataMissingHeader = ({
1614
title,
1715
isDataMissing,
18-
shareLink,
1916
titleStyle,
2017
}: DataMissingHeaderProps) => (
2118
<Box
@@ -50,6 +47,5 @@ export const DataMissingHeader = ({
5047
title}
5148
</Typography>
5249
</Box>
53-
{shareLink && <Share link={shareLink} />}
5450
</Box>
5551
);

govtool/frontend/src/components/molecules/GovernanceActionDetailsCardLinks.tsx

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Typography } from "@atoms";
44
import { ICONS } from "@consts";
55
import { useModal } from "@context";
66
import { useScreenDimension, useTranslation } from "@hooks";
7-
import { LinkWithIcon } from "@molecules";
87

98
export const GovernanceActionDetailsCardLinks = ({
109
links,
@@ -42,29 +41,56 @@ export const GovernanceActionDetailsCardLinks = ({
4241
}}
4342
>
4443
{links.map(({ uri, label }) => (
45-
<Box flexDirection="column">
44+
<Box flexDirection={isMobile ? "column" : "row"} display="flex">
4645
{label && (
4746
<Typography
4847
data-testid={`${label}-${uri}-label`}
49-
sx={{ fontWeight: "500" }}
48+
sx={{
49+
fontWeight: 400,
50+
flex: 1,
51+
fontSize: 16,
52+
lineHeight: "24px",
53+
mr: 8,
54+
overflow: "hidden",
55+
width: "auto",
56+
whiteSpace: "nowrap",
57+
}}
5058
>
5159
{label}
5260
</Typography>
5361
)}
54-
<LinkWithIcon
55-
key={uri}
56-
label={uri}
57-
onClick={() => {
58-
openModal({
59-
type: "externalLink",
60-
state: {
61-
externalLink: uri,
62-
},
63-
});
62+
<Typography
63+
sx={{
64+
fontSize: 16,
65+
fontWeight: 400,
66+
maxWidth: "283px",
67+
lineHeight: "24px",
68+
whiteSpace: "nowrap",
69+
overflow: "hidden",
70+
textOverflow: "ellipsis",
71+
color: "primaryBlue",
6472
}}
65-
icon={<img alt="link" src={ICONS.link} />}
66-
cutWithEllipsis
67-
/>
73+
>
74+
{uri}
75+
</Typography>
76+
{label && (
77+
<Box ml={1}>
78+
<img
79+
data-testid="link-button"
80+
alt="link"
81+
src={ICONS.externalLinkIcon}
82+
style={{ cursor: "pointer" }}
83+
onClick={() => {
84+
openModal({
85+
type: "externalLink",
86+
state: {
87+
externalLink: uri,
88+
},
89+
});
90+
}}
91+
/>
92+
</Box>
93+
)}
6894
</Box>
6995
))}
7096
</Box>

0 commit comments

Comments
 (0)