File tree Expand file tree Collapse file tree 6 files changed +26
-9
lines changed
chat/[agentId]/[conversationId]/richContent Expand file tree Collapse file tree 6 files changed +26
-9
lines changed Original file line number Diff line number Diff line change 1818
1919{#if isComplete }
2020 <div class =" alert-container" >
21- <Alert class =" success" >
21+ <Alert color =" success" >
2222 <div >{successText }</div >
2323 </Alert >
2424 </div >
2525{/if }
2626
2727{#if isError }
2828 <div class =" alert-container" >
29- <Alert class = " error " >
29+ <Alert color = " danger " >
3030 <div >{errorText }</div >
3131 </Alert >
3232 </div >
Original file line number Diff line number Diff line change 66 z-index : 8888 ;
77
88 .alert {
9- color : white ;
109 text-align : center ;
1110 }
1211
Original file line number Diff line number Diff line change 207207 }
208208 }
209209
210- .button-group -container {
210+ .plain-option -container {
211211 display : flex ;
212212 flex-wrap : wrap ;
213213
230230 }
231231 }
232232
233- .card-group -container {
233+ .complex-option -container {
234234 display : flex ;
235235 flex-wrap : wrap ;
236236 gap : 5px ;
Original file line number Diff line number Diff line change 6666< / script>
6767
6868{#if cards .length > 0 }
69- < div class = " card-group -container" >
69+ < div class = " complex-option -container" >
7070 {#each cards as card, idx (idx)}
7171 < Card class = " card-element" >
7272 < CardBody>
Original file line number Diff line number Diff line change 131131{/ if }
132132
133133{#if plainOptions .length > 0 }
134- < div class = " button-group -container" >
134+ < div class = " plain-option -container" >
135135 {#each plainOptions as option, index}
136136 < button
137137 class = {` btn btn-sm m-1 ${ option .is_secondary ? ' btn-outline-secondary' : ' btn-outline-primary' } ` }
Original file line number Diff line number Diff line change 55 import { refreshAgents } from ' $lib/services/agent-service' ;
66 import LoadingToComplete from ' $lib/common/LoadingToComplete.svelte' ;
77 import { _ } from ' svelte-i18n' ;
8+ import Swal from ' sweetalert2/dist/sweetalert2.js' ;
9+ import " sweetalert2/src/sweetalert2.scss" ;
810
911 let isLoading = false ;
1012 let isComplete = false ;
1113 let isError = false ;
1214 const duration = 3000 ;
1315
16+ function readyToRefresh () {
17+ // @ts-ignore
18+ Swal .fire ({
19+ title: ' Are you sure?' ,
20+ text: " You will migrate all agents data to mongoDb." ,
21+ icon: ' warning' ,
22+ showCancelButton: true ,
23+ confirmButtonText: ' Yes' ,
24+ cancelButtonText: ' No'
25+ // @ts-ignore
26+ }).then ((result ) => {
27+ if (result .value ) {
28+ refreshAgentData ();
29+ }
30+ });
31+ }
32+
1433 const refreshAgentData = () => {
1534 isLoading = true ;
1635 refreshAgents ().then (res => {
2847 }, duration);
2948 });
3049 };
31-
3250 </script >
3351
3452<HeadTitle title =" MongoDB" />
3553<Breadcrumb title ="MongoDB" pagetitle =" {$_ (' Setting' )}" />
3654<LoadingToComplete isLoading ={isLoading } isComplete ={isComplete } isError ={isError } />
3755
3856<h3 >{$_ (' Migrate agents from file repository to MongoDB' )}</h3 >
39- <Button color ="primary" on:click ={() => refreshAgentData ()} disabled ={isLoading }>
57+ <Button color ="primary" on:click ={() => readyToRefresh ()} disabled ={isLoading }>
4058 <i class ="bx bx-copy" /> {$_ (' Start Migration' )}
4159</Button >
You can’t perform that action at this time.
0 commit comments