you can use this one and adapt it for icinga director selfservice features.
there is some work from neteye: