Skip to content

Commit

Permalink
ProTo: Added getOutputName to GeneralGuiTool, defining the title of t…
Browse files Browse the repository at this point in the history
…he main output element
  • Loading branch information
morj-uio authored and sveinugu committed Dec 21, 2016
1 parent 2829900 commit 01485db
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
10 changes: 8 additions & 2 deletions lib/proto/tools/GeneralGuiTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ def getResetBoxes():
def getInputBoxOrder():
return None

@staticmethod
def getInputBoxGroups(choices=None):
@classmethod
def getInputBoxGroups(cls, choices=None):
if hasattr(super(GeneralGuiTool, cls), 'getInputBoxGroups'):
return super(GeneralGuiTool, cls).getInputBoxGroups(choices)
return None

@staticmethod
Expand All @@ -79,6 +81,10 @@ def isDebugMode():
def getOutputFormat(choices=None):
return 'html'

@classmethod
def getOutputName(cls, choices=None):
return cls.getToolSelectionName()

@staticmethod
def validateAndReturnErrors(choices):
return None
Expand Down
10 changes: 10 additions & 0 deletions lib/proto/tools/ToolTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,13 @@ def validateAndReturnErrors(cls, choices):
# 'html'
# """
# return 'html'
#
# @classmethod
# def getOutputName(cls, choices=None):
# return cls.getToolSelectionName()
# """
# The title (name) of the main output history element.
#
# Optional method. Default return value if method is not defined:
# the name of the tool.
# """
4 changes: 4 additions & 0 deletions lib/proto/tools/ToolTemplateMinimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ def validateAndReturnErrors(cls, choices):
# @classmethod
# def getOutputFormat(cls, choices):
# return 'html'
#
# @classmethod
# def getOutputName(cls, choices=None):
# return cls.getToolSelectionName()
10 changes: 4 additions & 6 deletions static/proto/html/ToolTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@
Optional&nbsp;method.&nbsp;Default&nbsp;return&nbsp;value&nbsp;if&nbsp;method&nbsp;is&nbsp;not&nbsp;defined:<br>
'html'</tt></dd></dl>

<dl><dt><a name="ToolTemplate-getOutputName"><strong>getOutputName</strong></a>(cls, choices)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>The title (name) of the main output history element.<br>
<br>
Optional&nbsp;method.&nbsp;Default&nbsp;return&nbsp;value&nbsp;if&nbsp;method&nbsp;is&nbsp;not&nbsp;defined:&nbsp;the name of the tool.</tt></dd></dl>

<dl><dt><a name="ToolTemplate-getRedirectURL"><strong>getRedirectURL</strong></a>(cls, choices)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>This&nbsp;method&nbsp;is&nbsp;called&nbsp;to&nbsp;return&nbsp;an&nbsp;URL&nbsp;if&nbsp;the&nbsp;isRedirectTool&nbsp;method<br>
returns&nbsp;True.<br>
&nbsp;<br>
Expand Down Expand Up @@ -282,12 +286,6 @@
&nbsp;<br>
Optional&nbsp;method.&nbsp;Default&nbsp;return&nbsp;value&nbsp;if&nbsp;method&nbsp;is&nbsp;not&nbsp;defined:&nbsp;True</tt></dd></dl>

<dl><dt><a name="ToolTemplate-isBatchTool"><strong>isBatchTool</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Specifies&nbsp;if&nbsp;this&nbsp;tool&nbsp;could&nbsp;be&nbsp;run&nbsp;from&nbsp;batch&nbsp;using&nbsp;the&nbsp;batch.&nbsp;The<br>
batch&nbsp;run&nbsp;line&nbsp;can&nbsp;be&nbsp;fetched&nbsp;from&nbsp;the&nbsp;info&nbsp;box&nbsp;at&nbsp;the&nbsp;bottom&nbsp;of&nbsp;the<br>
tool.<br>
&nbsp;<br>
Optional&nbsp;method.&nbsp;Default&nbsp;return&nbsp;value&nbsp;if&nbsp;method&nbsp;is&nbsp;not&nbsp;defined:&nbsp;same as isHistoryTool()</tt></dd></dl>

<dl><dt><a name="ToolTemplate-isPublic"><strong>isPublic</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Specifies&nbsp;whether&nbsp;the&nbsp;tool&nbsp;is&nbsp;accessible&nbsp;to&nbsp;all&nbsp;users.&nbsp;If&nbsp;False,&nbsp;the<br>
tool&nbsp;is&nbsp;only&nbsp;accessible&nbsp;to&nbsp;a&nbsp;restricted&nbsp;set&nbsp;of&nbsp;users&nbsp;as&nbsp;well&nbsp;as&nbsp;admin<br>
users,&nbsp;as&nbsp;defined&nbsp;in&nbsp;the&nbsp;galaxy.ini&nbsp;file.<br>
Expand Down

0 comments on commit 01485db

Please sign in to comment.