feat(manager): link to Management API Documentation next to the Management API Endpoint (#1486)

* wip

* style tweak
This commit is contained in:
Daniel LaCosse 2024-01-29 17:32:11 -05:00 committed by GitHub
parent 4e383f5501
commit 33de2a98c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 0 deletions

View file

@ -144,6 +144,7 @@
"gcp-type-outline-server": "Type 'outline-server' in the 'Name' field.",
"key": "Key {keyId}",
"manager-resources": "Manager Resources",
"management-api-documentation": "Server Management API Documentation",
"manual-server-assign-firewall": "Assign firewall rule",
"manual-server-assign-group": "Assign Security Group",
"manual-server-create-firewall": "Create a firewall rule",

View file

@ -718,6 +718,10 @@
"message": "Manager Resources",
"description": "This string appears within the manager sidebar as a link to the manager documentation."
},
"management_api_documentation": {
"message": "Server Management API Documentation",
"description": "This string appears next to the management API url, pointing to the API documentation."
},
"manual_server_assign_firewall": {
"message": "Assign firewall rule",
"description": "This string appears in the server setup view as a sub-header of a section that provides instructions to configure the server's firewall."

View file

@ -119,6 +119,14 @@ Polymer({
margin-top: 0px;
font-size: 12px;
}
.management-api-documentation-link {
align-items: center;
color: var(--primary-green);
display: flex;
gap: 0.25rem;
margin-bottom: 1rem;
margin-top: -1rem;
}
paper-input:not([readonly]) {
width: 60%;
}
@ -253,6 +261,15 @@ Polymer({
always-float-label=""
maxlength="100"
></paper-input>
<if-messages message-ids="management-api-documentation" localize="[[localize]]">
<a
class="management-api-documentation-link"
href="https://github.com/Jigsaw-Code/outline-server/tree/master/src/shadowbox#access-keys-management-api"
>
<span>[[localize('management-api-documentation')]]</span>
<iron-icon icon="open-in-new" />
</a>
</if-messages>
<paper-input
readonly=""
value="[[_formatDate(language, serverCreationDate)]]"