diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-01-26 00:41:26 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-01-26 00:41:26 +0000 |
commit | 1fdcb631871d49d6dc87491b8c89fb805ad0fa75 (patch) | |
tree | 8027f4c0e41745d825bbf71cba4d1a2eecf84e13 /java/src/IceGridGUI/LiveDeployment/Slave.java | |
parent | minor fixes (diff) | |
download | ice-1fdcb631871d49d6dc87491b8c89fb805ad0fa75.tar.bz2 ice-1fdcb631871d49d6dc87491b8c89fb805ad0fa75.tar.xz ice-1fdcb631871d49d6dc87491b8c89fb805ad0fa75.zip |
Various IceGrid Admin fixes
Diffstat (limited to 'java/src/IceGridGUI/LiveDeployment/Slave.java')
-rw-r--r-- | java/src/IceGridGUI/LiveDeployment/Slave.java | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/Slave.java b/java/src/IceGridGUI/LiveDeployment/Slave.java index 9774cc1c2e7..17530d6f22c 100644 --- a/java/src/IceGridGUI/LiveDeployment/Slave.java +++ b/java/src/IceGridGUI/LiveDeployment/Slave.java @@ -29,8 +29,10 @@ class Slave extends TreeNode // public boolean[] getAvailableActions() { - boolean[] actions = new boolean[ACTION_COUNT]; + boolean[] actions = new boolean[ACTION_COUNT]; actions[SHUTDOWN_REGISTRY] = true; + actions[RETRIEVE_STDOUT] = true; + actions[RETRIEVE_STDERR] = true; return actions; } @@ -79,13 +81,47 @@ class Slave extends TreeNode } } + public void retrieveOutput(final boolean stdout) + { + getRoot().openShowLogDialog(new ShowLogDialog.FileIteratorFactory() + { + public FileIteratorPrx open(int count) + throws FileNotAvailableException, RegistryNotExistException, RegistryUnreachableException + { + AdminSessionPrx session = getCoordinator().getSession(); + + if(stdout) + { + return session.openRegistryStdOut(_id, count); + } + else + { + return session.openRegistryStdErr(_id, count); + } + } + + public String getTitle() + { + return "Slave Registry " + _id + " " + (stdout ? "Stdout" : "Stderr"); + } + + public String getDefaultFilename() + { + return _id + (stdout ? ".out" : ".err"); + } + }); + } + public JPopupMenu getPopupMenu() { LiveActions la = getCoordinator().getLiveActionsForPopup(); - if(_popup == null) + 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_REGISTRY)); } |