Weathermap editor

Multi featured GUI editor for Weathermap maps.

Integrates into CACTI as a plugin, but can work separately. You may change default options in config.js

NB: Restrict access to php script with .htaccess or similar ways.

Online demo import/export mode.

Supports / features

  • Easy to drag&drop nodes movement
  • Templated nodes and links
  • Background color and image
  • Convert from and to WeatherMap format
  • Load and save to native WeatherMap configs
  • Editor for nodes, links, scales, fonts, templates, map properties
  • Links with VIA, multiple VIA and curved/angled styles
  • Gently handles unsupported tags (excepting templated objects)
  • All types of time objects: min/max/generated time
  • Display title
  • Grid contrasting to background
  • Snap to grid
  • Scales are drawn in classic style
  • Optionally can decrease redraw intense on movement
  • SET hidezero and hidepercent for scales
  • Online/offline modes - may work without CACTI
  • Import/export map
  • In online mode image list is taken from weathermap distro
  • In offline mode image list is built from cached list
  • Templated view

Editor is intended to present object position and links among nodes, custom fonts are not supported as they may be located at inaccessible location.

Links with VIA positions are displayed as bezier line with movable control points. Multiple VIAs are displayed as polyline.

 

Left: rendered with weathermap, right: rendered with editor.


Configuration

Theming and render options are configured by modifying config.js.

Default options:

// CACTI web path
var cacti_webpath_default = '/cacti';
var rra_path_default = '/var/lib/cacti/rra';

// Image cache
var imagesUrl_default = cacti_webpath_default + '/plugins/weathermap/';

var grid_step_default = 20;
var grid_snap_default = false;
var grid_default = false;

// if online image list is loaded from Weathermap plugin
var onlineMode = true;

// Colors
var colors = {
selected: "#AA3333",
grid: ["#F5F5F5", "#F5F5F5"],
link: "#CCCCCC",
stroke: "black",
text: "#000000",
textout: "#000000",
via: ["#E5E5E5", "#888888"]
};

var fixedFonts = {
1: '6pt monospace',
2: '8pt monospace',
3: '10pt monospace',
4: '12pt monospace',
5: '14pt monospace'};

var defFont = {title: 2, scale: 2, time: 2, node: 3};

// Tune for performance while dragging
// oddframe = 1 -> draw every second frame
var qq = 0, oddframe = 0;
Прикрепленные файлы

wmeditor-1.0.zip 22
Size: 102464 bytes
SHA1: 3ea4e272b3a42e1422479473af4a781eeb95da9b


Метки: cactilinuxразработка

Просмотров: 144
Автор: Admin
Опубликовано: 22.11.2017