mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-16 07:24:05 +00:00
fix: sync when sync switch is checked
This commit is contained in:
parent
a7c7ac2f0c
commit
9e1eee8af3
@ -467,7 +467,9 @@ const Documents = () => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
sx={{ marginRight: '20px' }}
|
sx={{ marginRight: '20px' }}
|
||||||
onClick={() => setActiveStep(0)}
|
onClick={() => setActiveStep(0)}
|
||||||
>{'< Back'}</Button>
|
>
|
||||||
|
{'< Back'}
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@ -496,6 +498,7 @@ const Documents = () => {
|
|||||||
)
|
)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
data.success &&
|
data.success &&
|
||||||
|
synchChecked &&
|
||||||
fetch(
|
fetch(
|
||||||
`${fetchBaseURL}/knowledge/${spaceName}/document/sync`,
|
`${fetchBaseURL}/knowledge/${spaceName}/document/sync`,
|
||||||
{
|
{
|
||||||
@ -551,6 +554,7 @@ const Documents = () => {
|
|||||||
)
|
)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
data.success &&
|
data.success &&
|
||||||
|
synchChecked &&
|
||||||
fetch(
|
fetch(
|
||||||
`${fetchBaseURL}/knowledge/${spaceName}/document/sync`,
|
`${fetchBaseURL}/knowledge/${spaceName}/document/sync`,
|
||||||
{
|
{
|
||||||
@ -610,6 +614,7 @@ const Documents = () => {
|
|||||||
)
|
)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
data.success &&
|
data.success &&
|
||||||
|
synchChecked &&
|
||||||
fetch(
|
fetch(
|
||||||
`${fetchBaseURL}/knowledge/${spaceName}/document/sync`,
|
`${fetchBaseURL}/knowledge/${spaceName}/document/sync`,
|
||||||
{
|
{
|
||||||
|
@ -397,7 +397,9 @@ const Index = () => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
sx={{ marginRight: '20px' }}
|
sx={{ marginRight: '20px' }}
|
||||||
onClick={() => setActiveStep(1)}
|
onClick={() => setActiveStep(1)}
|
||||||
>{'< Back'}</Button>
|
>
|
||||||
|
{'< Back'}
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@ -428,6 +430,7 @@ const Index = () => {
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
message.success('success')
|
message.success('success')
|
||||||
setIsAddKnowledgeSpaceModalShow(false)
|
setIsAddKnowledgeSpaceModalShow(false)
|
||||||
|
synchChecked &&
|
||||||
fetch(
|
fetch(
|
||||||
`${fetchBaseURL}/knowledge/${knowledgeSpaceName}/document/sync`,
|
`${fetchBaseURL}/knowledge/${knowledgeSpaceName}/document/sync`,
|
||||||
{
|
{
|
||||||
@ -463,6 +466,7 @@ const Index = () => {
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
message.success('success')
|
message.success('success')
|
||||||
setIsAddKnowledgeSpaceModalShow(false)
|
setIsAddKnowledgeSpaceModalShow(false)
|
||||||
|
synchChecked &&
|
||||||
fetch(
|
fetch(
|
||||||
`${fetchBaseURL}/knowledge/${knowledgeSpaceName}/document/sync`,
|
`${fetchBaseURL}/knowledge/${knowledgeSpaceName}/document/sync`,
|
||||||
{
|
{
|
||||||
@ -502,6 +506,7 @@ const Index = () => {
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
message.success('success')
|
message.success('success')
|
||||||
setIsAddKnowledgeSpaceModalShow(false)
|
setIsAddKnowledgeSpaceModalShow(false)
|
||||||
|
synchChecked &&
|
||||||
fetch(
|
fetch(
|
||||||
`${fetchBaseURL}/knowledge/${knowledgeSpaceName}/document/sync`,
|
`${fetchBaseURL}/knowledge/${knowledgeSpaceName}/document/sync`,
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user