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

[vtadmin-web] Add routes and simple tables for all entities #7440

Merged

Conversation

doeg
Copy link
Contributor

@doeg doeg commented Feb 3, 2021

Signed-off-by: Sara Bee [email protected]

Description

✨ Staged at http://vtadmin.puppy.software

Adds routes and (very ugly) simple tables for all of the entity routes (clusters, gates, keyspaces, schemas, and tablets). Most of these don't look very interesting yet.

⚠️ This branch does not explicitly depend on #7432, in order to keep the diff clean. However! The TypeScript types are generated from that branch's vtadmin.proto file, and deploying this branch to a vtadmin-web instance requires #7432 's vtadmin-api + vtctld binaries.

Screen Shot 2021-02-03 at 12 57 45 PM

Screen Shot 2021-02-03 at 12 57 48 PM

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

See above.

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

@doeg doeg requested a review from ajm188 February 3, 2021 18:01
Copy link
Contributor

@ajm188 ajm188 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I continue to love vtadmin.puppy.software 😍

const res = await vtfetch(endpoint);
// vtfetchEntities is a helper function for querying vtadmin-api endpoints
// that return a list of protobuf entities.
export const vtfetchEntities = async <T>(opts: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot!

export interface TableDefinition {
cluster?: pb.Schema['cluster'];
keyspace?: pb.Schema['keyspace'];
// The [0] index is a typescript quirk to infer the type of
Copy link
Contributor

@ajm188 ajm188 Feb 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! (thank you for commenting!)

@rohit-nayak-ps rohit-nayak-ps merged commit 4689c0f into vitessio:master Feb 4, 2021
@askdba askdba added the Component: VTAdmin VTadmin interface label Feb 8, 2021
@askdba askdba added this to the v10.0 milestone Feb 8, 2021
@doeg doeg deleted the sarabee-vtadmin-web-hooks branch November 1, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: VTAdmin VTadmin interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants