[icinga-checkins] icinga.org: icinga-core/test/core: 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:29:52 CEST 2012


Module: icinga-core
Branch: test/core
Commit: 1538f2deb60d04ed7a4b04b1800a0546e870e25d
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=1538f2deb60d04ed7a4b04b1800a0546e870e25d

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
to/from status.dat
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
itsself.

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
already)

plus: adding modified_attributes to json
output for extinfo.cgi too

plusplus: new cmd.cgi GET param 'attr'

refs #2473
refs #2474

---

 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(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=1538f2deb60d04ed7a4b04b1800a0546e870e25d




More information about the icinga-checkins mailing list