Add fresh device trust, installer recovery and scoped patch runtime
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { FormEvent, useEffect, useState } from 'react';
|
||||
import { objectId, page, record, request, Session, tenantPath, text } from './api';
|
||||
import { allowed } from './safety';
|
||||
import { windowsUpdateScriptHash } from './script-console';
|
||||
|
||||
interface Draft {
|
||||
name: string;
|
||||
@@ -79,7 +80,8 @@ export function ScriptLibrary({ tenantId, auth, selected, showPlan }: { tenantId
|
||||
});
|
||||
}
|
||||
if (!canRead) return null;
|
||||
const limit = stored?.execution_identity === 'system' ? 120 : stored?.execution_identity === 'root' ? 300 : 3600;
|
||||
const windowsUpdate = stored?.execution_identity === 'system' && stored.interpreter === 'powershell' && stored.script_sha256 === windowsUpdateScriptHash;
|
||||
const limit = windowsUpdate ? 3600 : stored?.execution_identity === 'system' ? 120 : stored?.execution_identity === 'root' ? 300 : 3600;
|
||||
return <section aria-label="Skriptbibliothek"><h2>Skriptbibliothek</h2>
|
||||
{error && <p role="alert" className="error">{error}</p>}{notice && <p role="status">{notice}</p>}
|
||||
{items.length > 0 && <label>Gespeicherte Skriptversion<select value={chosen} disabled={busy || !!draft} onChange={e => setChosen(e.target.value)}>
|
||||
@@ -101,9 +103,10 @@ export function ScriptLibrary({ tenantId, auth, selected, showPlan }: { tenantId
|
||||
</fieldset></form>}
|
||||
{canPlan && stored && !draft && <form key={stored.revision_id} onSubmit={plan}><fieldset disabled={busy}><legend>Auftrag für {stored.name} · v{stored.version} vorbereiten</legend>
|
||||
<p>{selected.length} ausgewählte Geräte · Ein Gerät gleichzeitig · Stopp beim ersten Fehler · 65536 Byte Ausgabe je Gerät</p>
|
||||
{windowsUpdate && <p>Diese Version installiert verfügbare Softwareupdates ohne eigenen Neustart. Sie meldet Neustartbedarf. Laufzeiten über 120 Sekunden erfordern die passende Windows-Update-Freigabe in Server- und Helperpolicy.</p>}
|
||||
<label>Begründung<input name="reason" required maxLength={1024}/></label>
|
||||
<label>Startfrist in Minuten<input name="minutes" type="number" min={1} max={1440} defaultValue={60} required/></label>
|
||||
<label>Laufzeit je Gerät in Sekunden<input name="runtime" type="number" min={1} max={limit} defaultValue={Math.min(limit,120)} required/></label>
|
||||
<label>Laufzeit je Gerät in Sekunden<input name="runtime" type="number" min={1} max={limit} defaultValue={windowsUpdate ? 3600 : Math.min(limit,120)} required/></label>
|
||||
<button disabled={!selected.length}>Plan vorbereiten</button>
|
||||
</fieldset></form>}
|
||||
</section>;
|
||||
|
||||
Reference in New Issue
Block a user