[icinga-checkins] icinga.org: icinga-core/test/cgis: classic ui: add modified attributes row to extinfo. cgi showing diffs to original config #2473 add modified attributes reset command to extinfo .cgi allowing to reset to original config #2474
git at icinga.org
git at icinga.org
Tue Apr 24 17:05:02 CEST 2012
Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date: Mon Apr 23 19:43:23 2012 +0200
classic ui: add modified attributes row to extinfo.cgi showing diffs to original config #2473 add modified attributes reset command to extinfo.cgi allowing to reset to original config #2474
unluckily a combined commit for both.
thing is that current objects contain the
modified_attributes, which is stored in
retention.dat by the core, plus written/read
the cgis did not have that as statusdata
defined, so changed that, now keeping the
status objects with another attribute.
ever since modified_attributes is a bitmask
we need to re-calculate that into a string.
printing it plain (json) and colored (html)
makes this another row in extinfo.cgi
while seeing the modified_attributes, one
might want to reset those - just changing
the values won't reset the modification
problem - normally cmd.cgi would not allow
to send CHANGE_* commands. this is now
opened, but only for the MODATTR change cmds
as well es only allowing new cgi GET param
'attr' to bet set to 0 (reset, MODATTR_NONE).
other values will provoke an error on the
cmd.cgi not allowing you to send that cmd
to the core, in order to prevent XSS and such.
combined, this generates another valuable
enhancement for the Icinga Classic UI :)
(the idoutils database already got those
information, so Icinga Web can fetch them
plus: adding modified_attributes to json
output for extinfo.cgi too
plusplus: new cmd.cgi GET param 'attr'
Changelog | 6 ++
Changelog_json | 3 +-
cgi/cgiutils.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++
cgi/cmd.c | 91 +++++++++++++++++++++++++++++-
cgi/extinfo.c | 23 +++++++
include/cgiutils.h | 10 +++
include/statusdata.h | 2 +
xdata/xsddefault.c | 4 +
8 files changed, 293 insertions(+), 2 deletions(-)
More information about the icinga-checkins