Author: Lars Michelsen <[email protected]>
Date: Sun Jan 25 18:48:05 2015 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Sun Jan 25 18:48:05 2015 +0100
Gadgets can now be shown for maps, dynamic groups and aggregations objects too
---
.../frontend/nagvis-js/js/NagVisStatefulObject.js | 5 +-
share/server/core/mapcfg/default.php | 98 +++++++++++---------
2 files changed, 59 insertions(+), 44 deletions(-)
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index d6fe3d0..f57c419 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -1056,11 +1056,14 @@ var NagVisStatefulObject = NagVisObject.extend({
sParams += '&type=' + this.conf.type
+ '&object_id=' + this.conf.object_id
+ '&scale=' +
escapeUrlValues(this.conf.gadget_scale.toString())
- + '&state=' + this.conf.state
+ + '&state=' + this.conf.summary_state
+ '&stateType=' + this.conf.state_type
+ '&ack=' + this.conf.summary_problem_has_been_acknowledged
+ '&downtime=' + this.conf.summary_in_downtime;
+ if (this.conf.type == 'dyngroup')
+ sParams += '&object_types=' + this.conf.object_types;
+
if (this.conf.perfdata && this.conf.perfdata != '')
sParams += '&perfdata=' +
this.conf.perfdata.replace(/\"\;|\&\#145\;/g,'%22');
diff --git a/share/server/core/mapcfg/default.php
b/share/server/core/mapcfg/default.php
index 371b253..67153c8 100644
--- a/share/server/core/mapcfg/default.php
+++ b/share/server/core/mapcfg/default.php
@@ -1191,44 +1191,48 @@ $mapConfigVarMap['servicegroup'] = Array(
);
$mapConfigVarMap['map'] = Array(
- 'type' => null,
- 'object_id' => null,
- 'map_name' => null,
- 'x' => null,
- 'y' => null,
- 'z' => null,
- 'view_type' => null,
- 'iconset' => null,
- 'line_type' => null,
- 'line_arrow' => null,
- 'line_cut' => null,
- 'line_width' => null,
- 'line_weather_colors' => null,
- 'context_menu' => null,
- 'context_template' => null,
- 'exclude_members' => null,
+ 'type' => null,
+ 'object_id' => null,
+ 'map_name' => null,
+ 'x' => null,
+ 'y' => null,
+ 'z' => null,
+ 'view_type_obj' => 'view_type',
+ 'iconset' => null,
+ 'line_type' => null,
+ 'line_arrow' => null,
+ 'line_cut' => null,
+ 'line_width' => null,
+ 'line_weather_colors' => null,
+ 'gadget_url' => null,
+ 'gadget_type' => null,
+ 'gadget_scale' => null,
+ 'gadget_opts' => null,
+ 'context_menu' => null,
+ 'context_template' => null,
+ 'exclude_members' => null,
'exclude_member_states' => null,
- 'hover_menu' => null,
- 'hover_template' => null,
- 'hover_delay' => null,
- 'hover_url' => null,
- 'hover_childs_show' => null,
- 'hover_childs_sort' => null,
- 'hover_childs_order' => null,
- 'hover_childs_limit' => null,
- 'label_show' => null,
- 'label_text' => null,
- 'label_x' => null,
- 'label_y' => null,
- 'label_width' => null,
- 'label_background' => null,
- 'label_border' => null,
- 'label_style' => null,
- 'label_maxlen' => null,
- 'only_hard_states' => null,
- 'map_url' => 'url',
- 'url_target' => null,
- 'use' => null,
+ 'hover_menu' => null,
+ 'hover_template' => null,
+ 'hover_delay' => null,
+ 'hover_url' => null,
+ 'hover_childs_show' => null,
+ 'hover_childs_sort' => null,
+ 'hover_childs_order' => null,
+ 'hover_childs_limit' => null,
+ 'label_show' => null,
+ 'label_text' => null,
+ 'label_x' => null,
+ 'label_y' => null,
+ 'label_width' => null,
+ 'label_background' => null,
+ 'label_border' => null,
+ 'label_style' => null,
+ 'label_maxlen' => null,
+ 'only_hard_states' => null,
+ 'map_url' => 'url',
+ 'url_target' => null,
+ 'use' => null,
);
$mapConfigVarMap['line'] = Array(
@@ -1324,17 +1328,21 @@ $mapConfigVarMap['dyngroup'] = array(
'dyngroup_name' => 'name',
'object_types' => null,
'object_filter' => null,
- 'x' => null,
- 'y' => null,
- 'z' => null,
- 'backend_id' => null,
- 'view_type' => null,
+ 'x' => null,
+ 'y' => null,
+ 'z' => null,
+ 'backend_id' => null,
+ 'view_type_obj' => 'view_type',
'iconset' => null,
'line_type' => null,
'line_arrow' => null,
'line_cut' => null,
'line_width' => null,
'line_weather_colors' => null,
+ 'gadget_url' => null,
+ 'gadget_type' => null,
+ 'gadget_scale' => null,
+ 'gadget_opts' => null,
'context_menu' => null,
'context_template' => null,
'exclude_members' => null,
@@ -1371,13 +1379,17 @@ $mapConfigVarMap['aggr'] = Array(
'y' => null,
'z' => null,
'backend_id' => null,
- 'view_type' => null,
+ 'view_type_obj' => 'view_type',
'iconset' => null,
'line_type' => null,
'line_arrow' => null,
'line_cut' => null,
'line_width' => null,
'line_weather_colors' => null,
+ 'gadget_url' => null,
+ 'gadget_type' => null,
+ 'gadget_scale' => null,
+ 'gadget_opts' => null,
'context_menu' => null,
'context_template' => null,
'exclude_members' => null,
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins