Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Story: Present input node endpoint #143

Merged
merged 9 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .helm/templates/editor.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ spec:
value: {{ .Values.auth.identity.clientId }}
- name: IDENTITY_SERVER_CLIENT_SECRET
value: {{ .Values.auth.identity.clientSecret }}
- name: NEXT_PUBLIC_EXECUTOR_BASE_URL
value: {{ .Values.executor.baseUrl }}
2 changes: 2 additions & 0 deletions .helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
ASPNETCORE_ENVIRONMENT: Production
services:
database: flooq-prod-postgresql
executor:
baseUrl: https://executor.flooq.io
auth:
next:
url: https://editor.flooq.io
Expand Down
2 changes: 2 additions & 0 deletions .helm/values-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
ASPNETCORE_ENVIRONMENT: Development
services:
database: flooq-staging-postgresql
executor:
baseUrl: https://executor-staging.flooq.io
auth:
next:
url: https://editor-staging.flooq.io
Expand Down
2 changes: 2 additions & 0 deletions .helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
ASPNETCORE_ENVIRONMENT: Development
services:
database: flooq-postgresql # name of the database pod
executor:
baseUrl: http://localhost:3500 # url of executor
auth:
github:
clientId: <EMPTY> # client id to authenticate with github
Expand Down
1 change: 1 addition & 0 deletions src/editor/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ BASE_URL=http://localhost:3000
API_BASE_URL=https://api-staging.flooq.io
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=secret
NEXT_PUBLIC_EXECUTOR_BASE_URL=https://executor-staging.flooq.io
IDENTITY_SERVER_ISSUER=https://identity-staging.flooq.io
IDENTITY_SERVER_CLIENT_ID=web
IDENTITY_SERVER_CLIENT_SECRET=
10 changes: 9 additions & 1 deletion src/editor/components/flow/new-node-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,28 @@ interface AddNodeDialogProps {
isAddNodeOpen: boolean,
setIsAddNodeOpen( value: boolean ): void
nodes: any
dataFlowId: string
setNodes( value: any ): void
}

export const AddNodeDialog = ( {
isAddNodeOpen,
setIsAddNodeOpen,
nodes,
dataFlowId,
setNodes
}: AddNodeDialogProps ): JSX.Element => {

const addNode = ( newNode: ReactFlowNode ): void => {
setNodes( [
...nodes,
newNode
{
...newNode,
data: {
...newNode.data,
dataFlowId: dataFlowId
}
}
] )
setIsAddNodeOpen( false )
}
Expand Down
3 changes: 1 addition & 2 deletions src/editor/components/graph/http-input-node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const HttpInputNode: FC<FlooqNode> = ( { id, data, ...rest } ) => {
<div className="p-2 flex flex-col gap-3">
<Input
label="Endpoint"
value={data.params.url}
value={`${process.env.NEXT_PUBLIC_EXECUTOR_BASE_URL}/flow/${data.dataFlowId}`}
disabled={true}
/>
<Select
Expand All @@ -43,4 +43,3 @@ export const HttpInputNode: FC<FlooqNode> = ( { id, data, ...rest } ) => {
</Node>
)
}

3 changes: 2 additions & 1 deletion src/editor/components/graph/node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ type NodeData = {
outgoingHandles: any[],
incomingHandles: any[],
params?: any,
canAddTargetHandle?: boolean;
canAddTargetHandle?: boolean,
dataFlowId?: string,
onAddedTargetHandle?: ( e: any ) => void
};

Expand Down
1 change: 1 addition & 0 deletions src/editor/pages/flows/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const DataFlowOverview = ( { dataFlow }: any ): JSX.Element => {
isAddNodeOpen={isAddNodeOpen}
setIsAddNodeOpen={setIsAddNodeOpen}
nodes={nodes}
dataFlowId={flow.id}
setNodes={setNodes}
/>

Expand Down