Conversation
0b7fcc7 to
fb61806
Compare
Rename settings_acme_servers translation keys to reflect ACME settings terminology, add challenge type and restart message keys, and add certificates/obsolete_tooltip keys for TLS certificates.
| /> | ||
| </cv-data-table-cell> | ||
| <cv-data-table-cell> | ||
| <div class="justify-flex-end"> |
There was a problem hiding this comment.
We can use class="flex justify-end", these class already exist here https://github.com/NethServer/ns8-core/blob/main/core/ui/src/styles/_utils.scss
| :noDefaultToFirst="true" | ||
| @tab-selected="tabSelected" | ||
| > | ||
| <cv-tab |
There was a problem hiding this comment.
This file has become very big (~1500 loc), maybe we can try to externalize two components, e.g. TlsCertficatesPanel and AcmeSettingsPanel
There was a problem hiding this comment.
Done. SettingsTlsCertificates.vue is down to 289 lines: page chrome, tab state, and the list-installed-modules chain whose Traefik instance list both tabs consume. The certificates tab moved to TlsCertificatesPanel.vue, and AcmeSettings.vue is now AcmeSettingsPanel.vue for symmetry.
Two notes on the wiring:
- The node filter is bound to a query param, and
watchQueryDatais bound to the view instance inbeforeRouteEnter, so the view still ownsselectedNodeIdand passes it down with.sync. - The panel now runs
listCertificates()from a watcher ontraefikInstancesinstead of being called at the end oflistInstalledModulesCompleted, same triggerAcmeSettingsPanelalready used.
I also dropped the selectedNodeLabel computed while moving the code; it was defined and never referenced, already dead on main.
Tested on a live single-node cluster: both tabs, filters, query params, the upload modal and its error mapping, the tooltips, and the ACME edit modal.
Follow review feedback: the search box label repeated the table title, and the restart notice did not say the page comes back on its own.
styles/_utils.scss is imported globally, so the local justify-flex-end rule duplicated flex and justify-end. Removing it empties the style block.
The view had grown past 1500 lines. Move the certificates tab into TlsCertificatesPanel and rename AcmeSettings to AcmeSettingsPanel, leaving the view with the page chrome, the tab state and the shared Traefik instance list it feeds to both panels. The node filter stays bound to a query param, so the view owns it and passes it down with .sync. Drop the selectedNodeLabel computed, which was never referenced. Also narrow the tooltip cursor rule: carbon already sets a pointer on the tooltip trigger, only .bx--tag overrides it.
Drop comments the code already states and shorten the ones worth keeping.
Description
The TLS certificates page had a separate
ACME serverspage reachable through a top-right button, and the ACME challenge type — already accepted byset-acme-server— was exposed nowhere, soTLS-ALPN-01(needed when port 80 is unavailable) required editingtraefik.yamlby hand.This PR merges the two pages into two tabs,
CertificatesandACME settings, and exposes the challenge type as a tag per node plus a required radio group in the edit modal. Options come from a singleACME_CHALLENGE_TYPESarray, soDNS-01is one entry plus one translation key away; it is left out here because it needs extra fields. The ACME table columns becomeNode,ACME directory URL,Challenge type, which also fixes the previous wrong order, and/settings/acme-serversredirects to/settings/tls-certificates?view=acme.Settings remain per node. No backend change:
set-acme-serveralready validateschallengeandget-acme-serveralready returns it.Surviving the Traefik restart
set-acme-serverrestarts Traefik, which serves the admin UI and its websocket, so the completion event carrying the table refresh is lost: stale values and skeleton rows until a manual reload. The Certificates tab has the same problem throughcert_helpers.purge_acme_json_and_restart_traefik. Both tabs now watch the VuexisWebsocketConnectedflag and reload on reconnection; counters are clamped and ACME rows keyed by Traefik instance, so a late event cannot unbalance a counter or duplicate a row. TheReload requiredwarning is gone, and the restart warning is no longer gated on the leader node — the restart happens on whichever node is edited. Mechanism borrowed from #1258, which fixes the same thing on HTTP routes; a shared mixin is the follow-up once both land.Design
Mockups: Figma, design issue NethServer/dev#7973.
Refs: NethServer/dev#8099