ntopng/httpdocs/templates/pages/notifications/shell/shell_endpoint.template
2025-02-17 12:19:21 +01:00

32 lines
1.1 KiB
Text

<div class="mb-3 row">
<label class="col-form-label col-sm-3">
<b>{{ i18n("notification_endpoint.shell.shell_script") }}</b>
<a title="{{ i18n('help') }}" target="blank" href="https://www.ntop.org/guides/ntopng/user_interface/shared/alerts/available_endpoints.html#shell"><i class="fa-regular fa-circle-question"></i></a>
</label>
<div class="col-sm-7">
<select name="shell_script" class="form-select" required>
{%
for key, dir in pairs(ntop.readdir("/usr/share/ntopng/scripts/shell/")) do
if(key:match('^(.*).[sh|py]$'))then
%}
<option value='{{ key }}'>{{ dir }}</option>
{%
end
%}
{%
end
%}
{%
for key, dir in pairs(ntop.readdir(dirs.installdir.."/scripts/shell")) do
if(key:match('^(.*).[sh|py]$')) then
%}
<option value='{{ key }}'>{{ dir }}</option>
{%
end
%}
{%
end
%}
</select>
</div>
</div>