Repository navigation
Conversation
docs-vars.js marks ALB_NAME for a signed-in reader, using the list from GET /api/website/projects/:projectId/albs (cloud-portal#1787). The list is fetched after session-status, so the other tokens don't wait for it. - One load balancer: filled in, like your-project-id. - Several: the hover card lists them with nothing picked, and both copy buttons stay disabled until the reader picks one. The pick applies to every ALB_NAME on the page. - A truncated list (500 cap) says so. No load balancers or a failed request leaves ALB_NAME as a plain placeholder. The create section of alb/operations/overview.mdx now uses NEW_ALB_NAME, which is never marked, since it names a load balancer that doesn't exist yet. README Placeholders documents both. Closes #116
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
The picked option in the ALB_NAME card gets a check mark and a heavier border, so it stands out in light mode too. The mark has empty alt text, since aria-pressed already tells screen readers.
|
|
This branch was successfully deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Marks
ALB_NAMEfor a signed-in reader, likeyour-project-id. Hovering it shows the reader's load balancers in their current project, so they can copy a name or the whole code block filled in.The list comes from
GET /api/website/projects/:projectId/albs(datum-cloud/cloud-portal#1787). It's a separate request made aftersession-status, so the other tokens are marked without waiting for it.Closes #116
Changes
docs-vars.jsALB_NAMEadded toTOKEN_PATTERN.NEW_ALB_NAMEand${ALB_NAME}don't match.datumctl alb delete ALB_NAME --yesnever gets a default. The pick applies to everyALB_NAMEon the page.ALB_NAMEstays a plain placeholder. Names are checked againstNAME_PATTERN.data-valueon each span, so a pick updates every span at once.style.css: picker list (scrolls past about 220px), picked state, disabled copy buttons. Both files are now Prettier-formatted, which accounts for most of the diff.alb/operations/overview.mdx: the create command, its "Replace the following" entry, and the--display-namerow useNEW_ALB_NAME. That load balancer doesn't exist yet, so filling it with an existing one would be wrong. OtherALB_NAMEuses (describe, logs, delete, auth, MetricsQLgateway_name) refer to an existing load balancer and stay.README.md: Placeholders gets anALB_NAMErow and a rule forNEW_ALB_NAME.gateway_namein the metrics is the HTTPProxy name. The portal queries it the same way (app/features/edge/proxy/metrics/queries.tsin cloud-portal).Test plan
node --check docs-vars.jsALB_NAMEunmarked,your-project-idstill marked, nothing loggeddatumctl alb delete web --yes --project my-proj.NEW_ALB_NAMEis not marked. Inline code that is only the token gets no "Copy code" buttonPROJECT_IDcard leavesALB_NAMEas written. After a pick, the MetricsQL block copies with the picked name and the truncated note showsmainwebsite.staging.env.datum.netagainst a staging portal that includes cloud-portal#1787: one ALB, several ALBs, none, signed outA 401/403/404 from the ALB route still shows as a failed request in the browser console. JavaScript can't suppress that. There are no script errors.