← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rvb/maas/bug-980906-add-node into lp:maas

 

Raphaël Badin has proposed merging lp:~rvb/maas/bug-980906-add-node into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #980906 in MAAS: "delete a node, add it back -- Nodes page does not show it, needs refresh"
  https://bugs.launchpad.net/maas/+bug/980906

For more details, see:
https://code.launchpad.net/~rvb/maas/bug-980906-add-node/+merge/102073

This branch adds a quick hack to the node listing page: when a node gets added (by the JS widget), it reloads the page.  This is only using existing (and tested) functionality and this is only a quick hack until this page is properly rewritten as a pure-JS page so I think it's fine without a test but feel free to tell me if you think otherwise.
-- 
https://code.launchpad.net/~rvb/maas/bug-980906-add-node/+merge/102073
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/bug-980906-add-node into lp:maas.
=== modified file 'src/maasserver/templates/maasserver/node_list.html'
--- src/maasserver/templates/maasserver/node_list.html	2012-04-05 06:23:59 +0000
+++ src/maasserver/templates/maasserver/node_list.html	2012-04-16 09:23:22 +0000
@@ -18,6 +18,11 @@
         e.preventDefault();
         Y.maas.node_add.showAddNodeWidget({targetNode: '#nodes'});
       });
+      // Reload the page when a new node gets added.
+      Y.maas.node_add.AddNodeDispatcher.on(
+        Y.maas.node_add.NODE_ADDED_EVENT, function(e) {
+	  window.location.reload();
+      });
     });
   });
   // -->