Skip to content

Commit 9384a1b

Browse files
author
Adam Collins
committedJan 29, 2025
#242 update tasks/all and tasks/index pages
1 parent 225fdde commit 9384a1b

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed
 

‎grails-app/controllers/au/org/ala/spatial/TasksController.groovy

+4-6
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,11 @@ class TasksController {
407407
t.history.each { it -> it }
408408
t.output.each { it -> it }
409409
t.input.each { it -> it }
410-
def task = tasksService.reRun(t)
411410

412-
if (task) {
413-
render task as JSON
414-
} else {
415-
redirect(action: "index", params: params)
416-
}
411+
tasksService.reRun(t)
412+
413+
params.remove('id')
414+
redirect(action: "index", params: params)
417415
}
418416

419417
/**

‎grails-app/views/tasks/all.gsp

+3-5
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110

111111
<g:sortableColumn property="history"
112112
title="${message(code: 'task.history.label', default: 'History (last 4 entries)')}"/>
113-
<td><i class="fa fa-user"></i></td>
113+
<td>userId</td>
114114
<th></th>
115115
</thead>
116116
<tbody>
@@ -135,9 +135,7 @@
135135
<g:formatDate date="${h.key}" format="dd/MM/yy hh:mm:ss"/>=${h.value}<br/>
136136
</g:each></td>
137137

138-
<td><g:link action="getUserById"
139-
id="${taskInstance.userId}"><g:if
140-
test="${taskInstance?.email != "null"}">${taskInstance?.email}</g:if><g:else>${taskInstance?.userId}</g:else></g:link></td>
138+
<td>${taskInstance?.userId}</td>
141139

142140
<td><g:link action="reRun" class="btn btn-sm btn-default" id="${taskInstance.id}"
143141
params="${params}">re-run task</g:link>
@@ -150,7 +148,7 @@
150148
</table>
151149

152150
<div class="pagination">
153-
<g:paginate total="${taskInstanceCount ?: 0}" params="${params}"/>
151+
<g:paginate total="${taskInstanceCount ?: 0}" params="${params}" action="all"/>
154152
</div>
155153
</div>
156154
</body>

‎grails-app/views/tasks/index.gsp

+2-4
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111

112112
<g:sortableColumn property="history"
113113
title="${message(code: 'task.history.label', default: 'History (last 4 entries)')}"/>
114-
<td><i class="fa fa-user"></i></td>
114+
<td>userId</td>
115115
<th></th>
116116
</thead>
117117
<tbody>
@@ -136,9 +136,7 @@
136136
<g:formatDate date="${h.key}" format="dd/MM/yy hh:mm:ss"/>=${h.value}<br/>
137137
</g:each></td>
138138

139-
<td><g:link action="getUserById"
140-
id="${taskInstance.userId}"><g:if
141-
test="${taskInstance?.email != "null"}">${taskInstance?.email}</g:if><g:else>${taskInstance?.userId}</g:else></g:link></td>
139+
<td>${taskInstance?.userId}</td>
142140

143141
<td><g:link action="reRun" class="btn btn-sm btn-default" id="${taskInstance.id}"
144142
params="${params}">re-run task</g:link>

0 commit comments

Comments
 (0)
Failed to load comments.