ntopng/httpdocs/templates/script_list.html
2020-01-21 19:39:41 +01:00

82 lines
3.2 KiB
HTML

{% if script_list.confset_id == nil or script_list.confset_id == "" then %}
<div class="alert alert-danger">
<b>Attention!</b>
The page was not found!
<a class="text-danger" href="#" onclick="history.back()"
>Click here to return to the previous page!</a
>
</div>
{% else %}
<div class="container-fluid mt-3">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item" aria-current="page">
<i class="fab fa-superpowers"></i>
{{ i18n("about.user_scripts", {}) }}
</li>
<li class="breadcrumb-item" aria-current="page">
<a href="/lua/admin/scripts_config.lua?subdir={{ script_list.script_subdir }}">
{{ script_list.hooks_localizated[script_list.script_subdir] }}
</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
{{ i18n("scripts_list.config", {}) }}
<b>{{ script_list.confset_name }}</b>
</li>
</ol>
</nav>
<div class="row">
<div class="col-md-12 col-lg-12 mt-3">
<div class="alert alert-danger d-none" id='alert-row-buttons' role="alert">
</div>
<table
id="scripts-config"
class="table w-100 table-striped table-hover table-bordered mt-3">
<thead>
<tr>
<th>{{ i18n("name", {}) }}</th>
<th>{{ i18n("description", {}) }}</th>
<th>{{ i18n("enabled", {}) }}</th>
<th>{{ i18n("action", {})}}</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
{# include modals for edit_configset.lua #}
{* script_list.template_utils.gen("script_list_components/edit_config_modal.html") *}
{# add css, js files #}
<link href="{{ ntop.getHttpPrefix() }}/datatables/datatables.min.css" rel="stylesheet"/>
<script type="text/javascript">
const confset_id = {{ script_list.confset_id }};
const script_subdir = "{{ script_list.script_subdir }}";
let csrf_toggle_buttons = "{{ ntop.getRandomCSRFValue() }}";
let csrf_edit_config = "{{ ntop.getRandomCSRFValue() }}";
let script_key_filter = "{{ script_list.script_filter }}";
let page_url = "{* script_list.page_url *}";
i18n.are_you_sure = '{{ i18n("scripts_list.are_you_sure", {}) }}'
i18n.all = '{{ i18n("all", {}) }}'
i18n.enabled = '{{ i18n("enabled", {}) }}'
i18n.disabled = '{{ i18n("disabled", {}) }}'
i18n.request_failed_message = '{{ i18n("request_failed_message") }}'
i18n.select_operator = "{{ i18n('scripts_list.select_operator') }}";
i18n.empty_input_box = "{{ i18n('config_scripts.empty_value_message') }}"
i18n.template_not_found = "{{ i18n('scripts_list.template_not_found') }}"
i18n.view = "{{ i18n('scripts_list.actions.view') }}"
i18n.view_src_script = "{{ i18n('scripts_list.actions.view_src_script') }}"
i18n.edit = "{{ i18n('scripts_list.actions.edit') }}"
i18n.edit_script = "{{ i18n('scripts_list.actions.edit_script') }}"
i18n.items_list_comma = "{{ i18n('scripts_list.items_list_comma') }}";
i18n.blacklisted_country = "{{ i18n('scripts_list.blacklisted_country') }}";
i18n.expired_csrf = "{{ i18n('expired_csrf') }}";
</script>
<script type="text/javascript" src="{{ ntop.getHttpPrefix() }}/js/config_callbacks/scripts-list-utils.js?{{ ntop.getStartupEpoch() }}"></script>
{% end %}