Files
karma/assets/templates/errors.haml
Łukasz Mierzwa ec08572f0a Use application/json for haml templates
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
2017-03-26 17:41:17 -07:00

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>