mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
138 lines
5.7 KiB
HTML
138 lines
5.7 KiB
HTML
{% if script_list.confset_id == nil or script_list.confset_id == "" then %}
|
|
<div class="alert alert-danger">
|
|
<b>{{ i18n("scripts_list.attention", {}) }}!</b> {{ i18n("scripts_list.missing_configset", {}) }}
|
|
<a class="text-danger" href="#" onclick="history.back()">
|
|
{{ i18n("scripts_list.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>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<table id="scripts-config" class="table w-100 table-striped table-hover table-bordered mt-3">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ i18n("name", {}) }}</th>
|
|
<th>{{ i18n("category", {}) }}</th>
|
|
<th>{{ i18n("description", {}) }}</th>
|
|
<th>{{ i18n("values", {}) }}</th>
|
|
<th style="width: 200px">{{ i18n("action", {})}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='notes bg-light border'>
|
|
<b>{{ i18n('notes') }}</b>
|
|
<ul>
|
|
<li> {{ i18n('user_scripts.categories') }}
|
|
<ul>
|
|
{% for _, cat in pairsByKeys(script_categories) do %}
|
|
<li> {* string.format("<i class='fa %s'></i> %s: %s", cat.icon, i18n(cat.i18n_title, {product=info.product}),
|
|
i18n(cat.i18n_descr, {product=info.product})) *} </li>
|
|
{% end %}
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{# include modals for edit_configset.lua #}
|
|
{* script_list.template_utils.gen("pages/modals/edit_configset/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 }}";
|
|
|
|
const scripts_categories = [
|
|
{
|
|
label: "{{ i18n('scripts_list.all') }}",
|
|
disableFilter: true
|
|
},
|
|
{% for _, cat in pairsByKeys(script_categories) do %}
|
|
{
|
|
label: "{{ i18n(cat.i18n_title) }}",
|
|
disableFilter: false
|
|
},
|
|
{% end %}
|
|
];
|
|
|
|
let pageCsrf = "{{ ntop.getRandomCSRFValue() }}";
|
|
let script_key_filter = "{{ script_list.script_filter }}";
|
|
let page_url = "{* script_list.page_url *}";
|
|
let apps_and_categories = {* script_list.apps_and_categories *};
|
|
let device_types = {* script_list.device_types *};
|
|
let mud_max_recording = {* script_list.mud_max_recording *};
|
|
|
|
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') }}";
|
|
i18n.filter_categories = "{{ i18n('scripts_list.filter_dropdown') }}";
|
|
i18n.showing_x_to_y_rows = "{{ i18n('showing_x_to_y_rows', {x='_START_', y='_END_', tot='_TOTAL_'}) }}";
|
|
i18n.script_search = "{{ i18n('scripts_list.script_search') }}";
|
|
|
|
i18n.scripts_list = {};
|
|
i18n.scripts_list.templates = {};
|
|
i18n.scripts_list.templates.excluded_applications = "{{ i18n('scripts_list.templates.excluded_applications') }}";
|
|
i18n.scripts_list.templates.mud_enabled_devices = "{{ i18n('scripts_list.templates.mud_enabled_devices') }}";
|
|
i18n.scripts_list.templates.max_mud_recording = "{{ i18n('scripts_list.templates.max_mud_recording') }}";
|
|
i18n.scripts_list.templates.flow_duration_threshold = "{{ i18n('scripts_list.templates.flow_duration_threshold') }}";
|
|
i18n.scripts_list.templates.elephant_flows_l2r = "{{ i18n('scripts_list.templates.elephant_flows_l2r') }}";
|
|
i18n.scripts_list.templates.elephant_flows_r2l = "{{ i18n('scripts_list.templates.elephant_flows_r2l') }}";
|
|
i18n.scripts_list.templates.template_not_implemented = "{{ i18n('scripts_list.templates.template_not_implemented') }}";
|
|
i18n.scripts_list.templates.blacklisted_country_list = "{{ i18n('scripts_list.templates.blacklisted_country_list') }}";
|
|
|
|
|
|
i18n.enable = "{{ i18n('show_alerts.enable_alerts') }}";
|
|
i18n.disable = "{{ i18n('show_alerts.disable_alerts') }}";
|
|
|
|
i18n.metrics = {};
|
|
i18n.metrics.minutes = "{{ i18n('metrics.minutes') }}";
|
|
i18n.metrics.hours = "{{ i18n('metrics.hours') }}";
|
|
i18n.metrics.days = "{{ i18n('metrics.days') }}";
|
|
|
|
i18n.values = "{{ i18n('values', {}) }}";
|
|
|
|
</script>
|
|
<script type="text/javascript" src="{{ ntop.getHttpPrefix() }}/js/config_callbacks/scripts-list-utils.js?{{ ntop.getStartupEpoch() }}"></script>
|
|
|
|
{% end %}
|