Skip to content

Commit

Permalink
UI improvement For Harp (#1036)
Browse files Browse the repository at this point in the history
Removes dynamic rendering forcing in a lot of places, adds some logs to
grpc backend
  • Loading branch information
Amogh-Bharadwaj authored Jan 9, 2024
1 parent 2a215a9 commit 9b04215
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 13 deletions.
3 changes: 3 additions & 0 deletions flow/cmd/mirror_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func (h *FlowRequestHandler) MirrorStatus(
ctx context.Context,
req *protos.MirrorStatusRequest,
) (*protos.MirrorStatusResponse, error) {
slog.Info("Mirror status endpoint called", slog.String(string(shared.FlowNameKey), req.FlowJobName))
cdcFlow, err := h.isCDCFlow(ctx, req.FlowJobName)
if err != nil {
return &protos.MirrorStatusResponse{
Expand Down Expand Up @@ -73,6 +74,7 @@ func (h *FlowRequestHandler) CDCFlowStatus(
ctx context.Context,
req *protos.MirrorStatusRequest,
) (*protos.CDCMirrorStatus, error) {
slog.Info("CDC mirror status endpoint called", slog.String(string(shared.FlowNameKey), req.FlowJobName))
config, err := h.getFlowConfigFromCatalog(req.FlowJobName)
if err != nil {
return nil, err
Expand Down Expand Up @@ -172,6 +174,7 @@ func (h *FlowRequestHandler) QRepFlowStatus(
ctx context.Context,
req *protos.MirrorStatusRequest,
) (*protos.QRepMirrorStatus, error) {
slog.Info("QRep Flow status endpoint called", slog.String(string(shared.FlowNameKey), req.FlowJobName))
partitionStatuses, err := h.getPartitionStatuses(ctx, req.FlowJobName)
if err != nil {
slog.Error(fmt.Sprintf("unable to query qrep partition - %s: %s", req.FlowJobName, err.Error()))
Expand Down
2 changes: 0 additions & 2 deletions ui/app/api/alert-config/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { alertConfigType } from '@/app/alert-config/validation';
import prisma from '@/app/utils/prisma';

export const dynamic = 'force-dynamic';

export async function GET() {
const configs = await prisma.alerting_config.findMany();
const serializedConfigs = configs.map((config) => ({
Expand Down
2 changes: 0 additions & 2 deletions ui/app/api/mirrors/alerts/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import prisma from '@/app/utils/prisma';

export const dynamic = 'force-dynamic';

export async function POST(request: Request) {
const { flowName } = await request.json();
const errCount = await prisma.flow_errors.count({
Expand Down
2 changes: 0 additions & 2 deletions ui/app/mirrors/edit/[mirrorId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { CDCMirror } from './cdc';
import NoMirror from './nomirror';
import SyncStatus from './syncStatus';

export const dynamic = 'force-dynamic';

type EditMirrorProps = {
params: { mirrorId: string };
};
Expand Down
2 changes: 0 additions & 2 deletions ui/app/mirrors/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import useSWR from 'swr';
import { fetcher } from '../utils/swr';
import { CDCFlows, QRepFlows } from './tables';

export const dynamic = 'force-dynamic';

export default function Mirrors() {
const {
data: flows,
Expand Down
2 changes: 0 additions & 2 deletions ui/app/mirrors/status/qrep/[mirrorId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import QRepConfigViewer from './qrepConfigViewer';
import QrepGraph from './qrepGraph';
import QRepStatusTable, { QRepPartitionStatus } from './qrepStatusTable';

export const dynamic = 'force-dynamic';

type QRepMirrorStatusProps = {
params: { mirrorId: string };
};
Expand Down
2 changes: 0 additions & 2 deletions ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { Icon } from '@/lib/Icon';
import { Label } from '@/lib/Label';
import { ProgressCircle } from '@/lib/ProgressCircle';

export const dynamic = 'force-dynamic';

type QRepConfigViewerProps = {
mirrorId: string;
};
Expand Down
1 change: 0 additions & 1 deletion ui/app/peers/[peerName]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { GetFlowHttpAddressFromEnv } from '@/rpc/http';
import Link from 'next/link';
import SlotTable from './slottable';
import StatTable from './stattable';
export const dynamic = 'force-dynamic';

type DataConfigProps = {
params: { peerName: string };
Expand Down

0 comments on commit 9b04215

Please sign in to comment.