~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to views/fault-page.twig

  • Committer: Dan Garner
  • Date: 2016-02-18 16:07:16 UTC
  • mfrom: (454.4.137)
  • Revision ID: git-v1:8867f12675bc9e0e67e7e622c80da7471b9f294a
Merge pull request #139 from dasgarner/feature/nested-display-groups

Feature/nested display groups

Show diffs side-by-side

added added

removed removed

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