Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
b7b20a35
authored
Jul 20, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ts and app detail
parent
f362ba25
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
26 additions
and
20 deletions
+26
-20
client/Dockerfile
+2
-1
client/src/api/app.ts
+1
-1
client/src/pages/app/detail/components/Edit/components/ChatTest.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeAnswer.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeCQNode.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeChat.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeHistory.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeKbSearch.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeQuestionInput.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeTFSwitch.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeUserGuide.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Nodes/NodeVariable.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/Plugins/KBSelect.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/TemplateList.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/modules/ButtonEdge.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/modules/Container.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/modules/Divider.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/modules/Label.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/modules/NodeCard.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/render/RenderInput.tsx
+0
-0
client/src/pages/app/detail/components/Edit/components/render/RenderOutput.tsx
+0
-0
client/src/pages/app/detail/components/Edit/index.module.scss
+0
-0
client/src/pages/app/detail/components/Edit/index.tsx
+0
-0
client/src/pages/app/detail/components/OverView.tsx
+4
-14
client/src/pages/app/detail/index.tsx
+18
-4
client/src/pages/number/components/InformTable.tsx
+1
-0
No files found.
client/Dockerfile
View file @
b7b20a35
...
...
@@ -5,7 +5,8 @@ RUN apk add --no-cache libc6-compat && npm install -g pnpm
WORKDIR
/app
# Install dependencies based on the preferred package manager
COPY
package.json pnpm-lock.yaml* ./
COPY
package.json ./
COPY
pnpm-lock.yaml* ./
RUN
pnpm config
set
registry https://registry.npmmirror.com/
RUN
\
[
-f
pnpm-lock.yaml
]
&&
pnpm install
||
\
...
...
client/src/api/app.ts
View file @
b7b20a35
...
...
@@ -46,7 +46,7 @@ export const triggerModelCollection = (appId: string) =>
// ====================== data
export
const
getAppTotalUsage
=
(
data
:
{
appId
:
string
})
=>
POST
<
{
date
:
Date
;
total
:
number
}[]
>
(
`/app/data/totalUsage`
,
{
POST
<
{
date
:
String
;
total
:
number
}[]
>
(
`/app/data/totalUsage`
,
{
...
data
,
start
:
addDays
(
new
Date
(),
-
13
),
end
:
addDays
(
new
Date
(),
1
)
...
...
client/src/pages/app/detail/components/
e
dit/components/ChatTest.tsx
→
client/src/pages/app/detail/components/
E
dit/components/ChatTest.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeAnswer.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeAnswer.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeCQNode.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeCQNode.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeChat.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeChat.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeHistory.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeHistory.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeKbSearch.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeKbSearch.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeQuestionInput.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeQuestionInput.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeTFSwitch.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeTFSwitch.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeUserGuide.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeUserGuide.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Nodes/NodeVariable.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Nodes/NodeVariable.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/Plugins/KBSelect.tsx
→
client/src/pages/app/detail/components/
E
dit/components/Plugins/KBSelect.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/TemplateList.tsx
→
client/src/pages/app/detail/components/
E
dit/components/TemplateList.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/modules/ButtonEdge.tsx
→
client/src/pages/app/detail/components/
E
dit/components/modules/ButtonEdge.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/modules/Container.tsx
→
client/src/pages/app/detail/components/
E
dit/components/modules/Container.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/modules/Divider.tsx
→
client/src/pages/app/detail/components/
E
dit/components/modules/Divider.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/modules/Label.tsx
→
client/src/pages/app/detail/components/
E
dit/components/modules/Label.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/modules/NodeCard.tsx
→
client/src/pages/app/detail/components/
E
dit/components/modules/NodeCard.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/render/RenderInput.tsx
→
client/src/pages/app/detail/components/
E
dit/components/render/RenderInput.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/components/render/RenderOutput.tsx
→
client/src/pages/app/detail/components/
E
dit/components/render/RenderOutput.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/index.module.scss
→
client/src/pages/app/detail/components/
E
dit/index.module.scss
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
e
dit/index.tsx
→
client/src/pages/app/detail/components/
E
dit/index.tsx
View file @
b7b20a35
File moved
client/src/pages/app/detail/components/
Settings
.tsx
→
client/src/pages/app/detail/components/
OverView
.tsx
View file @
b7b20a35
...
...
@@ -15,10 +15,8 @@ import MyIcon from '@/components/Icon';
import
TotalUsage
from
'./Charts/TotalUsage'
;
const
InfoModal
=
dynamic
(()
=>
import
(
'./InfoModal'
));
import
AppEdit
from
'./edit'
;
import
styles
from
'../../list/index.module.scss'
;
const
Settings
=
({
appId
}:
{
appId
:
string
})
=>
{
const
OverView
=
({
appId
}:
{
appId
:
string
})
=>
{
const
theme
=
useTheme
();
const
{
toast
}
=
useToast
();
const
router
=
useRouter
();
...
...
@@ -28,7 +26,6 @@ const Settings = ({ appId }: { appId: string }) => {
content
:
'确认删除该应用?'
});
const
[
settingAppInfo
,
setSettingAppInfo
]
=
useState
<
AppSchema
>
();
const
[
fullScreen
,
setFullScreen
]
=
useState
(
false
);
/* 点击删除 */
const
handleDelModel
=
useCallback
(
async
()
=>
{
...
...
@@ -61,7 +58,7 @@ const Settings = ({ appId }: { appId: string }) => {
<
Grid
gridTemplateColumns=
{
[
'1fr'
,
'repeat(2,1fr)'
]
}
gridGap=
{
[
2
,
4
,
6
]
}
>
<
Box
>
<
Box
mb=
{
2
}
fontSize=
{
[
'md'
,
'xl'
]
}
>
概览
基本信息
</
Box
>
<
Box
border=
{
theme
.
borders
.
base
}
...
...
@@ -93,7 +90,7 @@ const Settings = ({ appId }: { appId: string }) => {
onClick=
{
openConfirm
(
handleDelModel
)
}
/>
</
Flex
>
<
Box
className=
{
styles
.
intro
}
py=
{
3
}
wordBreak=
{
'break-all'
}
color=
{
'myGray.600'
}
>
<
Box
className=
{
'textEllipsis3'
}
py=
{
3
}
wordBreak=
{
'break-all'
}
color=
{
'myGray.600'
}
>
{
appDetail
.
intro
||
'快来给应用一个介绍~'
}
</
Box
>
<
Flex
>
...
...
@@ -140,13 +137,6 @@ const Settings = ({ appId }: { appId: string }) => {
</
Flex
>
</
Grid
>
</
Box
>
<
Box
flex=
{
'1 0 0'
}
position=
{
'relative'
}
>
<
AppEdit
app=
{
appDetail
}
onFullScreen=
{
(
val
)
=>
setFullScreen
(
val
)
}
fullScreen=
{
fullScreen
}
/>
</
Box
>
{
settingAppInfo
&&
(
<
InfoModal
...
...
@@ -162,4 +152,4 @@ const Settings = ({ appId }: { appId: string }) => {
);
};
export
default
Settings
;
export
default
OverView
;
client/src/pages/app/detail/index.tsx
View file @
b7b20a35
...
...
@@ -9,11 +9,16 @@ import { useQuery } from '@tanstack/react-query';
import
Tabs
from
'@/components/Tabs'
;
import
SideTabs
from
'@/components/SideTabs'
;
import
Settings
from
'./components/Settings
'
;
import
OverView
from
'./components/OverView
'
;
import
Avatar
from
'@/components/Avatar'
;
import
MyIcon
from
'@/components/Icon'
;
import
PageContainer
from
'@/components/PageContainer'
;
import
Loading
from
'@/components/Loading'
;
const
Edit
=
dynamic
(()
=>
import
(
'./components/Edit'
),
{
ssr
:
false
,
loading
:
()
=>
<
Loading
/>
});
const
Share
=
dynamic
(()
=>
import
(
'./components/Share'
),
{
ssr
:
false
});
...
...
@@ -22,6 +27,7 @@ const API = dynamic(() => import('./components/API'), {
});
enum
TabEnum
{
'overview'
=
'overview'
,
'settings'
=
'settings'
,
'share'
=
'share'
,
'API'
=
'API'
...
...
@@ -48,7 +54,8 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
const
tabList
=
useMemo
(
()
=>
[
{
label
:
'概览'
,
id
:
TabEnum
.
settings
,
icon
:
'overviewLight'
},
{
label
:
'概览'
,
id
:
TabEnum
.
overview
,
icon
:
'overviewLight'
},
{
label
:
'高级编排'
,
id
:
TabEnum
.
settings
,
icon
:
'settingLight'
},
{
label
:
'链接分享'
,
id
:
TabEnum
.
share
,
icon
:
'shareLight'
},
{
label
:
'API访问'
,
id
:
TabEnum
.
API
,
icon
:
'apiLight'
},
{
label
:
'立即对话'
,
id
:
'startChat'
,
icon
:
'chatLight'
}
...
...
@@ -157,7 +164,14 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
/>
</
Box
>
<
Box
flex=
{
'1 0 0'
}
h=
{
[
0
,
'100%'
]
}
overflow=
{
[
'overlay'
,
''
]
}
>
{
currentTab
===
TabEnum
.
settings
&&
<
Settings
appId=
{
appId
}
/>
}
{
currentTab
===
TabEnum
.
overview
&&
<
OverView
appId=
{
appId
}
/>
}
{
currentTab
===
TabEnum
.
settings
&&
appDetail
&&
(
<
Edit
app=
{
appDetail
}
fullScreen=
{
true
}
onFullScreen=
{
()
=>
setCurrentTab
(
TabEnum
.
overview
)
}
/>
)
}
{
currentTab
===
TabEnum
.
API
&&
<
API
appId=
{
appId
}
/>
}
{
currentTab
===
TabEnum
.
share
&&
<
Share
appId=
{
appId
}
/>
}
</
Box
>
...
...
@@ -167,7 +181,7 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
};
export
async
function
getServerSideProps
(
context
:
any
)
{
const
currentTab
=
context
?.
query
?.
currentTab
||
TabEnum
.
settings
;
const
currentTab
=
context
?.
query
?.
currentTab
||
TabEnum
.
overview
;
return
{
props
:
{
currentTab
}
...
...
client/src/pages/number/components/InformTable.tsx
View file @
b7b20a35
...
...
@@ -34,6 +34,7 @@ const BillTable = () => {
borderRadius=
{
'md'
}
cursor=
{
item
.
read
?
'default'
:
'pointer'
}
position=
{
'relative'
}
_notLast=
{
{
mb
:
3
}
}
onClick=
{
async
()
=>
{
if
(
!
item
.
read
)
{
await
readInform
(
item
.
_id
);
...
...
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