Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
fix ci
  • Loading branch information
xxhZs committed May 14, 2024
1 parent 7024aac commit 1adee44
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
4 changes: 3 additions & 1 deletion dashboard/components/Relations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ export function Relations<R extends Relation>(
{r.columns && r.columns.length > 0 && (
<Td overflowWrap="normal">
{r.columns
.filter((col) => ("isHidden" in col ? !col.isHidden : true))
.filter((col) =>
"isHidden" in col ? !col.isHidden : true
)
.map((col) => extractColumnInfo(col))
.join(", ")}
</Td>
Expand Down
4 changes: 1 addition & 3 deletions dashboard/lib/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ export const PREDEFINED_API_ENDPOINTS = [
]

export const DEFAULT_API_ENDPOINT: string =
process.env.NODE_ENV === "production"
? PROD_API_ENDPOINT
: MOCK_API_ENDPOINT; // EXTERNAL_META_NODE_API_ENDPOINT to debug with RisingWave servers
process.env.NODE_ENV === "production" ? PROD_API_ENDPOINT : MOCK_API_ENDPOINT // EXTERNAL_META_NODE_API_ENDPOINT to debug with RisingWave servers

export const API_ENDPOINT_KEY = "risingwave.dashboard.api.endpoint"

Expand Down
13 changes: 7 additions & 6 deletions dashboard/lib/api/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import {
Schema,
Sink,
Source,
Subscription,
Table,
View,
Subscription,
} from "../../proto/gen/catalog"
import {
ListObjectDependenciesResponse_ObjectDependencies as ObjectDependencies,
Expand Down Expand Up @@ -67,10 +67,9 @@ export function relationType(x: Relation) {
return "SINK"
} else if ((x as Source).info !== undefined) {
return "SOURCE"
} else if ((x as Subscription).dependentTableId !== undefined) {
} else if ((x as Subscription).dependentTableId !== undefined) {
return "SUBSCRIPTION"
}
else {
} else {
return "UNKNOWN"
}
}
Expand Down Expand Up @@ -103,7 +102,7 @@ export async function getRelations() {
await getIndexes(),
await getSinks(),
await getSources(),
await getSubscriptions(),
await getSubscriptions()
)
relations = sortBy(relations, (x) => x.id)
return relations
Expand Down Expand Up @@ -156,7 +155,9 @@ export async function getViews() {
}

export async function getSubscriptions() {
let subscriptions: Subscription[] = (await api.get("/subscriptions")).map(Subscription.fromJSON)
let subscriptions: Subscription[] = (await api.get("/subscriptions")).map(
Subscription.fromJSON
)
subscriptions = sortBy(subscriptions, (x) => x.id)
return subscriptions
}
Expand Down
35 changes: 17 additions & 18 deletions dashboard/pages/subscriptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@
*
*/

import { Column, Relations} from "../components/Relations"
import { Column, Relations } from "../components/Relations"
import { getSubscriptions } from "../lib/api/streaming"
import {
Subscription as RwSubscription
} from "../proto/gen/catalog"
import { Subscription as RwSubscription } from "../proto/gen/catalog"

export default function Subscriptions() {
const subscriptionRetentionSeconds: Column<RwSubscription> = {
name: "Retention Seconds",
width: 3,
content: (r) => r.retentionSeconds ?? "unknown",
}
const subscriptionRetentionSeconds: Column<RwSubscription> = {
name: "Retention Seconds",
width: 3,
content: (r) => r.retentionSeconds ?? "unknown",
}

const subscriptionDependentTableId: Column<RwSubscription> = {
name: "Dependent Table Id",
width: 3,
content: (r) => r.dependentTableId ?? "unknown",
}
return Relations("Subscriptions", getSubscriptions, [
subscriptionRetentionSeconds,
subscriptionDependentTableId,])
}
const subscriptionDependentTableId: Column<RwSubscription> = {
name: "Dependent Table Id",
width: 3,
content: (r) => r.dependentTableId ?? "unknown",
}
return Relations("Subscriptions", getSubscriptions, [
subscriptionRetentionSeconds,
subscriptionDependentTableId,
])
}
2 changes: 1 addition & 1 deletion src/meta/src/controller/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ impl CatalogController {
}
}));

let subscription_dependencies: Vec<(SubscriptionId, TableId)> = Sink::find()
let subscription_dependencies: Vec<(SubscriptionId, TableId)> = Subscription::find()
.select_only()
.columns([
subscription::Column::SubscriptionId,
Expand Down

0 comments on commit 1adee44

Please sign in to comment.