minor tweaks to the web UI for consistency
This commit is contained in:
parent
f39637bf2a
commit
7d954b8b22
4 changed files with 28 additions and 26 deletions
|
|
@ -4735,12 +4735,12 @@ class RootExports(object):
|
|||
fields = ['imageinfo.id', 'filename', 'filesize', 'mediatype',
|
||||
'imageinfo.task_id', 'buildroot.id', 'hash']
|
||||
aliases = ['id', 'filename', 'filesize', 'mediatype', 'task_id',
|
||||
'br_id', 'hash']
|
||||
'br_id', 'hash']
|
||||
joins = ['buildroot ON imageinfo.task_id = buildroot.task_id']
|
||||
if imageID:
|
||||
clauses = ['imageinfo.id = %(imageID)s']
|
||||
clauses = ['imageinfo.id = %(imageID)i']
|
||||
elif taskID:
|
||||
clauses = ['imageinfo.task_id = %(taskID)s']
|
||||
clauses = ['imageinfo.task_id = %(taskID)i']
|
||||
|
||||
query = QueryProcessor(columns=fields, tables=tables, clauses=clauses,
|
||||
values=locals(), joins=joins, aliases=aliases)
|
||||
|
|
@ -4750,10 +4750,9 @@ class RootExports(object):
|
|||
if ret:
|
||||
ret['path'] = os.path.join(koji.pathinfo.imageFinalPath(),
|
||||
koji.pathinfo.livecdRelPath(ret['id']))
|
||||
# Again we're covering for huge filesizes. XMLRPC will complain if
|
||||
# numbers exceed signed 32-bit integer ranges.
|
||||
if ret['filesize'] > 2147483647:
|
||||
ret['filesize'] = str(ret['filesize'])
|
||||
# Always return filesize as a string instead of an int so XMLRPC doesn't
|
||||
# complain about 32-bit overflow
|
||||
ret['filesize'] = str(ret['filesize'])
|
||||
return ret
|
||||
|
||||
# Called from kojid::LiveCDTask
|
||||
|
|
|
|||
|
|
@ -9,45 +9,43 @@
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Image ID</th><td>$image.id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Build Root ID</th><td><a href="buildrootinfo?buildrootID=$image.br_id">$image.br_id</a></td>
|
||||
<th>ID</th><td>$image.id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>File Name</th><td>$image.filename</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>File Size</th><td>$image.filesize bytes</td>
|
||||
</tr>
|
||||
<th>File Size</th><td>$image.filesize</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Media Type</th><td>$image.mediatype</td>
|
||||
</tr>
|
||||
<tr>
|
||||
#if $len($image.hash) == 32
|
||||
<th>Hash (MD5)</th><td>$image.hash</td>
|
||||
<th>Digest (md5)</th><td>$image.hash</td>
|
||||
#elif $len($image.hash) == 40
|
||||
<th>Hash (SHA1)</th><td>$image.hash</td>
|
||||
<th>Digest (sha1)</th><td>$image.hash</td>
|
||||
#elif $len($image.hash) == 64
|
||||
<th>Hash (SHA256)</th><td>$image.hash</td>
|
||||
<th>Digest (sha256)</th><td>$image.hash</td>
|
||||
#elif $len($image.hash) == 96
|
||||
<th>Hash (SHA384)</th><td>$image.hash</td>
|
||||
<th>Digest (sha384)</th><td>$image.hash</td>
|
||||
#elif $len($image.hash) == 128
|
||||
<th>Hash (SHA512)</th><td>$image.hash</td>
|
||||
<th>Digest (sha512)</th><td>$image.hash</td>
|
||||
#else
|
||||
<th>Hash </th><td>$image.hash</td>
|
||||
#end if
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Task ID</th><td><a href="taskinfo?taskID=$image.task_id">$image.task_id</a></td>
|
||||
<th>Task</th><td><a href="taskinfo?taskID=$task.id" class="task$util.taskState($task.state)">$koji.taskLabel($task)</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Buildroot</th><td><a href="buildrootinfo?buildrootID=$buildroot.id">/var/lib/mock/$buildroot.tag_name-$buildroot.id-$buildroot.repo_id</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Output</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
#for $ofile in $logs
|
||||
<a href="$ofile">$basename($ofile)</a><br/>
|
||||
<a href="$ofile">$basename($ofile)</a><br/>
|
||||
#end for
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -572,8 +572,13 @@ def imageinfo(req, imageID):
|
|||
server = _getServer(req)
|
||||
values = _initValues(req, 'Image Information')
|
||||
imageURL = req.get_options().get('KojiImagesURL', 'http://localhost/images')
|
||||
values['image'] = server.getImageInfo(imageID=imageID)
|
||||
urlrelpath = koji.pathinfo.livecdRelPath(values['image']['id'])
|
||||
imageID = int(imageID)
|
||||
image = server.getImageInfo(imageID=imageID)
|
||||
values['image'] = image
|
||||
values['title'] = image['filename'] + ' | Image Information'
|
||||
urlrelpath = koji.pathinfo.livecdRelPath(image['id'])
|
||||
values['buildroot'] = server.getBuildroot(image['br_id'])
|
||||
values['task'] = server.getTaskInfo(image['task_id'], request=True)
|
||||
filelist = []
|
||||
for ofile in os.listdir(values['image']['path']):
|
||||
relpath = os.path.join(urlrelpath, ofile)
|
||||
|
|
@ -1424,7 +1429,7 @@ def rpmlist(req, type, buildrootID=None, imageID=None, start=None, order='nvr'):
|
|||
raise koji.GenericError, 'unrecognized type of rpmlist'
|
||||
|
||||
elif imageID != None:
|
||||
|
||||
imageID = int(imageID)
|
||||
values['image'] = server.getImageInfo(imageID=imageID)
|
||||
# If/When future image types are supported, add elifs here if needed.
|
||||
if type == 'image':
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@
|
|||
#end if
|
||||
#if $task.method == 'createLiveCD' and $image
|
||||
<tr>
|
||||
<th>Image Information</th>
|
||||
<th>Image</th>
|
||||
<td>
|
||||
<a href="imageinfo?imageID=$image.id">$image.filename</a><br/>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue