Lines 22-36
Link Here
|
22 |
} ); |
22 |
} ); |
23 |
} |
23 |
} |
24 |
function get_infos(version, node){ |
24 |
function get_infos(version, node){ |
25 |
$.ajax({ |
25 |
$.getJSON('/cgi-bin/koha/admin/ajax-updatedb-getinfos.pl', |
26 |
url: "/cgi-bin/koha/admin/ajax-updatedb-getinfos.pl", |
26 |
{ version: version }, |
27 |
data: { |
27 |
function(param) { |
28 |
version: version |
28 |
if ( param['errors'] ) { |
29 |
}, |
29 |
$(node).replaceWith(_("Errors occured: ") + param['errors']); |
30 |
success: function(data){ |
30 |
} |
31 |
$(node).replaceWith(data); |
31 |
var s; |
32 |
}, |
32 |
s = "<b>" + _("Comments:") + "</b>"; |
33 |
}); |
33 |
s += '<br/>'; |
|
|
34 |
if ( param['comments'] ) { |
35 |
s += param['comments']; |
36 |
} else { |
37 |
s += _("No comments"); |
38 |
} |
39 |
s += '<br/><br/>'; |
40 |
|
41 |
s += "<b>" + _("Queries:") + "</b>"; |
42 |
s += '<br/>'; |
43 |
if ( param['queries'] ) { |
44 |
s += param['queries']; |
45 |
} else { |
46 |
s += _("No queries"); |
47 |
} |
48 |
$(node).replaceWith(s); |
49 |
} |
50 |
); |
34 |
} |
51 |
} |
35 |
//]]> |
52 |
//]]> |
36 |
</script> |
53 |
</script> |
Lines 56-71
Link Here
|
56 |
<li> |
73 |
<li> |
57 |
[% report_loo.version %] -- |
74 |
[% report_loo.version %] -- |
58 |
[% FOREACH r IN report_loo.report %] |
75 |
[% FOREACH r IN report_loo.report %] |
59 |
[% IF r.error.error == "ALREADY_EXISTS" %] |
76 |
[% IF r.error.error == "ALREADY_EXISTS" %] |
60 |
This file ( [% r.error.filepath %] ) still already execute in version [% r.error.old_version %] : same md5 ([% r.error.md5 %]) |
77 |
<span style="color:orange;"> |
61 |
[<a href="/cgi-bin/koha/admin/updatedatabase.pl?op=mark_as_ok&version=[% report_loo.version %]">Mark as OK</a>] |
78 |
[% r.error.filepath %] already executed in version [% r.error.old_version %] : same md5 ([% r.error.md5 %]) |
62 |
[% ELSIF r.error.error == "LOAD_FUNCTIONS_FAILED" %] |
79 |
[<a href="/cgi-bin/koha/admin/updatedatabase.pl?op=mark_as_ok&version=[% report_loo.version %]">Mark as OK</a>] |
63 |
Load functions in [% r.error.filename %] failed |
80 |
</span> |
64 |
[% ELSIF r.error.error == "BAD_EXTENSION" %] |
81 |
[% ELSIF r.error.error == "LOAD_FUNCTIONS_FAILED" %] |
65 |
This extension ([% r.error.extension %]) is not take into account (only .pl or .sql)"; |
82 |
<span style="color:red;"> |
|
|
83 |
Load functions in [% r.error.filename %] failed ([% r.error.error_str %]) |
84 |
</span> |
85 |
[% ELSIF r.error.error == "BAD_EXTENSION" %] |
86 |
<span style="color:red;"> |
87 |
This extension ([% r.error.extension %]) is not take into account (only .pl or .sql)"; |
88 |
</span> |
89 |
[% ELSE %] |
90 |
[% IF r.error == "OK" %] |
91 |
<span style="color:green;"> |
92 |
[% r.error %]; |
93 |
</span> |
66 |
[% ELSE %] |
94 |
[% ELSE %] |
|
|
95 |
<span style="color:red;"> |
67 |
[% r.error %]; |
96 |
[% r.error %]; |
|
|
97 |
</span> |
68 |
[% END %] |
98 |
[% END %] |
|
|
99 |
[% END %] |
69 |
[% END %] |
100 |
[% END %] |
70 |
</li> |
101 |
</li> |
71 |
[% END %] |
102 |
[% END %] |
Lines 96-104
Link Here
|
96 |
<thead> |
127 |
<thead> |
97 |
<tr> |
128 |
<tr> |
98 |
<th>DB revision</th> |
129 |
<th>DB revision</th> |
99 |
<th>Comments</th> |
|
|
100 |
<th>Status</th> |
130 |
<th>Status</th> |
101 |
<th>Availability</th> |
131 |
<th>Comments</th> |
102 |
<th>Details</th> |
132 |
<th>Details</th> |
103 |
</tr> |
133 |
</tr> |
104 |
</thead> |
134 |
</thead> |
Lines 107-180
Link Here
|
107 |
<tr> |
137 |
<tr> |
108 |
<td>[% v.version %]</td> |
138 |
<td>[% v.version %]</td> |
109 |
<td> |
139 |
<td> |
110 |
[% FOREACH c IN v.comments %] |
|
|
111 |
[% c.comment %] |
112 |
[% END %] |
113 |
</td> |
114 |
<td> |
115 |
[% IF v.available %] |
140 |
[% IF v.available %] |
116 |
Unknown |
141 |
Not applied |
|
|
142 |
[% IF (dev_mode) %] |
143 |
[<a href="/cgi-bin/koha/admin/updatedatabase.pl?op=update&version=[% v.version %]">Execute</a>] |
144 |
[% END %] |
117 |
[% ELSE %] |
145 |
[% ELSE %] |
118 |
[% IF v.status %] |
146 |
[% SWITCH v.status %] |
119 |
<span style="color:green;">OK</span> |
147 |
[% CASE 0 %] |
120 |
[% IF v.status == 2 %] |
148 |
<span style="color:red;">Applied and failed</span> |
121 |
[FORCED] |
149 |
[% CASE 1 %] |
122 |
[% END %] |
150 |
<span style="color:green;">Applied and OK</span> |
123 |
[% ELSE %] |
151 |
[% CASE 2 %] |
124 |
<span style="color:red;">Failed</span> |
152 |
<span style="color:green;">Applied and Forced</span> |
|
|
153 |
[% CASE %] |
154 |
<span style="color:red;">Status does not exist !</span> |
125 |
[% END %] |
155 |
[% END %] |
126 |
[% END %] |
156 |
[% END %] |
127 |
</td> |
157 |
</td> |
128 |
<td> |
158 |
<td> |
129 |
[% IF v.available %] |
159 |
[% FOREACH c IN v.comments %] |
130 |
Available |
160 |
[% c.comment %]<br/> |
131 |
[% IF (dev_mode) %] |
|
|
132 |
[<a href="/cgi-bin/koha/admin/updatedatabase.pl?op=update&version=[% v.version %]">Execute</a>] |
133 |
[% END %] |
134 |
[% ELSE %] |
135 |
Already executed |
136 |
[% END %] |
161 |
[% END %] |
137 |
</td> |
162 |
</td> |
138 |
<td width="50%"> |
163 |
<td width="50%"> |
|
|
164 |
[% IF v.available %] |
165 |
<span style="display:block;"><a href="#" onclick="get_infos('[% v.version %]', this); return false;">Get comments</a></span> |
166 |
[% ELSE %] |
139 |
<div class="details" style="display:none;"> |
167 |
<div class="details" style="display:none;"> |
140 |
[% IF v.available %] |
168 |
<div class="queries" style="display:block;"> |
141 |
Unknown |
169 |
<b>Queries</b> : |
142 |
<span style="display:block;"><a href="#" onclick="get_infos('[% v.version %]', this); return false;">Get comments</a></span> |
170 |
<ul> |
143 |
[% ELSE %] |
171 |
[% FOREACH q IN v.queries %] |
144 |
<div class="queries" style="display:block;"> |
172 |
<li>[% q.query %]<br/></li> |
145 |
<span class="underline">Queries</span> : |
173 |
[% END %] |
146 |
[% FOREACH q IN v.queries %] |
174 |
</ul> |
147 |
[% q.query %]<br/> |
175 |
</div> |
148 |
[% END %] |
176 |
[% IF v.status == 1 %] |
149 |
</div> |
177 |
<div class="status" style="display:block;"> |
150 |
[% IF v.status == 1 %] |
178 |
<b>Status</b> : |
151 |
<div class="status" style="display:block;"> |
179 |
<span style="color:green;">OK</span> |
152 |
<span class="underline">Status</span> : |
180 |
</div> |
153 |
<span style="color:green;">OK</span> |
181 |
[% ELSE %] |
154 |
</div> |
182 |
<div class="status" style="display:block;"> |
155 |
[% ELSE %] |
183 |
<b>Status</b> : |
156 |
<div class="status" style="display:block;"> |
184 |
[% IF v.status == 2 %] |
157 |
<span class="underline">Status</span> : |
185 |
<span style="color:green;">OK</span> |
158 |
[% IF v.status == 2 %] |
186 |
[FORCED] |
159 |
<span style="color:green;">OK</span> |
187 |
[% ELSE %] |
160 |
[FORCED] |
188 |
<span style="color:red;">Failed</span> |
161 |
[% ELSE %] |
189 |
[<a href="/cgi-bin/koha/admin/updatedatabase.pl?op=mark_as_ok&version=[% v.version %]">Mark as OK</a>] |
162 |
<span style="color:red;">Failed</span> |
190 |
[% END %] |
163 |
[<a href="/cgi-bin/koha/admin/updatedatabase.pl?op=mark_as_ok&version=[% v.version %]">Mark as OK</a>] |
191 |
</div> |
164 |
[% END %] |
192 |
<div class="errors" style="display:block;"> |
165 |
</div> |
193 |
<b>Errors</b> : |
166 |
<div class="errors" style="display:block;"> |
194 |
<ul> |
167 |
<span class="underline">Errors</span> : |
195 |
[% FOREACH e IN v.errors %] |
168 |
<span class="errors"> |
196 |
<li><span>[% e.error %]</span></li> |
169 |
[% FOREACH e IN v.errors %] |
|
|
170 |
<span>[% e.error %]</span> |
171 |
[% END %] |
172 |
</span> |
173 |
</div> |
174 |
[% END %] |
197 |
[% END %] |
175 |
[% END %] |
198 |
</ul> |
|
|
199 |
</div> |
200 |
[% END %] |
176 |
</div> |
201 |
</div> |
177 |
<a href="#" onclick="see_details(this);return false;">Show details</a> |
202 |
<a href="#" onclick="see_details(this);return false;">Show details</a> |
|
|
203 |
[% END %] |
178 |
</td> |
204 |
</td> |
179 |
</tr> |
205 |
</tr> |
180 |
[% END %] |
206 |
[% END %] |
181 |
- |
|
|