19
19
20
20
require_once ("../inc/submit_db.inc " );
21
21
require_once ("../inc/util.inc " );
22
+ require_once ("../inc/result.inc " );
22
23
require_once ("../inc/submit_util.inc " );
23
24
require_once ("../project/project.inc " );
24
25
@@ -41,6 +42,12 @@ function handle_main($user) {
41
42
$ wus = BoincWorkunit::enum ("batch = $ batch ->id " );
42
43
$ batch = get_batch_params ($ batch , $ wus );
43
44
}
45
+ $ app = BoincApp::lookup_id ($ batch ->app_id );
46
+ if ($ app ) {
47
+ $ batch ->app_name = $ app ->name ;
48
+ } else {
49
+ $ batch ->app_name = "unknown " ;
50
+ }
44
51
}
45
52
46
53
foreach ($ batches as $ batch ) {
@@ -74,11 +81,12 @@ function handle_main($user) {
74
81
$ first = false ;
75
82
echo "<h2>Completed batches</h2> \n" ;
76
83
start_table ();
77
- table_header ("name " , "ID " , "# jobs " , "submitted " );
84
+ table_header ("name " , "ID " , "app " , " # jobs " , "submitted " );
78
85
}
79
86
table_row (
80
87
"<a href=submit.php?action=query_batch&batch_id= $ batch ->id > $ batch ->name </a> " ,
81
88
"<a href=submit.php?action=query_batch&batch_id= $ batch ->id > $ batch ->id </a> " ,
89
+ $ batch ->app_name ,
82
90
$ batch ->njobs ,
83
91
local_time_str ($ batch ->create_time )
84
92
);
@@ -96,11 +104,12 @@ function handle_main($user) {
96
104
$ first = false ;
97
105
echo "<h2>Aborted batches</h2> \n" ;
98
106
start_table ();
99
- table_header ("name " , "ID " , "# jobs " , "submitted " );
107
+ table_header ("name " , "ID " , "app " , " # jobs " , "submitted " );
100
108
}
101
109
table_row (
102
110
"<a href=submit.php?action=query_batch&batch_id= $ batch ->id > $ batch ->name </a> " ,
103
111
"<a href=submit.php?action=query_batch&batch_id= $ batch ->id > $ batch ->id </a> " ,
112
+ $ batch ->app_name ,
104
113
$ batch ->njobs ,
105
114
local_time_str ($ batch ->create_time )
106
115
);
@@ -163,7 +172,7 @@ function handle_query_batch($user) {
163
172
);
164
173
$ wus = BoincWorkunit::enum ("batch = $ batch ->id " );
165
174
foreach ($ wus as $ wu ) {
166
- $ resultid = $ wu ->canonical_instance_id ;
175
+ $ resultid = $ wu ->canonical_resultid ;
167
176
if ($ resultid ) {
168
177
$ x = "<a href=result.php?resultid= $ resultid> $ resultid</a> " ;
169
178
$ y = "completed " ;
@@ -173,7 +182,7 @@ function handle_query_batch($user) {
173
182
}
174
183
175
184
echo "<tr>
176
- <td><a href=submit.php?action=query_job&job_id= $ id> $ id</a></td>
185
+ <td><a href=submit.php?action=query_job&wuid= $ wu -> id > $ wu -> id </a></td>
177
186
<td> $ y</td>
178
187
<td> $ x</td>
179
188
</tr>
@@ -197,7 +206,7 @@ function handle_query_job() {
197
206
"Instance ID<br><span class=note>click for result page</span> " ,
198
207
"State " , "Output files "
199
208
);
200
- $ results = BoincResult::enum ("workunitid= $ job_id " );
209
+ $ results = BoincResult::enum ("workunitid= $ wuid " );
201
210
foreach ($ results as $ result ) {
202
211
echo "<tr>
203
212
<td><a href=result.php?resultid= $ result ->id > $ result ->id </a></td>
0 commit comments