diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-02-15 14:06:26 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-02-15 14:06:26 +0000 |
commit | b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf (patch) | |
tree | 38bb138746c59e28e6a21bea133ba900fbaeabf1 /frontends/php/hosts.php | |
parent | b3c8ef909f5494a311e39f89b16d81a4c559f280 (diff) | |
download | zabbix-b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf.tar.gz zabbix-b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf.tar.xz zabbix-b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf.zip |
- added Clone functionality (Eugene)
- more PostgreSQL support
- allow schama generation in any place calling
git-svn-id: svn://svn.zabbix.com/trunk@3831 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hosts.php')
-rw-r--r-- | frontends/php/hosts.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php index ae5f1102..2ba690ec 100644 --- a/frontends/php/hosts.php +++ b/frontends/php/hosts.php @@ -92,7 +92,7 @@ include_once "include/page_header.php"; "notes"=> array(T_ZBX_STR, O_OPT, NULL, NULL, 'isset({useprofile})'), /* group */ "groupid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, '{config}==1&&{form}=="update"'), - "gname"=> array(T_ZBX_STR, O_NO, NULL, NOT_EMPTY, '{config}==1&&isset({save})'), + "gname"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, '{config}==1&&isset({save})'), /* application */ "applicationid"=>array(T_ZBX_INT,O_OPT, P_SYS, DB_ID, '{config}==4&&{form}=="update"'), @@ -108,6 +108,7 @@ include_once "include/page_header.php"; "unlink_and_clear"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), "save"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), + "clone"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), "delete"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), "delete_and_clear"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), "cancel"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), @@ -145,6 +146,12 @@ include_once "include/page_header.php"; } foreach($unlink_templates as $id) unset($_REQUEST['templates'][$id]); } +/* CLONE HOST */ + elseif(($_REQUEST["config"]==0 || $_REQUEST["config"]==3) && isset($_REQUEST["clone"]) && isset($_REQUEST["hostid"])) + { + unset($_REQUEST["hostid"]); + $_REQUEST["form"] = "clone"; + } /* SAVE HOST */ elseif(($_REQUEST["config"]==0 || $_REQUEST["config"]==3) && isset($_REQUEST["save"])) { @@ -306,7 +313,13 @@ include_once "include/page_header.php"; } /****** ACTIONS FOR GROUPS **********/ - if($_REQUEST["config"]==1&&isset($_REQUEST["save"])) +/* CLONE HOST */ + elseif($_REQUEST["config"]==1 && isset($_REQUEST["clone"]) && isset($_REQUEST["groupid"])) + { + unset($_REQUEST["groupid"]); + $_REQUEST["form"] = "clone"; + } + elseif($_REQUEST["config"]==1&&isset($_REQUEST["save"])) { $hosts = get_request("hosts",array()); if(isset($_REQUEST["groupid"])) |