177 lines
5.6 KiB
Django/Jinja
177 lines
5.6 KiB
Django/Jinja
|
|
#include "includes/header.html.j2"
|
|
|
|
<h4>Information for tag <a href="taginfo?tagID={{ tag.id }}">{{ tag.name }}</a></h4>
|
|
|
|
<table>
|
|
#if child and 'admin' in perms
|
|
<tr>
|
|
<th colspan="2"><a href="tagparent?tagID={{ child.id }}&parentID={{ tag.id }}&action=add{{ util.authToken() }}">Add {{ tag.name }} as parent of {{ child.name }}</a></th>
|
|
</tr>
|
|
#endif
|
|
<tr>
|
|
<th>Name</th><td>{{ tag.name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>ID</th><td>{{ tag.id }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Arches</th><td>{{ tag.arches }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Locked</th><td class="{{ (not tag.locked)|lower }}">{{ 'yes' if tag.locked else 'no' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Permission</th><td>{{ allPerms[tag.perm_id] if tag.perm_id else 'none' }}</td>
|
|
</tr>
|
|
#if mavenEnabled
|
|
<tr>
|
|
<th>Maven Support?</th><td class="{{ tag.maven_support|lower }}">{{ 'yes' if tag.maven_support else 'no' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Include All Maven Builds?</th><td class="{{ tag.maven_include_all|lower }}">{{ 'yes' if tag.maven_include_all else 'no' }}</td>
|
|
</tr>
|
|
#endif
|
|
<tr>
|
|
<th>Inheritance</th>
|
|
<td class="tree">
|
|
<span class="root">{{ tag.name }}</span>
|
|
#set numParents = (inheritance |length)
|
|
#set iter = 0
|
|
#set all_depths = [0]
|
|
#set TRUNC_DEPTH = 7
|
|
<ul>
|
|
#for parent in inheritance
|
|
#set iter = iter + 1
|
|
#set nextDepth = (loop.nextitem.currdepth if not loop.last else 1)
|
|
#set depth = parent.currdepth
|
|
#set _junk = all_depths.append(depth)
|
|
## ^ TODO refactor to avoid this
|
|
#if depth == TRUNC_DEPTH and not all
|
|
<li><span class="treeBranch"><span class="treeToggle treeLabel">...</span></span></li>
|
|
<li class="hidden">
|
|
#elif tagsByChild[parent.child_id]|length > 1
|
|
<li class="sibling">
|
|
#else
|
|
<li>
|
|
#endif
|
|
#set _junk = tagsByChild[parent.child_id].pop()
|
|
## ^ TODO refactor to avoid this
|
|
<span class="treeBranch">
|
|
<span class="treeLabel">
|
|
<a href="taginfo?tagID={{ parent.parent_id }}">{{ parent.name }}</a>
|
|
#if depth == 1 and 'admin' in perms
|
|
<span class="treeLink">(<a href="tagparent?tagID={{ tag.id }}&parentID={{ parent.parent_id }}&action=edit{{ util.authToken() }}">edit</a>) (<a href="tagparent?tagID={{ tag.id }}&parentID={{ parent.parent_id }}&action=remove{{ util.authToken() }}">remove</a>)</span>
|
|
#endif
|
|
</span>
|
|
</span>
|
|
#if nextDepth > depth
|
|
<ul>
|
|
#else
|
|
</li>
|
|
#endif
|
|
#for _tail in range(nextDepth, depth)
|
|
</ul>
|
|
</li>
|
|
#endfor
|
|
#endfor
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
#set maxDepth = all_depths|max
|
|
#if maxDepth >= TRUNC_DEPTH
|
|
<tr>
|
|
<td colspan="2">
|
|
#if all
|
|
<a href="taginfo?tagID={{ tag.id }}{{ util.passthrough('inherited') }}">Show abbreviated tree</a>
|
|
#else
|
|
<a href="taginfo?tagID={{ tag.id }}{{ util.passthrough('inherited') }}&all=1">Show full tree</a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
#endif
|
|
#if 'admin' in perms
|
|
<tr>
|
|
<td colspan="2"><a href="tags?childID={{ tag.id }}">Add parent</a></td>
|
|
</tr>
|
|
#endif
|
|
#if external_repos
|
|
<tr>
|
|
<th>External repos</th>
|
|
<td>
|
|
#for external_repo in external_repos
|
|
<a href="externalrepoinfo?extrepoID={{ external_repo.external_repo_id }}">{{ external_repo.external_repo_name }}</a> [{{ external_repo.merge_mode }}]
|
|
#if external_repo.tag_id != tag.id
|
|
<span class="smaller">(inherited from <a href="taginfo?tagID={{ external_repo.tag_id }}">{{ external_repo.tag_name }}</a>)</span>
|
|
#endif
|
|
<br/>
|
|
#endfor
|
|
</td>
|
|
</tr>
|
|
#endif
|
|
<tr>
|
|
<th>Repo created</th>
|
|
<td>
|
|
#if repo
|
|
<a href="repoinfo?repoID={{ repo.id }}">{{ util.formatTimeRSS(repo.create_ts) }}</a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Packages</th>
|
|
<td><a href="packages?blocked=0&tagID={{ tag.id }}">{{ numPackages }}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Packages (blocked packages included)</th>
|
|
<td><a href="packages?tagID={{ tag.id }}">{{ numPackagesBlocked }}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Builds</th>
|
|
<td><a href="builds?tagID={{ tag.id }}">{{ numBuilds }}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Targets building from this tag</th>
|
|
<td>
|
|
#if (srcTargets |length)
|
|
#for target in srcTargets
|
|
<a href="buildtargetinfo?name={{ target.name|urlencode }}">{{ target.name }}</a><br/>
|
|
#endfor
|
|
#else
|
|
No build targets
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Targets building to this tag</th>
|
|
<td>
|
|
#if (destTargets |length)
|
|
#for target in destTargets
|
|
<a href="buildtargetinfo?name={{ target.name|urlencode }}">{{ target.name }}</a><br/>
|
|
#endfor
|
|
#else
|
|
No build targets
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
#if 'admin' in perms
|
|
<tr>
|
|
<td colspan="2"><a href="tagedit?tagID={{ tag.id }}{{ util.authToken() }}">Edit tag</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"><a href="tagdelete?tagID={{ tag.id }}{{ util.authToken() }}">Delete tag</a></td>
|
|
</tr>
|
|
#endif
|
|
#if tag.get('extra')
|
|
<tr>
|
|
<th>Extra options:</th>
|
|
</tr>
|
|
#for key in tag['extra']
|
|
<tr>
|
|
<th>{{ key }}</th>
|
|
<td>{{ tag.extra[key]|pprint }}</td>
|
|
</tr>
|
|
#endfor
|
|
#endif
|
|
</table>
|
|
|
|
#include "includes/footer.html.j2"
|