Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
113af85c
Commit
113af85c
authored
Feb 28, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add requierd
parent
916bacb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
page.tsx
web/app/(commonLayout)/workflow/nodes/page.tsx
+2
-2
index.tsx
...ts/workflow/nodes/http/components/authorization/index.tsx
+7
-4
mock.ts
web/app/components/workflow/nodes/tool/mock.ts
+2
-1
No files found.
web/app/(commonLayout)/workflow/nodes/page.tsx
View file @
113af85c
...
@@ -5,8 +5,8 @@ import { memo } from 'react'
...
@@ -5,8 +5,8 @@ import { memo } from 'react'
import
Workflow
from
'@/app/components/workflow'
import
Workflow
from
'@/app/components/workflow'
import
{
BlockEnum
}
from
'@/app/components/workflow/types'
import
{
BlockEnum
}
from
'@/app/components/workflow/types'
const
nodes
=
[
const
nodes
=
[
BlockEnum
.
HttpRequest
/* 9 */
,
BlockEnum
.
VariableAssigner
/* 11 */
,
BlockEnum
.
Start
/* 1 */
,
BlockEnum
.
DirectAnswer
/* 2 */
,
BlockEnum
.
LLM
/* 3 */
,
BlockEnum
.
KnowledgeRetrieval
/* 4 */
,
BlockEnum
.
QuestionClassifier
/* 5 */
,
BlockEnum
.
HttpRequest
/* 9 */
,
BlockEnum
.
Tool
/* 10 */
,
BlockEnum
.
VariableAssigner
/* 11 */
,
BlockEnum
.
Start
/* 1 */
,
BlockEnum
.
DirectAnswer
/* 2 */
,
BlockEnum
.
LLM
/* 3 */
,
BlockEnum
.
KnowledgeRetrieval
/* 4 */
,
BlockEnum
.
QuestionClassifier
/* 5 */
,
BlockEnum
.
IfElse
/* 6 */
,
BlockEnum
.
Code
/* 7 */
,
BlockEnum
.
TemplateTransform
/* 8 */
,
BlockEnum
.
Tool
/* 10 */
,
BlockEnum
.
IfElse
/* 6 */
,
BlockEnum
.
Code
/* 7 */
,
BlockEnum
.
TemplateTransform
/* 8 */
,
BlockEnum
.
End
/* 12 */
,
BlockEnum
.
End
/* 12 */
,
].
map
((
item
,
i
)
=>
({
].
map
((
item
,
i
)
=>
({
id
:
`
${
i
+
1
}
`
,
id
:
`
${
i
+
1
}
`
,
...
...
web/app/components/workflow/nodes/http/components/authorization/index.tsx
View file @
113af85c
...
@@ -18,10 +18,13 @@ type Props = {
...
@@ -18,10 +18,13 @@ type Props = {
onHide
:
()
=>
void
onHide
:
()
=>
void
}
}
const
Field
=
({
title
,
children
}:
{
title
:
string
;
children
:
JSX
.
Element
})
=>
{
const
Field
=
({
title
,
isRequired
,
children
}:
{
title
:
string
;
isRequired
?:
boolean
;
children
:
JSX
.
Element
})
=>
{
return
(
return
(
<
div
>
<
div
>
<
div
className=
'leading-8 text-[13px] font-medium text-gray-700'
>
{
title
}
</
div
>
<
div
className=
'leading-8 text-[13px] font-medium text-gray-700'
>
{
title
}
{
isRequired
&&
<
span
className=
'ml-0.5 text-[#D92D20]'
>
*
</
span
>
}
</
div
>
<
div
>
{
children
}
</
div
>
<
div
>
{
children
}
</
div
>
</
div
>
</
div
>
)
)
...
@@ -115,7 +118,7 @@ const Authorization: FC<Props> = ({
...
@@ -115,7 +118,7 @@ const Authorization: FC<Props> = ({
/>
/>
</
Field
>
</
Field
>
{
tempPayload
.
config
?.
type
===
APIType
.
custom
&&
(
{
tempPayload
.
config
?.
type
===
APIType
.
custom
&&
(
<
Field
title=
{
t
(
`${i18nPrefix}.header`
)
}
>
<
Field
title=
{
t
(
`${i18nPrefix}.header`
)
}
isRequired
>
<
input
<
input
type=
'text'
type=
'text'
className=
'w-full h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
className=
'w-full h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
...
@@ -125,7 +128,7 @@ const Authorization: FC<Props> = ({
...
@@ -125,7 +128,7 @@ const Authorization: FC<Props> = ({
</
Field
>
</
Field
>
)
}
)
}
<
Field
title=
{
t
(
`${i18nPrefix}.api-key-title`
)
}
>
<
Field
title=
{
t
(
`${i18nPrefix}.api-key-title`
)
}
isRequired
>
<
input
<
input
type=
'text'
type=
'text'
className=
'w-full h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
className=
'w-full h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
...
...
web/app/components/workflow/nodes/tool/mock.ts
View file @
113af85c
import
{
BlockEnum
}
from
'../../types'
import
type
{
ToolNodeType
}
from
'./types'
import
type
{
ToolNodeType
}
from
'./types'
import
{
VarType
}
from
'./types'
import
{
VarType
}
from
'./types'
export
const
mockData
:
ToolNodeType
=
{
export
const
mockData
:
ToolNodeType
=
{
title
:
'Test'
,
title
:
'Test'
,
desc
:
'Test'
,
desc
:
'Test'
,
type
:
'Test'
,
type
:
BlockEnum
.
Tool
,
provider_id
:
'test'
,
provider_id
:
'test'
,
provider_type
:
'builtin'
,
provider_type
:
'builtin'
,
provider_name
:
'test'
,
provider_name
:
'test'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment