diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-12-12 02:03:00 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-12-12 02:03:00 +0000 |
commit | e0ff861f4deff7ace40a588935d9b51b3b5b504d (patch) | |
tree | f77b20504a6152ca26165c5fb4e77f95c3deb572 /java/src/IceGridGUI/LiveDeployment/Node.java | |
parent | Added --verbose, --keep. (diff) | |
download | ice-e0ff861f4deff7ace40a588935d9b51b3b5b504d.tar.bz2 ice-e0ff861f4deff7ace40a588935d9b51b3b5b504d.tar.xz ice-e0ff861f4deff7ace40a588935d9b51b3b5b504d.zip |
First cut for ShowLogDialog
Diffstat (limited to 'java/src/IceGridGUI/LiveDeployment/Node.java')
-rwxr-xr-x | java/src/IceGridGUI/LiveDeployment/Node.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/Node.java b/java/src/IceGridGUI/LiveDeployment/Node.java index 3ba6ecb9122..bb70bbd6415 100755 --- a/java/src/IceGridGUI/LiveDeployment/Node.java +++ b/java/src/IceGridGUI/LiveDeployment/Node.java @@ -36,9 +36,38 @@ class Node extends ListTreeNode { boolean[] actions = new boolean[ACTION_COUNT]; actions[SHUTDOWN_NODE] = _up; + actions[RETRIEVE_STDOUT] = _up; + actions[RETRIEVE_STDERR] = _up; return actions; } + public void retrieveOutput(final boolean stdout) + { + getRoot().openShowLogDialog(new ShowLogDialog.FileIteratorFactory() + { + public FileIteratorPrx open(int count) + throws FileNotAvailableException, NodeNotExistException, NodeUnreachableException + { + AdminSessionPrx adminSession = getRoot().getCoordinator().getSession(); + + if(stdout) + { + return adminSession.openNodeStdOut(_id, count); + } + else + { + return adminSession.openNodeStdErr(_id, count); + } + } + + public String getTitle() + { + return "Node " + _id + " " + (stdout ? "Stdout" : "Stderr"); + } + }); + } + + public void shutdownNode() { final String prefix = "Shutting down node '" + _id + "'..."; @@ -91,6 +120,9 @@ class Node extends ListTreeNode if(_popup == null) { _popup = new JPopupMenu(); + _popup.add(la.get(RETRIEVE_STDOUT)); + _popup.add(la.get(RETRIEVE_STDERR)); + _popup.addSeparator(); _popup.add(la.get(SHUTDOWN_NODE)); } |