Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xiaomi_vac plugin: remove webif pagelength init from web interface #829

Merged
merged 2 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion xiaomi_vac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@

class Robvac(SmartPlugin):
ALLOW_MULTIINSTANCE = False
PLUGIN_VERSION = "1.2.3"
PLUGIN_VERSION = "1.2.4"

def __init__(self, smarthome):
super().__init__()
self._ip = self.get_parameter_value("ip")
self._token = self.get_parameter_value("token")
self._cycle = self.get_parameter_value("read_cycle")
Expand Down
2 changes: 1 addition & 1 deletion xiaomi_vac/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugin:
In newer Valetudo versions you find the token in the log as LocalSecret. Convert the token at https://gchq.github.io/CyberChef/#recipe=To_Hex to 32 characters.
'
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1453597-support-thread-f%C3%BCr-xiaomi-saugroboter-plugin
version: 1.2.3 # Plugin version
version: 1.2.4 # Plugin version
sh_minversion: 1.4 # minimum shNG version to use this plugin
multi_instance: False # plugin supports multi instance
classname: Robvac # class containing the plugin
Expand Down
13 changes: 1 addition & 12 deletions xiaomi_vac/webif/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,8 @@
<script>
$(document).ready( function () {
$(window).trigger('datatables_defaults');
/* get pagelength from http module or plugin. */
{% if webif_pagelength is defined %}webif_pagelength = {{ webif_pagelength|int }};{% endif %}
if (isNaN(parseFloat(webif_pagelength)) || webif_pagelength == 0) {
resize = true;
webif_pagelength = -1;
}
else {
resize = false;
}
try {
table = $('#maintable').DataTable( {
pageLength: webif_pagelength,
pageResize: resize});
table = $('#maintable').DataTable( {});
}
catch (e) {
console.log("Datatable JS not loaded, showing standard table without reorder option " +e);
Expand Down