Files
OpenVPN-Monitoring-Simple/DOCS/Changes/2026-10-04_Profile_Modal_Polish_PLAN.md
ayurishchevandClaude Sonnet 5.5 d251ec73d0 Certificates: profile modal with notes, note tooltip; async PKI init
- Profiler: UserProfile.note (nullable, startup migration), PUT
  /profiles/{id}/note (max 1000 chars); add missing `requests`
  dependency (client creation failed without Public IP set).
- UI: clickable rows on Certificates open a compact profile details
  modal with an editable note; tooltip with the note on the client
  name (v-note-tooltip) and a note icon.
- PKI init runs in a background thread: POST /system/init returns 202,
  GET /system/init/status, 409 for a second start, Clear PKI and client
  creation are blocked while it runs. A marker file identifies an
  interrupted run (only such a PKI is wiped on the next Init).
- PKI Configuration page: state from the server, progress spinner and
  step text, polling, Init/Clear/Save locked while running, Init locked
  once initialized.
- Tests: one pytest each for notes and async init (requirements-dev.txt).
- Docs: plans and summaries in DOCS/Changes, API reference, README, Index.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 20:56:36 +03:00

2.6 KiB

Compact profile modal and note tooltip: implementation plan (2026-10-04)

Goal: (1) make the profile details modal compact with a balanced layout, (2) show the profile note in a tooltip when hovering over the client name in the Certificates list. UI only; no API or DB changes.

Steps

1. Compact modal (APP_UI/src/components/ProfileDetailsModal.vue)

  • Remove modal-lg: use the default Bootstrap width (500 px) and modal-dialog-centered; on phones it stays full width minus margins.
  • Layout of the details block: a compact two-column "label : value" list (fixed narrow label column, value left-aligned right next to it) instead of two wide columns. Rows: Status, Created, Expires (with days remaining next to the date, e.g. 2027-01-10 (98 d)), Revoked (only if set), File.
  • Header: client name as the title with the status badge next to it; the separate "Client Name" and "Status" rows are removed.
  • File path: single line, text-break, small muted font.
  • Note: textarea with 3 rows, counter under it on the right; Save / Close buttons stay in the footer.
  • Dates: one short format (YYYY-MM-DD HH:mm) instead of locale date plus time.

2. Note tooltip (APP_UI/src/views/Certificates.vue)

  • Hovering the username cell (both active and expired/revoked rows) shows a tooltip with the note text. No note: no tooltip.
  • Implementation: Bootstrap Tooltip (already a dependency) via a small directive v-note-tooltip="cert.note" in APP_UI/src/directives/ (create on mount, update the text when the note changes after saving, dispose on unmount). Options: placement: 'top', container: 'body', html: false (note is plain text, so no XSS), long text wrapped to a max width of about 320 px, line breaks preserved.
  • Small note marker (fa-note-sticky icon, muted) next to the username when a note exists, so it is visible which clients have a note.
  • Styles in assets/main.css: tooltip max width, white-space: pre-wrap, dark theme colours via existing variables.

3. Verification (containers, no new tests)

  • No new automated tests (UI only, no UI test infrastructure).
  • Rebuild app-ui in the existing stand (ovpmon-test, port 8089) and check manually: modal width and layout in light and dark themes and on a narrow window; tooltip on active and revoked rows; tooltip text updates right after saving a note; no tooltip for clients without a note; long and multi-line notes.

4. Documentation

  • Summary appended to DOCS/Changes/2026-10-04_Profile_Notes.md; one line in the README.md changes table.

Out of scope

Showing the note as a table column, editing the note from the list, API changes.