replace 'Add Node' with 'Register Node' as link to registerwizard.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 2 Jun 2009 18:08:40 +0000 (18:08 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 2 Jun 2009 18:08:40 +0000 (18:08 +0000)
move 'Add Node' to 'Admin' menu, to encourage users to use the wizard over
just adding a node.

modules/planetlab.module
planetlab/includes/plc_functions.php
planetlab/includes/plc_objects.php

index cc131fc..378d1f9 100644 (file)
@@ -159,6 +159,7 @@ function planetlab_block($op = 'list', $delta = 0, $edit = array()) {
       $bullet_item .= ul_start();
       $bullet_item .= leaf( href (l_nodes_site (plc_my_site_id()),"My Site Nodes"));
       $bullet_item .= leaf( href (l_node_add(),"Add Node"));
+      $bullet_item .= leaf( href (l_register_node(),"Register Node"));
       $bullet_item .= ul_end();
       $items [] = expanded($bullet_item);
 
@@ -182,6 +183,7 @@ function planetlab_block($op = 'list', $delta = 0, $edit = array()) {
        $bullet_item = '';
        $bullet_item .= href(l_admin(),"Admin search");
        $bullet_item .= ul_start();
+    $bullet_item .= leaf( href (l_node_add(),"Add Node"));
        $bullet_item .= leaf( href( l_tags(),"Tags"));
        $bullet_item .= leaf( href( l_nodegroups(),"Node groups"));
        $bullet_item .= leaf (href(l_peers(),'Peers'));
index a54dd65..83a764b 100644 (file)
@@ -55,6 +55,7 @@ function href ($url,$text) { return "<a href='" . $url . "'>" . $text . "</a>";
 function l_actions ()                  { return "/db/common/actions.php"; }
 // some complex node actions are kept separate, e.g. the ones related to getbootmedium
 function l_actions_download ()         { return "/db/nodes/node_downloads.php"; }
+function l_register_node ()            { return "/registerwizard/index.php"; }
 
 function l_nodes ()                    { return "/db/nodes/index.php"; }
 function l_nodes_peer ($peer_id)       { return "/db/nodes/index.php?peerscope=$peer_id"; }
index 65abc9a..db354bc 100644 (file)
@@ -216,7 +216,7 @@ class Node extends PlcObject {
     $this->last_contact = $node['last_contact'];
     $this->site_id = $node['site_id'];
     $this->pcu_ids = $node['pcu_ids'];
-    $this->nn = $api->GetNodeNetworks($node['nodenetwork_ids']);
+    $this->nn = $api->GetInterfaces($node['interface_ids']);
     foreach ($this->nn as $nnet)
       {
        if ( $nnet['is_primary'] == true )