Commit 510de936 authored by Michal Hrusecky's avatar Michal Hrusecky 🐉

Drop preloading data to speed up things

parent ffdbd798
......@@ -41,10 +41,6 @@ class PakonPluginPage(ConfigPageMixin, PakonPluginConfigHandler):
args['PLUGIN_STYLES'] = PakonPlugin.PLUGIN_STYLES
args['PLUGIN_STATIC_SCRIPTS'] = PakonPlugin.PLUGIN_STATIC_SCRIPTS
args['PLUGIN_DYNAMIC_SCRIPTS'] = PakonPlugin.PLUGIN_DYNAMIC_SCRIPTS
args['query'] = json.dumps({})
data = current_state.backend.perform(
"pakon", "perform_query", {"query_data": args['query']})
args['results'] = self._prepare_data(data)
def render(self, **kwargs):
self._prepare_render_args(kwargs)
......
<div id="pakon-results">
%if reversed(results):
<table id="pakon-results-table"></table>
%else:
<p>{{ trans("No results found.") }}</p>
%end
</div>
......@@ -4,19 +4,6 @@
<div id="page-pakon-plugin" class="config-page">
%include("_messages.tpl")
<!--
<form action="{{ url("config_action", page_name="pakon", action="perform_query") }}" class="config-form" method="post">
<div class="row">
<label for="field-lan_ipaddr">Router IP address</label>
<input name="query" value="{{ query }}" type="text" id="field-query"/>
<input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}" id="csrf-token">
</div>
<div class="row">
<button type="submit" name="action" id="pakon-query-trigger" value="query-trigger" class="button">{{ trans("Query") }}</button>
</div>
</form>
-->
<fieldset>
<legend>{{ trans("Data view - settings") }}:</legend>
<label for="date-from">
......@@ -67,7 +54,7 @@
<div id="pakon-results-statistics"></div>
<h3>{{ trans("Results") }}</h3>
%include("pakon/_results.tpl", results=results)
%include("pakon/_results.tpl")
</div>
<script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment