diff --git a/web/vtadmin/src/api/http.ts b/web/vtadmin/src/api/http.ts index 030455c652d..c23ad131332 100644 --- a/web/vtadmin/src/api/http.ts +++ b/web/vtadmin/src/api/http.ts @@ -421,6 +421,20 @@ export const fetchVSchema = async ({ clusterID, keyspace }: FetchVSchemaParams) return pb.VSchema.create(result); }; +export interface FetchTransactionsParams { + clusterID: string; + keyspace: string; +} + +export const fetchTransactions = async ({ clusterID, keyspace }: FetchTransactionsParams) => { + const { result } = await vtfetch(`/api/transactions/${clusterID}/${keyspace}`); + + const err = vtctldata.GetUnresolvedTransactionsResponse.verify(result); + if (err) throw Error(err); + + return vtctldata.GetUnresolvedTransactionsResponse.create(result); +}; + export const fetchWorkflows = async () => { const { result } = await vtfetch(`/api/workflows`); diff --git a/web/vtadmin/src/components/App.tsx b/web/vtadmin/src/components/App.tsx index f7821f3a4ad..bbf6f014111 100644 --- a/web/vtadmin/src/components/App.tsx +++ b/web/vtadmin/src/components/App.tsx @@ -40,6 +40,7 @@ import { isReadOnlyMode } from '../util/env'; import { CreateKeyspace } from './routes/createKeyspace/CreateKeyspace'; import { Topology } from './routes/topology/Topology'; import { ClusterTopology } from './routes/topology/ClusterTopology'; +import { Transactions } from './routes/Transactions'; export const App = () => { return ( @@ -117,6 +118,10 @@ export const App = () => { + + + + diff --git a/web/vtadmin/src/components/NavRail.tsx b/web/vtadmin/src/components/NavRail.tsx index e2897395760..9f9e1bf1681 100644 --- a/web/vtadmin/src/components/NavRail.tsx +++ b/web/vtadmin/src/components/NavRail.tsx @@ -65,6 +65,9 @@ export const NavRail = () => {