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
6da9950b
Commit
6da9950b
authored
Feb 28, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: workflow to auth
parent
e8921787
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
3 deletions
+43
-3
page.tsx
web/app/(commonLayout)/workflow/nodes/page.tsx
+2
-2
panel.tsx
web/app/components/workflow/nodes/tool/panel.tsx
+32
-1
node.tsx
web/app/components/workflow/nodes/variable-assigner/node.tsx
+1
-0
workflow.ts
web/i18n/en-US/workflow.ts
+4
-0
workflow.ts
web/i18n/zh-Hans/workflow.ts
+4
-0
No files found.
web/app/(commonLayout)/workflow/nodes/page.tsx
View file @
6da9950b
...
...
@@ -5,8 +5,8 @@ import { memo } from 'react'
import
Workflow
from
'@/app/components/workflow'
import
{
BlockEnum
}
from
'@/app/components/workflow/types'
const
nodes
=
[
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
.
IfElse
/* 6 */
,
BlockEnum
.
Code
/* 7 */
,
BlockEnum
.
TemplateTransform
/* 8 */
,
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
.
HttpRequest
/* 9 */
,
BlockEnum
.
End
/* 12 */
,
].
map
((
item
,
i
)
=>
({
id
:
`
${
i
+
1
}
`
,
...
...
web/app/components/workflow/nodes/tool/panel.tsx
View file @
6da9950b
import
type
{
FC
}
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
Split
from
'../_base/components/split'
import
Button
from
'@/app/components/base/button'
import
Field
from
'@/app/components/workflow/nodes/_base/components/field'
const
i18nPrefix
=
'workflow.nodes.tool'
const
Panel
:
FC
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
readOnly
=
false
return
(
<
div
>
Tool input
</
div
>
<
div
className=
'mt-2'
>
{
!
readOnly
&&
(
<>
<
div
className=
'px-4 pb-3'
>
<
Button
type=
'primary'
className=
'w-full !h-8'
>
{
t
(
`${i18nPrefix}.toAuthorize`
)
}
</
Button
>
</
div
>
<
Split
className=
'mb-2'
/>
</>
)
}
<
div
className=
'px-4 pb-4 space-y-4'
>
<
Field
title=
{
t
(
`${i18nPrefix}.inputVars`
)
}
>
inputVars
</
Field
>
</
div
>
<
Split
/>
</
div
>
)
}
...
...
web/app/components/workflow/nodes/variable-assigner/node.tsx
View file @
6da9950b
...
...
@@ -57,6 +57,7 @@ const Node: FC = () => {
)
}
</
div
>
{
/* For test */
}
<
div
className=
'mt-1 flex items-center h-6 justify-center bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'
onClick=
{
()
=>
{
...
...
web/i18n/en-US/workflow.ts
View file @
6da9950b
...
...
@@ -121,6 +121,10 @@ const translation = {
array
:
'Array'
,
},
},
tool
:
{
toAuthorize
:
'To authorize'
,
inputVars
:
'Input Variables'
,
},
},
}
...
...
web/i18n/zh-Hans/workflow.ts
View file @
6da9950b
...
...
@@ -120,6 +120,10 @@ const translation = {
array
:
'Array'
,
},
},
tool
:
{
toAuthorize
:
'授权'
,
inputVars
:
'输入变量'
,
},
},
}
...
...
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