Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ IMPORTANT NOTE: This version only works on CACTI 1.x++!

* dev: Pin the CI database image and shared test dependencies, disable persisted checkout credentials, and limit workflow permissions and runtime

--- 2.0.1 ---

* issue#322: Refresh the bundled manual with current installation, upgrade, editor, image management and troubleshooting guides; retain the configuration and data-source references and repair documentation links
* issue#322: Update editor and map-management screenshots, including map creation, management, the viewer, hover graphs and Advanced settings; use compact previews with full-size links and refresh cached documentation assets
* feature#322: Add themed Docs access from the map heading and a Docs button after Rebuild All in map management, opening the bundled manual in a new tab

--- 2.0 ---

* security: Add a version-safe CSP nonce (`plugin_weathermap_csp_nonce()`) to every inline `<script>` tag so pages stay compatible with Cacti's Content-Security-Policy nonce enforcement, while falling back cleanly on older Cacti releases that lack the `CactiSecureHeaders` class
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ Version 2.0 adds a redesigned map editor, editable notes, curved link comments,
traffic colour presets, optional high-load link pulsing, separate icon and
background libraries, sharper hover graphs and two-step Undo and Redo.

See [docs/](docs/) for the HTML manual, FAQ and example configurations, and
[the editor workflow guide](docs/editor-workflow.md) for the current node and
link properties controls. Parts of the original HTML manual describe the older
core interface.
See [the 2.0 manual](docs/index.html) for installation, upgrades, editor workflows,
image libraries, troubleshooting and the configuration/data-source reference.
[The editor workflow guide](docs/editor-workflow.md) links to the detailed manual.

See [CHANGELOG.md](CHANGELOG.md) for updates listed by version, and
[COPYING](COPYING) for the license.
Expand Down Expand Up @@ -102,7 +101,8 @@ This fork is maintained separately from that upstream project.

See: http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html

* The manual uses the Kube CSS Framework and ParaType's PT Sans font.
* Historical documentation assets include the Kube CSS Framework and ParaType's
PT Sans font. The current manual uses a self-contained stylesheet and system fonts.

See: http://imperavi.com/kube/
See: http://www.fontsquirrel.com/fonts/PT-Sans
Expand Down
4 changes: 4 additions & 0 deletions css/weathermap.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ body#wm_fullscreen { font-family: sans-serif; margin: 0; border: 0; padding: 0;

.tableHeader .wm-edit-map { color: inherit; }

