diff --git a/dashboard/components/Relations.tsx b/dashboard/components/Relations.tsx index e8bbc17a172aa..67feb2ac81cad 100644 --- a/dashboard/components/Relations.tsx +++ b/dashboard/components/Relations.tsx @@ -35,7 +35,7 @@ import Title from "../components/Title" import useFetch from "../lib/api/fetch" import { Relation, - StreamingJob, + StreamingRelation, getDatabases, getSchemas, getUsers, @@ -73,7 +73,7 @@ export const dependentsColumn: Column = { ), } -export const fragmentsColumn: Column = { +export const fragmentsColumn: Column = { name: "Fragments", width: 1, content: (r) => ( diff --git a/dashboard/lib/api/streaming.ts b/dashboard/lib/api/streaming.ts index b1560b957bdf3..2594aa10ea1c4 100644 --- a/dashboard/lib/api/streaming.ts +++ b/dashboard/lib/api/streaming.ts @@ -68,7 +68,7 @@ export interface Relation { databaseName?: string } -export class StreamingJobInfo { +export class StreamingJob { jobId!: number objType!: string name!: string @@ -101,7 +101,7 @@ export class StreamingJobInfo { } } -export interface StreamingJob extends Relation { +export interface StreamingRelation extends Relation { dependentRelations: number[] } @@ -124,14 +124,14 @@ export function relationTypeTitleCase(x: Relation) { return _.startCase(_.toLower(relationType(x))) } -export function relationIsStreamingJob(x: Relation): x is StreamingJob { +export function relationIsStreamingJob(x: Relation): x is StreamingRelation { const type = relationType(x) return type !== "UNKNOWN" && type !== "SOURCE" && type !== "INTERNAL" } export async function getStreamingJobs() { let jobs = plainToInstance( - StreamingJobInfo, + StreamingJob, (await api.get("/streaming_jobs")) as any[] ) jobs = sortBy(jobs, (x) => x.jobId)