feat(FN-4275): complete Step 2 — group project research limits
Fusion-Task-Id: FN-4275 Fusion-Task-Lineage: 73857412-928d-4c51-8113-2ac5ce811d04
This commit is contained in:
@@ -293,8 +293,25 @@
|
|||||||
gap: var(--space-sm);
|
gap: var(--space-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-research-limits-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: var(--space-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-research-limit-field {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-xs);
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-research-limits-error {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.settings-research-source-grid {
|
.settings-research-source-grid,
|
||||||
|
.settings-research-limits-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4552,93 +4552,97 @@ export function SettingsModal({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label htmlFor="research-project-max-concurrent">Max Concurrent Runs</label>
|
<div className="settings-research-limits-grid">
|
||||||
<input
|
<div className="settings-research-limit-field">
|
||||||
id="research-project-max-concurrent"
|
<label htmlFor="research-project-max-concurrent">Max Concurrent Runs</label>
|
||||||
className="input"
|
<input
|
||||||
type="number"
|
id="research-project-max-concurrent"
|
||||||
min={1}
|
className="input"
|
||||||
value={limits?.maxConcurrentRuns ?? 3}
|
type="number"
|
||||||
onChange={(event) =>
|
min={1}
|
||||||
setForm((current) => ({
|
value={limits?.maxConcurrentRuns ?? 3}
|
||||||
...current,
|
onChange={(event) =>
|
||||||
researchSettings: {
|
setForm((current) => ({
|
||||||
...(current.researchSettings ?? {}),
|
...current,
|
||||||
limits: {
|
researchSettings: {
|
||||||
...(current.researchSettings?.limits ?? {}),
|
...(current.researchSettings ?? {}),
|
||||||
maxConcurrentRuns: event.target.value === "" ? undefined : Number(event.target.value),
|
limits: {
|
||||||
},
|
...(current.researchSettings?.limits ?? {}),
|
||||||
},
|
maxConcurrentRuns: event.target.value === "" ? undefined : Number(event.target.value),
|
||||||
}))
|
},
|
||||||
}
|
},
|
||||||
/>
|
}))
|
||||||
</div>
|
}
|
||||||
<div className="form-group">
|
/>
|
||||||
<label htmlFor="research-project-max-sources">Max Sources Per Run</label>
|
</div>
|
||||||
<input
|
<div className="settings-research-limit-field">
|
||||||
id="research-project-max-sources"
|
<label htmlFor="research-project-max-sources">Max Sources Per Run</label>
|
||||||
className="input"
|
<input
|
||||||
type="number"
|
id="research-project-max-sources"
|
||||||
min={1}
|
className="input"
|
||||||
value={limits?.maxSourcesPerRun ?? 20}
|
type="number"
|
||||||
onChange={(event) =>
|
min={1}
|
||||||
setForm((current) => ({
|
value={limits?.maxSourcesPerRun ?? 20}
|
||||||
...current,
|
onChange={(event) =>
|
||||||
researchSettings: {
|
setForm((current) => ({
|
||||||
...(current.researchSettings ?? {}),
|
...current,
|
||||||
limits: {
|
researchSettings: {
|
||||||
...(current.researchSettings?.limits ?? {}),
|
...(current.researchSettings ?? {}),
|
||||||
maxSourcesPerRun: event.target.value === "" ? undefined : Number(event.target.value),
|
limits: {
|
||||||
},
|
...(current.researchSettings?.limits ?? {}),
|
||||||
},
|
maxSourcesPerRun: event.target.value === "" ? undefined : Number(event.target.value),
|
||||||
}))
|
},
|
||||||
}
|
},
|
||||||
/>
|
}))
|
||||||
</div>
|
}
|
||||||
<div className="form-group">
|
/>
|
||||||
<label htmlFor="research-project-max-duration">Max Duration (ms)</label>
|
</div>
|
||||||
<input
|
<div className="settings-research-limit-field">
|
||||||
id="research-project-max-duration"
|
<label htmlFor="research-project-max-duration">Max Duration (ms)</label>
|
||||||
className="input"
|
<input
|
||||||
type="number"
|
id="research-project-max-duration"
|
||||||
min={1000}
|
className="input"
|
||||||
value={limits?.maxDurationMs ?? 300000}
|
type="number"
|
||||||
onChange={(event) =>
|
min={1000}
|
||||||
setForm((current) => ({
|
value={limits?.maxDurationMs ?? 300000}
|
||||||
...current,
|
onChange={(event) =>
|
||||||
researchSettings: {
|
setForm((current) => ({
|
||||||
...(current.researchSettings ?? {}),
|
...current,
|
||||||
limits: {
|
researchSettings: {
|
||||||
...(current.researchSettings?.limits ?? {}),
|
...(current.researchSettings ?? {}),
|
||||||
maxDurationMs: event.target.value === "" ? undefined : Number(event.target.value),
|
limits: {
|
||||||
},
|
...(current.researchSettings?.limits ?? {}),
|
||||||
},
|
maxDurationMs: event.target.value === "" ? undefined : Number(event.target.value),
|
||||||
}))
|
},
|
||||||
}
|
},
|
||||||
/>
|
}))
|
||||||
</div>
|
}
|
||||||
<div className="form-group">
|
/>
|
||||||
<label htmlFor="research-project-request-timeout">Request Timeout (ms)</label>
|
</div>
|
||||||
<input
|
<div className="settings-research-limit-field">
|
||||||
id="research-project-request-timeout"
|
<label htmlFor="research-project-request-timeout">Request Timeout (ms)</label>
|
||||||
className="input"
|
<input
|
||||||
type="number"
|
id="research-project-request-timeout"
|
||||||
min={1000}
|
className="input"
|
||||||
value={limits?.requestTimeoutMs ?? 30000}
|
type="number"
|
||||||
onChange={(event) =>
|
min={1000}
|
||||||
setForm((current) => ({
|
value={limits?.requestTimeoutMs ?? 30000}
|
||||||
...current,
|
onChange={(event) =>
|
||||||
researchSettings: {
|
setForm((current) => ({
|
||||||
...(current.researchSettings ?? {}),
|
...current,
|
||||||
limits: {
|
researchSettings: {
|
||||||
...(current.researchSettings?.limits ?? {}),
|
...(current.researchSettings ?? {}),
|
||||||
requestTimeoutMs: event.target.value === "" ? undefined : Number(event.target.value),
|
limits: {
|
||||||
},
|
...(current.researchSettings?.limits ?? {}),
|
||||||
},
|
requestTimeoutMs: event.target.value === "" ? undefined : Number(event.target.value),
|
||||||
}))
|
},
|
||||||
}
|
},
|
||||||
/>
|
}))
|
||||||
{researchLimitError && <small className="field-error">{researchLimitError}</small>}
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{researchLimitError && <small className="field-error settings-research-limits-error">{researchLimitError}</small>}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user