/* The heading already supplies the active Cacti theme colours. */
.wm-docs-link { float: right; margin-inline-start: 1em; color: inherit !important; }
.wm-docs-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wm-gallery-cards { padding: 12px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.wm-map-card { margin: 0; width: 384px; max-width: 100%; box-sizing: border-box; border: 1px solid var(--border-color, #999); border-radius: 5px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,.12); }

Expand Down
70 changes: 12 additions & 58 deletions docs/editor-workflow.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,15 @@
# Editing nodes and links
# Editing maps in Weathermap 2.0

For an ordinary interface traffic link, use the main controls to choose an
interface, set its maximum bandwidth, change the line width and add IN/OUT
comments. The current interface shows its graph title and interface description,
with the RRD path below it.
The bundled HTML manual is the maintained user guide:

Search by device, interface or description, or choose **Browse all**. Use
**Next results** and **Previous results** to browse further pages without
replacing the current selection. Selecting
an entry does not overwrite the link until you click **Use interface**. This
sets its traffic source, click destination and hover graph together. Click
**Save** to persist the changes or **Cancel** to leave the map unchanged.
**Tidy** adjusts the link route; **Via** lets you place a routing point.
- [Getting started](pages/main.html)
- [Node and link properties, search and placement](pages/editor.html)
- [Additional hover graphs](pages/editor.html#hover)
- [Combining measured traffic sources](pages/editor.html#combining)
- [Map notes](pages/editor.html#notes)
- [Undo and Redo](pages/editor.html#history)
- [Appearance, curved comments and image uploads](pages/appearance.html)
- [Troubleshooting](pages/faq.html)

**Advanced settings** exposes raw targets, custom click destinations, multiple
hover graphs and the existing low-level editor controls. These are useful for
combining sources, nonstandard RRD targets or external graph images.

For a node used as an endpoint label or icon, edit the display name, icon and
position in the main controls. **Move** places it on the map; **Clone** duplicates
it. Advanced settings includes its internal name, custom click destination and
hover graphs, useful for device measurements such as CPU or memory. Choosing a
graph only enables **Add** and **Replace**; it does not apply it automatically.

Delete controls are separate from Save and Cancel. Confirmation identifies the
item by display name and explains what is removed. Deleting a node also removes
its connected map links. Cacti devices and graphs remain.


## Undo and Redo

Use **Undo** and **Redo** at the top right of the editor toolbar to reverse or
reapply the last two saved map changes. Each completed move, placement or saved
dialog counts as one action. Buttons are disabled when no matching action is
available; their tooltips identify the next action. Keyboard shortcuts are
**Ctrl/Cmd+Z** for Undo and **Ctrl/Cmd+Shift+Z** for Redo. Text fields retain their
normal text-editing shortcuts. Save or cancel an open dialog first.

History covers map configuration changes: nodes, connected links, notes, via
points, labels, icons, map properties, colours and raw object configuration.
Undoing a node deletion restores its connected map links too. A new change after
Undo clears Redo. No-op saves and failed saves do not consume a step.

History belongs to the current browser tab, map and authenticated session.
Duplicated tabs start a separate history; reloading the same tab keeps it.
Tab ownership uses Web Locks, with a SharedWorker fallback for HTTP installations.
If neither browser API is available, history stays disabled and normal editing
continues. Changes made elsewhere invalidate it rather than overwriting someone else's
work. Included configuration files and managed images are checked before a
restore, including image references inherited through INCLUDE files. Older
snapshots without a complete image-reference list are discarded safely.
Uploading or deleting library files, deleting map files, Cacti devices,
graphs and personal editor preferences are outside this history.

Snapshots are stored privately outside the web root, not in browser data or
Cacti's concurrently written session rows. They expire after four hours of
inactivity. Storage retains up to eight recently changed maps/tabs and 8 MiB per
session; older histories are discarded when either limit is reached. Temporary
storage must be writable by the PHP service account. No database upgrade is
required.
Use the same guide through the viewer's **Docs** link. It is bundled with the
installed plugin and does not require an external documentation service.
18 changes: 18 additions & 0 deletions docs/example/combined-sources-2.0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
WIDTH 660
HEIGHT 160
KEYPOS -1 -1
TIMEPOS -1 -1
NODE DEFAULT
LABELFONT 3
NODE a
LABEL Core
POSITION 60 80
NODE b
LABEL Access
POSITION 600 80
LINK combined
NODES a b
WIDTH 9
TARGET static:200M:100M static:100M:50M
BANDWIDTH 1G
BWLABEL percent
34 changes: 34 additions & 0 deletions docs/example/curved-comments-2.0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
WIDTH 660
HEIGHT 380
KEYPOS -1 -1
TIMEPOS -1 -1
FONTDEFINE 10 docs/example/Vera.ttf 12
NODE DEFAULT
ICON 8 8 round
LABEL
NODE a
POSITION 60 115
NODE b
POSITION 600 115
NODE c
POSITION 60 300
NODE d
POSITION 600 300
LINK DEFAULT
WIDTH 7
BWLABEL none
VIASTYLE curved
COMMENTFONT 10
COMMENTFONTCOLOR 0 70 180
OUTCOMMENT Uplink connection
COMMENTPOS 25 25
LINK straight
NODES a b
VIA 180 40
VIA 450 85
COMMENTCURVE 0
LINK curved
NODES c d
VIA 180 225
VIA 450 270
COMMENTCURVE 1
40 changes: 40 additions & 0 deletions docs/example/editor-settings-2.0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
WIDTH 660
HEIGHT 300
BACKGROUND docs/example/background.png
SET background_sizing fit
SET traffic_pulse 1
KEYPOS -1 -1
TIMEPOS -1 -1
FONTDEFINE 100 docs/example/Vera.ttf 10

NODE core
LABEL Core router
ICON 72 72 images/objects/cisco-router.png
POSITION 120 100
LABELOFFSET S60
SET editor_label_position S60

NODE access
LABEL Access switch
POSITION 540 100

NODE site_note
LABEL Example site\nTraffic overview
LABELFONT 100
LABELBGCOLOR none
LABELOUTLINECOLOR none
LABELFONTSHADOWCOLOR none
POSITION 330 240
SET editor_note 1
SET editor_note_escaped 1
SET editor_note_align centre

LINK DEFAULT
COMMENTFONT 100
COMMENTCURVE 1

LINK uplink
NODES core access
TARGET static:900M:200M
OUTCOMMENT Uplink
VIA 330 140
Loading