This file is indexed.

/usr/share/koji-web/scripts/tasks.chtml is in koji-servers 1.10.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#import koji
#from kojiweb import util

#def printChildren($taskID, $childMap)
  #set $iter = 0
  #set $children = $childMap[$str($taskID)]
  #if $children
  <ul>
    #for $child in $children
    #set $iter += 1
    #if $iter < $len($children)
    <li class="sibling">
    #else
    <li>
    #end if
      #set $childState = $util.taskState($child.state)
      <span class="treeBranch">
        <span class="treeLabel">
          <a href="taskinfo?taskID=$child.id" class="task$childState" title="$childState">$koji.taskLabel($child)</a>
        </span>
      </span>
    $printChildren($child.id, $childMap)
    </li>
    #end for
  </ul>
  #end if
#end def

#def headerPrefix($state)
  #if $state == 'active'
Active
  #elif $state == 'all'
All
  #else
#echo $state.capitalize()
  #end if
#end def

#attr _PASSTHROUGH = ['owner', 'state', 'view', 'method', 'hostID', 'channelID', 'order']

#include "includes/header.chtml"

  <h4>$headerPrefix($state) #if $view == 'toplevel' then 'toplevel' else ''# #if $method != 'all' then $method else ''# Tasks#if $ownerObj then ' owned by <a href="userinfo?userID=%i">%s</a>' % ($ownerObj.id, $ownerObj.name) else ''##if $host then ' on host <a href="hostinfo?hostID=%i">%s</a>' % ($host.id, $host.name) else ''# #if $channel then ' in channel <a href="channelinfo?channelID=%i">%s</a>' % ($channel.id, $channel.name) else ''#</h4>

  <table class="data-list">
    <tr>
      <td colspan="6">
        <form action="tasks">
        <table class="nested">
        <tr><td>
        <strong>State</strong>:
        </td><td>
        <select name="state" class="filterlist" onchange="javascript: window.location = 'tasks?state=' + this.value + '$util.passthrough_except($self, 'state')';">
          <option value="active" $util.toggleSelected($self, $state, 'active')>active</option>
          <option value="all" $util.toggleSelected($self, $state, 'all')>all</option>
          <option value="free" #if $state == 'free' then 'selected="selected"' else ''#>free</option>
          <option value="open" #if $state == 'open' then 'selected="selected"' else ''#>open</option>
          <option value="closed" #if $state == 'closed' then 'selected="selected"' else ''#>closed</option>
          <option value="failed" #if $state == 'failed' then 'selected="selected"' else ''#>failed</option>
          <option value="canceled" #if $state == 'canceled' then 'selected="selected"' else ''#>canceled</option>
          <option value="assigned" #if $state == 'assigned' then 'selected="selected"' else ''#>assigned</option> 
        </select>
        </td><td>
        <strong>Owner</strong>:
        </td><td>
        <select name="owner" class="filterlist" onchange="javascript: window.location = 'tasks?owner=' + this.value + '$util.passthrough_except($self, 'owner')';">
          <option value="" #if not $owner then 'selected="selected"' else ''#>everyone</option>
          #if $loggedInUser
          <option value="$loggedInUser.name">me</option>
          #end if
          #for $user in $users
          <option value="$user.name" #if $user.name == $owner then 'selected="selected"' else ''#>$user.name</option>
          #end for
        </select>
        </td></tr>
        <tr><td>
        <strong>Method</strong>:
        </td><td>
        <select name="method" class="filterlist" onchange="javascript: window.location = 'tasks?method=' + this.value + '$util.passthrough_except($self, 'method')';">
          <option value="all" $util.toggleSelected($self, $method, 'all')>all</option>
          #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
          #end for
        </select>
        </td><td>
        <strong>View</strong>:
        </td><td>
        <select name="view" class="filterlist" onchange="javascript: window.location = 'tasks?view=' + this.value + '$util.passthrough_except($self, 'view')';">
          <option value="tree" $util.toggleSelected($self, $view, 'tree') #if not $treeEnabled then 'disabled="disabled"' else ''#>tree</option>
          <option value="toplevel" $util.toggleSelected($self, $view, 'toplevel') #if not $toplevelEnabled then 'disabled="disabled"' else ''#>toplevel</option>
          <option value="flat" $util.toggleSelected($self, $view, 'flat')>flat</option>
        </select>
        </td></tr>
        </table>
        </form>
      </td>
    </tr>
    <tr>
      <td class="paginate" colspan="6">
        #if $len($taskPages) > 1
        <form class="pageJump" action="">
          Page:
          <select onchange="javascript: window.location = 'tasks?start=' + this.value * $taskRange + '$util.passthrough_except($self)';">
            #for $pageNum in $taskPages
            <option value="$pageNum"#if $pageNum == $taskCurrentPage then ' selected="selected"' else ''#>#echo $pageNum + 1#</option>
            #end for
          </select>
        </form>
        #end if
        #if $taskStart > 0
        <a href="tasks?start=#echo $taskStart - $taskRange #$util.passthrough_except($self)">&lt;&lt;&lt;</a>
        #end if
        #if $totalTasks != 0
        <strong>Tasks #echo $taskStart + 1 # through #echo $taskStart + $taskCount # of $totalTasks</strong>
        #end if
        #if $taskStart + $taskCount < $totalTasks
        <a href="tasks?start=#echo $taskStart + $taskRange#$util.passthrough_except($self)">&gt;&gt;&gt;</a>
        #end if
      </td>
    </tr>
    <tr class="list-header">
      <th><a href="tasks?order=$util.toggleOrder($self, 'id')$util.passthrough_except($self, 'order')">ID</a> $util.sortImage($self, 'id')</th>
      <th><a href="tasks?order=$util.toggleOrder($self, 'method')$util.passthrough_except($self, 'order')">Type</a> $util.sortImage($self, 'method')</th>
      <th><a href="tasks?order=$util.toggleOrder($self, 'owner')$util.passthrough_except($self, 'order')">Owner</a> $util.sortImage($self, 'owner')</th>
      <th><a href="tasks?order=$util.toggleOrder($self, 'arch')$util.passthrough_except($self, 'order')">Arch</a> $util.sortImage($self, 'arch')</th>
      <th><a href="tasks?order=$util.toggleOrder($self, 'completion_time')$util.passthrough_except($self, 'order')">Finished</a> $util.sortImage($self, 'completion_time')</th>
      <th><a href="tasks?order=$util.toggleOrder($self, 'state')$util.passthrough_except($self, 'order')">State</a> $util.sortImage($self, 'state')</th>
    </tr>
    #if $len($tasks) > 0
      #for $task in $tasks
        <tr class="$util.rowToggle($self)">
          #set $taskState = $util.taskState($task.state)
          <td>$task.id</td>
          <td#if $treeDisplay then ' class="tree"' else ''#>
            #if $treeDisplay then '&nbsp;' else ''#<a href="taskinfo?taskID=$task.id" class="task$taskState" title="$taskState">$koji.taskLabel($task)</a>
            #if $treeDisplay
            $printChildren($task.id, $task.descendents)
            #end if
          </td>
          <td class="user-$task.owner_name">
            #if $task.owner_type == $koji.USERTYPES['HOST']
            <a href="hostinfo?userID=$task.owner">$task.owner_name</a>
            #else
            <a href="userinfo?userID=$task.owner">$task.owner_name</a>
            #end if
          </td>
          <td>$task.arch</td>
          <td>$util.formatTime($task.completion_time)</td>
          <td class="task$state">$util.imageTag($taskState)</td>
        </tr>
      #end for
    #else
      <tr class="row-odd">
        <td colspan="6">No tasks</td>
      </tr>
    #end if
    <tr>
      <td class="paginate" colspan="6">
        #if $len($taskPages) > 1
        <form class="pageJump" action="">
          Page:
          <select onchange="javascript: window.location = 'tasks?start=' + this.value * $taskRange + '$util.passthrough_except($self)';">
            #for $pageNum in $taskPages
            <option value="$pageNum"#if $pageNum == $taskCurrentPage then ' selected="selected"' else ''#>#echo $pageNum + 1#</option>
            #end for
          </select>
        </form>
        #end if
        #if $taskStart > 0
        <a href="tasks?start=#echo $taskStart - $taskRange #$util.passthrough_except($self)">&lt;&lt;&lt;</a>
        #end if
        #if $totalTasks != 0
        <strong>Tasks #echo $taskStart + 1 # through #echo $taskStart + $taskCount # of $totalTasks</strong>
        #end if
        #if $taskStart + $taskCount < $totalTasks
        <a href="tasks?start=#echo $taskStart + $taskRange#$util.passthrough_except($self)">&gt;&gt;&gt;</a>
        #end if
      </td>
    </tr>
  </table>

#include "includes/footer.chtml"