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

add list mirrors page #512

Merged
merged 3 commits into from
Oct 15, 2023
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
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ services:
environment:
<<: *catalog-config
PEERDB_FLOW_SERVER_ADDRESS: flow_api:8112
DATABASE_URL: postgres://postgres:postgres@catalog:5432/postgres
PEERDB_FLOW_SERVER_HTTP: http://flow_api:8113

volumes:
pgdata:
Expand Down
31 changes: 31 additions & 0 deletions nexus/catalog/migrations/V9__mirror_stats_rels.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- For the cdc_batches, set batch_id as the primary key
ALTER TABLE peerdb_stats.cdc_batches
ADD CONSTRAINT pk_cdc_batches PRIMARY KEY (batch_id);

-- add incrementing id column to cdc_batch_table, make this the primary key
ALTER TABLE peerdb_stats.cdc_batch_table
ADD COLUMN id SERIAL PRIMARY KEY;

-- For the qrep_runs table, set run_uuid as the primary key
ALTER TABLE peerdb_stats.qrep_runs
ADD CONSTRAINT pk_qrep_runs PRIMARY KEY (run_uuid);

-- For the qrep_partitions table, set partition_uuid as the primary key
ALTER TABLE peerdb_stats.qrep_partitions
ADD CONSTRAINT pk_qrep_partitions PRIMARY KEY (partition_uuid);


-- Foreign key for flow_name in cdc_batches
ALTER TABLE peerdb_stats.cdc_batches
ADD CONSTRAINT fk_cdc_batches_flow_name
FOREIGN KEY (flow_name) REFERENCES peerdb_stats.cdc_flows(flow_name) ON DELETE CASCADE;

-- Composite foreign key for flow_name and batch_id in cdc_batch_table
ALTER TABLE peerdb_stats.cdc_batch_table
ADD CONSTRAINT fk_cdc_batch_table_flow_batch
FOREIGN KEY (batch_id) REFERENCES peerdb_stats.cdc_batches(batch_id) ON DELETE CASCADE;

-- Foreign key for run_uuid in qrep_partitions
ALTER TABLE peerdb_stats.qrep_partitions
ADD CONSTRAINT fk_qrep_partitions_run_uuid
FOREIGN KEY (run_uuid) REFERENCES peerdb_stats.qrep_runs(run_uuid) ON DELETE CASCADE;
3 changes: 3 additions & 0 deletions stacks/peerdb-ui.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY ui/ ./

# Prisma
RUN yarn prisma generate

ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn build

Expand Down
7 changes: 0 additions & 7 deletions ui/app/dashboard/layout.tsx

This file was deleted.

195 changes: 0 additions & 195 deletions ui/app/dashboard/page.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion ui/app/mirrors/edit/[mirrorId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import { MirrorStatusResponse } from '@/grpc_generated/route';
import { Header } from '@/lib/Header';
import { LayoutMain } from '@/lib/Layout';
import { ProgressCircle } from '@/lib/ProgressCircle';
import useSWR from 'swr';
Expand Down Expand Up @@ -49,7 +50,7 @@ export default function EditMirror({ params: { mirrorId } }: EditMirrorProps) {

return (
<LayoutMain alignSelf='flex-start' justifySelf='flex-start' width='full'>
<h1>{mirrorStatus.flowJobName}</h1>
<Header variant='title2'>{mirrorId}</Header>
{mirrorStatus.cdcStatus && <CDCMirror cdc={mirrorStatus.cdcStatus} />}
</LayoutMain>
);
Expand Down
Loading