File tree Expand file tree Collapse file tree 3 files changed +30
-9
lines changed Expand file tree Collapse file tree 3 files changed +30
-9
lines changed Original file line number Diff line number Diff line change 1+ : root {
2+ --drawflow-node-width : 250px ;
3+ }
4+
15.drawflow .drawflow-node {
26 background : var (--bs-primary );
37 color : white;
4- width : 250 px ;
8+ width : var ( --drawflow-node-width ) ;
59 border : 2px solid var (--bs-primary );
610}
711
1519 color : white;
1620}
1721
18- .drawflow .parent-node .task-node {
19- width : 300px ;
20- }
21-
2222.drawflow-delete {
2323 background-color : var (--bs-danger );
2424 line-height : 25px ;
Original file line number Diff line number Diff line change 2222 import Swal from ' sweetalert2/dist/sweetalert2.js' ;
2323 import " sweetalert2/src/sweetalert2.scss" ;
2424 import { replaceNewLine } from ' $lib/helpers/http' ;
25+ import ' overlayscrollbars/overlayscrollbars.css' ;
26+ import { OverlayScrollbars } from ' overlayscrollbars' ;
2527
2628 let isError = false ;
2729 const duration = 3000 ;
2830 const firstPage = 1 ;
2931 const pageSize = 10 ;
3032
33+ const options = {
34+ scrollbars: {
35+ visibility: ' auto' ,
36+ autoHide: ' move' ,
37+ autoHideDelay: 100 ,
38+ dragScroll: true ,
39+ clickScroll: false ,
40+ theme: ' os-theme-dark' ,
41+ pointers: [' mouse' , ' touch' , ' pen' ]
42+ }
43+ };
44+
3145 /** @type {import('$types').PagedItems<import('$types').AgentTaskModel>} */
3246 let tasks = { count: 0 , items: [] };
3347
4458
4559 onMount (async () => {
4660 await getPagedAgentTasks ();
61+
62+ const scrollElements = document .querySelectorAll (' .scrollbar' );
63+ scrollElements .forEach ((item ) => {
64+ const scrollbar = OverlayScrollbars (item, options);
65+ });
4766 });
4867
4968 async function getPagedAgentTasks () {
212231 < / td>
213232 < td> {task .description }< / td>
214233 < td> {task .agent_name }< / td>
215- < td> {@html replaceNewLine (task .content )}< / td>
234+ < td>< div style = " max-height: 100px; " class = " scrollbar " > {@html replaceNewLine (task .content )}< / div > </ td>
216235 < td> {utcToLocal (task .updated_datetime )}< / td>
217236 < td>< span class = " badge bg-success" > {task .enabled ? " Enabled" : " Disabled" }< / span>< / td>
218237 < td>
Original file line number Diff line number Diff line change 3737 visibility: ' auto' ,
3838 autoHide: ' move' ,
3939 autoHideDelay: 100 ,
40- dragScroll: true ,
41- clickScroll: false ,
40+ dragScroll: false ,
41+ clickScroll: true ,
4242 theme: ' os-theme-dark' ,
4343 pointers: [' mouse' , ' touch' , ' pen' ]
4444 }
4545 };
4646
4747 onMount (async () => {
4848 const container = document .getElementById (" drawflow" );
49+ container .style .setProperty (' --drawflow-node-width' , ' 300px' );
50+
4951 if (container) {
5052 editor = new Drawflow (container);
5153 editor .reroute = true ;
174176 </script >
175177
176178<div >
177- <!--<button class="btn btn-primary me-2" on:click={handleRunTaskSequentiallyInServer}><i class="bx bx-run"></i> Execute Sequentially through Router </button>-->
179+ <!--<button class="btn btn-primary me-2" on:click={handleRunTaskSequentiallyInServer}><i class="bx bx-run"></i> Execute through {task?.agent_name} </button>-->
178180 {#if task ?.direct_agent_id }
179181 <button class ="btn btn-primary" on:click ={handleRunTaskInteractively }><i class =" bx bx-rocket" ></i > Execute Interactively</button >
180182 {/if }
You can’t perform that action at this time.
0 commit comments