Skip to content
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

Staging #218

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ ERPC_DB_SSL_MODE=
GENESIS_TIMESTAMP=
SLOT_DURATION=
SLOTS_PER_EPOCH=
TOTAL_GNOSIS_VALIDATORS=
TOTAL_GNOSIS_VALIDATORS=
LOKI_URL=https://<user_id>:<password>@logs.metrics.shutter.network/insert/loki/api/v1/push
12 changes: 12 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ services:
condition: service_healthy
ports:
- "4000:4000"
logging:
driver: loki
options:
loki-url: ${LOKI_URL}
loki-external-labels: |
job=observer
environment:
DB_HOST: db
DB_PORT: 5432
Expand Down Expand Up @@ -46,6 +52,12 @@ services:
restart: unless-stopped
depends_on:
- observer
logging:
driver: loki
options:
loki-url: ${LOKI_URL}
loki-external-labels: |
job=explorer-backend
environment:
SERVER_PORT: 5000
OBSERVER_DB_HOST: db
Expand Down
4 changes: 2 additions & 2 deletions frontend/cypress/components/SearchBar.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('<SearchBar /> and <Transaction /> data display test', () => {
path="/"
element={
<SearchBar
placeholder="Search by Txn Hash"
placeholder="Search by transaction hash"
value={searchQuery}
onChange={handleSearchChange}
/>
Expand All @@ -49,7 +49,7 @@ describe('<SearchBar /> and <Transaction /> data display test', () => {

mount(<TestComponent />);

cy.get('input[placeholder="Search by Txn Hash"]', { timeout: 10000 })
cy.get('input[placeholder="Search by transaction hash"]', { timeout: 10000 })
.should('exist')
.should('be.visible')
.type(`${txHash}{enter}`, { force: true });
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ResponsiveLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ResponsiveLayout: FC<ResponsiveLayoutProps> = ({ children }) => {
<Box component="main" sx={mainStyles}>
<Box sx={{ display: 'flex', justifyContent: 'flex-start', alignItems: 'center', mb: 2, padding: 0 }}>
<SearchBar
placeholder="Search by Txn Hash"
placeholder="Search by transaction hash"
value={searchQuery}
onChange={handleSearchChange}
/>
Expand Down
24 changes: 12 additions & 12 deletions frontend/src/pages/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Transaction: FC = () => {

if (updatedData) {
setTransaction(updatedData.message as TransactionDetails);
if (transaction? finalisedStatuses.includes(transaction.TxStatus): false){
if (transaction ? finalisedStatuses.includes(transaction.TxStatus) : false) {
setStopPolling(true)
}
} else {
Expand Down Expand Up @@ -149,7 +149,7 @@ const Transaction: FC = () => {
<Grid size={{ xs: 'auto', sm: 4 }}>
<Box display="flex" alignItems="center" gap={1}>
<Typography variant="body1" fontWeight="bold" className="card-label" textAlign="left">Estimated Inclusion Time</Typography>
<Tooltip title="Estimated time in which transaction should be included">
<Tooltip title="Estimated timestamp at which the transaction should be included">
<InfoIcon />
</Tooltip>
</Box>
Expand All @@ -161,7 +161,7 @@ const Transaction: FC = () => {
<Grid size={{ xs: 'auto', sm: 4 }}>
<Box display="flex" alignItems="center" gap={1}>
<Typography variant="body1" fontWeight="bold" className="card-label" textAlign="left">Estimated Inclusion Delay</Typography>
<Tooltip title="Time it might take for tx to be included">
<Tooltip title="Estimated delay between submission time and inclusion time">
<InfoIcon />
</Tooltip>
</Box>
Expand All @@ -182,7 +182,7 @@ const Transaction: FC = () => {
<Grid size={{ xs: 'auto', sm: 4 }}>
<Box display="flex" alignItems="center" gap={1}>
<Typography variant="body1" fontWeight="bold" className="card-label" textAlign="left">Effective Inclusion Time</Typography>
<Tooltip title="Time in which the transaction was included">
<Tooltip title="Timestamp at which the transaction was included">
<InfoIcon />
</Tooltip>
</Box>
Expand All @@ -194,7 +194,7 @@ const Transaction: FC = () => {
<Grid size={{ xs: 'auto', sm: 4 }}>
<Box display="flex" alignItems="center" gap={1}>
<Typography variant="body1" fontWeight="bold" className="card-label" textAlign="left">Effective Inclusion Delay</Typography>
<Tooltip title="Time taken for tx to be included">
<Tooltip title="Delay between submission time and inclusion time">
<InfoIcon />
</Tooltip>
</Box>
Expand All @@ -216,7 +216,7 @@ const Transaction: FC = () => {
<Grid container spacing={1}>
<Grid>
<Typography variant="body1" className={`tx-status status-${transaction.TxStatus.replace(/\s+/g, "-")}`}>
{transaction.TxStatus === 'Not included' ? 'INCLUSION TIMEOUT EXPIRED' : transaction.TxStatus.toUpperCase()}
{transaction.TxStatus === 'Not included' ? 'INCLUSION TIMEOUT EXPIRED' : transaction.TxStatus.toUpperCase()}
</Typography>
</Grid>
{transaction.TxStatus === 'Not included' && (
Expand All @@ -225,14 +225,14 @@ const Transaction: FC = () => {
(Please check for inclusion directly on the Gnosis Explorer)
</Typography>
</Grid>
<Grid>
<Link target="_blank" href={`${explorerUrl}/tx/${transaction.UserTxHash}`}>
<LinkIcon color='primary'/>
</Link>
</Grid>
<Grid>
<Link target="_blank" href={`${explorerUrl}/tx/${transaction.UserTxHash}`}>
<LinkIcon color='primary' />
</Link>
</Grid>
</>
)}
</Grid>
</Grid>

<Grid size={{ lg: 12 }} sx={{ display: { xs: 'none', sm: 'none', md: 'none', lg: 'block' }, }}>
<Divider></Divider>
Expand Down
Loading