~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to views/fault-page.twig

  • Committer: Dan Garner
  • Date: 2015-03-26 14:08:33 UTC
  • Revision ID: git-v1:70d14044444f8dc5d602b99890d59dea46d9470c
Moved web servable files to web folder

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{#
2
 
/*
3
 
 * Spring Signage Ltd - http://www.springsignage.com
4
 
 * Copyright (C) 2015 Spring Signage Ltd
5
 
 * (${FILE_NAME})
6
 
 */
7
 
#}
8
 
{% extends "authed.twig" %}
9
 
 
10
 
{% block pageContent %}
11
 
 
12
 
 
13
 
    <div class="widget">
14
 
        <div class="widget-title">{% trans "Report Fault" %}</div>
15
 
        <div class="widget-body">
16
 
            <div class="row">
17
 
                <div class="board">
18
 
                    <div class="board-inner">
19
 
                        <ul class="nav fault nav-tabs" id="fault">
20
 
                            <div class="liner"></div>
21
 
                            <li class="active">
22
 
                                <a href="#home" data-toggle="tab">
23
 
                                    <span class="round-tabs one"> <i class="glyphicon glyphicon-home"></i> </span> </a>
24
 
                            </li>
25
 
                            <li class="">
26
 
                                <a href="#checklist" data-toggle="tab">
27
 
                                    <span class="round-tabs two"> <i class="fa fa-check-square-o" aria-hidden="true"></i> </span>
28
 
                                </a>
29
 
                            </li>
30
 
                            <li class="">
31
 
                                <a href="#turnons" data-toggle="tab">
32
 
                                    <span class="round-tabs three"> <i class="fa fa-bug" aria-hidden="true"></i> </span>
33
 
                                </a>
34
 
                            </li>
35
 
                            <li class="">
36
 
                                <a href="#replicate" data-toggle="tab">
37
 
                                    <span class="round-tabs four"> <i class="fa fa-clone" aria-hidden="true"></i> </span>
38
 
                                </a>
39
 
                            </li>
40
 
                            <li class="">
41
 
                                <a href="#collect" data-toggle="tab">
42
 
                                    <span class="round-tabs five"> <i class="fa fa-floppy-o" aria-hidden="true"></i> </span>
43
 
                                </a>
44
 
                            </li>
45
 
                            <li class="">
46
 
                                <a href="#turnoff" data-toggle="tab">
47
 
                                    <span class="round-tabs six">  <span><i class="fa fa-bug"></i><i class="fa fa-ban fa-stack-2x"></i></span> </span>
48
 
                                </a>
49
 
                            </li>
50
 
                            <li class="">
51
 
                                <a href="#ask" data-toggle="tab">
52
 
                                    <span class="round-tabs seven"><i class="fa fa-question-circle" aria-hidden="true"></i></span>
53
 
                                </a>
54
 
                            </li>
55
 
                        </ul>
56
 
                    </div>
57
 
                    <div class="tab-content">
58
 
                        <div class="tab-pane fade in active" id="home">
59
 
                            <h3 class="head text-center">{% trans "Report an application fault" %}
60
 
                                <span style="color:#f48260;"></span>
61
 
                            </h3>
62
 
 
63
 
                            {% if urlError %}
64
 
                                <p class="alert alert-info">{% trans "CMS configuration warning, it is very unlikely that /web/ should be in the URL. This usually means that the DocumentRoot of the web server is wrong and may put your CMS at risk if not corrected." %}</p>
65
 
                            {% endif %}
66
 
 
67
 
                            {% if binLogError %}
68
 
                                <p class="alert alert-info">{% trans "The CMS may not be working as expected because MySQL BINLOG format is set to STATEMENT. This can effect sessions and should be set to ROW or MIXED." %}</p>
69
 
                            {% endif %}
70
 
 
71
 
                            <p class="narrow text-center">{% trans "Before reporting a fault it would be appreciated if you follow the steps. Click start " %}</p>
72
 
 
73
 
                            <form class="form-horizontal text-center" id="home_form" name="home_form" role="form">
74
 
                                <fieldset>
75
 
                                    <button type="submit" href="#checklist" name="home_form" class="btn-submit btn btn-success">
76
 
                                        {% trans "Start" %}
77
 
                                        <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></button>
78
 
                                </fieldset>
79
 
                            </form>
80
 
                        </div>
81
 
                        <div class="tab-pane fade" id="checklist">
82
 
                            <p class="text-center">{% trans "Check that the Environment passes all the CMS Environment checks." %}</p>
83
 
 
84
 
                            {% if environmentFault %}
85
 
                                <p class="alert alert-danger narrow text-center">{% trans "There is a critical error that you should resolve first." %}</p>
86
 
                            {% elseif environmentWarning %}
87
 
                                <p class="alert alert-warning narrow text-center">{% trans "There is a warning on the checklist that you should resolve." %}</p>
88
 
                            {% else %}
89
 
                                <p class="alert alert-success narrow text-center">{% trans "All checks pass. Click next to continue" %}</p>
90
 
                            {% endif %}
91
 
 
92
 
                            <br/>
93
 
                            {% if environmentFault or environmentWarning %}
94
 
                                <table id="checksWithFaults" class="table table-striped">
95
 
                                    <thead>
96
 
                                    <tr>
97
 
                                        <th>{% trans "Item" %}</th>
98
 
                                        <th>{% trans "Status" %}</th>
99
 
                                        <th>{% trans "Advice" %}</th>
100
 
                                    </tr>
101
 
                                    </thead>
102
 
                                    <tbody>
103
 
                                    {% for check in environmentCheck %}
104
 
                                        {% if check.status != 1 %}
105
 
                                            <tr>
106
 
                                                <td>{{ check.item }}</td>
107
 
                                                <td>
108
 
                                                    {% if check.status == 0 %}
109
 
                                                        <span class="fa fa-times"></span>
110
 
                                                    {% else %}
111
 
                                                        <span class="fa fa-exclamation"></span>
112
 
                                                    {% endif %}
113
 
                                                </td>
114
 
                                                <td>{{ check.advice }}</td>
115
 
                                            </tr>
116
 
                                        {% endif %}
117
 
                                    {% endfor %}
118
 
                                    </tbody>
119
 
                                </table>
120
 
 
121
 
                                <p class="text-center"><b>{% trans "All other checks passed" %}</b></p>
122
 
 
123
 
                            {% endif %}
124
 
                            <div class="row text-center">
125
 
                                <a id="toggler" href="#" class="btn btn-info">{% trans "I want to see the list anyway." %}</a>
126
 
                            </div>
127
 
                            <br/>
128
 
                            {% if environmentCheck %}
129
 
                                <table id="checksWithSuccess" class="table table-striped hide-table">
130
 
                                    <thead>
131
 
                                    <tr>
132
 
                                        <th>{% trans "Item" %}</th>
133
 
                                        <th>{% trans "Status" %}</th>
134
 
                                        <th>{% trans "Advice" %}</th>
135
 
                                    </tr>
136
 
                                    </thead>
137
 
                                    <tbody>
138
 
                                    {% for check in environmentCheck %}
139
 
                                        {% if check.status == 1 %}
140
 
                                            <tr>
141
 
                                                <td>{{ check.item }}</td>
142
 
                                                <td>
143
 
                                                    {% if check.status == 1 %}
144
 
                                                        <span class="fa fa-check fa-2x text-success"></span>
145
 
                                                    {% endif %}
146
 
                                                </td>
147
 
                                                <td>{{ check.advice }}</td>
148
 
                                            </tr>
149
 
                                        {% endif %}
150
 
                                    {% endfor %}
151
 
                                    </tbody>
152
 
                                </table>
153
 
                            {% endif %}
154
 
 
155
 
 
156
 
                            <form class="form-horizontal text-center" id="checklist_form" name="checklist_form" role="form">
157
 
                                <fieldset>
158
 
                                    <button type="submit" href="#home" name="home_form" class="btn-submit btn btn-info">
159
 
                                        <i class="fa fa-chevron-circle-left" aria-hidden="true"></i> {% trans "Previous" %}
160
 
                                    </button>
161
 
                                    <button type="submit" href="#turnons" name="checklist_form" class="btn-submit btn btn-primary">
162
 
                                        {% trans "Next" %} <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
163
 
                                    </button>
164
 
                                </fieldset>
165
 
                            </form>
166
 
                        </div>
167
 
 
168
 
                        <div class="tab-pane fade" id="turnons">
169
 
 
170
 
                            <p class="narrow text-center">{% trans "Turn ON full auditing and debugging." %}</p>
171
 
                            <form id="1" class="XiboAutoForm text-center " action="{{ urlFor("fault.debug.on") }}" method="put" onsubmit="return checkFormOn(this);">
172
 
                                <input class="btn btn-success" type="submit" name="onDeb" value="{% trans " Turn ON Debugging" %}"></input>
173
 
                            </form>
174
 
                            <br/>
175
 
                            <form class="form-horizontal text-center" id="turnons_form" name="turnons_form" role="form">
176
 
                                <fieldset>
177
 
                                    <button type="submit" href="#checklist" name="turnons_form" class="btn-submit btn btn-info">
178
 
                                        <i class="fa fa-chevron-circle-left" aria-hidden="true"></i> {% trans "Previous" %}
179
 
                                    </button>
180
 
                                    <button type="submit" href="#replicate" name="turnons_form" class="btn-submit btn btn-primary">
181
 
                                        {% trans "Next" %} <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
182
 
                                    </button>
183
 
                                </fieldset>
184
 
                            </form>
185
 
 
186
 
                        </div>
187
 
 
188
 
 
189
 
                        <div class="tab-pane fade text-center" id="replicate">
190
 
                            <p class="narrow">{% trans "Recreate the Problem in a new window." %}</p>
191
 
                            <p class="narrow">{% trans "Please open a new window and recreate the problem. While you do that we are going to log all of the actions taken in a text based log. We won't capture screenshots or videos, so if you feel that this would be useful please capture those manually and add them to the zip file you will download in the next step." %}</p>
192
 
                            <br/>
193
 
                            <a href="{{ urlFor("home") }}" target="_blank" class="btn btn-success"><i class="fa fa-external-link"></i> {% trans "Open a new window" %}</a>
194
 
                            <br/>
195
 
                            <br/>
196
 
                            <form class="form-horizontal text-center" id="replicate_form" name="replicate_form" role="form">
197
 
                                <fieldset>
198
 
                                    <button type="submit" href="#turnons" name="replicate_form" class="btn-submit btn btn btn-info">
199
 
                                        <i class="fa fa-chevron-circle-left" aria-hidden="true"></i> {% trans "Previous" %}
200
 
                                    </button>
201
 
                                    <button type="submit" href="#collect" name="replicate_form" class="btn-submit btn btn-primary">
202
 
                                        {% trans "Next" %} <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
203
 
                                    </button>
204
 
                                </fieldset>
205
 
                            </form>
206
 
                        </div>
207
 
 
208
 
                        <div class="tab-pane fade" id="collect">
209
 
                            <p class="narrow text-center">
210
 
                                {% trans "Automatically collect and export relevant information into a text file." %}
211
 
                                {% trans "Please save this file to your PC." %}
212
 
                            </p>
213
 
                            <p class="narrow text-center">
214
 
                                {% trans "What items would you like to save?" %}
215
 
                            </p>
216
 
                            <div class="col-md-6 col-md-offset-3 ">
217
 
                                <div class="funkyradio">
218
 
                                    <div class="funkyradio-primary">
219
 
                                        <input type="checkbox" name="outputVersion" id="outputVersion" checked/>
220
 
                                        <label for="outputVersion">{% trans "Version Information" %}</label>
221
 
                                    </div>
222
 
                                    <div class="funkyradio-primary">
223
 
                                        <input type="checkbox" name="outputLog" id="outputLog" checked/>
224
 
                                        <label for="outputLog">{% trans "Log" %}</label>
225
 
                                    </div>
226
 
                                    <div class="funkyradio-primary">
227
 
                                        <input type="checkbox" name="outputEnvCheck" id="outputEnvCheck" checked/>
228
 
                                        <label for="outputEnvCheck">{% trans "Environment Check" %}</label>
229
 
                                    </div>
230
 
                                    <div class="funkyradio-primary">
231
 
                                        <input type="checkbox" name="outputSettings" id="outputSettings" checked/>
232
 
                                        <label for="outputSettings">{% trans "Settings" %}</label>
233
 
                                    </div>
234
 
                                    <div class="funkyradio-primary">
235
 
                                        <input type="checkbox" name="outputDisplays" id="outputDisplays" checked/>
236
 
                                        <label for="outputDisplays">{% trans "Display List" %}</label>
237
 
                                    </div>
238
 
                                    <div class="funkyradio-primary">
239
 
                                        <input type="checkbox" name="outputDisplayProfile" id="outputDisplayProfile" checked/>
240
 
                                        <label for="outputDisplayProfile">{% trans "Display Settings Profile (included with each display)" %}</label>
241
 
                                    </div>
242
 
                                </div>
243
 
                            </div>
244
 
 
245
 
                            <div class="col-md-12 text-center">
246
 
                                <a id="dldata" class="btn btn-success text-center" type="submit" href="#" data-base-href="{{ urlFor("fault.collect") }}">
247
 
                                    <i class="fa fa-floppy-o" aria-hidden="true"></i> {% trans "Collect and Save Data" %}
248
 
                                </a> <br/><br/>
249
 
                                <form class="form-horizontal text-center" id="collect_form" name="collect_form" role="form">
250
 
                                    <button type="submit" href="#replicate" name="collect_form" class="btn-submit btn btn-info">
251
 
                                        <i class="fa fa-chevron-circle-left" aria-hidden="true"></i>{% trans "Previous" %}
252
 
                                    </button>
253
 
                                    <button type="submit" href="#turnoff" name="collect_form" class="btn-submit btn btn-primary">
254
 
                                        {% trans "Next" %} <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
255
 
                                    </button>
256
 
                                </form>
257
 
                            </div>
258
 
 
259
 
 
260
 
                        </div>
261
 
 
262
 
                        <div class="tab-pane fade text-center" id="turnoff">
263
 
                            <p class="narrow">{% trans "Turn full auditing and debugging OFF." %}</p>
264
 
 
265
 
                            <form id="2" class="XiboAutoForm text-center " action="{{ urlFor("fault.debug.off") }}" method="put" onsubmit="return checkFormOff(this);">
266
 
                                <input class="btn btn-danger" type="submit" name="offDeb" value="{% trans " Turn OFF Debugging" %}"></input>
267
 
                            </form>
268
 
                            <br/>
269
 
                            <form class="form-horizontal text-center" id="turnoff_form" name="turnoff_form" role="form">
270
 
                                <fieldset>
271
 
                                    <button type="submit" href="#collect" name="turnoff_form" class="btn-submit btn btn-info">
272
 
                                        <i class="fa fa-chevron-circle-left" aria-hidden="true"></i> {% trans "Previous" %}
273
 
                                    </button>
274
 
                                    <button type="submit" href="#ask" name="turnoff_form" class="btn-submit btn btn-primary">
275
 
                                        {% trans "Next" %} <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
276
 
                                    </button>
277
 
                                </fieldset>
278
 
                            </form>
279
 
                        </div>
280
 
 
281
 
 
282
 
                        <div class="tab-pane fade" id="ask">
283
 
                            <div class="text-center"><i class="img-intro icon-checkmark-circle"></i></div>
284
 
                            <h3 class="head text-center">
285
 
                                {% trans "That's it!" %}
286
 
                            </h3>
287
 
                            <p class="narrow text-center">
288
 
                                {% trans "Click on the below link to open the bug report page for this release." %}
289
 
                                {% trans "Describe the problem and upload the file you obtained earlier." %}
290
 
                            </p>
291
 
                            <form class="text-center">
292
 
                                <fieldset>
293
 
                                    <a class="btn btn-success" href="{{ theme.getThemeConfig("product_support_url", "https://community.xibo.org.uk/c/support") }}" target="_blank">
294
 
                                        <i class="fa fa-question" aria-hidden="true"></i> {% trans "Ask a question" %}
295
 
                                    </a>
296
 
                                    <button type="submit" href="#home" name="turnoff_form" class="btn-submit btn btn-info">
297
 
                                        <i class="fa fa-home" aria-hidden="true"></i> {% trans "Start again" %}
298
 
                                    </button>
299
 
                                </fieldset>
300
 
                            </form>
301
 
                        </div>
302
 
                    </div>
303
 
                </div>
304
 
            </div>
305
 
 
306
 
        </div>
307
 
    </div>
308
 
{% endblock %}
309
 
 
310
 
 
311
 
    {% block javaScript %}
312
 
        <script type="text/javascript">
313
 
            // Fault Page List switcher
314
 
            $(function () {
315
 
                $('a[title]').tooltip();
316
 
                $('.btn-submit').on('click', function (e) {
317
 
                    var formname = $(this).attr('name');
318
 
                    var tabname = $(this).attr('href');
319
 
                    if ($('#' + formname)[0].checkValidity()) { /* Only works in Firefox/Chrome need polyfill for IE9, Safari. */
320
 
                        e.preventDefault();
321
 
                        $('ul.nav li a[href="' + tabname + '"]').parent().removeClass('disabled');
322
 
                        $('ul.nav li a[href="' + tabname + '"]').trigger('click');
323
 
                    }
324
 
                });
325
 
                $('ul.nav li').on('click', function (e) {
326
 
                    if ($(this).hasClass('disabled')) {
327
 
                        e.preventDefault();
328
 
                        return false;
329
 
                    }
330
 
                });
331
 
            });
332
 
 
333
 
        </script>
334
 
 
335
 
 
336
 
        <script type="text/javascript">
337
 
 
338
 
            $(function () {
339
 
                $('[data-toggle="popover"]').popover()
340
 
            })
341
 
 
342
 
 
343
 
            function checkFormOn(form) {
344
 
                form.onDeb.disabled = true;
345
 
                form.onDeb.value = "Debugging mode ON";
346
 
                return true;
347
 
            }
348
 
 
349
 
            function checkFormOff(form) {
350
 
                form.offDeb.disabled = true;
351
 
                form.offDeb.value = "Debugging mode Off";
352
 
                return true;
353
 
            }
354
 
 
355
 
            $("#dldata").on("click", function (event) {
356
 
                if ($(this).hasClass("disabled")) {
357
 
                    event.preventDefault();
358
 
                }
359
 
 
360
 
                // Disable download button when downloading
361
 
                $(this).addClass("btn-success disabled");
362
 
                $("#dldata").text('{% trans "Downloading file" %}');
363
 
                $("#dldata").prop("href", $("#dldata").data().baseHref + "?" + $(".funkyradio").find("input[type=checkbox]").serialize());
364
 
 
365
 
 
366
 
                //Re Enables download button after new checkbox selection
367
 
                $('.funkyradio').click(function () {
368
 
                    if ($(this).is(':checked')) {
369
 
                        $('#dldata').removeClass('disabled');
370
 
 
371
 
                    } else {
372
 
                        $('#dldata').removeClass('disabled').attr('enabled');
373
 
                        ;
374
 
                        $("#dldata").text('{% trans "Download selected items" %}');
375
 
                    }
376
 
                });
377
 
 
378
 
            });
379
 
 
380
 
 
381
 
        </script>
382
 
 
383
 
        <script>
384
 
            $("#toggler").click(function () {
385
 
                $(this).text(function (i, v) {
386
 
                    return v === '{% trans "Hide Environment checks" %}' ? '{% trans "Show Environment checks" %}' : '{% trans "Hide Environment checks" %}'
387
 
                })
388
 
                $("#checksWithSuccess").toggle();
389
 
            });
390
 
 
391
 
        </script>
392
 
 
393
 
 
394
 
    {% endblock %}
 
 
b'\\ No newline at end of file'