Seed versioned OPNsense scripts and label the shared POSIX interpreter

This commit is contained in:
2026-11-20 08:22:59 +01:00
parent 1f3cd5ea0c
commit 2e3916b84b
5 changed files with 56 additions and 7 deletions
+3 -2
View File
@@ -117,7 +117,7 @@ export function ScriptLibrary({ tenantId, auth }: { tenantId: string; auth: Sess
const latest = versions[0];
const query = search.trim().normalize('NFC').toLocaleLowerCase('de');
const shown = latestRevisions(library.data ?? []).filter((item) =>
(!platform || scriptPlatform(item.interpreter) === platform) &&
(!platform || (platform==='opnsense' ? item.interpreter==='posix_sh' : scriptPlatform(item.interpreter) === platform)) &&
item.name.normalize('NFC').toLocaleLowerCase('de').includes(query));
function edit(existing?: Revision) {
setBase(existing?.version ?? 0);
@@ -258,7 +258,8 @@ export function ScriptLibrary({ tenantId, auth }: { tenantId: string; auth: Sess
<label><span>Plattform</span>
<select aria-label="Plattform" value={platform} onChange={e => setPlatform(e.target.value)}>
<option value="">Alle Plattformen</option>
<option value="linux">Linux</option>
<option value="linux">Linux</option>
<option value="opnsense">OPNsense (POSIX-Shell)</option>
<option value="windows">Windows</option>
</select>
</label>