feat(scenarios): add step title, scenario credentials, and environment context in executor

- add nullable title column to scenario steps; exposed in create/edit forms and step table
- add scenario-credential join (many-to-many with CredentialEntity) with CRUD endpoints
- expose environment URLs in code executor helpers via helpers.env and helpers.getEnvUrl()
- resolve and cache environment per run from the login step's environmentName in scheduler
- add section spacing and step table title column to ScenarioDetailPage
This commit is contained in:
2026-04-09 23:37:21 +03:00
parent 1f3a604940
commit 1efbbb38a3
34 changed files with 1362 additions and 14 deletions
@@ -16,6 +16,7 @@ export function EditStepPage() {
const [scenario, setScenario] = useState<Scenario | null>(null);
const [step, setStep] = useState<ScenarioStep | null>(null);
const [order, setOrder] = useState('');
const [title, setTitle] = useState('');
const [type, setType] = useState<StepType>('exec');
const [sessionName, setSessionName] = useState('');
const [execCode, setExecCode] = useState('');
@@ -33,6 +34,7 @@ export function EditStepPage() {
setScenario(sc);
setStep(st);
setOrder(String(st.order));
setTitle(st.title ?? '');
setType(st.type);
setSessionName(st.sessionName);
setExecCode(st.execCode ?? '');
@@ -63,6 +65,7 @@ export function EditStepPage() {
try {
await steps.update(Number(id), Number(stepId), {
order: Number(order),
title: title.trim() || undefined,
type,
sessionName: sessionName.trim(),
execCode: execCode.trim() || undefined,
@@ -109,6 +112,12 @@ export function EditStepPage() {
}}
error={orderError || undefined}
/>
<Input
label={t('steps.form_title')}
placeholder={t('steps.form_title_placeholder')}
value={title}
onChange={(e) => setTitle(e.target.value)}
/>
<Select
label={t('steps.form_type')}
value={type}