Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cli/tui/screens/policy/AddPolicyFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function AddPolicyFlow({ isInteractive = true, onExit, onBack, onDev, onD
if (item.id === '__create_new__') {
setFlow({ name: 'engine-wizard' });
} else {
setFlow({ name: 'loading' });
const [deployedId, deployedGateways] = await Promise.all([
policyEnginePrimitive.getDeployedEngineId(item.id),
policyEnginePrimitive.getDeployedGateways(),
Expand Down Expand Up @@ -161,6 +162,7 @@ export function AddPolicyFlow({ isInteractive = true, onExit, onBack, onDev, onD
}, []);

const handleAddPolicyToNewEngine = useCallback(async (engineName: string) => {
setFlow({ name: 'loading' });
const [deployedId, deployedGateways] = await Promise.all([
policyEnginePrimitive.getDeployedEngineId(engineName),
policyEnginePrimitive.getDeployedGateways(),
Expand All @@ -177,7 +179,7 @@ export function AddPolicyFlow({ isInteractive = true, onExit, onBack, onDev, onD
if (flow.name === 'loading') {
return (
<Box>
<Text dimColor>Loading policy engines...</Text>
<Text dimColor>Loading...</Text>
</Box>
);
}
Expand Down
Loading