Skip to content

Commit

Permalink
Add graph alias for rad app connections (#6489)
Browse files Browse the repository at this point in the history
# Description

This PR adds an alias for `rad app graph` that points to `rad app
connections`.

It is a temporary update until we permanently update the command.

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Partially addresses: #6473

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at b5b8f0c</samp>

### Summary
:sparkles::recycle::memo:

<!--
1. :sparkles: This emoji represents the addition of a new feature or
enhancement, and can be used to highlight the main purpose of the pull
request, which is to implement a graphical view of the connections.
2. :recycle: This emoji represents the refactoring or improvement of
existing code, and can be used to indicate the modification of the
`NewCommand` function to add an alias for the existing command.
3. :memo: This emoji represents the addition or update of documentation,
and can be used to indicate the changes to the command help text and the
README file that explain the new alias and feature.
-->
Add "graph" alias for "connections" command in
`pkg/cli/cmd/app/connections/connections.go`. This enables users to view
a graphical representation of the connections for an application.

> _`NewCommand` adds_
> _alias for connections_
> _graph in the spring_

### Walkthrough
* Add an alias "graph" for the "connections" command
([link](https://github.com/radius-project/radius/pull/6489/files?diff=unified&w=0#diff-eb0083d8df9479acb2d5b36bf150aa410e371a26a01619d09c933a73994aa563L27-R31))

---------

Signed-off-by: Aaron Crawfis <[email protected]>
(cherry picked from commit 047da70)
  • Loading branch information
AaronCrawfis authored and sk593 committed Oct 17, 2023
1 parent 9a1a803 commit 4ccb45b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/cli/cmd/app/connections/connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import (
func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
runner := NewRunner(factory)
cmd := &cobra.Command{
Use: "connections",
Short: "Shows the connections for an application.",
Long: `Shows the connections for an application`,
Args: cobra.MaximumNArgs(1),
Use: "connections",
Aliases: []string{"graph"},
Short: "Shows the connections for an application.",
Long: `Shows the connections for an application`,
Args: cobra.MaximumNArgs(1),
Example: `
# Show connections for current application
rad app connections
Expand Down

0 comments on commit 4ccb45b

Please sign in to comment.