make non-plugin tasks default
This commit is contained in:
parent
ac070c9ddf
commit
96012ee56f
3 changed files with 42 additions and 59 deletions
|
|
@ -35,8 +35,10 @@ LiteralFooter = True
|
|||
# HiddenUsers = 5372 1234
|
||||
|
||||
# Task types visible in pulldown menu on tasks page.
|
||||
# Tasks = build, buildSRPMFromSCM, buildArch, chainbuild, maven, buildMaven, chainmaven, wrapperRPM, winbuild, vmExec, waitrepo, tagBuild, newRepo, createrepo, buildNotification, tagNotification, dependantTask, livecd, createLiveCD, appliance, createAppliance, image, createImage, runroot, livemedia, createLiveMedia
|
||||
# Tasks =
|
||||
# runroot plugin provided via main package could be listed as:
|
||||
# Tasks = runroot
|
||||
# Tasks that can exist without a parent
|
||||
# ToplevelTasks = build, buildNotification, chainbuild, maven, chainmaven, wrapperRPM, winbuild, newRepo, tagBuild, tagNotification, waitrepo, livecd, appliance, image, livemedia
|
||||
# ToplevelTasks =
|
||||
# Tasks that can have children
|
||||
# ParentTasks = build, chainbuild, maven, chainmaven, winbuild, newRepo, wrapperRPM, livecd, appliance, image, livemedia
|
||||
# ParentTasks =
|
||||
|
|
|
|||
|
|
@ -416,6 +416,36 @@ def notificationdelete(environ, notificationID):
|
|||
|
||||
_redirect(environ, 'index')
|
||||
|
||||
# All Tasks
|
||||
_TASKS = ['build',
|
||||
'buildSRPMFromSCM',
|
||||
'buildArch',
|
||||
'chainbuild',
|
||||
'maven',
|
||||
'buildMaven',
|
||||
'chainmaven',
|
||||
'wrapperRPM',
|
||||
'winbuild',
|
||||
'vmExec',
|
||||
'waitrepo',
|
||||
'tagBuild',
|
||||
'newRepo',
|
||||
'createrepo',
|
||||
'buildNotification',
|
||||
'tagNotification',
|
||||
'dependantTask',
|
||||
'livecd',
|
||||
'createLiveCD',
|
||||
'appliance',
|
||||
'createAppliance',
|
||||
'image',
|
||||
'createImage',
|
||||
'livemedia',
|
||||
'createLiveMedia']
|
||||
# Tasks that can exist without a parent
|
||||
_TOPLEVEL_TASKS = ['build', 'buildNotification', 'chainbuild', 'maven', 'chainmaven', 'wrapperRPM', 'winbuild', 'newRepo', 'tagBuild', 'tagNotification', 'waitrepo', 'livecd', 'appliance', 'image', 'livemedia']
|
||||
# Tasks that can have children
|
||||
_PARENT_TASKS = ['build', 'chainbuild', 'maven', 'chainmaven', 'winbuild', 'newRepo', 'wrapperRPM', 'livecd', 'appliance', 'image', 'livemedia']
|
||||
|
||||
def tasks(environ, owner=None, state='active', view='tree', method='all', hostID=None, channelID=None, start=None, order='-id'):
|
||||
values = _initValues(environ, 'Tasks', 'tasks')
|
||||
|
|
@ -435,15 +465,15 @@ def tasks(environ, owner=None, state='active', view='tree', method='all', hostID
|
|||
|
||||
values['users'] = server.listUsers(queryOpts={'order': 'name'})
|
||||
|
||||
if method in environ['koji.options']['Tasks']:
|
||||
if method in _TASKS + environ['koji.options']['Tasks']:
|
||||
opts['method'] = method
|
||||
else:
|
||||
method = 'all'
|
||||
values['method'] = method
|
||||
values['alltasks'] = environ['koji.options']['Tasks']
|
||||
values['alltasks'] = _TASKS + environ['koji.options']['Tasks']
|
||||
|
||||
treeEnabled = True
|
||||
if hostID or (method not in ['all'] + environ['koji.options']['ParentTasks']):
|
||||
if hostID or (method not in ['all'] + _PARENT_TASKS + environ['koji.options']['ParentTasks']):
|
||||
# force flat view if we're filtering by a hostID or a task that never has children
|
||||
if view == 'tree':
|
||||
view = 'flat'
|
||||
|
|
@ -452,7 +482,7 @@ def tasks(environ, owner=None, state='active', view='tree', method='all', hostID
|
|||
values['treeEnabled'] = treeEnabled
|
||||
|
||||
toplevelEnabled = True
|
||||
if method not in ['all'] + environ['koji.options']['ToplevelTasks']:
|
||||
if method not in ['all'] + _TOPLEVEL_TASKS + environ['koji.options']['ToplevelTasks']:
|
||||
# force flat view if we're viewing a task that is never a top-level task
|
||||
if view == 'toplevel':
|
||||
view = 'flat'
|
||||
|
|
|
|||
|
|
@ -93,58 +93,9 @@ class Dispatcher(object):
|
|||
['LogLevel', 'string', 'WARNING'],
|
||||
['LogFormat', 'string', '%(msecs)d [%(levelname)s] m=%(method)s u=%(user_name)s p=%(process)s r=%(remoteaddr)s %(name)s: %(message)s'],
|
||||
|
||||
['Tasks', 'list', ['build',
|
||||
'buildSRPMFromSCM',
|
||||
'buildArch',
|
||||
'chainbuild',
|
||||
'maven',
|
||||
'buildMaven',
|
||||
'chainmaven',
|
||||
'wrapperRPM',
|
||||
'winbuild',
|
||||
'vmExec',
|
||||
'waitrepo',
|
||||
'tagBuild',
|
||||
'newRepo',
|
||||
'createrepo',
|
||||
'buildNotification',
|
||||
'tagNotification',
|
||||
'dependantTask',
|
||||
'livecd',
|
||||
'createLiveCD',
|
||||
'appliance',
|
||||
'createAppliance',
|
||||
'image',
|
||||
'createImage',
|
||||
'runroot',
|
||||
'livemedia',
|
||||
'createLiveMedia']],
|
||||
['ToplevelTasks', 'list', ['build',
|
||||
'buildNotification',
|
||||
'chainbuild',
|
||||
'maven',
|
||||
'chainmaven',
|
||||
'wrapperRPM',
|
||||
'winbuild',
|
||||
'newRepo',
|
||||
'tagBuild',
|
||||
'tagNotification',
|
||||
'waitrepo',
|
||||
'livecd',
|
||||
'appliance',
|
||||
'image',
|
||||
'livemedia']],
|
||||
['ParentTasks', 'list', ['build',
|
||||
'chainbuild',
|
||||
'maven',
|
||||
'chainmaven',
|
||||
'winbuild',
|
||||
'newRepo',
|
||||
'wrapperRPM',
|
||||
'livecd',
|
||||
'appliance',
|
||||
'image',
|
||||
'livemedia']],
|
||||
['Tasks', 'list', []],
|
||||
['ToplevelTasks', 'list', []],
|
||||
['ParentTasks', 'list', []],
|
||||
|
||||
['RLIMIT_AS', 'string', None],
|
||||
['RLIMIT_CORE', 'string', None],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue