-
Incident report
-
Resolution: Fixed
-
Major
-
1.9.0 (alpha)
-
None
-
Trunk version: 8167
mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0
Linux 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
The calls for the system map links aren't available through the API.
The following functions exists in the standard API (frontends/php):
map_link_drawtypes(){
map_link_drawtype2str($drawtype){
sysmap_accessible($sysmapid,$perm){
get_sysmap_by_sysmapid($sysmapid){
get_sysmaps_element_by_selementid($selementid){
add_sysmap($name,$width,$height,$backgroundid,$label_type,$label_location){
update_sysmap($sysmapid,$name,$width,$height,$backgroundid,$label_type,$label_location){
delete_sysmap($sysmapids){
add_link($sysmapid,$selementid1,$selementid2,$triggers,$drawtype,$color){
update_link($linkid,$sysmapid,$selementid1,$selementid2,$triggers,$drawtype,$color){
delete_link($linkid){
get_link_triggers($linkid){
add_link_trigger($linkid,$triggerid,$drawtype,$color){
update_link_trigger($linkid,$triggerid,$drawtype,$color){
delete_link_trigger($linkid,$triggerid){
delete_all_link_triggers($linkid){
check_circle_elements_link($sysmapid,$elementid,$elementtype){
add_element_to_sysmap($sysmapid,$elementid,$elementtype,
update_sysmap_element($selementid,$sysmapid,$elementid,$elementtype,
delete_sysmaps_element($selementids){
delete_sysmaps_elements_with_hostid($hostids){
delete_sysmaps_elements_with_sysmapid($sysmapids){
delete_sysmaps_elements_with_triggerid($triggerids){
delete_sysmaps_elements_with_groupid($groupids){
get_png_by_selementid($selementid){
get_info_by_selementid($selementid){
get_action_map_by_sysmapid($sysmapid){
get_icon_center_by_selementid($selementid){
MyDrawLine($image,$x1,$y1,$x2,$y2,$color,$drawtype){
convertColor($im,$color){
expand_map_element_label_by_data($db_element){
Now, some sysmap functionality has been made available through the API in frontends/php/api/classes/class.cmap.php:
get($options=array()){
getById($map_data){
add($maps){
update($maps){
delete($sysmapids){
I'm definitely not a PHP coder, but it would seem to me that these functions don't call Zabbix, but works directly with the database. I'm not sure what the reason for this is.
This problem is very urgent for me, so I'm trying to add at least addlink() in a new file called frontends/php/api/classes/class.clink.php. I've managed to get from:
Response Body: {"jsonrpc":"2.0","error":
{"code":-32602,"message":"Invalid params.","data":"Action does not exists"},"id":2}
to
Response Body: {"jsonrpc":"2.0","error":
,"id":4}
which I in some strange way regard as an improvement
Unfortunately I've completely broken the PHP frontend, but I'll give it another try.
Any help with this would be very appreciated.
Regards,
Daniel Petzen