-
Notifications
You must be signed in to change notification settings - Fork 717
Custom URLs improvements #8743
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
Custom URLs improvements #8743
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,4 +30,24 @@ public sealed class ResourceUrlAnnotation : IResourceAnnotation | |
| /// The display order the URL. Higher values mean sort higher in the list. | ||
| /// </summary> | ||
| public int? DisplayOrder; | ||
|
|
||
| /// <summary> | ||
| /// Whether this URL should be shown on the dashboard resources page. Defaults to <see langword="true"/>. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Set this to <see langword="false"/> to only show this URL in the resource details grid. | ||
| /// </remarks> | ||
| public bool ShowOnResourcesPage { get; set; } = true; | ||
|
|
||
| internal ResourceUrlAnnotation WithEndpoint(EndpointReference endpoint) | ||
| { | ||
| return new() | ||
| { | ||
| Url = Url, | ||
| DisplayText = DisplayText, | ||
| Endpoint = endpoint, | ||
| DisplayOrder = DisplayOrder, | ||
| ShowOnResourcesPage = ShowOnResourcesPage | ||
| }; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added to support the new overload of |
||
| } | ||
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.
Thoughts on the property name? This maps to the
IsInternalproperty on the URL snapshot and resource server APIs but that name is pretty terrible so trying to make it more descriptive here.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.
make it an enum?
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.
Ha I actually started that way, a flags enum.
Uh oh!
There was an error while loading. Please reload this page.
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.
Actually not flags as the resource snapshots, dashboard, and resource server protocol currently only support the boolean state (
IsInternal). So perhaps something like the following, although I admit I don't love it: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.
Flags
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.
And modify the protocol?
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.
Maybe flags is wrong anyways because alll combinations aren’t valid so the above is fine?