diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/hw_posbox_homepage/views/handler_list.html | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/hw_posbox_homepage/views/handler_list.html')
| -rw-r--r-- | addons/hw_posbox_homepage/views/handler_list.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/addons/hw_posbox_homepage/views/handler_list.html b/addons/hw_posbox_homepage/views/handler_list.html new file mode 100644 index 00000000..86e7487e --- /dev/null +++ b/addons/hw_posbox_homepage/views/handler_list.html @@ -0,0 +1,50 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + <script> + $(document).ready(function () { + $('#load_handler_btn').on('click', function(e){ + e.preventDefault(); + $('.loading-block').removeClass('o_hide'); + $.ajax({ + url: '/load_iot_handlers', + }).done(function () { + $('.message-status').html('Handlers loaded successfully <br> Refreshing page'); + setTimeout(function () { + location.reload(true); + }, 25000); + }).fail(function () { + setTimeout(function () { + location.reload(true); + }, 25000); + }); + }); + }); + </script> +{% endblock %} +{% block content %} + <h2 class="text-center text-green">Interfaces list</h2> + <table align="center" width="50%" cellpadding="3"> + {% for interfaces in interfaces_list -%} + <tr><td>{{ interfaces }}</td></tr> + {%- endfor %} + </table> + <h2 class="text-center text-green">Drivers list</h2> + <table align="center" width="50%" cellpadding="3"> + {% for driver in drivers_list -%} + <tr><td>{{ driver }}</td></tr> + {%- endfor %} + </table> + {% if server %} + <div style="margin-top: 20px;" class="text-center"> + <a id="load_handler_btn" class="btn" href='/load_iot_handlers'>Load handlers</a> + </div> + <div class="text-center font-small" style="margin: 10px auto;"> + You can clear the handlers configuration + <form style="display: inline-block;margin-left: 4px;" action='/handlers_clear'> + <input class="btn btn-sm" type="submit" value="Clear"/> + </form> + </div> + {% endif %} + {{ loading_block_ui('Loading Handlers') }} +{% endblock %} |
