-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dashboard] Add Replicas to Serve Dashboard UI (#33503)
adds replica rows to the Deployments table in Serve Applications details page Updates the deployments table to support two row types. (Column names adjusted). Adds a replica detail page Adds serve button to the Main nav bar at the top Updates the frontend models for /serve_head/applications after some backwards-incompatible changes. Wrote tests
- Loading branch information
Showing
23 changed files
with
800 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Link } from "@material-ui/core"; | ||
import React, { PropsWithChildren } from "react"; | ||
import { Link as RouterLink } from "react-router-dom"; | ||
import { ClassNameProps } from "./props"; | ||
|
||
type ActorLinkProps = PropsWithChildren< | ||
{ | ||
actorId: string; | ||
/** | ||
* This can be provided to override where we link to. | ||
*/ | ||
to?: string; | ||
} & ClassNameProps | ||
>; | ||
|
||
export const generateActorLink = (actorId: string) => `/actors/${actorId}`; | ||
|
||
/** | ||
* A link to the top-level actors detail page. | ||
*/ | ||
export const ActorLink = ({ | ||
actorId, | ||
to, | ||
children, | ||
className, | ||
}: ActorLinkProps) => { | ||
return ( | ||
<Link | ||
className={className} | ||
component={RouterLink} | ||
to={to ?? generateActorLink(actorId)} | ||
> | ||
{children ?? actorId} | ||
</Link> | ||
); | ||
}; | ||
|
||
type NodeLinkProps = PropsWithChildren< | ||
{ | ||
nodeId: string; | ||
/** | ||
* This can be provided to override where we link to. | ||
*/ | ||
to?: string; | ||
} & ClassNameProps | ||
>; | ||
|
||
export const generateNodeLink = (nodeId: string) => `/cluster/nodes/${nodeId}`; | ||
|
||
/** | ||
* A link to the top-level Cluster node detail page. | ||
*/ | ||
export const NodeLink = ({ | ||
nodeId, | ||
to, | ||
children, | ||
className, | ||
}: NodeLinkProps) => { | ||
return ( | ||
<Link | ||
className={className} | ||
component={RouterLink} | ||
to={to ?? generateNodeLink(nodeId)} | ||
> | ||
{children ?? nodeId} | ||
</Link> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.