From b63e8e1eae831f599ba10d4807410d00a847f2cd Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 29 Sep 2015 11:31:48 -0400 Subject: [PATCH] attempt to fix web display --- www/kojiweb/buildrootinfo_cg.chtml | 41 ++++++++++++++++++++++++++++++ www/kojiweb/index.py | 15 +++++++---- 2 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 www/kojiweb/buildrootinfo_cg.chtml diff --git a/www/kojiweb/buildrootinfo_cg.chtml b/www/kojiweb/buildrootinfo_cg.chtml new file mode 100644 index 00000000..7485813a --- /dev/null +++ b/www/kojiweb/buildrootinfo_cg.chtml @@ -0,0 +1,41 @@ +#import koji +#from kojiweb import util + +#include "includes/header.chtml" + +

Information for external buildroot $buildroot.cg_name:$buildroot.id

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID$buildroot.id
Host OS$buildroot.host_os
Host Arch$buildroot.host_arch
Content Generator$buildroot.cg_name ($buildroot.cg_version)
Container Type$buildroot.container_type
Container Arch$buildroot.container_arch
Component RPMs
Built RPMs
Component Archives
Built Archives
+ +#include "includes/footer.chtml" diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py index fdbbc279..fc4b6a3f 100644 --- a/www/kojiweb/index.py +++ b/www/kojiweb/index.py @@ -1623,17 +1623,22 @@ def buildrootinfo(environ, buildrootID, builtStart=None, builtOrder=None, compon buildrootID = int(buildrootID) buildroot = server.getBuildroot(buildrootID) - values['title'] = '%(tag_name)s-%(id)i-%(repo_id)i' % buildroot + ' | Buildroot Info' - if buildroot == None: raise koji.GenericError, 'unknown buildroot ID: %i' % buildrootID - task = server.getTaskInfo(buildroot['task_id'], request=True) + elif buildroot['br_type'] == koji.BR_TYPES['STANDARD']: + template = 'buildrootinfo.chtml' + values['title'] = '%(tag_name)s-%(id)i-%(repo_id)i | Buildroot Info' % buildroot + values['task'] = server.getTaskInfo(buildroot['task_id'], request=True) + + else: + template = 'buildrootinfo_cg.chtml' + values['title'] = '%(cg_name)s:%(id)i | Buildroot Info' % buildroot + # TODO - fetch tools and extras info values['buildroot'] = buildroot - values['task'] = task - return _genHTML(environ, 'buildrootinfo.chtml') + return _genHTML(environ, template) def rpmlist(environ, type, buildrootID=None, imageID=None, start=None, order='nvr'): """