mirror of
https://github.com/prymitive/karma
synced 2026-05-09 03:36:44 +00:00
application/javascript was set in commit 5e501844a7 which works, but causes browsers to throw lots of errors in the console, as they try to parse those scripts as javascript, json type still works and doesn't have same issue with browsers
59 lines
1.3 KiB
Plaintext
59 lines
1.3 KiB
Plaintext
<script type="application/json" id="reload-needed">
|
|
%div.jumbotron
|
|
%h1.text-center
|
|
New version detected, reloading ...
|
|
%i.fa.fa-refresh.fa-spin
|
|
</script>
|
|
|
|
|
|
<script type="application/json" id="update-error">
|
|
%div.jumbotron
|
|
%h1.text-center
|
|
=error
|
|
%i.fa.fa-exclamation-circle.text-danger
|
|
-if (message) {
|
|
%div.text-center
|
|
%p
|
|
=message
|
|
-if (last_ts > 0) {
|
|
%div.text-center
|
|
%p
|
|
Last successful update was
|
|
=moment.unix(last_ts).fromNow()
|
|
</script>
|
|
|
|
|
|
<script type="application/json" id="fatal-error">
|
|
%div.jumbotron
|
|
%h1.text-center
|
|
Critical error
|
|
%i.fa.fa-exclamation-circle.text-danger
|
|
%div.text-center
|
|
%p
|
|
-var msg = 'Auto refresh is enabled but last update was ' + moment.unix(last_ts).fromNow();
|
|
=msg
|
|
%p
|
|
This page will auto reload in
|
|
%span#reload-counter
|
|
=seconds_left
|
|
seconds
|
|
</script>
|
|
|
|
|
|
<script type="application/json" id="internal-error">
|
|
%div.jumbotron
|
|
%h1.text-center
|
|
Internal error
|
|
%i.fa.fa-exclamation-circle.text-danger
|
|
%div.text-center
|
|
%p
|
|
-if (name) {
|
|
=name
|
|
-if (message) {
|
|
=message
|
|
-if (!name && !message) {
|
|
-var msg = raw.split('(');
|
|
-if (msg.length > 0) {
|
|
=msg[0]
|
|
</script>
|