Add versioned script library, reconcile permit refusals and compact helper captures

This commit is contained in:
2026-11-17 15:45:56 +01:00
parent a576c10e8a
commit 8e2fef7007
29 changed files with 1225 additions and 50 deletions
+3 -1
View File
@@ -1,3 +1,4 @@
import { ScriptLibrary } from './script-library';
import { CatalogCheckNotice } from './catalog-check';
import React, { useEffect, useState } from 'react';
import { createRoot } from 'react-dom/client';
@@ -35,6 +36,7 @@ export function ScriptPlanNotice({ plan }: { plan: RecordValue }) {
const jobs = scriptPlanJobs(plan); if (!jobs.length) return null;
return <article aria-label="Feste Skriptkonsole vor Genehmigung"><h3>Vollständige feste Skriptaufträge ({jobs.length})</h3><p>Diese Inhalte stammen aus den hashgeprüften gespeicherten Planbytes. Jeder Zielauftrag, Versuch und Skripthash ist fest gebunden.</p>
{jobs.map(job => <article key={job.jobId}><h4>Asset {job.assetId}</h4><p>Agent: {job.agentId} · Job: {job.jobId} · Versuch: {job.attemptId}</p>
{job.revision && <p>Skriptbibliothek · <strong>{job.revision.name} · Version {job.revision.version}</strong> · {job.revision.id}</p>}
<p>Interpreter: {job.interpreter} · Identität: <strong>{job.identity}</strong> · Privilegiertes Profil: <strong>{job.privilegedProfile === fullMaintenanceScriptProfile ? fullMaintenanceScriptProfile : 'bestehendes begrenztes Profil'}</strong> · Windowsprozess: {job.interpreter !== 'powershell' ? 'nicht zutreffend' : job.windowsProfile === 'powershell_51_remote_signed' ? 'Windows PowerShell5.1 RemoteSigned, nur Jobprozess' : 'geerbte Windowsrichtlinie / kein Windows-Prozessoverride'}</p>
<p>Frühester Start: {job.notBefore} · Startfrist: {job.startBefore} · Laufzeit: {job.runtimeSeconds}s · Ausgabe: höchstens {job.outputBytes} Bytes</p>
<p>Skript: {job.scriptBytes} UTF-8-Bytes · SHA256: <code>{job.scriptHash}</code><br/>Jobpayload-SHA256: <code>{job.jobHash}</code></p>
@@ -271,7 +273,7 @@ function Workspace({ auth, logout }: { auth: Session; logout: () => void }) {
}
function TenantWorkspace({ tenantId, auth }: { tenantId: string; auth: Session }) {
const [selected, setSelected] = useState<string[]>([]), [planId, setPlan] = useState<string | null>(null), [operationId, setOperation] = useState<string | null>(null);
return <><Devices tenantId={tenantId} auth={auth} selected={selected} setSelected={setSelected}/><Planner tenantId={tenantId} auth={auth} selected={selected} showPlan={setPlan}/><Catalog tenantId={tenantId} auth={auth}/><WindowsMsiCatalog tenantId={tenantId} auth={auth}/><AgentReleaseCatalog tenantId={tenantId} auth={auth}/><TenantControls tenantId={tenantId} auth={auth}/><Operations tenantId={tenantId} open={setOperation}/>{operationId && <OperationDetail key={operationId} tenantId={tenantId} id={operationId} auth={auth} openPlan={setPlan}/ >}{planId && <PlanDetail key={planId} tenantId={tenantId} id={planId} auth={auth} onOperation={setOperation}/>}</>;
return <><Devices tenantId={tenantId} auth={auth} selected={selected} setSelected={setSelected}/><ScriptLibrary tenantId={tenantId} auth={auth} selected={selected} showPlan={setPlan}/><Planner tenantId={tenantId} auth={auth} selected={selected} showPlan={setPlan}/><Catalog tenantId={tenantId} auth={auth}/><WindowsMsiCatalog tenantId={tenantId} auth={auth}/><AgentReleaseCatalog tenantId={tenantId} auth={auth}/><TenantControls tenantId={tenantId} auth={auth}/><Operations tenantId={tenantId} open={setOperation}/>{operationId && <OperationDetail key={operationId} tenantId={tenantId} id={operationId} auth={auth} openPlan={setPlan}/ >}{planId && <PlanDetail key={planId} tenantId={tenantId} id={planId} auth={auth} onOperation={setOperation}/>}</>;
}
function App() {
const [auth, setAuth] = useState<Session | null>(null), [loading, setLoading] = useState(true), [error, setError] = useState<string | null>(null);