-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add a link text label to the ClusterAlert resource #45972
Merged
Merged
Conversation
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 label allows to customize text on a button that contains the alert link.
bl-nero
added
no-changelog
Indicates that a PR does not require a changelog entry
backport/branch/v16
labels
Aug 28, 2024
fspmarshall
approved these changes
Aug 28, 2024
zmb3
reviewed
Aug 28, 2024
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
zmb3
reviewed
Aug 29, 2024
api/types/cluster_alert.go
Outdated
u, err := url.Parse(val) | ||
if err != nil { | ||
return trace.BadParameter("invalid alert: label link %q is not a valid URL", val) | ||
} | ||
if u.Hostname() != validLinkDestination { | ||
return trace.BadParameter("invalid alert: label link not allowed %q", val) | ||
} | ||
case AlertLinkCTA: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
case AlertLinkCTA: | |
case AlertLinkText: |
bl-nero
changed the title
Add a CTA label to the ClusterAlert resource
Add a link text label to the ClusterAlert resource
Sep 2, 2024
@zmb3 I renamed the entire CTA concept per your suggestion in the UI PR. |
zmb3
approved these changes
Sep 3, 2024
public-teleport-github-review-bot
bot
removed the request for review
from rudream
September 3, 2024 15:25
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Sep 4, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 4, 2024
* Add an alert CTA label This label allows to customize text on a button that contains the alert link. * Comment * Update api/types/cluster_alert.go Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> * Rename CTA to "link text" --------- Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This label allows to customize text on a button that contains the alert link.
Background: the newly designed banner alert UX changes the way we render links in cluster alerts. Instead of making the entire message a link, we display the message as regular text, and add an action button that opens a link. This means we need a text for that action button, and it's going to be different for different types of actions.
Since we already use labels for the link URL itself, we introduce another one for the call-to-action text.
This PR will be backported, even though the UI itself is specific to v17, since the alerts may be generated in a version prior to the one that displays them.
Tested manually (together with the UI):
tctl alerts create
.Follow-up UI PR: #45973.
Follow-up Enterprise PR: https://github.com/gravitational/teleport.e/pull/4951
Contributes to #44595.