diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-26 13:58:43 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-26 13:58:43 +0000 |
| commit | 7cd552914e890df489dfe4032ed79f0841db96ff (patch) | |
| tree | 1328738d7483678e378f06e09b6a10b72af70f70 /frontends/php/nodes.php | |
| parent | ed5c04a0dce5c31017b9813e8510dd8165353a7a (diff) | |
| download | zabbix-7cd552914e890df489dfe4032ed79f0841db96ff.tar.gz zabbix-7cd552914e890df489dfe4032ed79f0841db96ff.tar.xz zabbix-7cd552914e890df489dfe4032ed79f0841db96ff.zip | |
- added possibility to add Node with pre-defined NodeID (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3930 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/nodes.php')
| -rw-r--r-- | frontends/php/nodes.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/frontends/php/nodes.php b/frontends/php/nodes.php index 9d0ce999..c215251c 100644 --- a/frontends/php/nodes.php +++ b/frontends/php/nodes.php @@ -36,6 +36,7 @@ include_once "include/page_header.php"; // media form "nodeid"=> array(T_ZBX_INT, O_NO, null, DB_ID, '{form}=="update"'), + "new_nodeid"=> array(T_ZBX_INT, O_OPT, null, DB_ID, 'isset({save})'), "name"=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), "timezone"=> array(T_ZBX_INT, O_OPT, null, BETWEEN(-12,+13), 'isset({save})'), "ip"=> array(T_ZBX_IP, O_OPT, null, null, 'isset({save})'), @@ -57,7 +58,7 @@ include_once "include/page_header.php"; $accessible_nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_LIST); - if(isset($_REQUEST["nodeid"]) && !in_array($_REQUEST["nodeid"], explode(',',$accessible_nodes))) + if(!in_array($ZBX_CURNODEID, explode(',',$accessible_nodes))) { access_deny(); } @@ -69,7 +70,7 @@ include_once "include/page_header.php"; if(isset($_REQUEST['nodeid'])) { /* update */ $audit_action = AUDIT_ACTION_UPDATE; - $result = update_node($_REQUEST['nodeid'], + $result = update_node($_REQUEST['nodeid'],$_REQUEST['new_nodeid'], $_REQUEST['name'], $_REQUEST['timezone'], $_REQUEST['ip'], $_REQUEST['port'], $_REQUEST['slave_history'], $_REQUEST['slave_trends']); $nodeid = $_REQUEST['nodeid']; @@ -78,7 +79,7 @@ include_once "include/page_header.php"; else { /* add */ $audit_action = AUDIT_ACTION_ADD; - $result = add_node( + $result = add_node($_REQUEST['new_nodeid'], $_REQUEST['name'], $_REQUEST['timezone'], $_REQUEST['ip'], $_REQUEST['port'], $_REQUEST['slave_history'], $_REQUEST['slave_trends'], $_REQUEST['node_type']); $nodeid = $result; @@ -115,7 +116,7 @@ include_once "include/page_header.php"; show_table_header(S_NODES_BIG,$form); $table=new CTableInfo(S_NO_NODES_DEFINED); - $table->SetHeader(array(S_NAME,S_TYPE,S_TIME_ZONE,S_IP.':'.S_PORT)); + $table->SetHeader(array(S_ID,S_NAME,S_TYPE,S_TIME_ZONE,S_IP.':'.S_PORT)); $db_nodes = DBselect('select * from nodes where nodeid in ('. get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_LIST).') '. @@ -127,6 +128,7 @@ include_once "include/page_header.php"; $node_type_name = node_type2str($node_type); $table->AddRow(array( + $row['nodeid'], array( get_node_path($row['masterid']), new CLink( |
