@@ -573,23 +573,27 @@ export const SocketActions = {
573573 * Expects the full path including root.
574574 * Optionally pass the just the filename and path.
575575 */
576- async serverFilesMetadata ( filepath : string ) {
576+ async serverFilesMetadata ( filename : string ) {
577+ const wait = `${ Waits . onFileSystem } /gcodes/${ filename } `
577578 baseEmit (
578579 'server.files.metadata' , {
579580 dispatch : 'files/onFileMetaData' ,
581+ wait,
580582 params : {
581- filename : filepath
583+ filename
582584 }
583585 }
584586 )
585587 } ,
586588
587- async serverFilesMetascan ( filepath : string ) {
589+ async serverFilesMetascan ( filename : string ) {
590+ const wait = `${ Waits . onFileSystem } /gcodes/${ filename } `
588591 baseEmit (
589592 'server.files.metascan' , {
590593 dispatch : 'files/onFileMetaData' ,
594+ wait,
591595 params : {
592- filename : filepath
596+ filename
593597 }
594598 }
595599 )
@@ -689,7 +693,7 @@ export const SocketActions = {
689693 } ,
690694
691695 async serverFilesDeleteFile ( path : string ) {
692- const wait = `${ Waits . onFileSystem } /${ path } / `
696+ const wait = `${ Waits . onFileSystem } /${ path } `
693697 baseEmit (
694698 'server.files.delete_file' , {
695699 dispatch : 'void' ,
@@ -780,6 +784,43 @@ export const SocketActions = {
780784 )
781785 } ,
782786
787+ async serverAnalysisStatus ( ) {
788+ baseEmit (
789+ 'server.analysis.status' , {
790+ dispatch : 'analysis/onAnalysisStatus'
791+ }
792+ )
793+ } ,
794+
795+ async serverAnalysisEstimate ( filename : string , estimator_config ?: string ) {
796+ const wait = `${ Waits . onFileSystem } /gcodes/${ filename } `
797+ baseEmit (
798+ 'server.analysis.estimate' , {
799+ params : {
800+ filename,
801+ estimator_config
802+ } ,
803+ wait,
804+ dispatch : 'void'
805+ }
806+ )
807+ } ,
808+
809+ async serverAnalysisProcess ( filename : string , estimator_config ?: string , force ?: boolean ) {
810+ const wait = `${ Waits . onFileSystem } /gcodes/${ filename } `
811+ baseEmit (
812+ 'server.analysis.process' , {
813+ params : {
814+ filename,
815+ estimator_config,
816+ force
817+ } ,
818+ wait,
819+ dispatch : 'analysis/onAnalysisProcess'
820+ }
821+ )
822+ } ,
823+
783824 async serverSpoolmanGetSpoolId ( ) {
784825 baseEmit (
785826 'server.spoolman.get_spool_id' , {
0 commit comments