From 231faf1162a0aac6feb4e30b18da7bd14bb8de11 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Tue, 25 May 2004 07:40:51 +0000 Subject: - added support for real delta. item.delta=2. (Alexei) - new selection for triggers.php (Alexei) - new selection for items.php (Alexei) - removed helpdesk.php (Alexei) - fixed check of permissions for screenedit.php (Alexei) - new selection for graphs in charts.php (Alexei) - new selection of maps in maps.php (Alexei) - new selection of group and host for latest.php (Alexei) - added support for macro {IPADDRESS} (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1348 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/services.php | 104 ++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'frontends/php/services.php') diff --git a/frontends/php/services.php b/frontends/php/services.php index 5979f131..57167c5a 100644 --- a/frontends/php/services.php +++ b/frontends/php/services.php @@ -19,7 +19,7 @@ **/ ?> No permissions !"); + show_table_header("".S_NO_PERMISSIONS.""); show_footer(); exit; } @@ -42,17 +42,17 @@ if($HTTP_GET_VARS["register"]=="update") { $result=@update_service($HTTP_GET_VARS["serviceid"],$HTTP_GET_VARS["name"],$HTTP_GET_VARS["triggerid"],$HTTP_GET_VARS["linktrigger"],$HTTP_GET_VARS["algorithm"],$HTTP_GET_VARS["showsla"],$HTTP_GET_VARS["goodsla"],$HTTP_GET_VARS["sortorder"]); - show_messages($result,"Service updated","Cannot update service"); + show_messages($result, S_SERVICE_UPDATED, S_CANNOT_UPDATE_SERVICE); } if($HTTP_GET_VARS["register"]=="add") { $result=@add_service($HTTP_GET_VARS["serviceid"],$HTTP_GET_VARS["name"],$HTTP_GET_VARS["triggerid"],$HTTP_GET_VARS["linktrigger"],$HTTP_GET_VARS["algorithm"],$HTTP_GET_VARS["showsla"],$HTTP_GET_VARS["goodsla"],$HTTP_GET_VARS["goodsla"]); - show_messages($result,"Service added","Cannot add service"); + show_messages($result, S_SERVICE_ADDED, S_CANNOT_ADD_SERVICE); } if($HTTP_GET_VARS["register"]=="add server") { $result=add_host_to_services($HTTP_GET_VARS["hostid"],$HTTP_GET_VARS["serviceid"]); - show_messages($result,"Host trigger added","Cannot add host triggers"); + show_messages($result, S_TRIGGER_ADDED, S_CANNOT_ADD_TRIGGER); } if($HTTP_GET_VARS["register"]=="add link") { @@ -65,31 +65,31 @@ $HTTP_GET_VARS["softlink"]=1; } $result=add_service_link($HTTP_GET_VARS["servicedownid"],$HTTP_GET_VARS["serviceupid"],$HTTP_GET_VARS["softlink"]); - show_messages($result,"Service link added","Cannot add service link"); + show_messages($result, S_LINK_ADDED, S_CANNOT_ADD_LINK); } if($HTTP_GET_VARS["register"]=="delete") { $result=delete_service($HTTP_GET_VARS["serviceid"]); - show_messages($result,"Service deleted","Cannot delete service"); + show_messages($result, S_SERVICE_DELETED, S_CANNOT_DELETE_SERVICE); unset($HTTP_GET_VARS["serviceid"]); } if($HTTP_GET_VARS["register"]=="delete_link") { $result=delete_service_link($HTTP_GET_VARS["linkid"]); - show_messages($result,"Link deleted","Cannot delete link"); + show_messages($result, S_LINK_DELETED, S_CANNOT_DELETE_LINK); } } ?> "; echo ""; - echo "Service"; - echo "Status calculation"; + echo "".S_SERVICE.""; + echo "".S_STATUS_CALCULATION.""; echo ""; $col=0; @@ -100,19 +100,19 @@ echo "".$service["name"].""; if($service["algorithm"] == SERVICE_ALGORITHM_NONE) { - echo "none"; + echo "".S_NONE.""; } else if($service["algorithm"] == SERVICE_ALGORITHM_MAX) { - echo "MAX of childs"; + echo "".S_MAX_OF_CHILDS.""; } else if($service["algorithm"] == SERVICE_ALGORITHM_MIN) { - echo "MIN of childs"; + echo "".S_MIN_OF_CHILDS.""; } else { - echo "unknown"; + echo "".S_UNKNOWN.""; } echo ""; $col++; @@ -147,19 +147,19 @@ } if($row["algorithm"] == SERVICE_ALGORITHM_NONE) { - echo "none"; + echo "".S_NONE.""; } else if($row["algorithm"] == SERVICE_ALGORITHM_MAX) { - echo "MAX of childs"; + echo "".S_MAX_OF_CHILDS.""; } else if($row["algorithm"] == SERVICE_ALGORITHM_MIN) { - echo "MIN of childs"; + echo "".S_MIN_OF_CHILDS.""; } else { - echo "unknown"; + echo "".S_UNKNOWN.""; } echo ""; } @@ -172,10 +172,10 @@ show_table_header("LINKS"); echo ""; echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; $sql="select linkid,servicedownid,serviceupid,soft from services_links where serviceupid=".$HTTP_GET_VARS["serviceid"]." or servicedownid=".$HTTP_GET_VARS["serviceid"]; $result=DBselect($sql); @@ -190,13 +190,13 @@ echo ""; if($row["soft"] == 0) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } - echo ""; + echo ""; echo ""; } echo "
Service 1Service 2Soft/hard linkActions".S_SERVICE_1."".S_SERVICE_2."".S_SOFT_HARD_LINK."".S_ACTIONS."
".$service["name"]."Hard".S_HARD."Soft".S_SOFT."Delete".S_DELETE."
"; @@ -226,7 +226,7 @@ echo "
"; echo ""; show_table2_header_begin(); - echo "Service"; + echo S_SERVICE; show_table2_v_delimiter(); echo "
"; @@ -234,12 +234,12 @@ { echo ""; } - echo "Name"; + echo S_NAME; show_table2_h_delimiter(); echo ""; show_table2_v_delimiter(); - echo nbsp("Status calculation algorithm"); + echo nbsp(S_STATUS_CALCULATION_ALGORITHM); show_table2_h_delimiter(); echo ""; show_table2_v_delimiter(); - echo nbsp("Show SLA"); + echo nbsp(S_SHOW_SLA); show_table2_h_delimiter(); if($showsla==1) { @@ -288,12 +288,12 @@ } show_table2_v_delimiter(); - echo nbsp("Acceptable SLA (in %)"); + echo nbsp(S_ACCEPTABLE_SLA_IN_PERCENT); show_table2_h_delimiter(); echo ""; show_table2_v_delimiter(); - echo nbsp("Link to trigger ?"); + echo nbsp(S_LINK_TO_TRIGGER_Q); show_table2_h_delimiter(); if(isset($triggerid)&&($triggerid!="")) { @@ -305,7 +305,7 @@ } show_table2_v_delimiter(); - echo "Trigger"; + echo S_TRIGGER; show_table2_h_delimiter(); $result=DBselect("select triggerid,description from triggers order by description"); echo ""; show_table2_v_delimiter(); - echo nbsp("Sort order (0->999)"); + echo nbsp(".S_SORT_ORDER_0_999."); show_table2_h_delimiter(); echo ""; @@ -343,7 +343,7 @@ if(isset($HTTP_GET_VARS["serviceid"])) { echo ""; - echo ""; + echo ""; } show_table2_header_end(); @@ -364,7 +364,7 @@ echo "
"; show_table2_header_begin(); - echo nbsp("Link to ..."); + echo nbsp(S_LINK_TO); show_table2_v_delimiter(); echo ""; @@ -373,7 +373,7 @@ echo ""; echo ""; } - echo "Name"; + echo S_NAME; show_table2_h_delimiter(); $result=DBselect("select serviceid,triggerid,name from services order by name"); echo ""; show_table2_v_delimiter(); - echo nbsp("Soft link ?"); + echo nbsp(S_SOFT_LINK_Q); show_table2_h_delimiter(); // if(isset($HTTP_GET_VARS["softlink"])&&($HTTP_GET_VARS["triggerid"]!="")) // { @@ -421,7 +421,7 @@ echo "
"; show_table2_header_begin(); - echo nbsp("Add server details"); + echo nbsp(S_ADD_SERVER_DETAILS); show_table2_v_delimiter(); echo ""; @@ -429,7 +429,7 @@ { echo ""; } - echo "Server"; + echo S_SERVER; show_table2_h_delimiter(); $result=DBselect("select hostid,host from hosts order by host"); echo "