Skip to content

Commit 25a652a

Browse files
committed
fix(agentic-workflow): keep resource settings visible
1 parent 4b2b5f8 commit 25a652a

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

libs/domains/services/feature/src/lib/service-creation-flow/agentic-workflow/agentic-workflow-configuration/agentic-workflow-configuration.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,29 @@ export function AgenticWorkflowConfiguration() {
308308
value={values.description}
309309
onChange={(event) => form.setValue('description', event.currentTarget.value, { shouldDirty: true })}
310310
/>
311+
<div className="grid gap-3 sm:grid-cols-3">
312+
<InputText
313+
name="cpu"
314+
label="CPU (mCPU)"
315+
type="number"
316+
value={values.cpu}
317+
onChange={(event) => form.setValue('cpu', event.currentTarget.value, { shouldDirty: true })}
318+
/>
319+
<InputText
320+
name="memory"
321+
label="Memory (MB)"
322+
type="number"
323+
value={values.memory}
324+
onChange={(event) => form.setValue('memory', event.currentTarget.value, { shouldDirty: true })}
325+
/>
326+
<InputText
327+
name="storage"
328+
label="Storage (GB)"
329+
type="number"
330+
value={values.storage}
331+
onChange={(event) => form.setValue('storage', event.currentTarget.value, { shouldDirty: true })}
332+
/>
333+
</div>
311334
<InputToggle
312335
small
313336
align="top"

libs/domains/services/feature/src/lib/service-creation-flow/agentic-workflow/agentic-workflow-context.spec.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ function FormDefaults() {
77

88
return (
99
<>
10+
<span data-testid="cpu">{values.cpu}</span>
11+
<span data-testid="memory">{values.memory}</span>
12+
<span data-testid="storage">{values.storage}</span>
1013
<span data-testid="whitelist-hosts">{values.whitelistHosts}</span>
1114
<span data-testid="workflow-enabled">{String(values.workflowEnabled)}</span>
1215
</>
@@ -21,6 +24,9 @@ describe('AgenticWorkflowCreationFlow', () => {
2124
</AgenticWorkflowCreationFlow>
2225
)
2326

27+
expect(screen.getByTestId('cpu')).toHaveTextContent('2000')
28+
expect(screen.getByTestId('memory')).toHaveTextContent('2048')
29+
expect(screen.getByTestId('storage')).toHaveTextContent('10')
2430
expect(screen.getByTestId('whitelist-hosts')).toHaveTextContent('*')
2531
expect(screen.getByTestId('workflow-enabled')).toHaveTextContent('true')
2632
})

libs/domains/services/feature/src/lib/service-creation-flow/agentic-workflow/agentic-workflow-context.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ export interface AgenticWorkflowGitRepository {
8686
export interface AgenticWorkflowFormData {
8787
name: string
8888
description: string
89+
cpu: string
90+
memory: string
91+
storage: string
8992
workflowEnabled: boolean
9093
aiModel: AgenticWorkflowModelType
9194
webhookEnabled: boolean
@@ -132,6 +135,9 @@ export function AgenticWorkflowCreationFlow({ children, creationFlowUrl, onExit
132135
defaultValues: {
133136
name: '',
134137
description: '',
138+
cpu: '2000',
139+
memory: '2048',
140+
storage: '10',
135141
workflowEnabled: true,
136142
aiModel: AgenticWorkflowModelType.CLAUDE,
137143
webhookEnabled: true,

libs/domains/services/feature/src/lib/service-creation-flow/agentic-workflow/agentic-workflow-summary.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export function AgenticWorkflowSummary() {
128128
<SummarySection title="Service information" onEdit={() => handleEditSection('service-information')}>
129129
<SummaryValue label="Name" value={values.name} />
130130
<SummaryValue label="Description" value={values.description || undefined} />
131+
<SummaryValue label="CPU" value={values.cpu ? `${values.cpu} mCPU` : undefined} />
132+
<SummaryValue label="Memory" value={values.memory ? `${values.memory} MB` : undefined} />
133+
<SummaryValue label="Storage" value={values.storage ? `${values.storage} GB` : undefined} />
131134
<SummaryValue label="Enabled" value={values.workflowEnabled ? 'Yes' : 'No'} />
132135
</SummarySection>
133136

0 commit comments

Comments
 (0)