Seed versioned OPNsense scripts and label the shared POSIX interpreter
This commit is contained in:
@@ -647,8 +647,8 @@ export function OrderComposer({ tenantId, auth, initialAssetIds, onSubmitted, cu
|
||||
Neustartskript auswählen
|
||||
</button>
|
||||
)}
|
||||
<label>
|
||||
Bibliotheksskript
|
||||
<label>
|
||||
Bibliotheksskript
|
||||
<select
|
||||
required
|
||||
value={revision?.name ?? ''}
|
||||
@@ -663,7 +663,8 @@ export function OrderComposer({ tenantId, auth, initialAssetIds, onSubmitted, cu
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
</label>
|
||||
{hasOPNsense && <p className="muted">OPNsense verwendet die POSIX-Shell von FreeBSD. Wählen Sie eine passende Revision; Linux-spezifische Programme wie systemctl stehen hier nicht zur Verfügung.</p>}
|
||||
{scripts.data && !heads.length && <p>Für diesen Kunden sind noch keine Skripte veröffentlicht.</p>}
|
||||
{revision && (
|
||||
<>
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface Revision extends Script {
|
||||
script_sha256: string;
|
||||
}
|
||||
export const interpreterNames: Record<Interpreter, string> = {
|
||||
posix_sh: 'Linux · Shell',
|
||||
posix_sh: 'POSIX-Shell',
|
||||
bash: 'Linux · Bash',
|
||||
powershell: 'Windows · PowerShell'
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user