enable selection of Windows tasks on the Tasks page
This commit is contained in:
parent
2e0defc4a7
commit
a2b91eaa1e
5 changed files with 20 additions and 2 deletions
|
|
@ -49,6 +49,12 @@ NotifyOnSuccess = True
|
|||
## Disables all notifications
|
||||
# DisableNotifications = False
|
||||
|
||||
## Extended features
|
||||
## Support Maven builds
|
||||
# EnableMaven = False
|
||||
## Support Windows builds
|
||||
# EnableWin = False
|
||||
|
||||
## Koji hub plugins
|
||||
## The path where plugins are found
|
||||
# PluginPath = /usr/lib/koji-hub-plugins
|
||||
|
|
|
|||
|
|
@ -6305,6 +6305,9 @@ class RootExports(object):
|
|||
def mavenEnabled(self):
|
||||
return bool(context.opts.get('EnableMaven'))
|
||||
|
||||
def winEnabled(self):
|
||||
return bool(context.opts.get('EnableWin'))
|
||||
|
||||
def showSession(self):
|
||||
return "%s" % context.session
|
||||
|
||||
|
|
|
|||
|
|
@ -359,6 +359,9 @@ _TASKS = ['build',
|
|||
'chainbuild',
|
||||
'maven',
|
||||
'buildMaven',
|
||||
'wrapperRPM',
|
||||
'winbuild',
|
||||
'vmExec',
|
||||
'waitrepo',
|
||||
'tagBuild',
|
||||
'newRepo',
|
||||
|
|
@ -369,9 +372,9 @@ _TASKS = ['build',
|
|||
'createLiveCD',
|
||||
'createAppliance']
|
||||
# Tasks that can exist without a parent
|
||||
_TOPLEVEL_TASKS = ['build', 'buildNotification', 'chainbuild', 'maven', 'newRepo', 'tagBuild', 'tagNotification', 'waitrepo', 'createLiveCD', 'createAppliance']
|
||||
_TOPLEVEL_TASKS = ['build', 'buildNotification', 'chainbuild', 'maven', 'wrapperRPM', 'winbuild', 'newRepo', 'tagBuild', 'tagNotification', 'waitrepo', 'createLiveCD', 'createAppliance']
|
||||
# Tasks that can have children
|
||||
_PARENT_TASKS = ['build', 'chainbuild', 'maven', 'newRepo']
|
||||
_PARENT_TASKS = ['build', 'chainbuild', 'maven', 'winbuild', 'newRepo']
|
||||
|
||||
def tasks(req, owner=None, state='active', view='tree', method='all', hostID=None, start=None, order='-id'):
|
||||
values = _initValues(req, 'Tasks', 'tasks')
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ All
|
|||
#for $task_type in $alltasks
|
||||
#if $task_type in ('maven', 'buildMaven') and not $mavenEnabled
|
||||
#continue
|
||||
#elif $task_type in ('winbuild', 'vmExec') and not $winEnabled
|
||||
#continue
|
||||
#elif $task_type == 'wrapperRPM' and not ($mavenEnabled or $winEnabled)
|
||||
#continue
|
||||
#else
|
||||
<option value="$task_type" #if $method == $task_type then 'selected="selected"' else ''#>$task_type</option>
|
||||
#end if
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ def _genHTML(req, fileName):
|
|||
req._values['authToken'] = _genToken(req)
|
||||
if not req._values.has_key('mavenEnabled'):
|
||||
req._values['mavenEnabled'] = req._session.mavenEnabled()
|
||||
if not req._values.has_key('winEnabled'):
|
||||
req._values['winEnabled'] = req._session.winEnabled()
|
||||
|
||||
tmpl_class = TEMPLATES.get(fileName)
|
||||
if not tmpl_class:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue