Compare commits

...

129 Commits

Author SHA1 Message Date
Samuele Locatelli a25f06afeb Merge tag 'TestIssues_01' into develop
Test chiusura issue...
2024-03-07 11:02:53 +01:00
Samuele Locatelli 44be6ad694 Merge branch 'Release/TestIssues_01' 2024-03-07 11:02:45 +01:00
Samuele Locatelli 22d7f55aaa Refresh TAB + test chiusura issue:
Closes #1
2024-03-07 11:02:11 +01:00
Samuele Locatelli 9171a29faf Merge tag 'UpdateBaseUrlTab01' into develop
Update baseUrlTab
2024-03-05 17:29:00 +01:00
Samuele Locatelli 592ca82487 Merge branch 'Release/UpdateBaseUrlTab01' 2024-03-05 17:28:53 +01:00
Samuele Locatelli 3d4998d783 Cambio naming BaseUrl x TAB 2024-03-05 17:28:31 +01:00
Samuele Locatelli 23d30a6026 Merge tag 'UpdateReload01' into develop
Update procedure reload x MON e TAB3
2024-03-05 08:22:59 +01:00
Samuele Locatelli 805bb1782f Merge branch 'Release/UpdateReload01' 2024-03-05 08:22:48 +01:00
Samuele Locatelli eb532976f1 Update periodo reload x TAB3 2024-03-05 08:22:27 +01:00
Samuele Locatelli 66b25571cf Modifica reload anche x tablet 2024-03-04 18:54:30 +01:00
Samuele Locatelli 374dd0c318 typo 2024-03-04 17:59:15 +01:00
Samuele Locatelli 12c0943814 altra modifica reload 2024-03-04 17:57:48 +01:00
Samuele Locatelli d214f14226 Altra prova 2024-03-04 17:53:32 +01:00
Samuele Locatelli 9a786c014a Lascio tentativo x 10 min 2024-03-04 17:46:11 +01:00
Samuele Locatelli 62149c500b test gestione reload auto 2024-03-04 17:44:10 +01:00
Samuele Locatelli aeedbedbc5 Altro test 2024-03-04 17:39:08 +01:00
Samuele Locatelli e4ef7dc9b8 altro test x reconnect 2024-03-04 17:36:48 +01:00
Samuele Locatelli 8795f9bb3e tolta tutta la gestione custom 2024-03-04 17:30:40 +01:00
Samuele Locatelli dd8bbfe7b1 rimesso 1 solo giro a 10 sec 2024-03-04 17:24:43 +01:00
Samuele Locatelli b8d75a90bd altra sintassi 2024-03-04 17:22:32 +01:00
Samuele Locatelli 1f21a6d6bb ancora test reload 2024-03-04 17:19:31 +01:00
Samuele Locatelli 294c4373e0 modifica reload x MON, altro metodo 2024-03-04 17:16:20 +01:00
Samuele Locatelli ccb5af08fa Altro metodo reload 1 sola volta 2024-03-04 17:00:43 +01:00
Samuele Locatelli 4506bcdcb8 Altro test reload MON 2024-03-04 16:56:28 +01:00
Samuele Locatelli 42d41b69b3 Altra modalità reconnect 2024-03-04 16:48:26 +01:00
Samuele Locatelli 3a9469ebc5 Altro test reconnect 2024-03-04 16:37:20 +01:00
Samuele Locatelli f0201bcb25 Test reload MON con timeout 2024-03-04 16:31:59 +01:00
Samuele Locatelli 1303886512 Merge tag 'UpdateConfigJson01' into develop
Update conf json
2024-03-04 09:20:46 +01:00
Samuele Locatelli 5924634763 Merge branch 'Release/UpdateConfigJson01' 2024-03-04 09:19:44 +01:00
Samuele Locatelli 77b32b72fc Update conf parametrica ServerConf 2024-03-04 09:19:18 +01:00
Samuele Locatelli d43a537f19 Merge tag 'UpdateTabletAndMonRefresh01' into develop
Update gestione refresh monitor + vari fix tablet
2024-03-01 10:34:06 +01:00
Samuele Locatelli 68516ffd3d Merge branch 'Release/UpdateTabletAndMonRefresh01' 2024-03-01 10:33:31 +01:00
Samuele Locatelli 331eb59c73 Update MON x refresh orologio ogni sec 2024-03-01 10:33:00 +01:00
Samuele Locatelli 2b02a91627 Fix pz pallet riattrezzaggio 2024-03-01 09:46:54 +01:00
Samuele Locatelli 2de877f09a pzPallet: esteso a 30 2024-02-28 18:02:05 +01:00
Samuele Locatelli 3aeed52ceb Test fix PzPallet 2024-02-28 16:23:52 +01:00
Samuele Locatelli 0a88c693c7 test nuovo reconnection handler 2024-02-28 15:52:26 +01:00
Samuele Locatelli b83dda2db2 Fix refresh allarmi 2024-02-28 15:28:36 +01:00
Samuele Locatelli cf6ddb045f Fix calcolo TC centesimale 2024-02-28 15:20:16 +01:00
Samuele Locatelli f2783e3d37 update ricalcolo techSheet 2024-02-28 11:54:59 +01:00
Samuele Locatelli 0b60b7de38 Aggiunto blocco in riattrezzaggio x update info 2024-02-28 11:54:51 +01:00
Samuele Locatelli 348c887af7 Fix update pag dettaglio 2024-02-28 11:13:40 +01:00
Samuele Locatelli 97c64ce03c Fix cache apgina ODL 2024-02-28 10:34:25 +01:00
Samuele Locatelli aea37b1110 Fix force reload attrezzaggio (da verificare...) 2024-02-28 09:28:47 +01:00
Samuele Locatelli 450552ee75 Fix selezione pzpallet 2024-02-28 09:12:19 +01:00
Samuele Locatelli ef4ac14e18 update tempo con sel tendina 2024-02-27 19:44:36 +01:00
Samuele Locatelli 1d208d37a2 test altro metodo parse time mobile 2024-02-27 19:35:33 +01:00
Samuele Locatelli 2afc9acf2c test insert tempo x sel datetime mobile 2024-02-27 19:14:31 +01:00
Samuele Locatelli e8052ed5a2 Cambio comportamento insert fermate x mostrare esito insert 2024-02-27 19:14:19 +01:00
Samuele Locatelli d0b624f74b add log x gestione IobInfo 2024-02-27 19:13:50 +01:00
Samuele Locatelli 58b9ffcea8 fix reload home btn top 2024-02-27 19:13:39 +01:00
Samuele Locatelli 340fc785f5 Fix veto reload note/tempo7pzPallet in attrezzaggio 2024-02-27 19:13:26 +01:00
Samuele Locatelli a9ac48c016 Merge tag 'FixDbAndRedis01' into develop
Fix conf DB e REDIS
2024-02-27 16:50:16 +01:00
Samuele Locatelli cde7309597 Merge branch 'Release/FixDbAndRedis01' 2024-02-27 16:50:09 +01:00
Samuele Locatelli 1708de0abb Fix conf nomi DB SQL + Redis DefaultDb 2024-02-27 16:48:57 +01:00
Samuele Locatelli f413f44e3d Fix log ricerca IOB_INFO 2024-02-27 16:32:24 +01:00
Samuele Locatelli e568c91dd7 Update log x IOB_INFO 2024-02-27 16:07:44 +01:00
Samuele Locatelli bc27286a54 Update iob info x img 2024-02-27 16:02:57 +01:00
Samuele Locatelli e0fa3e9bac Typo fix 2024-02-27 10:30:50 +01:00
Samuele Locatelli bd700b1e36 Merge tag 'UpdateBlinkTab1' into develop
Aggiunto blink su TAB3
2024-02-27 08:37:20 +01:00
Samuele Locatelli a2566419c6 Merge branch 'Release/UpdateBlinkTab1' 2024-02-27 08:37:08 +01:00
Samuele Locatelli db063fc394 Update accento shadow + blink su TAB3 2024-02-27 08:36:39 +01:00
Samuele Locatelli 1f0ff69c58 Merge tag 'CreateBasePageTab3' into develop
Update gestione BasePage x TAB3 + fix vari x ricalcoli
2024-02-26 20:18:14 +01:00
Samuele Locatelli 57240c0b1b Merge branch 'Release/CreateBasePageTab3' 2024-02-26 20:17:59 +01:00
Samuele Locatelli 0de4730518 Completato porting inheritance da BasePage + pulizia using 2024-02-26 20:17:35 +01:00
Samuele Locatelli 70414dc00f Riorganizzazione BasePage con inheritance 2024-02-26 20:05:47 +01:00
Samuele Locatelli f3c3452a16 ancora fix placeholder 2024-02-26 19:00:44 +01:00
Samuele Locatelli d39acbe570 ulteriore fix placeholder 2024-02-26 18:57:54 +01:00
Samuele Locatelli 4454f5c64d Cambio wait 2024-02-26 18:52:59 +01:00
Samuele Locatelli c375f61b94 test placeholder alto 2024-02-26 18:48:41 +01:00
Samuele Locatelli 99c0abb0fd Completata sositutiozne sampler con TabDataFeeder 2024-02-26 18:26:30 +01:00
Samuele Locatelli 0ffde6db57 Continuo porting pagine a gestione TabDataFeeder 2024-02-26 18:09:48 +01:00
Samuele Locatelli 3ac8a1ace7 Fix grafici x machine block 2024-02-26 16:37:00 +01:00
Samuele Locatelli 390bc4c23c Aggiunto verifica directory disegni + feeder TAB 2024-02-26 16:11:29 +01:00
Samuele Locatelli ab429c1c67 Continuo modifica x eliminare SamplerMSE singoli 2024-02-26 15:58:15 +01:00
Samuele Locatelli 553fa000b5 Update gestione parametro display PDF + inizio TabDataFeeder 2024-02-26 15:15:24 +01:00
Samuele Locatelli cb3ad67aaa update layer spento x MON 2024-02-26 15:14:56 +01:00
Samuele Locatelli d8d3078f2f Filtraggio OPeratori e scarti da anagrafica 2024-02-26 14:17:08 +01:00
Samuele Locatelli fc134abf0c Merge tag 'UpdateTab3BlockDisplay02' into develop
Update monitor x stato "spento"
2024-02-26 11:33:20 +01:00
Samuele Locatelli 8df24f8f1d Merge branch 'Release/UpdateTab3BlockDisplay02' 2024-02-26 11:33:07 +01:00
Samuele Locatelli dddf55565b Update x spento su monitor 2024-02-26 11:32:49 +01:00
Samuele Locatelli 429abcd7cf Update scroll su TAB3 2024-02-26 11:32:44 +01:00
Samuele Locatelli ad8a5718c2 Merge tag 'UpdateTab3BlockDisplay01' into develop
Update display TAB3
2024-02-26 09:10:54 +01:00
Samuele Locatelli bab66a31e6 Merge branch 'Release/UpdateTab3BlockDisplay01' 2024-02-26 09:10:43 +01:00
Samuele Locatelli f1d7b4fd32 Update grafico display blocchi 2024-02-26 08:34:15 +01:00
Samuele Locatelli b41b024239 TAB£:
- Update display macchina con immagini
2024-02-24 12:40:09 +01:00
Samuele Locatelli 26bd0e284f Merge tag 'AddPdfViewerAndMonFilter01' into develop
Aggiunta filtraggio x MON + nuovo PDF viewer
2024-02-23 12:25:35 +01:00
Samuele Locatelli c0bd2de326 Merge branch 'Release/AddPdfViewerAndMonFilter01' 2024-02-23 12:25:26 +01:00
Samuele Locatelli 83f1ef8856 Inclusione componente EgwCoreLib x pdf 2024-02-23 12:24:58 +01:00
Samuele Locatelli 3ce5ff08d5 Test x modifica viewer pdf.js 2024-02-23 12:21:24 +01:00
Samuele Locatelli b7609d22ba Modifica MON x filtrare x gruppi 2024-02-23 12:21:05 +01:00
Samuele Locatelli 086f9a0721 Fix chiave deploy da locale a globale 2024-02-22 11:03:47 +01:00
Samuele Locatelli ca67fed604 Modifica layout x reconnect handler 2024-02-21 18:54:04 +01:00
Samuele Locatelli e390874ef6 Aggiunto test mobile/desktop 2024-02-21 18:49:39 +01:00
Samuele Locatelli 68c66fec24 test con iframe 2024-02-21 18:42:14 +01:00
Samuele Locatelli ee17743d07 Altro test componente x tablet 2024-02-21 18:36:44 +01:00
Samuele Locatelli 7df41a8403 Update cong estione embed dei PDF 2024-02-21 18:31:16 +01:00
Samuele Locatelli 186005656f update conf x path disegni 2024-02-21 17:54:15 +01:00
Samuele Locatelli bb96cf0033 Merge tag 'AddDownloadDisegni01' into develop
Aggiunto mapping cartella x download disegni
2024-02-21 17:33:27 +01:00
Samuele Locatelli 5a85a607b7 Merge branch 'Release/AddDownloadDisegni01' 2024-02-21 17:33:06 +01:00
Samuele Locatelli d07cfdff7b Update config develop x path disegni 2024-02-21 17:21:47 +01:00
Samuele Locatelli 603da66f00 Merge branch 'feature/TestPdfDoc01' into develop 2024-02-21 17:12:23 +01:00
Samuele Locatelli 6e3a74bd2c Update x gestione disegni (parametrica) 2024-02-21 17:10:16 +01:00
Samuele Locatelli 9d3a2761b8 Merge tag 'UpdateLoginW11_01' into develop
Fix gestione login w11
2024-02-21 10:24:38 +01:00
Samuele Locatelli fc61f46802 Merge branch 'Release/UpdateLoginW11_01' 2024-02-21 10:23:00 +01:00
Samuele Locatelli 9d74e8dcb0 Aggiunta ritardi in login e check lastOpenedPage x TAB3 e win11 2024-02-21 10:19:39 +01:00
Samuele Locatelli 0097b48ba5 Merge tag 'UpdateLayoutReload03' into develop
Completo modifiche gestione reload blazor
2024-02-19 19:27:07 +01:00
Samuele Locatelli e61b54d9ae Merge branch 'Release/UpdateLayoutReload03' 2024-02-19 19:25:56 +01:00
Samuele Locatelli c746f0ce2b Completamento modifiche layout 2024-02-19 19:25:21 +01:00
Samuele Locatelli e3b2b5d32c Merge tag 'UpdateLayoutReload02' into develop
Fix gestione reload blazor
2024-02-19 19:25:06 +01:00
Samuele Locatelli 11c2dd0412 Merge branch 'Release/UpdateLayoutReload02' 2024-02-19 19:24:51 +01:00
Samuele Locatelli 5f95187c01 Ancora ottimizzazioni layout struct x balzor.js e reload 2024-02-19 19:24:38 +01:00
Samuele Locatelli 1bfe90de1c tolta gestione response compressione 2024-02-19 15:45:11 +01:00
Samuele Locatelli 2a38aeea45 test spostamento blazor js in fondo 2024-02-19 15:41:52 +01:00
Samuele Locatelli 2dc6af1bc8 test pagina TAB3 con reconnect disattivato 2024-02-19 15:35:26 +01:00
Samuele Locatelli 51c45ac2fc Merge tag 'UpdateLayoutReload01' into develop
Update gestione reload base page layout
2024-02-19 14:33:07 +01:00
Samuele Locatelli 193108f573 Merge branch 'Release/UpdateLayoutReload01' 2024-02-19 14:32:52 +01:00
Samuele Locatelli d3104d9598 Update base page x reload 2024-02-19 14:31:34 +01:00
Samuele Locatelli cf49953145 Merge tag 'AddRecalcProdOnConferma' into develop
Aggiunta ricalcolo pezzi in caso di conferma produzione
2024-02-19 09:48:16 +01:00
Samuele Locatelli 8d95f7ef5c Merge branch 'Release/AddRecalcProdOnConferma' 2024-02-19 09:48:06 +01:00
Samuele Locatelli 297ad69831 Aggiunta flush stato prod prima della conf pezzi 2024-02-19 09:47:32 +01:00
Samuele Locatelli 4f8bb3892e Merge tag 'AddPageReconnectAuto' into develop
Add page reconnect + reload event da flushCache
2024-02-19 09:20:05 +01:00
Samuele Locatelli 04a34c9cae Merge branch 'Release/AddPageReconnectAuto' 2024-02-19 09:19:54 +01:00
Samuele Locatelli caa5ca85c5 Evento reload gestito + rilettura pagina gestita 2024-02-19 09:19:36 +01:00
Samuele Locatelli 39cc5ec35f Merge tag 'AddMseSamplerDisposeTimer' into develop
Aggiunta globale dispose x metodi MseSampler
2024-02-06 19:31:05 +01:00
Samuele Locatelli 8fa562f247 Merge branch 'Release/AddMseSamplerDisposeTimer' 2024-02-06 19:29:27 +01:00
Samuele Locatelli 3ced4656bd Aggiunta metodi dispose su tutte le pagine 2024-02-06 19:28:57 +01:00
Samuele Locatelli 1d056d1960 Modifica principale: dispose del sampler dopo n cicli 2024-02-06 19:28:48 +01:00
Samuele Locatelli 169d9aedc9 Update gestione reload CmpTop 2024-02-06 16:59:31 +01:00
155 changed files with 2568 additions and 1704 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
#--------------------------------
# area MP.Stats
#--------------------------------
/Mp.FileData/temp/*.csv
/MP.FileData/temp/*.csv
*.bak
#--------------------------------
+27 -27
View File
@@ -267,7 +267,7 @@ LAND:IIS01:deploy:
needs: ["LAND:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
PROG:IIS01:deploy:
stage: deploy
@@ -286,7 +286,7 @@ PROG:IIS01:deploy:
needs: ["PROG:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
STAT:IIS01:deploy:
stage: deploy
@@ -305,7 +305,7 @@ STAT:IIS01:deploy:
needs: ["STAT:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
MON:IIS01:deploy:
stage: deploy
@@ -324,7 +324,7 @@ MON:IIS01:deploy:
needs: ["MON:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
SPEC:IIS01:deploy:
stage: deploy
@@ -343,7 +343,7 @@ SPEC:IIS01:deploy:
needs: ["SPEC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
INVE:IIS01:deploy:
stage: deploy
@@ -362,7 +362,7 @@ INVE:IIS01:deploy:
needs: ["INVE:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CONF:IIS01:deploy:
stage: deploy
@@ -381,7 +381,7 @@ CONF:IIS01:deploy:
needs: ["CONF:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
IOC:IIS01:deploy:
stage: deploy
@@ -400,7 +400,7 @@ IOC:IIS01:deploy:
needs: ["IOC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
TAB3:IIS01:deploy:
stage: deploy
@@ -419,7 +419,7 @@ TAB3:IIS01:deploy:
needs: ["TAB3:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# ----- Start DEPLOY master (IIS02/IIS04) -----
LAND:IIS02:deploy:
@@ -437,8 +437,8 @@ LAND:IIS02:deploy:
needs: ["LAND:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
PROG:IIS02:deploy:
stage: deploy
@@ -455,8 +455,8 @@ PROG:IIS02:deploy:
needs: ["PROG:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
STAT:IIS02:deploy:
stage: deploy
@@ -473,8 +473,8 @@ STAT:IIS02:deploy:
needs: ["STAT:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
MON:IIS02:deploy:
stage: deploy
@@ -491,8 +491,8 @@ MON:IIS02:deploy:
needs: ["MON:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
SPEC:IIS02:deploy:
stage: deploy
@@ -509,8 +509,8 @@ SPEC:IIS02:deploy:
needs: ["SPEC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
INVE:IIS02:deploy:
stage: deploy
@@ -527,8 +527,8 @@ INVE:IIS02:deploy:
needs: ["INVE:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CONF:IIS02:deploy:
stage: deploy
@@ -545,8 +545,8 @@ CONF:IIS02:deploy:
needs: ["CONF:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
IOC:IIS02:deploy:
stage: deploy
@@ -563,8 +563,8 @@ IOC:IIS02:deploy:
needs: ["IOC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
TAB3:IIS02:deploy:
stage: deploy
@@ -581,8 +581,8 @@ TAB3:IIS02:deploy:
needs: ["IOC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# ----- Start INSTALLER (develop/master) -----
LAND:installer:
+10 -1
View File
@@ -101,7 +101,6 @@ namespace MP_TAB3.Components
DateTime fine = DateTime.Today.AddDays(1);
DateTime inizio = fine.AddDays(-8);
CurrPeriodo = new Periodo(inizio, fine);
await doUpdate();
}
var rawDest = config.GetValue<string>("AlarmDest");
if (!string.IsNullOrEmpty(rawDest))
@@ -114,6 +113,15 @@ namespace MP_TAB3.Components
}
}
protected override async Task OnParametersSetAsync()
{
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
{
lastRecMSE = RecMSE;
await doUpdate();
}
}
protected void SaveNumRec(int newNum)
{
NumRecPage = newNum;
@@ -208,6 +216,7 @@ namespace MP_TAB3.Components
private Periodo CurrPeriodo { get; set; } = new Periodo();
private string IdxMaccSel { get; set; } = "";
private MappaStatoExpl? lastRecMSE { get; set; } = null;
#endregion Private Properties
}
+20 -17
View File
@@ -67,26 +67,30 @@ namespace MP_TAB3.Components
#region Protected Methods
protected async Task RefreshLogIn(string decodValue)
protected async Task RefreshScadLogIn(string decodValue)
{
bool done = false;
if (TypeScadLogin <= 0 || TypeScadLogin == 2)
// solo se non è logout!!!
if (!NavMan.Uri.Contains("logout"))
{
done = await MsgServ.DoLogIn(decodValue, false);
}
else
{
done = await MsgServ.DoLogIn(decodValue, true);
}
if (done)
{
if (!string.IsNullOrEmpty(LastOpenedPage) && !string.IsNullOrEmpty(CurrMacc))
if (TypeScadLogin <= 0 || TypeScadLogin == 2)
{
NavMan.NavigateTo(LastOpenedPage);
done = await MsgServ.DoLogIn(decodValue, false);
}
else
{
NavMan.NavigateTo("status-map");
done = await MsgServ.DoLogIn(decodValue, true);
}
if (done && !string.IsNullOrEmpty(LastOpenedPage))
{
if (!string.IsNullOrEmpty(CurrMacc))
{
NavMan.NavigateTo(LastOpenedPage);
}
else
{
NavMan.NavigateTo("status-map");
}
}
}
}
@@ -128,9 +132,8 @@ namespace MP_TAB3.Components
await Task.Delay(1);
if (!NavMan.Uri.Contains("reg-new-device"))
{
await MsgServ.IdxMaccSet("");
NavMan.NavigateTo("status-map");
NavMan.NavigateTo("status-map", true);
}
}
@@ -149,7 +152,7 @@ namespace MP_TAB3.Components
CurrMacc = await MsgServ.IdxMaccGet();
CurrOprTknLS = await MsgServ.GetCurrOperDtoLSAsync();
var decodedUrl = Uri.UnescapeDataString(CurrOprTknLS);
var currOprTokLsDeco = Uri.UnescapeDataString(CurrOprTknLS);
if (!string.IsNullOrEmpty(CurrOprTknLS))
{
var decryptedData = MsgServ.DecryptData(CurrOprTknLS);
@@ -176,7 +179,7 @@ namespace MP_TAB3.Components
}
else if (!string.IsNullOrEmpty(CurrOprTknRedis) && CurrOprTknRedis == CurrOprTknLS)
{
await RefreshLogIn(decodedUrl);
await RefreshScadLogIn(currOprTokLsDeco);
await EA_UserIsOk.InvokeAsync(true);
}
}
+1 -1
View File
@@ -7,7 +7,7 @@
<div class="mb-1 fs-6">
@if (enableControlli)
{
@if (RecMSE.IdxOdl > 0)
@if (RecMSE != null && RecMSE.IdxOdl > 0)
{
<button class="btn btn-primary btn-lg text-light w-100 mb-1" @onclick="ToggleBtn">
<i class="fa fa-wrench"></i> @ConfTitle
+7 -3
View File
@@ -6,11 +6,15 @@
<div class="d-flex justify-content-center flex-wrap align-items-center">
@if(infosIob.iType == MP.Data.Objects.Enums.IobType.rPi)
{
<img src="/images/linuxLogo.png" style="height: 70px; width: 70px" />
<img src="images/linuxLogo.png" style="height: 7em; width: 7em;" />
}
else if (infosIob.iType == MP.Data.Objects.Enums.IobType.WIN || infosIob.iType == MP.Data.Objects.Enums.IobType.ND)
else if (infosIob.iType == MP.Data.Objects.Enums.IobType.WIN)
{
<img src="/images/winLogo.png" style="height: 70px; width: 70px" />
<img src="images/winLogo.png" style="height: 7em; width: 7em;" />
}
else if (infosIob.iType == MP.Data.Objects.Enums.IobType.ND)
{
<img src="images/pythonLogo.png" style="height: 7em; width: 7em;" />
}
</div>
</div>
+13 -5
View File
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DTO;
using MP.Data.Objects;
using MP.Data.Services;
@@ -7,20 +6,29 @@ namespace MP_TAB3.Components
{
public partial class IobInfoMan
{
#region Public Properties
[Parameter]
public string idxMacch { get; set; } = "";
#endregion Public Properties
#region Protected Properties
protected IOB_data infosIob { get; set; } = new IOB_data();
[Inject]
protected TabDataService TabSrv { get; set; } = null!;
protected IOB_data infosIob { get; set; } = new IOB_data();
#endregion Protected Properties
protected override async Task OnInitializedAsync()
#region Protected Methods
protected override async Task OnParametersSetAsync()
{
infosIob = await TabSrv.IobInfo(idxMacch);
}
#endregion Protected Methods
}
}
+110 -71
View File
@@ -3,10 +3,17 @@
<div class="card text-white mapBlock shadow bg-secondary p-0 m-0">
<div class="card-body">
<div class="placeholder-glow">
<span class="placeholder col-7"></span>
<span class="placeholder col-4"></span>
<span class="placeholder col-4"></span>
<span class="placeholder col-7"></span>
<span class="placeholder col-7 mb-1"></span>
<span class="placeholder col-12 mb-1 pholderHeight"></span>
<span class="placeholder col-12 mb-1"></span>
<span class="placeholder col-3 mb-1"></span>
<span class="placeholder col-8"></span>
<span class="placeholder col-3"></span>
<span class="placeholder col-7 mb-1"></span>
<span class="placeholder col-3"></span>
<span class="placeholder col-8 mb-1"></span>
</div>
</div>
</div>
@@ -19,10 +26,16 @@ else
<div class="card-body">
<div class="alert alert-info w-100 fs-3">No data</div>
<div class="placeholder-glow">
<span class="placeholder col-7"></span>
<span class="placeholder col-4"></span>
<span class="placeholder col-4"></span>
<span class="placeholder col-7"></span>
<span class="placeholder col-7 mb-1"></span>
<span class="placeholder col-12 mb-1 pholderHeight"></span>
<span class="placeholder col-12 mb-1"></span>
<span class="placeholder col-3 mb-1"></span>
<span class="placeholder col-8"></span>
<span class="placeholder col-3"></span>
<span class="placeholder col-7 mb-1"></span>
<span class="placeholder col-3"></span>
<span class="placeholder col-8 mb-1"></span>
</div>
</div>
</div>
@@ -33,21 +46,26 @@ else
{
if (Width > 640)
{
<div class="card shadow rounded rounded-4 border-secondary" @onclick="ShowDetail">
<img src="@ImgUrlMacc(RecMSE.Url)" class="card-img-top imgFitToSize" alt="@RecMSE.CodMacchina">
<div class="card bg-dark @cssClassBorder @cssClassOverlay rounded-4" @onclick="ShowDetail">
<img src="@ImgUrlMacc(RecMSE.Url)" class="card-img-top imgFitToSize rounded-top-4" alt="@RecMSE.CodMacchina">
<div class="bg-black">
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start rCTop">
<div class="labelTopDx px-2 w-100">
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start">
<div class="labelTop px-2 w-100">
<div class="text-center fs-2 fw-bold">
@RecMSE.Nome
</div>
</div>
</div>
</div>
<div class="card-body p-1">
<div class="@RecMSE.Semaforo borderStd p-1">
<div class="d-flex justify-content-center fs-5">
<span><b>@RecMSE.DescrizioneStato</b>: &nbsp; @(FormatDurata(RecMSE.Durata))</span>
<div class="card-body rounded-bottom-4 p-0 bg-dark">
<div class="@RecMSE.Semaforo py-0 px-1">
<div class="d-flex justify-content-between fs-5">
<div class="px-0 @cssClassTextDescr">
<span>@RecMSE.DescrizioneStato </span>
</div>
<div class="px-0">
<b>@(FormatDurata(RecMSE.Durata))</b>
</div>
</div>
</div>
<div class="d-flex justify-content-around">
@@ -72,77 +90,88 @@ else
<div class="col-4">
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz rich" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
</div>
<div class="col-8" style="line-height: 1.6rem;">
<div class="col-8 py-1" style="line-height: 1.6rem;">
<div class="text-center text-light d-flex justify-content-between">
<div class="col-4"><span>ART:</span></div>
<div class="col-8">@($"{RecMSE.CodArticolo}")</div>
<div class="px-1"><span>ART:</span></div>
<div class="px-1">@($"{RecMSE.CodArticolo}")</div>
</div>
<div class="text-center text-light d-flex justify-content-between small lh-sm">
<div class="col-4">ODL:</div>
<div class="col-8">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
<div class="px-1">ODL:</div>
<div class="px-1">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
</div>
<div class="text-center text-light d-flex justify-content-between small lh-sm">
<div class="col-4">PODL:</div>
<div class="col-8">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
<div class="px-1">PODL:</div>
<div class="px-1">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
</div>
</div>
</div>
</div>
</div>
}
else
{
<div class="cardObj shadow" @onclick="ShowDetail">
<div class="card-body p-0">
<div class="@RecMSE.Semaforo borderStd p-1 text-center">
<div class="fs-5" style="line-height: 1.8rem;">
<b>@RecMSE.Nome</b>
<br />
<b>@RecMSE.DescrizioneStato</b>: &nbsp; @(FormatDurata(RecMSE.Durata))
<div class="card bg-dark shadow @cssClassBorder @cssClassOverlay rounded-4" @onclick="ShowDetail">
<img src="@ImgUrlMacc(RecMSE.Url)" class="card-img-top imgFitToSize rounded-top-4" alt="@RecMSE.CodMacchina">
<div class="bg-black">
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start">
<div class="labelTop px-2 py-0 w-100">
<div class="text-center fs-2 fw-bold">
@RecMSE.Nome
</div>
</div>
</div>
@if (showCard)
{
<div class="d-flex justify-content-between w-100">
<div class="px-2">
<div class="d-flex text-success">
<div class="px-0">
<i class="fa-regular fa-circle-check"></i>&nbsp;@($"{RecMSE.PezziConf}")
</div>
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0)
{
<div class="px-1">
<div class="text-danger">
@($"(- {datiProdAct.PzConfScarto})")
</div>
</div>
}
</div>
</div>
<div class="card-body rounded-bottom-4 p-0 bg-dark">
<div class="@RecMSE.Semaforo py-0 px-1">
<div class="d-flex justify-content-between fs-5">
<div class="px-0 @cssClassTextDescr">
<span>@RecMSE.DescrizioneStato</span>
</div>
<div class="px-2">
<div class="text-end text-warning">
<i class="fa-solid fa-layer-group"></i>&nbsp;@($"{RecMSE.PezziProd}")
</div>
<div class="px-0">
<b>
@(FormatDurata(RecMSE.Durata))
</b>
</div>
</div>
<div class="d-flex justify-content-between w-100" style="height: 100px; width: 100px;">
<div class="col-6">
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz prod" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
</div>
<div class="d-flex justify-content-around">
<div class="text-center text-success d-flex justify-content-between">
<div>
<i class="fa-regular fa-circle-check"></i>&nbsp; @($" {RecMSE.PezziConf}") &nbsp;
</div>
<div style="font-size: 1rem; flex-direction: column; font-size: 1rem; display: flex; justify-content: center;" class="me-3 col-6">
<div class="text-center text-light d-flex justify-content-between">
<div class="col-4"><span>ART.</span></div>
<div class="col-8">@RecMSE.CodArticolo</div>
</div>
<div class="text-center text-light d-flex justify-content-between small">
<div class="col-4">ORD.</div>
<div class="col-8">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
</div>
<div class="text-danger">
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0)
{
@($"(- {datiProdAct.PzConfScarto})")
}
</div>
</div>
}
<div class="text-center text-warning ">
<div>
<i class="fa-solid fa-layer-group"></i>&nbsp; @($" {RecMSE.PezziProd}")
</div>
</div>
</div>
<div class="d-flex justify-content-between">
<div class="col-5">
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz rich" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
</div>
<div class="col-7 small py-2" style="line-height: 1.6rem; font-size:0.9rem;">
<div class="text-center text-light d-flex justify-content-between">
<div class="px-1"><span>ART:</span></div>
<div class="px-1">@($"{RecMSE.CodArticolo}")</div>
</div>
<div class="text-center text-light d-flex justify-content-between small lh-sm">
<div class="px-1">ODL:</div>
<div class="px-1">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
</div>
<div class="text-center text-light d-flex justify-content-between small lh-sm">
<div class="px-1">PODL:</div>
<div class="px-1">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
</div>
</div>
</div>
</div>
</div>
}
@@ -224,24 +253,34 @@ else
</div>
</div>
<div class="d-flex justify-content-between mt-1">
<div class="col-10 mb-2 px-2 py-1 @RecMSE.Semaforo statusCard">
<div class="col mb-2 px-2 py-1 @RecMSE.Semaforo rounded">
<div class="d-flex justify-content-center ">
<div class="p-0 mr-auto me-1">
<b>@RecMSE.DescrizioneStato</b> :
@RecMSE.DescrizioneStato
</div>
<div class="p-0">
@(FormatDurata(RecMSE.Durata))
<b>@(FormatDurata(RecMSE.Durata))</b>
</div>
</div>
</div>
<div class="col-2">
<div class="px-1 w-100">
<button class="btn btn-sm btn-secondary w-100"><i class="fa-regular fa-file-pdf"></i></button>
@if (enableDisegno)
{
<div class="col-2">
<div class="px-1 w-100">
@* <a target="_blank" href="@($"disegni/{RecMSE.CodArticolo}.pdf")" class="btn btn-sm btn-secondary w-100"><i class="fa-regular fa-file-pdf"></i></a> *@
<button class="btn btn-sm btn-info w-100" @onclick="ToggleDraw"><i class="fa-regular fa-file-pdf"></i></button>
</div>
</div>
</div>
}
</div>
</div>
}
}
}
@if (enableDisegno && showDraw && RecMSE != null)
{
string docUrl = string.IsNullOrEmpty(RecMSE.Disegno) ? $"disegni/{RecMSE.CodArticolo}.pdf" : $"disegni/{RecMSE.Disegno}.pdf";
<PdfDisplay Width="100%" PdfUrl="@docUrl" HeightList="@heightList"></PdfDisplay>
}
+107 -5
View File
@@ -5,6 +5,7 @@ using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
using System;
namespace MP_TAB3.Components
{
@@ -35,6 +36,9 @@ namespace MP_TAB3.Components
[Parameter]
public int Width { get; set; } = 0;
[Parameter]
public bool doBlink { get; set; } = false;
#endregion Public Properties
#region Public Methods
@@ -101,6 +105,81 @@ namespace MP_TAB3.Components
[Inject]
protected IConfiguration config { get; set; } = null!;
/// <summary>
/// CSS Class bordo da stato macchina
/// </summary>
protected string cssClassBorder
{
get
{
string answ = "border-3";
// se blink --> bianco!
if (RecMSE != null)
{
switch (RecMSE.Semaforo)
{
case "sGi":
answ += doBlink ? " border-secondary shadow shadow-primary" : " border-warning shadow shadow-warning";
break;
case "sRo":
answ += doBlink ? " border-secondary shadow shadow-primary" : " border-danger shadow shadow-danger";
break;
case "sGr":
answ += " border-dark";
break;
case "sBl":
answ += " border-primary";
break;
case "sVe":
answ += " border-success";
break;
default:
answ += " border-secondary";
break;
}
}
return answ;
}
}
/// <summary>
/// CSS Class x overlay (effetto spento x macchina spenta/ sGr)
/// </summary>
protected string cssClassOverlay
{
get
{
string answ = "";
if (RecMSE != null)
{
answ = RecMSE.Semaforo == "sGr" ? "bg-dark opacity-50" : "";
}
return answ;
}
}
/// <summary>
/// CSS class x testo (se descr lunga scorre...)
/// </summary>
protected string cssClassTextDescr
{
get
{
string answ = "text-nowrap";
if (RecMSE != null && RecMSE.DescrizioneStato.Length >= 17)
{
answ = " scroll-left";
}
return answ;
}
}
protected ProdAdvDispl.ProdCounter CurrCount
{
get
@@ -144,22 +223,23 @@ namespace MP_TAB3.Components
#region Protected Methods
protected override async Task OnAfterRenderAsync(bool firstRender)
{//await Task.Delay(500);
{
if (firstRender)
{
//await getWDim();
StateHasChanged();
await InvokeAsync(StateHasChanged);
}
isLoading = RecMSE == null;
isMobile = await JSRuntime.InvokeAsync<bool>("isDevice");
await Task.Delay(1);
//return base.OnAfterRenderAsync(firstRender);
}
protected override async Task OnInitializedAsync()
{
isLoading = true;
// abilitazione disegni...
TabDServ.ConfigGetVal("enableDisegno", ref enableDisegno);
// se configurata uso cartella virtuale... altrimenti cartella processo
var sImgBasePath = config.GetValue<string>("OptConf:ImgBasePath");
var sImgBasePath = config.GetValue<string>("ServerConf:ImgBasePath") ?? (config.GetValue<string>("OptConf:ImgBasePath") ?? "");
if (!string.IsNullOrEmpty(sImgBasePath))
{
imgBasePath = sImgBasePath;
@@ -234,16 +314,38 @@ namespace MP_TAB3.Components
NavMan.NavigateTo($"machine-detail");
}
/// <summary>
/// Toggle visibilità button
/// </summary>
protected void ToggleDraw()
{
showDraw = !showDraw;
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private bool enableDisegno = false;
private string imgBasePath = "";
private bool isLoading = false;
#endregion Private Fields
#region Private Properties
private Dictionary<string, string> heightList { get; set; } = new Dictionary<string, string>() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" } };
/// <summary>
/// Boolean Mobile vs Desktop
/// </summary>
private bool isMobile { get; set; }
private bool showDraw { get; set; } = false;
#endregion Private Properties
#region Private Methods
private string cssComStatus(string semaforo, DateTime? lastUpdateN)
+92 -41
View File
@@ -1,23 +1,11 @@
/* Bordi */
/*.rCAll {
border-radius: 10px;
}
.rCTop {
border-radius: 10px 10px 0 0;
}
.rCBot {
border-radius: 0 0 10px 10px;
}*/
.mapBlock {
.mapBlock {
font-family: 'Open Sans Condensed', sans-serif;
color: #FFF;
background-image: linear-gradient(#111, #000);
min-width: 8em;
}
.labelTopDx {
padding: 0.1em 0.4em;
.labelTop {
padding: 0.1em;
width: auto;
min-height: 0;
top: 0;
@@ -25,24 +13,49 @@
bottom: auto;
color: #FFFFFF;
background: #2200DE;
background: rgba(33, 36, 39, 0.7);
background: rgba(33, 36, 39, 0.75);
border-radius: 15px 15px 0 0;
/*-webkit-border-top-right-radius: inherit;
border-top-right-radius: inherit;
-webkit-border-top-left-radius: inherit;
border-top-left-radius: inherit;
-webkit-border-bottom-left-radius: inherit;
border-bottom-left-radius: inherit;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;*/
}
/* gestione scroll testo */
.scroll-left {
height: 1.5em;
overflow: hidden;
position: relative;
width: 70%;
white-space: nowrap;
}
.scroll-left span {
/*display: inline-block;*/
position: absolute;
width: 100%;
height: 100%;
margin: 0;
line-height: 1.5em;
/* Starting position */
-moz-transform: translateX(0%);
-webkit-transform: translateX(0%);
transform: translateX(0%);
/* Apply animation to this element */
-moz-animation: scroll-left 8s ease infinite;
-webkit-animation: scroll-left 8s ease infinite;
animation: scroll-left 8s ease infinite;
}
/* Move it (define the animation) */
@keyframes scroll-left {
0% {
transform: translateX(0%);
}
30% {
transform: translateX(0%);
}
80% {
transform: translateX(-50%);
}
}
/* area semafori*/
.sVe {
text-align: left;
background: #198754;
/*background: rgba(0,255,80,.6);*/
/*padding: 0px 4px 0px 4px;*/
/*color: Yellow;*/
color: #fff;
}
.sGi {
@@ -50,21 +63,17 @@
background: #ffc107;
background: rgba(255, 220, 0, 0.6);
color: #fff;
/*padding: 0px 4px 0px 4px;*/
}
.sRo {
text-align: left;
background-color: #e2001a;
background: rgba(240, 0, 10, 0.6);
color: #fff;
/*padding: 0px 4px 0px 4px;*/
}
.sBl {
text-align: left;
background: #3690FF;
background: rgba(0, 80, 255, 0.6);
/*padding: 0px 4px 0px 4px;*/
/*color: Yellow;*/
color: #fff;
}
.sGr {
@@ -72,28 +81,70 @@
background-color: #bcbcbc;
background: rgba(180, 180, 180, 0.6);
color: #fff;
/*padding: 0px 4px 0px 4px;*/
}
/*end semafori */
/* shadow customizzate */
/* Custom shadow class definitions */
.shadow {
--bs-shadow-rgb: 0, 0, 0;
box-shadow: 0 0.5rem 1rem rgba(var(--bs-shadow-rgb), 0.15) !important;
}
.shadow-sm {
--bs-shadow-rgb: 0, 0, 0;
box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-shadow-rgb), 0.075) !important;
}
.shadow-lg {
--bs-shadow-rgb: 0, 0, 0;
box-shadow: 0 1rem 3rem rgba(var(--bs-shadow-rgb), 0.175) !important;
}
.shadow-none {
box-shadow: none !important;
}
/* Custom shadow classes with specific colors */
.shadow-primary {
--bs-shadow-rgb: var(--bs-primary-rgb);
}
.shadow-secondary {
--bs-shadow-rgb: var(--bs-secondary-rgb);
}
.shadow-success {
--bs-shadow-rgb: var(--bs-success-rgb);
}
.shadow-info {
--bs-shadow-rgb: var(--bs-info-rgb);
}
.shadow-warning {
--bs-shadow-rgb: var(--bs-warning-rgb);
}
.shadow-danger {
--bs-shadow-rgb: var(--bs-danger-rgb);
}
.shadow-light {
--bs-shadow-rgb: var(--bs-light-rgb);
}
.shadow-dark {
--bs-shadow-rgb: var(--bs-dark-rgb);
}
.card-body {
background-color: currentColor;
background-image: linear-gradient(121deg, rgba(255, 255, 255, 0.2) -0.71%, rgba(255, 255, 255, 0.05) 97.66%);
border-radius: 0 0 15px 15px;
}
.imgFitToSize {
height: 9.5rem;
object-fit: contain;
border-radius: 15px 15px 0 0;
background-color: #383b3f;
height: 10rem;
object-fit: cover;
}
.pholderHeight {
height: 7rem;
object-fit: cover;
}
@media (max-width: 640.98px) {
.imgFitToSize {
height: 5rem;
height: 7.5rem;
}
.card-body {
background-color: transparent;
}
}
.statusCard {
border-radius: 0.5rem;
.pholderHeight {
height: 5rem;
}
}
+109 -41
View File
@@ -1,16 +1,4 @@
/* Bordi */
/*.rCAll {
border-radius: 10px;
}
.rCTop {
border-radius: 10px 10px 0 0;
}
.rCBot {
border-radius: 0 0 10px 10px;
}*/
.mapBlock {
font-family: 'Open Sans Condensed', sans-serif;
color: #FFF;
@@ -18,8 +6,8 @@
min-width: 8em;
}
.labelTopDx {
padding: 0.1em 0.4em;
.labelTop {
padding: 0.1em;
width: auto;
min-height: 0;
top: 0;
@@ -27,25 +15,50 @@
bottom: auto;
color: #FFFFFF;
background: #2200DE;
background: rgba(33,36,39,.7);
background: rgba(33,36,39,.75);
border-radius: 15px 15px 0 0;
/*-webkit-border-top-right-radius: inherit;
border-top-right-radius: inherit;
-webkit-border-top-left-radius: inherit;
border-top-left-radius: inherit;
-webkit-border-bottom-left-radius: inherit;
border-bottom-left-radius: inherit;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;*/
}
/* gestione scroll testo */
.scroll-left {
height: 1.5em;
overflow: hidden;
position: relative;
width: 70%;
white-space: nowrap;
}
.scroll-left span {
/*display: inline-block;*/
position: absolute;
width: 100%;
height: 100%;
margin: 0;
line-height: 1.5em;
/* Starting position */
-moz-transform: translateX(0%);
-webkit-transform: translateX(0%);
transform: translateX(0%);
/* Apply animation to this element */
-moz-animation: scroll-left 8s ease infinite;
-webkit-animation: scroll-left 8s ease infinite;
animation: scroll-left 8s ease infinite;
}
/* Move it (define the animation) */
@keyframes scroll-left {
0% {
transform: translateX(0%);
}
30% {
transform: translateX(0%);
}
80% {
transform: translateX(-50%);
}
}
/* area semafori*/
.sVe {
text-align: left;
background: #198754;
/*background: rgba(0,255,80,.6);*/
/*padding: 0px 4px 0px 4px;*/
/*color: Yellow;*/
color: #fff;
}
@@ -54,7 +67,6 @@
background: #ffc107;
background: rgba(255,220,0,.6);
color: #fff;
/*padding: 0px 4px 0px 4px;*/
}
.sRo {
@@ -62,15 +74,12 @@
background-color: #e2001a;
background: rgba(240,0,10,.6);
color: #fff;
/*padding: 0px 4px 0px 4px;*/
}
.sBl {
text-align: left;
background: #3690FF;
background: rgba(0,80,255,.6);
/*padding: 0px 4px 0px 4px;*/
/*color: Yellow;*/
color: #fff;
}
@@ -79,33 +88,92 @@
background-color: #bcbcbc;
background: rgba(180,180,180,.6);
color: #fff;
/*padding: 0px 4px 0px 4px;*/
}
/*end semafori */
/* shadow customizzate */
/* Custom shadow class definitions */
.shadow {
--bs-shadow-rgb: 0, 0, 0;
box-shadow: 0 0.5rem 1rem rgba(var(--bs-shadow-rgb), 0.15) !important;
}
.shadow-sm {
--bs-shadow-rgb: 0, 0, 0;
box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-shadow-rgb), 0.075) !important;
}
.shadow-lg {
--bs-shadow-rgb: 0, 0, 0;
box-shadow: 0 1rem 3rem rgba(var(--bs-shadow-rgb), 0.175) !important;
}
.shadow-none {
box-shadow: none !important;
}
/* Custom shadow classes with specific colors */
.shadow-primary {
--bs-shadow-rgb: var(--bs-primary-rgb);
}
.shadow-secondary {
--bs-shadow-rgb: var(--bs-secondary-rgb);
}
.shadow-success {
--bs-shadow-rgb: var(--bs-success-rgb);
}
.shadow-info {
--bs-shadow-rgb: var(--bs-info-rgb);
}
.shadow-warning {
--bs-shadow-rgb: var(--bs-warning-rgb);
}
.shadow-danger {
--bs-shadow-rgb: var(--bs-danger-rgb);
}
.shadow-light {
--bs-shadow-rgb: var(--bs-light-rgb);
}
.shadow-dark {
--bs-shadow-rgb: var(--bs-dark-rgb);
}
.card-body {
background-color: currentColor;
background-image: linear-gradient(121deg, rgba(255, 255, 255, 0.20) -0.71%, rgba(255, 255, 255, 0.05) 97.66%);
border-radius: 0 0 15px 15px
}
.imgFitToSize {
height: 7.5rem;
height: 10rem;
object-fit: cover;
}
.pholderHeight {
height: 7rem;
object-fit: cover;
border-radius: 15px 15px 0 0;
}
@media (max-width: 640.98px){
.imgFitToSize{
height: 5rem;
height: 7.5rem;
}
.card-body{
background-color: transparent;
}
.pholderHeight {
height: 5rem;
}
}
.statusCard {
border-radius: 0.5rem;
}
+1 -1
View File
@@ -1 +1 @@
.mapBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);min-width:8em;}.labelTopDx{padding:.1em .4em;width:auto;min-height:0;top:0;left:auto;bottom:auto;color:#fff;background:#2200de;background:rgba(33,36,39,.7);border-radius:15px 15px 0 0;}.sVe{text-align:left;background:#198754;color:#fff;}.sGi{text-align:left;background:#ffc107;background:rgba(255,220,0,.6);color:#fff;}.sRo{text-align:left;background-color:#e2001a;background:rgba(240,0,10,.6);color:#fff;}.sBl{text-align:left;background:#3690ff;background:rgba(0,80,255,.6);color:#fff;}.sGr{text-align:left;background-color:#bcbcbc;background:rgba(180,180,180,.6);color:#fff;}.card-body{background-color:currentColor;background-image:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);border-radius:0 0 15px 15px;}.imgFitToSize{height:7.5rem;object-fit:cover;border-radius:15px 15px 0 0;}@media(max-width:640.98px){.imgFitToSize{height:5rem;}.card-body{background-color:transparent;}}.statusCard{border-radius:.5rem;}
.mapBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);min-width:8em;}.labelTop{padding:.1em;width:auto;min-height:0;top:0;left:auto;bottom:auto;color:#fff;background:#2200de;background:rgba(33,36,39,.75);border-radius:15px 15px 0 0;}.scroll-left{height:1.5em;overflow:hidden;position:relative;width:70%;white-space:nowrap;}.scroll-left span{position:absolute;width:100%;height:100%;margin:0;line-height:1.5em;-moz-transform:translateX(0%);-webkit-transform:translateX(0%);transform:translateX(0%);-moz-animation:scroll-left 8s ease infinite;-webkit-animation:scroll-left 8s ease infinite;animation:scroll-left 8s ease infinite;}@keyframes scroll-left{0%{transform:translateX(0%);}30%{transform:translateX(0%);}80%{transform:translateX(-50%);}}.sVe{text-align:left;background:#198754;color:#fff;}.sGi{text-align:left;background:#ffc107;background:rgba(255,220,0,.6);color:#fff;}.sRo{text-align:left;background-color:#e2001a;background:rgba(240,0,10,.6);color:#fff;}.sBl{text-align:left;background:#3690ff;background:rgba(0,80,255,.6);color:#fff;}.sGr{text-align:left;background-color:#bcbcbc;background:rgba(180,180,180,.6);color:#fff;}.shadow{--bs-shadow-rgb:0,0,0;box-shadow:0 .5rem 1rem rgba(var(--bs-shadow-rgb),.15)!important;}.shadow-sm{--bs-shadow-rgb:0,0,0;box-shadow:0 .125rem .25rem rgba(var(--bs-shadow-rgb),.075)!important;}.shadow-lg{--bs-shadow-rgb:0,0,0;box-shadow:0 1rem 3rem rgba(var(--bs-shadow-rgb),.175)!important;}.shadow-none{box-shadow:none!important;}.shadow-primary{--bs-shadow-rgb:var(--bs-primary-rgb);}.shadow-secondary{--bs-shadow-rgb:var(--bs-secondary-rgb);}.shadow-success{--bs-shadow-rgb:var(--bs-success-rgb);}.shadow-info{--bs-shadow-rgb:var(--bs-info-rgb);}.shadow-warning{--bs-shadow-rgb:var(--bs-warning-rgb);}.shadow-danger{--bs-shadow-rgb:var(--bs-danger-rgb);}.shadow-light{--bs-shadow-rgb:var(--bs-light-rgb);}.shadow-dark{--bs-shadow-rgb:var(--bs-dark-rgb);}.card-body{background-color:currentColor;background-image:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);}.imgFitToSize{height:10rem;object-fit:cover;}.pholderHeight{height:7rem;object-fit:cover;}@media(max-width:640.98px){.imgFitToSize{height:7.5rem;}.card-body{background-color:transparent;}.pholderHeight{height:5rem;}}
-1
View File
@@ -1 +0,0 @@

-136
View File
@@ -1,136 +0,0 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
namespace MP_TAB3.Components
{
public partial class MseSampler : IDisposable
{
#region Public Properties
[Parameter]
public EventCallback<List<MappaStatoExpl>> E_Updated { get; set; }
/// <summary> Moltiplicatore campionamento:
/// HF: se > 1 (mappa)
/// LF: se < 1 (dettaglio) </summary>
[Parameter]
public double SampleMult { get; set; } = 1;
#endregion Public Properties
#region Public Methods
public void Dispose()
{
if (aTimer != null)
{
aTimer.Elapsed -= ElapsedTimer;
aTimer.Stop();
aTimer.Dispose();
Log.Info("MseSampler Timer Disposed!");
}
GC.Collect();
}
#endregion Public Methods
#region Protected Fields
protected int fastTimerMSec = 3000;
#endregion Protected Fields
#region Protected Properties
[Inject]
protected IConfiguration config { get; set; } = null!;
protected int fastRefreshMs
{
get
{
// tempo variabile tra +/- 10% del target (SampleMult) della freq standard di update MSE
int answ = ((int)(fastTimerMSec / SampleMult * rnd.Next(900, 1100))) / 1000;
return answ;
}
}
[Inject]
protected StatusData SDService { get; set; } = null!;
[Inject]
protected MessageService MServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
{
try
{
var pUpd = Task.Run(async () =>
{
aTimer.Interval = fastRefreshMs;
await InvokeAsync(RefreshData);
});
pUpd.Wait();
}
catch (Exception exc)
{
Log.Error($"Eccezione durante MseSampler.ElapsedTimer{Environment.NewLine}{exc}");
}
}
protected override void OnInitialized()
{
SetupConf();
StartTimer();
}
protected void StartTimer()
{
if (aTimer != null)
{
aTimer.Stop();
aTimer.Dispose();
}
aTimer = new System.Timers.Timer(fastRefreshMs);
aTimer.Elapsed += ElapsedTimer;
aTimer.Enabled = true;
aTimer.Start();
Log.Info("MseSampler Timer started!");
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private System.Timers.Timer aTimer = null!;
private Random rnd = new Random();
#endregion Private Fields
#region Private Methods
private async Task RefreshData()
{
List<MappaStatoExpl> ListMSE = await SDService.MseGetAll();
await MServ.SaveMse(ListMSE);
await E_Updated.InvokeAsync(ListMSE);
}
private void SetupConf()
{
// sistemo i parametri opzionali...
fastTimerMSec = config.GetValue<int>("OptConf:msRefresh");
Log.Trace($"MseSampler setupConf | Effettuato setup parametri | fastRefreshMSec: {fastTimerMSec}");
}
#endregion Private Methods
}
}
+4 -4
View File
@@ -82,10 +82,10 @@
</div>
</div>
}
<div class="col-12">
@* <div class="col-12">
Check articolo in revisione
</div>
@if (cancelSetupEnabled && RecMSE.PezziConf == 0)
</div> *@
@if (cancelSetupEnabled && RecMSE != null && RecMSE.PezziConf == 0)
{
<div class="col-12 col-md-6 p-2">
<button class="btn btn-lg btn-danger w-100" @onclick="OdlAnnullaSetup">Annulla Setup ODL <i class="fa-solid fa-ban me-1"></i></button>
@@ -307,7 +307,7 @@
Pz Pallet
</div>
<select class="form-select" @bind="PzPallet">
@for (int i = 1; i <= 20; i++)
@for (int i = 1; i <= 30; i++)
{
<option value="@i">@i</option>
}
+48 -41
View File
@@ -646,8 +646,8 @@ namespace MP_TAB3.Components
// se fosse multi CHIUDO ODL x altra tavola...
if (isMulti)
{
// se NON sono in attrezzaggio...
if (!inAttr)
// se NON sono in attrezzaggio// riattrezzaggio...
if (!inAttr && !showSplitOdlRiattr)
{
int idxOdlAltra = 0;
try
@@ -733,7 +733,7 @@ namespace MP_TAB3.Components
{
if (!setupActive)
{
if (RecMSE != null)
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
{
if (string.IsNullOrEmpty(IdxMaccSel))
{
@@ -749,11 +749,13 @@ namespace MP_TAB3.Components
}
}
IdxMaccParent = getIdxMaccParent();
checkAll();
// verifica stato inAttr
await CheckAttr();
//salvo lastRec...
lastRecMSE = RecMSE;
await ReloadData(true);
}
checkAll();
// verifica stato inAttr
await CheckAttr();
await ReloadData(true);
}
// verifica conferma produzione
datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, DateTime.Now);
@@ -993,7 +995,10 @@ namespace MP_TAB3.Components
protected async Task ShowRiattrezzaggio()
{
showSplitOdlRiattr = !showSplitOdlRiattr;
await ReloadXDL(true);
if (showSplitOdlRiattr)
{
await ReloadXDL(true);
}
}
protected async Task SplitOdl()
@@ -1092,8 +1097,6 @@ namespace MP_TAB3.Components
private string IdxMaccSel = "";
private int idxPOdlSel = 0;
private bool inAttr = false;
private bool isInProd = false;
private bool isLoading = false;
private bool isMaster = false;
private bool isMulti = false;
private bool isProcessing = false;
@@ -1105,7 +1108,7 @@ namespace MP_TAB3.Components
private double nextVal = 0;
private string noteAttr = "";
private int numDayOdl = 5;
private int PzPallet = 1;
private int PzPallet = 0;
private string searchPodl = "";
private bool showAll = false;
private bool showChkCloseOdlVal = false;
@@ -1175,6 +1178,9 @@ namespace MP_TAB3.Components
/// </summary>
private int IdxOdlAltra { get; set; } = 0;
private bool isLoading { get; set; } = false;
private MappaStatoExpl? lastRecMSE { get; set; } = null;
private string lblWarnBody
{
get => odlOk ? Traduci("ConfProdBeforeContinueBody") : Traduci("setOdlBeforeContinueBody");
@@ -1210,9 +1216,6 @@ namespace MP_TAB3.Components
}
private bool setupActive { get; set; } = false;
#if false
private string IdxMaccSelLast = "";
#endif
/// <summary>
/// Verifica visibilità btn riprendi ODL su 2° tavola SE:
@@ -1288,7 +1291,7 @@ namespace MP_TAB3.Components
}
}
private decimal tcRichAttr { get; set; } = 1;
private decimal tcRichAttr { get; set; } = 0;
private string titleOdlDetail
{
@@ -1445,17 +1448,14 @@ namespace MP_TAB3.Components
}
}
private void fixTcNotePzPallet()
private void fixTcNotePzPallet(bool reloadFromOdl)
{
if (tcRichAttr == 0)
if (tcRichAttr == 0 || string.IsNullOrEmpty(noteAttr) || PzPallet == 0)
{
tcRichAttr = IdxPOdlSel == 0 ? currOdl.Tcassegnato : currPodl.Tcassegnato;
tcRichAttr = reloadFromOdl || IdxPOdlSel == 0 ? currOdl.TCRichAttr : currPodl.Tcassegnato;
noteAttr = reloadFromOdl || IdxPOdlSel == 0 ? currOdl.Note : currPodl.Note;
PzPallet = reloadFromOdl || IdxPOdlSel == 0 ? currOdl.PzPallet : currPodl.PzPallet;
}
if (string.IsNullOrEmpty(noteAttr))
{
noteAttr = IdxPOdlSel == 0 ? currOdl.Note : currPodl.Note;
}
PzPallet = IdxPOdlSel == 0 ? currOdl.PzPallet : currPodl.PzPallet;
}
/// <summary>
@@ -1543,21 +1543,25 @@ namespace MP_TAB3.Components
}
}
await updateIdxOdl();
// imposto tcRichAttr in base allo stato...
if (odlOk)
// aggiorno questi dati SOLO SE non sono in attrezzaggio
if (!inAttr && !showSplitOdlRiattr)
{
// prendo TCRich da PODL...
if (IdxPOdlSel > 0)
// imposto tcRichAttr in base allo stato...
if (odlOk)
{
tcRichAttr = currPodl.Tcassegnato;
noteAttr = currPodl.Note;
PzPallet = currPodl.PzPallet;
}
else
{
tcRichAttr = currOdl.TCRichAttr;
noteAttr = currOdl.Note;
PzPallet = currOdl.PzPallet;
// prendo TCRich da PODL...
if (IdxPOdlSel > 0)
{
tcRichAttr = currPodl.Tcassegnato;
noteAttr = currPodl.Note;
PzPallet = currPodl.PzPallet;
}
else if (IdxOdl > 0)
{
tcRichAttr = currOdl.TCRichAttr;
noteAttr = currOdl.Note;
PzPallet = currOdl.PzPallet;
}
}
}
}
@@ -1570,13 +1574,16 @@ namespace MP_TAB3.Components
if (IdxPOdlSel > 0)
{
await ReloadXDL(false);
// controllo se sia cambiato PODL
// solo se NON sno in attrezzaggio controllo se sia cambiato PODL
if (IdxPOdlSel != lastIdxPOdl)
{
lastIdxPOdl = IdxPOdlSel;
tcRichAttr = currPodl.Tcassegnato;
noteAttr = currPodl.Note;
PzPallet = currPodl.PzPallet;
if (!inAttr && !showSplitOdlRiattr)
{
tcRichAttr = currPodl.Tcassegnato;
noteAttr = currPodl.Note;
PzPallet = currPodl.PzPallet;
}
}
}
}
@@ -1615,7 +1622,7 @@ namespace MP_TAB3.Components
}
await updateIdxOdl();
// sistemo TCiclo, note, pzPallet..
fixTcNotePzPallet();
fixTcNotePzPallet(reloadFromOdl);
}
private async Task updateIdxOdl()
+7 -2
View File
@@ -95,9 +95,14 @@ namespace MP_TAB3.Components
setupConf();
StartTimer();
currItem = null;
if (RecMSE != null)
}
protected override async Task OnParametersSetAsync()
{
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
{
IdxMaccSel = RecMSE.IdxMacchina;
lastRecMSE = RecMSE;
await ReloadData();
}
await Task.Delay(1);
@@ -153,8 +158,8 @@ namespace MP_TAB3.Components
#region Private Properties
private ObjItemDTO? currItem { get; set; } = null;
private string IdxMaccSel { get; set; } = "";
private MappaStatoExpl? lastRecMSE { get; set; } = null;
#endregion Private Properties
+1 -1
View File
@@ -59,7 +59,7 @@ namespace MP_TAB3.Components
{
await FixQtyUdc();
var currUrl = NavMan.Uri;
string baseUrl = config["OptConf:BaseUrl"];
string baseUrl = config.GetValue<string>("ServerConf:BaseUrlTab") ?? (config.GetValue<string>("OptConf:BaseUrlTab") ?? "");
string UrlTabJumpMag = SMServ.GetConf("UrlTabJumpMag");
if (string.IsNullOrEmpty(UrlTabJumpMag))
{
+9 -5
View File
@@ -174,8 +174,9 @@ namespace MP_TAB3.Components
protected override async Task OnParametersSetAsync()
{
lblOut = "";
if (RecMSE != null && string.IsNullOrEmpty(IdxMaccSel))
if (RecMSE != null && (string.IsNullOrEmpty(IdxMaccSel) || !RecMSE.MostlyEquals(lastRecMSE)))
{
await TabDServ.FlushCache("StatoProd");
if (!confProdActive)
{
numPzLasciati = 0;
@@ -196,6 +197,9 @@ namespace MP_TAB3.Components
IdxMaccSel = idxMSel;
}
}
//salvo lastRec...
lastRecMSE = RecMSE;
dtReqUpdate = DateTime.Now.AddMilliseconds(100);
await DoUpdate();
}
}
@@ -255,11 +259,12 @@ namespace MP_TAB3.Components
confProdActive = !confProdActive;
if (confProdActive)
{
// svuoto cache conf prod sicurezza
await TabDServ.FlushCache("StatoProd");
numPzLasc = 0;
}
dtReqUpdate = DateTime.Now;
await DoUpdate();
StateHasChanged();
}
#endregion Protected Methods
@@ -280,10 +285,9 @@ namespace MP_TAB3.Components
private bool confProdActive { get; set; } = false;
private MappaStatoExpl? currRecMSE { get; set; } = null;
private DateTime dtReqUpdate { get; set; } = DateTime.Now;
private string IdxMaccSel { get; set; } = "";
private bool isProcessing { get; set; } = false;
private MappaStatoExpl? lastRecMSE { get; set; } = null;
private int MatrOpr
{
@@ -299,7 +303,7 @@ namespace MP_TAB3.Components
#region Private Methods
/// <summary>
/// Registra conferma produzione in modalit nuova (con rettifica pezzi lasciati) o legacy
/// Registra conferma produzione in modalita nuova (con rettifica pezzi lasciati) o legacy
/// (con anticipo periodo)
/// </summary>
private bool effettuaConfermaProd()
+191 -92
View File
@@ -8,6 +8,10 @@
{
<span>@($"ODL: {RecMSE.IdxOdl}")</span>
}
else
{
<span>n.a.</span>
}
</div>
</div>
@@ -17,18 +21,21 @@
<div class="small">
<span>Data di inizio</span>
</div>
<div class="text-center fw-bold">
@if (RecMSE != null)
{
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.DataInizioOdl:yyyy/MM/dd}")</span>
}
</div>
<div class="text-center small">
@if (RecMSE != null)
{
</div>
<div class="text-center small">
<span>@($"{RecMSE.DataInizioOdl:HH: mm}")</span>
}
</div>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -36,11 +43,20 @@
<div class="small">
<span>Cod Articolo</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.CodArticolo</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.CodArticolo</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -48,11 +64,20 @@
<div class="small">
<span>Nr Pezzi lanciati</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.NumPezzi}") pz.</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.NumPezzi}") pz.</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -60,11 +85,20 @@
<div class="small text-nowrap" style="font-size: .8rem">
<span>Nr Pezzi confermati</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.PezziConf}") pz.</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.PezziConf}") pz.</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
</div>
@@ -74,11 +108,20 @@
<div class="small">
<span>Nr pezzi fatti</span>
</div>
<div class="text-center fw-bold">
<span>(@($"{RecMSE.PezziProd}") pz.)</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>(@($"{RecMSE.PezziProd}") pz.)</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -86,14 +129,23 @@
<div class="small">
<span>Efficienza globale</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.OEE_tot</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_tot)
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.OEE_tot</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_tot)
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -101,14 +153,23 @@
<div class="small">
<span>Efficienza lavoro</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.OEE_wrk</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_wrk)
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.OEE_wrk</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_wrk)
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -116,42 +177,53 @@
<div class="small text-nowrap" style="font-size: .8rem">
<span>Efficienza teorica</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.OEE_run</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_run)
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.OEE_run</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_run)
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
</div>
<div class="d-flex justify-content-between ">
<div class="col-3 p-1 flex-fill">
<div class="cardFullHeight p-1">
<div class="small">
<span>Tc medio</span>
</div>
<div class="text-center fw-bold">
<span>
@($"{RecMSE.TCMedio:0.###}")
</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCMedioRt:0.###}"))
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>
@($"{RecMSE.TCMedio:0.###}")
</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCMedioRt:0.###}"))
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -159,14 +231,23 @@
<div class="small">
<span>Tc lavoro</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCLav:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCLavRT:0.###}"))
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCLav:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCLavRT:0.###}"))
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -174,14 +255,23 @@
<div class="small">
<span>Tc tecnico</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCEff:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCEffRT:0.###}"))
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCEff:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCEffRT:0.###}"))
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -189,11 +279,20 @@
<div class="small text-nowrap" style="font-size: .8rem">
<span>Tc impostato</span>
</div>
<div class="text-center fw-bold">
<span> @($"{RecMSE.TCAssegnato:0.###}")</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span> @($"{RecMSE.TCAssegnato:0.###}")</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
</div>
+1 -1
View File
@@ -1,4 +1,4 @@
<div class=" col-4 col-sm-4 col-md-4 col-lg-2 flex-fill ">
<div class=" col-4 col-sm-4 col-md-4 col-lg-2 flex-fill2 ">
<div class="p-2 h-100 w-100">
<div class="@objCss text-center card w-100 h-100" @onclick="() => ReportSelected()">
<div class="card-body text-light">
+2 -2
View File
@@ -42,11 +42,11 @@
</div>
<div class="col-12">
<div class="row">
@foreach (var item in ListComplete)
@foreach (var item in listCauScarto)
{
<div class="col-6 col-lg-4 col-xl-3 mt-2">
<button class="btn w-100 btn-lg @($"btn-{item.cssClass}")" @onclick="() => doSave(item)">
<i class="@item.icona"></i> <span style="font-size: 1rem;">@item.label</span>
<i class="@item.icona"></i><span cs="fs-5 ps-2">@item.label</span>
</button>
<asp:LinkButton ID="hlRegistra" runat="server" OnClick="hlRegistra_Click" CommandArgument='<%# Eval("value") %>' CssClass='<%# "btn w-100 btn-lg btn-" + Eval("cssClass")%>'>
+6 -2
View File
@@ -32,7 +32,7 @@ namespace MP_TAB3.Components
}
protected string errMsg { get; set; } = "";
protected List<vSelCauScartoModel> ListComplete { get; set; } = new List<vSelCauScartoModel>();
protected List<vSelCauScartoModel> listCauScarto { get; set; } = new List<vSelCauScartoModel>();
[Inject]
protected MessageService MServ { get; set; } = null!;
@@ -124,7 +124,11 @@ namespace MP_TAB3.Components
protected async Task ReloadData()
{
ListComplete = await TabServ.VSCS_getAll();
var rawData = await TabServ.VSCS_getAll();
listCauScarto = rawData
.Where(x => x.isEnabled)
.OrderBy(x => x.label)
.ToList();
}
protected void resetDate()
+23 -11
View File
@@ -1,12 +1,6 @@

<div class="row align-items-center flex-wrap">
@*<div class="col-12 text-end">
<div class="form-check form-switch fs-3">
<input class="form-check-input" type="checkbox" @bind="@ShowMS">
<label class="form-check-label">@txtSelMS</label>
</div>
</div>*@
<div class="col-8">
<div class="row align-items-center flex-wrap my-3">
<div class="col-12 col-md-8">
@if (tcMode == "mc")
{
<div class="input-group">
@@ -16,13 +10,31 @@
}
else
{
<div class="input-group my-3">
<div class="input-group">
<span class="input-group-text">@labelTempoIN</span>
<input type="time" class="form-control" @bind="@selTempoMS" step="1">
<select @bind="@selOre" class="form-select">
@for (int i = 0; i < 24; i++)
{
<option value="@i">@i.ToString("00")</option>
}
</select>
<select @bind="@selMin" class="form-select">
@for (int i = 0; i < 60; i++)
{
<option value="@i">@i.ToString("00")</option>
}
</select>
<select @bind="@selSec" class="form-select">
@for (int i = 0; i < 60; i++)
{
<option value="@i">@i.ToString("00")</option>
}
</select>
@* <input type="time" class="form-control" @bind="@selTempoMS" step="1"> *@
</div>
}
</div>
<div class="col-4">
<div class="col-12 col-md-4">
&rarr; @lblTempo
</div>
</div>
+33 -8
View File
@@ -1,5 +1,7 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.Services;
using System.Globalization;
using System.Text.RegularExpressions;
namespace MP_TAB3.Components
{
@@ -83,11 +85,6 @@ namespace MP_TAB3.Components
/// </summary>
protected decimal _tempoMC { get; set; } = 0;
//protected timeMode modoTempo
//{
// get => ShowMS ? timeMode.MS : timeMode.MC;
//}
[Inject]
protected MessageService MsgServ { get; set; } = null!;
@@ -104,6 +101,34 @@ namespace MP_TAB3.Components
}
}
protected int selOre
{
get => TempoMS.Hours;
set
{
TempoMS = new TimeSpan(value, selMin, selSec);
E_TCRich.InvokeAsync(TempoMC);
}
}
protected int selMin
{
get => TempoMS.Minutes;
set
{
TempoMS = new TimeSpan(selOre,value, selSec);
E_TCRich.InvokeAsync(TempoMC);
}
}
protected int selSec
{
get => TempoMS.Seconds;
set
{
TempoMS = new TimeSpan(selOre, selMin, value);
E_TCRich.InvokeAsync(TempoMC);
}
}
protected bool ShowMS { get; set; } = true;
[Inject]
@@ -146,7 +171,7 @@ namespace MP_TAB3.Components
/// <returns></returns>
protected TimeSpan minCent2Sec(decimal valore)
{
TimeSpan answ = TimeSpan.FromSeconds((double)valore * 60);
TimeSpan answ = TimeSpan.FromSeconds(Math.Round((double)(valore * 60)));
return answ;
}
@@ -186,7 +211,7 @@ namespace MP_TAB3.Components
/// <summary>
/// tempo min:sec
/// </summary>
private TimeSpan _tempoMS { get; set; } = TimeSpan.FromSeconds(1);
private TimeSpan _tempoMS { get; set; } = TimeSpan.FromSeconds(3599);
private string baseLang
{
@@ -208,7 +233,7 @@ namespace MP_TAB3.Components
}
else
{
answ = "ore:min:sec";
answ = "h:m:s";
}
return answ;
}
+5 -3
View File
@@ -68,8 +68,9 @@ namespace MP_TAB3.Components
protected bool ListArtDisabled { get => string.IsNullOrEmpty(SearchVal) || SearchVal.Length < SearchMinChar; }
protected Dictionary<string, string>? ListArticoli { get; set; } = null;
protected Dictionary<string, string> ListArticoliAll { get; set; } = new Dictionary<string, string>();
protected Dictionary<string, string> ListMacchineAll {
get => MServ.DictMacchine;
protected Dictionary<string, string> ListMacchineAll
{
get => MServ.DictMacchine;
set => MServ.DictMacchine = value;
}
@@ -148,7 +149,8 @@ namespace MP_TAB3.Components
protected override async Task OnInitializedAsync()
{
BaseAddr = config.GetValue<string>("OptConf:BaseAddr") ?? "";
// Cerco in ServerConf e se non trovato in OptConf...
BaseAddr = config.GetValue<string>("ServerConf:BaseAddr") ?? (config.GetValue<string>("OptConf:BaseAddr") ?? "");
await ReloadAllData();
}
+6 -10
View File
@@ -49,14 +49,15 @@ namespace MP_TAB3.Components
protected override async Task OnParametersSetAsync()
{
if (RecMSE != null)
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
{
CodArticolo = RecMSE.CodArticolo;
IdxMaccSel = RecMSE.IdxMacchina;
IdxOdl = RecMSE.IdxOdl ?? 0;
lastRecMSE = RecMSE;
await ReloadData();
checkReset();
}
await ReloadData();
checkReset();
}
#endregion Protected Methods
@@ -64,9 +65,7 @@ namespace MP_TAB3.Components
#region Private Fields
private string CodArticolo = "";
private bool inAttr = false;
private bool isProcessing = false;
#endregion Private Fields
@@ -74,8 +73,8 @@ namespace MP_TAB3.Components
#region Private Properties
private string IdxMaccSel { get; set; } = "";
private int IdxOdl { get; set; } = 0;
private MappaStatoExpl? lastRecMSE { get; set; } = null;
#endregion Private Properties
@@ -91,16 +90,13 @@ namespace MP_TAB3.Components
// SOLO SE ho articolo senn niente reset...
if (!string.IsNullOrEmpty(CodArticolo))
{
// controllo se la macchina in attrezzaggio...
// controllo se la macchina sia in attrezzaggio...
var rigaStato = TabDServ.StatoMacchina(IdxMaccSel);
if (rigaStato != null)
{
inAttr = (rigaStato.IdxStato == 2);
}
}
#if false
cmp_ST_objCheck.checkInputData();
#endif
}
private async Task ReloadData()
@@ -44,9 +44,18 @@ namespace MP_TAB3.Components
{
if (IdxOdl > 0 && !string.IsNullOrEmpty(CodGruppo))
{
await ReloadData();
if (CodArticolo != codArticoloLast || IdxOdl != idxOdlLast || CodGruppo!=codGruppoLast)
{
codArticoloLast = CodArticolo;
idxOdlLast = IdxOdl;
codGruppoLast = CodGruppo;
await ReloadData();
}
}
}
private int idxOdlLast = 0;
private string codArticoloLast = "";
private string codGruppoLast = "";
[Inject]
protected TabDataService TabServ { get; set; } = null!;
@@ -26,8 +26,8 @@ namespace MP_TAB3.Components
{
if (IdxOdl > 0)
{
var rawData = TabDServ.STAR_pendByOdl(IdxOdl);
showChecks = rawData.Count > 0;
var rawData = TabDServ.STAR_pendByOdl(IdxOdl);
showChecks = rawData.Count > 0;
}
else
{
@@ -52,7 +52,6 @@ namespace MP_TAB3.Components
var pUpd = Task.Run(async () =>
{
await processInput();
//await InvokeAsync(() => StateHasChanged());
});
pUpd.Wait();
}
@@ -70,13 +69,20 @@ namespace MP_TAB3.Components
protected override void OnParametersSet()
{
checkInputData();
if (CodArticolo != codArticoloLast || IdxOdl != idxOdlLast)
{
codArticoloLast = CodArticolo;
idxOdlLast = IdxOdl;
checkInputData();
}
}
#endregion Protected Methods
#region Private Fields
private string codArticoloLast = "";
private int idxOdlLast = 0;
private string lastBCodeVal = "";
private string MessageCss = "";
private string MessageText = "";
+9 -4
View File
@@ -3,13 +3,18 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2401.2618</Version>
<Version>6.16.2403.711</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Components\MseSampler.razor.cs" />
</ItemGroup>
<ItemGroup>
<Content Remove="compilerconfig.json" />
<Content Remove="Components\MseSampler.razor" />
</ItemGroup>
<ItemGroup>
@@ -20,14 +25,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2312.1510" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2312.1510" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2402.2311" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2402.2311" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
</ItemGroup>
<ItemGroup>
<Folder Include="Data\" />
<Folder Include="Controllers\" />
<Folder Include="Data\" />
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -39,8 +39,8 @@
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
<logger name="*" minlevel="Debug" writeTo="f" />
-->
<!--<logger name="*" minlevel="Info" writeTo="consoleTarget" />-->
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
<logger name="*" minlevel="Info" writeTo="fileTarget" />
</rules>
</nlog>
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/alarms"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -49
View File
@@ -1,63 +1,15 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Alarms
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
}
}
+2
View File
@@ -0,0 +1,2 @@

+196
View File
@@ -0,0 +1,196 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data;
using MP.Data.Services;
using Newtonsoft.Json;
using NLog.Fluent;
namespace MP_TAB3.Pages
{
/// <summary>
/// Pagina base da cui ereditare metodi x refresh dati da RedisChannel (MessagePipe)
/// </summary>
public partial class BasePage : IDisposable
{
#region Public Properties
/// <summary>
/// Dato di dettaglio MSE per macchina
/// </summary>
public MappaStatoExpl? CurrMSE { get; set; } = null;
/// <summary>
/// Macchina selezionata
/// </summary>
public string IdxMacc { get; set; } = "";
[Inject]
public MessageService MsgServ { get; set; } = null!;
[Inject]
public TabDataFeeder TDFeeder { get; set; } = null!;
#endregion Public Properties
#region Public Methods
/// <summary>
/// Metodo dispose
/// </summary>
public virtual void Dispose()
{
IdxMacc = "";
CurrMSE = null;
TDFeeder.dataPipe.EA_NewMessage -= DataPipe_EA_NewMessage;
TDFeeder.blinkPipe.EA_NewMessage -= BlinkPipe_EA_NewMessage;
}
#endregion Public Methods
#region Protected Methods
/// <summary>
/// Override Oninit x aggancio evento update da MessagePipe
/// </summary>
/// <returns></returns>
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
TDFeeder.dataPipe.EA_NewMessage += DataPipe_EA_NewMessage;
TDFeeder.blinkPipe.EA_NewMessage += BlinkPipe_EA_NewMessage;
}
protected override async Task OnParametersSetAsync()
{
await ReloadData();
}
/// <summary>
/// Metodo refresh con controllo salvataggio in LocalStorage ogni 5 sec
/// </summary>
/// <param name="ListMSE"></param>
/// <returns></returns>
protected async Task RefreshData(List<MappaStatoExpl> ListMSE)
{
// se vecchio salvo sul browser...
if (DateTime.Now.Subtract(lastSave).TotalSeconds > 5)
{
// salvo in LocalStorage...
await MsgServ.SaveMse(ListMSE);
lastSave = DateTime.Now;
}
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await RefreshMBlock();
}
}
}
/// <summary>
/// Refresh con rilettura da LocalStorage
/// </summary>
/// <returns></returns>
protected async Task RefreshMBlock()
{
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
protected virtual async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
}
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
#endregion Protected Methods
#region Private Fields
private bool doBlink = false;
/// <summary>
/// DateTime ultimo salvataggio in LocalStorage
/// </summary>
private DateTime lastSave = DateTime.Now;
#endregion Private Fields
#region Private Methods
/// <summary>
/// Ricezione evento blink
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BlinkPipe_EA_NewMessage(object? sender, EventArgs e)
{
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly List<string> --> allarmi
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
try
{
var dataRaw = JsonConvert.DeserializeObject<string>(currArgs.newMessage);
if (dataRaw != null)
{
bool.TryParse($"{dataRaw}", out doBlink);
}
}
catch
{ }
InvokeAsync(() =>
{
StateHasChanged();
});
}
}
/// <summary>
/// Ricevuto nuovi dati da mostrare!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <exception cref="NotImplementedException"></exception>
private void DataPipe_EA_NewMessage(object? sender, EventArgs e)
{
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly List<string> --> allarmi
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
try
{
List<MappaStatoExpl>? dataList = JsonConvert.DeserializeObject<List<MappaStatoExpl>>(currArgs.newMessage);
if (dataList != null)
{
InvokeAsync(() => RefreshData(dataList));
}
}
catch
{ }
}
InvokeAsync(() =>
{
StateHasChanged();
});
}
#endregion Private Methods
}
}
-58
View File
@@ -1,58 +0,0 @@
@page "/CardDemo"
@if (CardTitles == null || CardTitles.Count == 0)
{
<div class="row">
<div class="col-12 my-2 alert alert-secondary fs-3">
waiting on browser
</div>
@for (int i = 0; i < 9; i++)
{
<div class="col-4 my-2">
<CardTest Title="Loading" DoPlaceholder="true" CardCss="bg-secondary">
</CardTest>
</div>
}
</div>
}
else
{
<div class="row">
<div class="col-12 my-2 alert alert-success fs-3">
loaded on browser
</div>
@foreach (var item in CardTitles)
{
<div class="col-4 my-2">
<CardTest Title="@item">
<div>
Demo content page for <b>@item</b>
</div>
<div>
This is an example Blazor component!
</div>
</CardTest>
</div>
}
</div>
}
@code {
protected List<string>? CardTitles { get; set; }
protected override async Task OnInitializedAsync()
{
CardTitles = null;
await Task.Delay(300);
CardTitles = new List<string>();
await InvokeAsync(StateHasChanged);
await Task.Delay(300);
for (int i = 0; i < 9; i++)
{
CardTitles.Add($"Card {i + 1:00}");
}
await Task.Delay(10);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/controls"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null || IsLoading)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+8 -39
View File
@@ -1,18 +1,14 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Controls
{
#region Public Methods
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
@@ -27,27 +23,10 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
protected void SetMacc(string selIdxMacc)
{
IdxMaccSubSel = selIdxMacc;
@@ -58,24 +37,14 @@ namespace MP_TAB3.Pages
#region Private Fields
private string IdxMaccSubSel = "";
private bool IsLoading = false;
#endregion Private Fields
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
}
+2 -1
View File
@@ -1,6 +1,7 @@
@page "/declarations"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -49
View File
@@ -1,46 +1,15 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Declarations
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
protected void SetMacc(string selIdxMacc)
{
IdxMaccSubSel = selIdxMacc;
@@ -53,22 +22,5 @@ namespace MP_TAB3.Pages
private string IdxMaccSubSel = "";
#endregion Private Fields
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
}
}
-14
View File
@@ -3,18 +3,4 @@
<img src="images/LogoEgw.png" />
@code {
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await Task.Delay(1);
}
protected override async Task OnParametersSetAsync()
{
await Task.Delay(1);
}
}
+31
View File
@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data;
using MP.Data.Services;
using MP_TAB3.Shared;
using NLog.Fluent;
using Newtonsoft.Json;
namespace MP_TAB3.Pages
{
public partial class Index : IDisposable
{
#region Public Methods
public void Dispose()
{
//GC.Collect();
}
#endregion Public Methods
#region Protected Methods
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await Task.Delay(1);
}
#endregion Protected Methods
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/iob-info"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -49
View File
@@ -1,63 +1,15 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class IobInfo
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
}
}
+16 -1
View File
@@ -6,8 +6,17 @@ using Newtonsoft.Json;
namespace MP_TAB3.Pages
{
public partial class Logout
public partial class Logout : IDisposable
{
#region Public Methods
public void Dispose()
{
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
[Inject]
@@ -26,6 +35,12 @@ namespace MP_TAB3.Pages
#region Protected Methods
protected override Task OnAfterRenderAsync(bool firstRender)
{
MsgServ.RigaOper = null;
return base.OnAfterRenderAsync(firstRender);
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
+2 -1
View File
@@ -1,6 +1,7 @@
@page "/machine-detail"
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@inherits BasePage
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+5 -55
View File
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
@@ -9,12 +8,6 @@ namespace MP_TAB3.Pages
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected SharedMemService MStor { get; set; } = null!;
@@ -27,39 +20,15 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
await ReloadData();
await base.OnInitializedAsync();
// recupero parametri configurazione...
await setupConf();
if (enableSchedaTecnica)
{
checkLottiOdl();
}
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await RefreshMBlock();
}
}
}
protected async Task RefreshMBlock()
{
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
protected void SetMacc(string selIdxMacc)
{
IdxMaccSubSel = selIdxMacc;
@@ -73,6 +42,7 @@ namespace MP_TAB3.Pages
private bool enableMagLotti = false;
private bool enableSchedaTecnica = false;
private string IdxMaccSubSel = "";
private DateTime lastSave = DateTime.Now;
#endregion Private Fields
@@ -102,27 +72,7 @@ namespace MP_TAB3.Pages
#endif
}
private async Task ReloadData()
{
try
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
}
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in ReloadData{Environment.NewLine}{exc}");
}
// recupero parametri configurazione...
await setupConf();
}
private async Task setupConf()
{
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/notes"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -49
View File
@@ -1,63 +1,15 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Notes
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/odl"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -68
View File
@@ -1,53 +1,12 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
namespace MP_TAB3.Pages
{
public partial class ODL
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await RefreshMBlock();
}
}
}
protected async Task RefreshMBlock()
{
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
await base.OnInitializedAsync();
}
protected void SetMacc(string selIdxMacc)
@@ -59,34 +18,8 @@ namespace MP_TAB3.Pages
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private string IdxMaccSubSel = "";
#endregion Private Fields
#region Private Methods
private async Task ReloadData()
{
try
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
}
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in ReloadData{Environment.NewLine}{exc}");
}
}
#endregion Private Methods
}
}
+1 -2
View File
@@ -1,7 +1,6 @@
@page "/parameters"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -50
View File
@@ -1,63 +1,14 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Parameters
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
await base.OnInitializedAsync();
}
#endregion Protected Methods
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/prod-plan"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+1 -58
View File
@@ -1,72 +1,15 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
namespace MP_TAB3.Pages
{
public partial class ProdPlan
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Methods
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private async Task ReloadData()
{
try
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
catch (Exception exc)
{
Log.Error($"Eccerione in ReloadData{Environment.NewLine}{exc}");
}
}
#endregion Private Methods
}
}
+12 -6
View File
@@ -1,7 +1,6 @@
@page "/prod-stop"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
@@ -17,13 +16,20 @@ else
<div class="d-flex justify-content-between flex-wrap align-items-center mb-3">
@if (!string.IsNullOrEmpty(lblOut))
{
<div class="alert @alertCss fs-5 w-100">
@lblOut
<div class="alert @alertCss shadow-lg fs-1 text-center p-5 w-100">
<b>@titleOut</b>
<div>
@lblOut
</div>
<button class="btn btn-success" @onclick="ForceReloadPage"><i class="fa-solid fa-rotate-right"></i> Reload page</button>
</div>
}
@foreach (var item in events2show)
else
{
<ProdStopMan objCss="@item.CssClass" objIcon="@item.Icon" objTxt="@(item.label)" IdxEvento="@item.value" E_EventSelected="EventRecord"></ProdStopMan>
@foreach (var item in events2show)
{
<ProdStopMan objCss="@item.CssClass" objIcon="@item.Icon" objTxt="@(item.label)" IdxEvento="@item.value" E_EventSelected="EventRecord"></ProdStopMan>
}
}
</div>
}
+37 -53
View File
@@ -1,4 +1,5 @@
using global::Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
using MP.Data;
using MP.Data.DatabaseModels;
using MP.Data.Services;
@@ -12,10 +13,16 @@ namespace MP_TAB3.Pages
#region Protected Fields
protected int dltMinRealtime = 1;
protected bool isProcessing = false;
protected string lblOut = "";
protected int minAnticipoRicalcolo = 1;
protected bool rdm_ChkOnly = false;
protected int rdm_nEvCheck = 1;
protected int rdm_nEvStep = 1;
#endregion Protected Fields
@@ -24,14 +31,10 @@ namespace MP_TAB3.Pages
protected string alertCss { get; set; } = "alert-danger";
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected DateTime DtRif { get; set; } = DateTime.Now;
protected List<vSelEventiBCodeModel> events2show { get; set; } = new List<vSelEventiBCodeModel>();
protected string IdxMacc { get; set; } = "";
/// <summary>
/// Determina se insert sia Realtime o batch con DataOra (in base a diff tra DataOra
/// selezionata e realtime, se superiore ad X minuti NON realtime)
@@ -49,14 +52,9 @@ namespace MP_TAB3.Pages
}
}
protected string lblOut { get; set; } = "";
[Inject]
protected StatusData MDataService { get; set; } = null!;
[Inject]
protected MessageService MServ { get; set; } = null!;
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
@@ -182,12 +180,13 @@ namespace MP_TAB3.Pages
TabDServ.MacchinaSetInsEnab(IdxMacc, true);
}
// mostro esito
alertCss = "alert-succes";
lblOut = $"Registrata dichiarazione fermata [{rigaEvento.Nome}] alle {DateTime.Now:HH:mm:ss}";
alertCss = "alert-primary";
titleOut = rigaEvento.Nome;
lblOut = $"Registrata dichiarazione fermata alle {DateTime.Now:HH:mm:ss}";
}
else
{
alertCss = "alert-danger";
alertCss = "alert-warning";
lblOut = $"Codice evento non valido! {IdxEv}";
}
}
@@ -198,7 +197,7 @@ namespace MP_TAB3.Pages
if (ListMSE != null)
{
// salvo in LocalStorage...
await MServ.SaveMse(ListMSE);
await MsgServ.SaveMse(ListMSE);
// aggiorno MSE attuale
CurrMSE = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
}
@@ -206,35 +205,49 @@ namespace MP_TAB3.Pages
// se non era realtime --> rimando a commenti
if (needReload)
{
await MServ.LastOpenedPageSet("notes");
await MsgServ.LastOpenedPageSet("notes");
NavMan.NavigateTo("notes");
}
}
protected void ForceReloadPage()
{
NavMan.NavigateTo(NavMan.Uri, true);
}
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
dltMinRealtime = SMServ.GetConfInt("dltMinRealtime");
minAnticipoRicalcolo = SMServ.GetConfInt("minAnticipoRicalcolo");
rdm_nEvStep = SMServ.GetConfInt("rdm_nEvStep");
rdm_nEvCheck = SMServ.GetConfInt("rdm_nEvCheck");
rdm_ChkOnly = SMServ.GetConfBool("rdm_ChkOnly");
}
protected override async Task OnParametersSetAsync()
{
// leggo gli altri dati
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
protected override async Task ReloadData()
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
if (string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
try
{
CurrMSE = rawData;
await base.ReloadData();
// recupero eventi
var eventsAll = await TabDServ.AnagEventiGetByMacch(IdxMacc);
if (eventsAll != null)
{
events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.label).ToList();
}
}
else
catch (Exception exc)
{
await ReloadData();
Log.Error($"ProdStop: Eccezione in reloadData {Environment.NewLine}{exc}");
await MsgServ.LastOpenedPageSet("/");
}
}
}
@@ -249,6 +262,7 @@ namespace MP_TAB3.Pages
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private string titleOut = "";
#endregion Private Fields
@@ -256,39 +270,9 @@ namespace MP_TAB3.Pages
private int MatrOpr
{
get => MServ.MatrOpr;
get => MsgServ.MatrOpr;
}
#endregion Private Properties
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
try
{
IdxMacc = await MServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MServ.GetMachineMse(IdxMacc);
}
var eventsAll = await TabDServ.AnagEventiGetByMacch(IdxMacc);
if (eventsAll != null)
{
events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.label).ToList();
}
}
catch (Exception exc)
{
Log.Error($"ProdStop: Eccezione in reloadData {Environment.NewLine}{exc}");
await MServ.LastOpenedPageSet("/");
}
}
}
#endregion Private Methods
}
}
+5 -3
View File
@@ -11,6 +11,7 @@
@if (ShowScanBarcode)
{
<BarcodeReader ScanResult="(e) => ScanDoneHandler(e)"
Close="ToggleCodeScan"
ScanBtnTitle="Scan"
@@ -19,7 +20,7 @@
UseBuiltinDiv="false"
@ref="barcodeReaderCustom"
SelectDeviceBtnTitle="Select Device">
</BarcodeReader>
</BarcodeReader>
<div @ref="barcodeReaderCustom.Element" class="d-flex justify-content-center">
<div class="col-12 col-md-8 col-lg-6">
@@ -37,14 +38,15 @@
</div>
</div>
</div>
}
@if (oprsList.Count > 0)
@if (oprList.Count > 0)
{
<div class="mb-1">
<span class="fs-5 fw-bold">Selezionare un operatore</span>
<select class="form-select" @bind="matrOpr">
@foreach (var opr in oprsList)
@foreach (var opr in oprList)
{
<option value="@opr.MatrOpr">@($"{opr.Cognome} {opr.Nome}")</option>
}
+41 -24
View File
@@ -9,12 +9,25 @@ using Newtonsoft.Json;
namespace MP_TAB3.Pages
{
public partial class RegNewDevice
public partial class RegNewDevice : IDisposable
{
#region Public Methods
public void Dispose()
{
txtError = "";
matrOpr = 0;
oprList = new List<AnagOperatoriModel>();
//GC.Collect();
}
#endregion Public Methods
#region Protected Fields
protected int expDays = 1;
protected string txtError = "";
protected DateTime vetoScan = DateTime.Now;
#endregion Protected Fields
@@ -41,16 +54,14 @@ namespace MP_TAB3.Pages
}
}
protected EgwCoreLib.Razor.BarcodeReader barcodeReaderCustom { get; set; } = null!;
protected string CurrOprTknLS { get; set; } = null!;
protected string CurrOprTknRedis { get; set; } = null!;
protected int matrOpr
{
get
{
return _matrOpr;
}
get { return _matrOpr; }
set => _matrOpr = value;
}
@@ -60,31 +71,20 @@ namespace MP_TAB3.Pages
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
protected List<AnagOperatoriModel> oprsList { get; set; } = new List<AnagOperatoriModel>();
protected List<AnagOperatoriModel> oprList { get; set; } = new List<AnagOperatoriModel>();
protected AnagOperatoriModel rigaOpr { get; set; } = null!;
[Inject]
protected TabDataService TDService { get; set; } = null!;
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
[Inject]
protected TabDataService TDService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected async Task ToggleCodeScan()
{
await Task.Delay(1);
ShowScanBarcode = !ShowScanBarcode;
}
protected string txtError = "";
protected string Traduci(string lemma)
{
return SMServ.Traduci($"EN_{lemma}".ToUpper());
}
protected async Task FirstLogIn()
{
rigaOpr = await TDService.OperatoreSearch(matrOpr, authKey);
@@ -94,6 +94,7 @@ namespace MP_TAB3.Pages
var deHash = TDService.DecryptData(authKey);
rigaOpr = await TDService.OperatoreSearch(matrOpr, deHash);
}
await Task.Delay(50);
if (rigaOpr != null && rigaOpr.MatrOpr > 0)
{
userTknDTO newUserTkn = new userTknDTO()
@@ -105,9 +106,11 @@ namespace MP_TAB3.Pages
var jsonTkn = JsonConvert.SerializeObject(newUserTkn);
string hash = TDService.EncryptData(jsonTkn);
MsgServ.RigaOper = rigaOpr;
await Task.Delay(50);
await MsgServ.SetCurrOperDtoLSAsync(hash);
await MsgServ.SetLastMatrOprAsync(rigaOpr.MatrOpr);
await TDService.OperatoreSetRedis(matrOpr, hash, devGuid);
await Task.Delay(50);
NavMan.NavigateTo("status-map", true);
}
else
@@ -123,7 +126,13 @@ namespace MP_TAB3.Pages
matrOpr = await MsgServ.GetLastMatrOprAsync();
TDService.ConfigGetVal("cookieDayExpire", ref expDays);
ShowScanBarcode = !SMServ.GetConfBool("TAB_WebCamHide");
oprsList = await TDService.ElencoOperatori();
oprList = await TDService.ElencoOperatori();
// filtro solo abilitati + ordino x nome...
oprList = oprList
.Where(x => x.isEnabled)
.OrderBy(x => x.Cognome)
.ThenBy(x => x.Nome)
.ToList();
}
protected async Task ScanDoneHandler(string value)
@@ -157,15 +166,23 @@ namespace MP_TAB3.Pages
}
}
protected async Task ToggleCodeScan()
{
await Task.Delay(1);
ShowScanBarcode = !ShowScanBarcode;
}
protected string Traduci(string lemma)
{
return SMServ.Traduci($"EN_{lemma}".ToUpper());
}
#endregion Protected Methods
#region Private Properties
private bool ShowScanBarcode { get; set; } = false;
protected EgwCoreLib.Razor.BarcodeReader barcodeReaderCustom { get; set; } = null!;
#endregion Private Properties
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/scrap"
@inherits BasePage
<MseSampler SampleMult="0.25" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+8 -50
View File
@@ -1,69 +1,27 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Scrap
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
#endregion Private Methods
protected void SetMacc(string selIdxMacc)
{
IdxMaccSubSel = selIdxMacc;
}
#endregion Protected Methods
#region Private Fields
private string IdxMaccSubSel = "";
#endregion Private Fields
}
}
+1 -2
View File
@@ -1,6 +1,5 @@
@page "/status-map"
<MseSampler SampleMult="1.5" E_Updated="SaveData"></MseSampler>
<div class="pe-2">
<div class="row mb-2">
@if (ListMSE == null || ListMSE.Count == 0 || isCalcSize)
@@ -15,7 +14,7 @@
{
currIdx++;
<div class="col px-1">
<MachineBlock RecMSE="@item" FullMode="true" Width="@Width" Height="@Height" showCard="@ShowCard"></MachineBlock>
<MachineBlock RecMSE="@item" FullMode="true" Width="@Width" Height="@Height" showCard="@ShowCard" doBlink="@doBlink"></MachineBlock>
</div>
@if (currIdx >= maxBlocks)
{
+73 -7
View File
@@ -1,9 +1,11 @@
using global::Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using MP.Data;
using MP.Data.Conf;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using MP_TAB3.Shared;
using Newtonsoft.Json;
using NLog;
using System.Runtime.ExceptionServices;
@@ -16,6 +18,8 @@ namespace MP_TAB3.Pages
public void Dispose()
{
ListMSE = null;
TDFeeder.dataPipe.EA_NewMessage -= DataPipe_EA_NewMessage;
TDFeeder.blinkPipe.EA_NewMessage -= BlinkPipe_EA_NewMessage;
GC.Collect();
}
@@ -39,8 +43,6 @@ namespace MP_TAB3.Pages
protected bool _showCard = false;
protected int maxCol = 6;
protected string showArt = "";
#endregion Protected Fields
@@ -79,6 +81,9 @@ namespace MP_TAB3.Pages
[Inject]
protected TabDataService TabDServ { get; set; } = null!;
[Inject]
protected TabDataFeeder TDFeeder { get; set; } = null!;
protected int Width { get; set; } = 0;
#endregion Protected Properties
@@ -131,8 +136,12 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
setDefaults();
ListMSE = null;
setDefaults();
TDFeeder.dataPipe.EA_NewMessage += DataPipe_EA_NewMessage;
TDFeeder.blinkPipe.EA_NewMessage += BlinkPipe_EA_NewMessage;
Random rnd = new Random();
await Task.Delay(rnd.Next(1, 50));
SetupConf();
var LastOpenedPage = await MsgServ.LastOpenedPageGet();
var currMacc = await MsgServ.IdxMaccGet();
@@ -143,7 +152,6 @@ namespace MP_TAB3.Pages
{
NavMan.NavigateTo(LastOpenedPage);
}
//NavMan.NavigateTo($"machine-detail");
}
}
@@ -156,13 +164,15 @@ namespace MP_TAB3.Pages
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private static Logger Log = LogManager.GetCurrentClassLogger();
private bool doBlink = false;
#endregion Private Fields
#region Private Properties
private string baseLang { get; set; } = "";
private List<MappaStatoExpl>? ListMSE { get; set; } = null;
private string tcMode { get; set; } = "";
@@ -171,6 +181,63 @@ namespace MP_TAB3.Pages
#region Private Methods
/// <summary>
/// Ricezione evento blink
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BlinkPipe_EA_NewMessage(object? sender, EventArgs e)
{
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly List<string> --> allarmi
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
try
{
var dataRaw = JsonConvert.DeserializeObject<string>(currArgs.newMessage);
if (dataRaw != null)
{
bool.TryParse($"{dataRaw}", out doBlink);
}
}
catch
{ }
InvokeAsync(() =>
{
StateHasChanged();
});
}
}
/// <summary>
/// Ricevuto nuovi dati da mostrare!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <exception cref="NotImplementedException"></exception>
private void DataPipe_EA_NewMessage(object? sender, EventArgs e)
{
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly List<string> --> allarmi
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
try
{
List<MappaStatoExpl>? dataList = JsonConvert.DeserializeObject<List<MappaStatoExpl>>(currArgs.newMessage);
if (dataList != null)
{
SaveData(dataList);
}
}
catch
{ }
}
InvokeAsync(() =>
{
StateHasChanged();
});
}
private void setDefaults()
{
string df = MsgServ.UserPrefSetup("DefCardMode", "full");
@@ -183,9 +250,8 @@ namespace MP_TAB3.Pages
private void SetupConf()
{
// sistemo i parametri opzionali...
TabDServ.ConfigGetVal("MON_maxCol", ref maxCol);
TabDServ.ConfigGetVal("sART", ref showArt);
Log.Info($"setupConf | Effettuato setup parametri | MaxCol: {maxCol}");
Log.Info($"setupConf | Effettuato setup parametri | showArt: {showArt}");
}
#endregion Private Methods
+13 -2
View File
@@ -5,8 +5,19 @@ using NLog;
namespace MP_TAB3.Pages
{
public partial class TCHistory
public partial class TCHistory : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
TotalCount = 0;
ListComplete = new List<ODLExpModel>();
//GC.Collect();
}
#endregion Public Methods
#region Protected Fields
protected string BaseAddr = "";
@@ -53,7 +64,7 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
BaseAddr = config.GetValue<string>("OptConf:BaseAddr") ?? "";
BaseAddr = config.GetValue<string>("ServerConf:BaseAddr") ?? (config.GetValue<string>("OptConf:BaseAddr") ?? "");
await ReloadData();
}
+1 -2
View File
@@ -1,7 +1,6 @@
@page "/tech-sheet"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+3 -37
View File
@@ -1,5 +1,4 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB3.Pages
@@ -8,12 +7,6 @@ namespace MP_TAB3.Pages
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected TabDataService TabDServ { get; set; } = null!;
@@ -23,31 +16,17 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
await ReloadData();
await base.OnInitializedAsync();
SetupConf();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Fields
private string disMessage = "Gestione schede tecniche di attrezzaggio, collaudo e verifica procedure di setup. Il modulo opzionale attivabile su richiesta.";
private string disMessage = "Gestione schede tecniche di attrezzaggio, collaudo e verifica procedure di setup. Il modulo opzionale &grave; attivabile su richiesta.";
private string disSubtitle = "Funzionalit disattivata";
private string disSubtitle = "Funzionalit&agrave; disattivata";
private string disTitle = "Scheda Tecnica";
@@ -57,19 +36,6 @@ namespace MP_TAB3.Pages
#region Private Methods
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
private void SetupConf()
{
TabDServ.ConfigGetVal("enableSchedaTecnica", ref enableSchedaTecnica);
-201
View File
@@ -100,206 +100,5 @@
}
</div>
@code {
[Inject]
private MessageService MsgServ { get; set; } = null!;
protected async Task setTcMode(string tcMode)
{
await Task.Delay(1);
tcModIns = tcMode;
}
protected async Task setLang(string lang)
{
await Task.Delay(1);
langIns = lang;
}
protected async Task setDefCardMode(string defCardMode)
{
await Task.Delay(1);
defCardModeIns = defCardMode;
}
private int MatrOpr
{
get => MsgServ.MatrOpr;
}
private string UserName
{
get => MsgServ.CognomeNome;
}
protected string btnMsStyle
{
get
{
string answ = "";
if (tcModIns == "ms")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnMcStyle
{
get
{
string answ = "";
if (tcModIns == "mc")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnShrinkStyle
{
get
{
string answ = "";
if (defCardModeIns == "shrink")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnFullStyle
{
get
{
string answ = "";
if (defCardModeIns == "full")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string _tcModIns { get; set; } = "";
protected string tcModIns
{
get => _tcModIns;
set
{
if (_tcModIns != value)
{
_tcModIns = value;
MsgServ.UserPrefSet("TcMode", value);
}
}
}
protected string _langIns { get; set; } = "EN";
protected string langIns
{
get => _langIns;
set
{
if (_langIns != value)
{
_langIns = value;
MsgServ.UserPrefSet("Lang", value);
}
}
}
protected string _defCardMode { get; set; } = "";
protected string defCardModeIns
{
get => _defCardMode;
set
{
if (_defCardMode != value)
{
_defCardMode = value;
MsgServ.UserPrefSet("DefCardMode", value);
}
}
}
public int Height { get; set; } = 0;
public int Width { get; set; } = 0;
public string currIpv4 { get; set; } = "";
public class WindowDimension
{
public int Width { get; set; }
public int Height { get; set; }
}
protected async override Task OnAfterRenderAsync(bool firstRender)
{
//await Task.Delay(500);
if (firstRender)
{
await getWDim();
StateHasChanged();
Log.Debug($"Dimensioni schermo: {Width}x{Height}");
}
}
[Inject]
protected SharedMemService MStor { get; set; } = null!;
protected int dtScadLogin { get; set; } = 0;
protected async override Task OnInitializedAsync()
{
tcModIns = MsgServ.UserPrefSetup("TcMode", "ms");
langIns = MsgServ.UserPrefSetup("Lang", "IT");
defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full");
dtScadLogin = MStor.GetConfInt("TAB_dtTimerScadLogin");
await Task.Delay(1);
if (string.IsNullOrEmpty(currIpv4))
{
// ricalcolo e salvo...
if (httpContextAccessor.HttpContext != null)
{
var remoteIp = $"{httpContextAccessor.HttpContext.Connection?.RemoteIpAddress}";
// provo a recuperare ipV4...
currIpv4 = EgwCoreLib.Razor.Data.IpUtils.getLocalIpv4(remoteIp);
}
}
}
protected async Task getWDim()
{
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
Height = dimension.Height;
Width = dimension.Width;
}
protected string mainSize
{
get
{
string answ = "col-12";
if (Width > 1021)
{
answ = "col-6";
}
return answ;
}
}
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
}
+261
View File
@@ -0,0 +1,261 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
namespace MP_TAB3.Pages
{
public partial class User : IDisposable
{
#region Public Properties
public string currIpv4 { get; set; } = "";
public int Height { get; set; } = 0;
public int Width { get; set; } = 0;
#endregion Public Properties
#region Public Methods
public void Dispose()
{
//GC.Collect();
}
#endregion Public Methods
#region Public Classes
public class WindowDimension
{
#region Public Properties
public int Height { get; set; }
public int Width { get; set; }
#endregion Public Properties
}
#endregion Public Classes
#region Protected Properties
protected string _defCardMode { get; set; } = "";
protected string _langIns { get; set; } = "EN";
protected string _tcModIns { get; set; } = "";
protected string btnFullStyle
{
get
{
string answ = "";
if (defCardModeIns == "full")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnMcStyle
{
get
{
string answ = "";
if (tcModIns == "mc")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnMsStyle
{
get
{
string answ = "";
if (tcModIns == "ms")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnShrinkStyle
{
get
{
string answ = "";
if (defCardModeIns == "shrink")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string defCardModeIns
{
get => _defCardMode;
set
{
if (_defCardMode != value)
{
_defCardMode = value;
MsgServ.UserPrefSet("DefCardMode", value);
}
}
}
protected int dtScadLogin { get; set; } = 0;
protected string langIns
{
get => _langIns;
set
{
if (_langIns != value)
{
_langIns = value;
MsgServ.UserPrefSet("Lang", value);
}
}
}
protected string mainSize
{
get
{
string answ = "col-12";
if (Width > 1021)
{
answ = "col-6";
}
return answ;
}
}
[Inject]
protected SharedMemService MStor { get; set; } = null!;
protected string tcModIns
{
get => _tcModIns;
set
{
if (_tcModIns != value)
{
_tcModIns = value;
MsgServ.UserPrefSet("TcMode", value);
}
}
}
#endregion Protected Properties
#region Protected Methods
protected async Task getWDim()
{
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
Height = dimension.Height;
Width = dimension.Width;
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
//await Task.Delay(500);
if (firstRender)
{
await getWDim();
StateHasChanged();
Log.Debug($"Dimensioni schermo: {Width}x{Height}");
}
}
protected override async Task OnInitializedAsync()
{
tcModIns = MsgServ.UserPrefSetup("TcMode", "ms");
langIns = MsgServ.UserPrefSetup("Lang", "IT");
defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full");
dtScadLogin = MStor.GetConfInt("TAB_dtTimerScadLogin");
await Task.Delay(1);
if (string.IsNullOrEmpty(currIpv4))
{
// ricalcolo e salvo...
if (httpContextAccessor.HttpContext != null)
{
var remoteIp = $"{httpContextAccessor.HttpContext.Connection?.RemoteIpAddress}";
// provo a recuperare ipV4...
currIpv4 = EgwCoreLib.Razor.Data.IpUtils.getLocalIpv4(remoteIp);
}
}
}
protected async Task setDefCardMode(string defCardMode)
{
await Task.Delay(1);
defCardModeIns = defCardMode;
}
protected async Task setLang(string lang)
{
await Task.Delay(1);
langIns = lang;
}
protected async Task setTcMode(string tcMode)
{
await Task.Delay(1);
tcModIns = tcMode;
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Properties
private int MatrOpr
{
get => MsgServ.MatrOpr;
}
[Inject]
private MessageService MsgServ { get; set; } = null!;
private string UserName
{
get => MsgServ.CognomeNome;
}
#endregion Private Properties
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/workshift"
@inherits BasePage
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
+4 -32
View File
@@ -8,12 +8,7 @@ namespace MP_TAB3.Pages
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected TurniMaccModel currTurni { get; set; } = new TurniMaccModel();
protected string IdxMacc { get; set; } = "";
[Inject]
protected MessageService MsgServ { get; set; } = null!;
protected bool T1
{
@@ -68,46 +63,23 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await ReloadData();
}
protected async Task RefreshData(List<MappaStatoExpl> newList)
{
var ListMSE = newList;
if (!string.IsNullOrEmpty(IdxMacc))
{
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
if (rawData != null)
{
CurrMSE = rawData;
}
else
{
await ReloadData();
}
}
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Methods
private async Task ReloadData()
protected override async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
await base.ReloadData();
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
// recupero turni
currTurni = await TabServ.TurnoMacchinaGet(IdxMacc);
}
}
}
#endregion Private Methods
#endregion Protected Methods
}
}
+71 -4
View File
@@ -15,14 +15,12 @@
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="lib/font-awesome/css/all.min.css" />
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/font.min.css" />
<link rel="stylesheet" href="css/site.css" />
<link rel="stylesheet" href="MP-TAB3.styles.css" />
<component type="typeof(HeadOutlet)" render-mode="Server" />
@* <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> *@
</head>
<body>
@RenderBody()
@@ -38,9 +36,78 @@
<a class="dismiss">🗙</a>
</div>
@*<script src="~/lib//BarcodeReade.razor.js"></script>*@
<script src="lib/Utils.js"></script>
<script src="lib/WindowSize.js"></script>
<script src="lib/bootstrap/js/bootstrap.bundle.js"></script>
<script src="_framework/blazor.server.js"></script>
@* <script src="_framework/blazor.server.js"></script> *@
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
<script src="_framework/blazor.server.js" autostart="false"></script>
<script>
Blazor.start({
reconnectionOptions: {
maxRetries: 600,
retryIntervalMilliseconds: 1000
},
}).then(() => {
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
console.log("Client reconnected, waiting 5 sec and reload!");
setTimeout(function () {
document.location.reload();
}, 3000);
}
});
</script>
@* <script>
Blazor.start({
reconnectionOptions: {
maxRetries: 600,
retryIntervalMilliseconds: 1000
},
reconnectionHandler: {
onConnectionDown: (options, error) => console.error(error),
onConnectionUp: () => console.log("Client reconnected!")
}
}).then(() => {
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
get() {
return this.__reconnectionDisplay;
},
set(value) {
this.__reconnectionDisplay = {
show: () => value.show(),
update: (d) => value.update(d),
rejected: (d) => document.location.reload()
}
}
});
});
</script> *@
@* <script>
Blazor.start({
reconnectionOptions: {
maxRetries: Infinity,
retryIntervalMilliseconds: 1000
},
reconnectionHandler: {
onConnectionDown: (options, error) => {
Blazor.defaultReconnectionHandler.onConnectionDown(options, error);
Blazor.defaultReconnectionHandler._reconnectionDisplay.rejected = function () {
window.location.reload();
}
},
onConnectionUp: () => {
console.log("Client reconnected!");
document.location.reload();
}
}
}).then(() => {
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
document.location.reload();
}
});
</script> *@
</body>
</html>
+24 -1
View File
@@ -2,9 +2,12 @@ using Blazored.LocalStorage;
using Blazored.SessionStorage;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.FileProviders;
using MP.Data;
using MP.Data.Services;
using StackExchange.Redis;
using static Org.BouncyCastle.Math.EC.ECCurve;
var builder = WebApplication.CreateBuilder(args);
@@ -24,6 +27,9 @@ builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
builder.Services.AddSingleton<TabDataFeeder>();
builder.Services.AddSingleton<StatusData>();
builder.Services.AddSingleton<ListSelectDataSrv>();
builder.Services.AddSingleton<OrderDataSrv>();
@@ -43,7 +49,8 @@ builder.Services.AddHttpContextAccessor();
var app = builder.Build();
// aggiunt base URL x routing corretto
app.UsePathBase(configuration["OptConf:BaseUrl"]);
var pathBase= configuration.GetValue<string>("ServerConf:BaseUrlTab") ?? (configuration.GetValue<string>("OptConf:BaseUrlTab") ?? "");
app.UsePathBase(pathBase);
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
@@ -57,6 +64,22 @@ app.UseHttpsRedirection();
app.UseStaticFiles();
// gestione static files: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0
string BasePathDisegni = configuration.GetValue<string>("ServerConf:BasePathDisegni") ?? configuration.GetValue<string>("OptConf:BasePathDisegni")?? "";
if (!string.IsNullOrEmpty(BasePathDisegni))
{
// verifico esista folder disegni
if (Directory.Exists(BasePathDisegni))
{
// gestione cartella x PDF
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(BasePathDisegni),
RequestPath = "/disegni",
});
}
}
app.UseRouting();
app.MapBlazorHub();
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2401.2618</h4>
<h4>Versione: 6.16.2403.711</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2401.2618
6.16.2403.711
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2401.2618</version>
<version>6.16.2403.711</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+28
View File
@@ -0,0 +1,28 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"Redis": "iis01.egalware.com:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"MP.All": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"MP.Mon": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"MP.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
"MP.Tab": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"MP.Mag": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
},
"OptConf": {
"msRefresh": "1500",
"CodModulo": "MP-TAB3"
},
"ServerConf": {
"BaseAddr": "https://iis04.egalware.com/MP/TAB3/",
"BasePathDisegni": "C:\\Steamware\\disegni",
"BaseUrlTab": "/MP/TAB3",
"ImgBasePath": "https://iis04.egalware.com/MP/images/macchine/small/"
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net"
}
+8 -7
View File
@@ -9,20 +9,21 @@
"CodApp": "MP.TAB",
"ConnectionStrings": {
"Redis": "iis01.egalware.com:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
//"Redis": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"MP.All": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"MP.Mon": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"Mp.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
"MP.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
"MP.Tab": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"MP.Mag": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
},
"OptConf": {
"msRefresh": "4000",
"msRefresh": "1100",
"CodModulo": "MP-TAB3"
},
"ServerConf": {
"BaseAddr": "https://localhost:7295/MP/TAB3/",
"BaseUrl": "/MP/TAB3",
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/",
"ImgStBasePath": "C:\\Steamware\\images\\ST",
"CodModulo": "MoonPro"
"BasePathDisegni": "\\\\iis01\\W$\\Files\\Disegni",
"BaseUrlTab": "/MP/TAB3",
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/"
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"MailKitMailSettings": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+3
View File
@@ -0,0 +1,3 @@
function isDevice() {
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(navigator.userAgent);
}
+5 -2
View File
@@ -4,9 +4,11 @@
{
#region Public Fields
public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink";
public static readonly string MON_ACT_BLINK_KEY = $"{BASE_HASH}:MON:Current:Blink";
public static readonly string MON_ACT_MSE_DATA_KEY = $"{BASE_HASH}:MON:Current:MSE";
public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE";
public static readonly string TAB_ACT_BLINK_KEY = $"{BASE_HASH}:TAB:Current:Blink";
public static readonly string TAB_ACT_MSE_DATA_KEY = $"{BASE_HASH}:TAB:Current:MSE";
public static readonly string BROADCAST_M_PIPE = $"BroadCastMsg";
public static readonly string BROADCAST_CURR_KEY = $"{BASE_HASH}:Current:BroadCast";
@@ -19,6 +21,7 @@
public static string redisMacchine = "MP:MON:Cache:Macchine";
public static string redisMseKey = "MP:MON:Cache:MSE";
public static string redisMseKeySingle = "MP:MON:Cache:MseSingle";
+44
View File
@@ -1,6 +1,7 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MP.Data.DatabaseModels;
using NLog;
using System;
using System.Collections.Generic;
@@ -84,6 +85,49 @@ namespace MP.Data.Controllers
return dbResult;
}
/// <summary>
/// Elenco da tabella Macchine
/// </summary>
/// <param name="codGruppo"></param>
/// <returns></returns>
public List<Macchine> MacchineGetFilt(string codGruppo)
{
List<Macchine> dbResult = new List<Macchine>();
try
{
using (var dbCtx = new MoonProContext(_configuration))
{
if (codGruppo == "*")
{
dbResult = dbCtx
.DbSetMacchine
.AsNoTracking()
.OrderBy(x => x.IdxMacchina)
.ToList();
}
else
{
dbResult = dbCtx
.DbSetGrp2Macc
.Where(g => g.CodGruppo == codGruppo)
.Join(dbCtx.DbSetMacchine,
g => g.IdxMacchina,
m => m.IdxMacchina,
(g, m) => m
)
.AsNoTracking()
.OrderBy(x => x.IdxMacchina)
.ToList();
}
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in MacchineGetFilt{Environment.NewLine}{exc}");
}
return dbResult;
}
/// <summary>
/// Elenco da tabella MappaStatoExpl
/// </summary>
@@ -21,5 +21,6 @@ namespace MP.Data.DatabaseModels
public bool isAdmin { get; set; } = false;
public string authKey { get; set; }
public string CodOprExt { get; set; }
public bool isEnabled { get; set; } = false;
}
}
+191
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data;
#nullable disable
// <Auto-Generated>
@@ -159,5 +160,195 @@ namespace MP.Data.DatabaseModels
return PezziProd >= NumPezzi;
}
}
public override bool Equals(object obj)
{
if (!(obj is MappaStatoExpl item))
return false;
if (RowNum != item.RowNum)
return false;
if (LastUpdate != item.LastUpdate)
return false;
if (IdxMacchina != item.IdxMacchina)
return false;
if (CodMacchina != item.CodMacchina)
return false;
if (Nome != item.Nome)
return false;
if (Url != item.Url)
return false;
if (IdxOdl != item.IdxOdl)
return false;
if (IdxPOdl != item.IdxPOdl)
return false;
if (CodArticolo != item.CodArticolo)
return false;
if (Disegno != item.Disegno)
return false;
if (NumPezzi != item.NumPezzi)
return false;
if (TCAssegnato != item.TCAssegnato)
return false;
if (DataInizioOdl != item.DataInizioOdl)
return false;
if (Semaforo != item.Semaforo)
return false;
if (IdxStato != item.IdxStato)
return false;
if (DescrizioneStato != item.DescrizioneStato)
return false;
if (Durata != item.Durata)
return false;
if (PezziProd != item.PezziProd)
return false;
if (PezziConf != item.PezziConf)
return false;
if (TempoOn != item.TempoOn)
return false;
if (TempoAuto != item.TempoAuto)
return false;
if (TempoRun != item.TempoRun)
return false;
if (TCMedio != item.TCMedio)
return false;
if (TCLav != item.TCLav)
return false;
if (TCEff != item.TCEff)
return false;
if (TCMedioRt != item.TCMedioRt)
return false;
if (TCLavRT != item.TCLavRT)
return false;
if (TCEffRT != item.TCEffRT)
return false;
return true;
}
public bool MostlyEquals(object obj)
{
if (!(obj is MappaStatoExpl item))
return false;
if (RowNum != item.RowNum)
return false;
//if (LastUpdate != item.LastUpdate)
// return false;
if (IdxMacchina != item.IdxMacchina)
return false;
if (CodMacchina != item.CodMacchina)
return false;
if (Nome != item.Nome)
return false;
if (Url != item.Url)
return false;
if (IdxOdl != item.IdxOdl)
return false;
if (IdxPOdl != item.IdxPOdl)
return false;
if (CodArticolo != item.CodArticolo)
return false;
if (Disegno != item.Disegno)
return false;
if (NumPezzi != item.NumPezzi)
return false;
if (TCAssegnato != item.TCAssegnato)
return false;
if (DataInizioOdl != item.DataInizioOdl)
return false;
if (Semaforo != item.Semaforo)
return false;
if (IdxStato != item.IdxStato)
return false;
//if (DescrizioneStato != item.DescrizioneStato)
// return false;
//if (Durata != item.Durata)
// return false;
if (PezziProd != item.PezziProd)
return false;
if (PezziConf != item.PezziConf)
return false;
//if (TempoOn != item.TempoOn)
// return false;
//if (TempoAuto != item.TempoAuto)
// return false;
//if (TempoRun != item.TempoRun)
// return false;
//if (TCMedio != item.TCMedio)
// return false;
//if (TCLav != item.TCLav)
// return false;
//if (TCEff != item.TCEff)
// return false;
//if (TCMedioRt != item.TCMedioRt)
// return false;
//if (TCLavRT != item.TCLavRT)
// return false;
//if (TCEffRT != item.TCEffRT)
// return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}
@@ -16,5 +16,6 @@ namespace MP.Data.DatabaseModels
public string label { get; set; } = "";
public string cssClass { get; set; } = "";
public string icona { get; set; } = "";
public bool isEnabled { get; set; } = false;
}
}
+8 -2
View File
@@ -113,7 +113,10 @@ namespace MP.Data
//Subscribe to the channel named messages
sub.Subscribe(_channel, (channel, message) =>
{
Log.Trace($"req setup ch {channel} | {message}");
if (enableLog)
{
Log.Trace($"req setup ch {channel} | {message}");
}
// messaggio
PubSubEventArgs mea = new PubSubEventArgs(message);
// se qualcuno ascolta sollevo evento nuovo valore...
@@ -122,7 +125,10 @@ namespace MP.Data
EA_NewMessage(this, mea);
}
});
Log.Info($"Subscribed {_channel}");
if (enableLog)
{
Log.Info($"Subscribed {_channel}");
}
}
#endregion Private Methods
+3 -3
View File
@@ -49,14 +49,14 @@ namespace MP.Data
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Data");
string connString = _configuration.GetConnectionString("MP.Data");
if (string.IsNullOrEmpty(connString))
{
connString = _configuration.GetConnectionString("Mp.Mon");
connString = _configuration.GetConnectionString("MP.Mon");
}
if (string.IsNullOrEmpty(connString))
{
connString = _configuration.GetConnectionString("Mp.STATS");
connString = _configuration.GetConnectionString("MP.STATS");
}
optionsBuilder.UseSqlServer(connString);
+3 -3
View File
@@ -113,14 +113,14 @@ namespace MP.Data
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Data");
string connString = _configuration.GetConnectionString("MP.Data");
if (string.IsNullOrEmpty(connString))
{
connString = _configuration.GetConnectionString("Mp.Mon");
connString = _configuration.GetConnectionString("MP.Mon");
}
if (string.IsNullOrEmpty(connString))
{
connString = _configuration.GetConnectionString("Mp.STATS");
connString = _configuration.GetConnectionString("MP.STATS");
}
optionsBuilder.UseSqlServer(connString);
+1 -1
View File
@@ -65,7 +65,7 @@ namespace MP.Data
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.IS");
string connString = _configuration.GetConnectionString("MP.IS");
if (!string.IsNullOrEmpty(connString))
{
optionsBuilder.UseSqlServer(connString);
+1 -1
View File
@@ -78,7 +78,7 @@ namespace MP.Data
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Inve");
string connString = _configuration.GetConnectionString("MP.Inve");
if (!string.IsNullOrEmpty(connString))
{
optionsBuilder.UseSqlServer(connString);
+1 -1
View File
@@ -62,7 +62,7 @@ namespace MP.Data
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Mag");
string connString = _configuration.GetConnectionString("MP.Mag");
if (!string.IsNullOrEmpty(connString))
{
optionsBuilder.UseSqlServer(connString);
+1 -1
View File
@@ -60,7 +60,7 @@ namespace MP.Data
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Stats");
string connString = _configuration.GetConnectionString("MP.Stats");
optionsBuilder.UseSqlServer(connString);
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;");
+3 -3
View File
@@ -14,10 +14,10 @@ namespace MP.Data.Objects
{
#region Public Fields
public bool CNC_Counter { get; set; }=false;
public string IP { get; set; } ="::1";
public bool CNC_Counter { get; set; } = false;
public string IP { get; set; } = "::1";
public IobType iType { get; set; } = IobType.ND;
public string name { get; set; } ="ND";
public string name { get; set; } = "ND";
public string typeCss { get; set; } = "fa fa-question-circle-o";
#endregion Public Fields
+1 -1
View File
@@ -30,7 +30,7 @@ namespace MP.Data.Services
redisDb = redisConn.GetDatabase();
// conf DB
string connStr = _configuration.GetConnectionString("Mp.All");
string connStr = _configuration.GetConnectionString("MP.All");
if (string.IsNullOrEmpty(connStr))
{
Log.Error("ConnString empty!");
+4 -18
View File
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace MP.Data.Services
{
public class MonDataFeeder : StatusData
public class MonDataFeeder : StatusData, IDisposable
{
#region Public Constructors
@@ -15,8 +15,8 @@ namespace MP.Data.Services
{
// setup canali pub/sub
dataPipe = new MessagePipe(redisConn, Constants.ACT_MSE_DATA_KEY);
blinkPipe = new MessagePipe(redisConn, Constants.ACT_BLINK_KEY);
dataPipe = new MessagePipe(redisConn, Constants.MON_ACT_MSE_DATA_KEY);
blinkPipe = new MessagePipe(redisConn, Constants.MON_ACT_BLINK_KEY);
// avvio timers...
startTimers();
@@ -40,14 +40,6 @@ namespace MP.Data.Services
stopTimers();
}
/// <summary>
/// Richiesta attivazione --&gt; sposto avanti 1 minuto il periodo limite x fast running
/// </summary>
public void doActivate()
{
fastLimit = DateTime.Now.AddMinutes(1);
}
/// <summary>
/// Impostazione forzata timer refresh
/// </summary>
@@ -83,13 +75,7 @@ namespace MP.Data.Services
private static System.Timers.Timer fastTimer = new System.Timers.Timer(4000);
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Limite in formato data-ora per inviare dati rapidamente (incrementato come now + 1 min
/// ad ogni chiamata client)
/// </summary>
private DateTime fastLimit = DateTime.Now;
private static Logger Log = LogManager.GetCurrentClassLogger();
private int fastRefreshMs = 1000;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace MP.Data.Services
redisDb = redisConn.GetDatabase();
// conf DB
string connStr = _configuration.GetConnectionString("Mp.All");
string connStr = _configuration.GetConnectionString("MP.All");
if (string.IsNullOrEmpty(connStr))
{
Log.Error("ConnString empty!");
+26
View File
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data.Services
{
public class ReloadEventArgs : EventArgs
{
#region Public Constructors
public ReloadEventArgs(string messaggio)
{
this.ReloadMessage = messaggio;
}
#endregion Public Constructors
#region Public Properties
public string ReloadMessage { get; set; } = "";
#endregion Public Properties
}
}
+81 -4
View File
@@ -28,7 +28,7 @@ namespace MP.Data.Services
redisDb = redisConn.GetDatabase();
// conf DB
string connStr = _configuration.GetConnectionString("Mp.Mon");
string connStr = _configuration.GetConnectionString("MP.Mon");
if (string.IsNullOrEmpty(connStr))
{
Log.Error("ConnString empty!");
@@ -51,6 +51,10 @@ namespace MP.Data.Services
maxAge = _configuration.GetValue<int>("OptConf:msRefresh");
}
// sistemo i timespan
LongCache = TimeSpan.FromSeconds(300);
FastCache = TimeSpan.FromMilliseconds(maxAge);
// setup conf IOB da dizionario
tryLoadIobTags();
}
@@ -110,9 +114,66 @@ namespace MP.Data.Services
return outVal;
}
public Task<List<Macchine>> MacchineGetAll()
public async Task<List<Macchine>> MacchineGetAll()
{
return Task.FromResult(dbController.MacchineGetAll());
Stopwatch sw = new Stopwatch();
string source = "DB";
sw.Start();
List<Macchine>? result = new List<Macchine>();
// cerco in redis...
string currKey = $"{Constants.redisMacchine}:ALL";
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
{
result = JsonConvert.DeserializeObject<List<Macchine>>($"{rawData}");
source = "REDIS";
}
else
{
result = await Task.FromResult(dbController.MacchineGetAll());
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, LongCache);
}
if (result == null)
{
result = new List<Macchine>();
}
sw.Stop();
Log.Debug($"MacchineGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
return result;
//return Task.FromResult(dbController.MacchineGetAll());
}
public async Task<List<Macchine>> MacchineGetByGruppo(string CodGruppo)
{
Stopwatch sw = new Stopwatch();
string source = "DB";
sw.Start();
List<Macchine>? result = new List<Macchine>();
// cerco in redis...
string currKey = $"{Constants.redisMacchine}:{CodGruppo}";
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
{
result = JsonConvert.DeserializeObject<List<Macchine>>($"{rawData}");
source = "REDIS";
}
else
{
result = await Task.FromResult(dbController.MacchineGetFilt(CodGruppo));
//result = dbController.MacchineGetFilt(CodGruppo);
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, LongCache);
}
if (result == null)
{
result = new List<Macchine>();
}
sw.Stop();
Log.Debug($"MacchineGetByGruppo | {source} | {sw.Elapsed.TotalMilliseconds}ms");
return result;
}
/// <summary>
@@ -205,7 +266,7 @@ namespace MP.Data.Services
result = await Task.FromResult(dbController.MseGetAll(maxAge));
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(Constants.redisMseKey, rawData, TimeSpan.FromMilliseconds(maxAge));
await redisDb.StringSetAsync(Constants.redisMseKey, rawData, UltraFastCache);
}
if (result == null)
{
@@ -236,7 +297,23 @@ namespace MP.Data.Services
#region Private Fields
private static IConfiguration _configuration = null!;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Cache breve durata
/// </summary>
private TimeSpan FastCache = TimeSpan.FromSeconds(5);
/// <summary>
/// Cache brevissima durata
/// </summary>
private TimeSpan UltraFastCache = TimeSpan.FromMilliseconds(1500);
/// <summary>
/// Cache lunga durata
/// </summary>
private TimeSpan LongCache = TimeSpan.FromSeconds(60);
private int maxAge = 2000;
#endregion Private Fields
+118
View File
@@ -0,0 +1,118 @@
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using NLog;
using StackExchange.Redis;
using System;
using System.Threading.Tasks;
namespace MP.Data.Services
{
public class TabDataFeeder : StatusData, IDisposable
{
#region Public Constructors
public TabDataFeeder(IConfiguration configuration) : base(configuration)
{
// setup canali pub/sub
dataPipe = new MessagePipe(redisConn, Constants.TAB_ACT_MSE_DATA_KEY, false);
blinkPipe = new MessagePipe(redisConn, Constants.TAB_ACT_BLINK_KEY, false);
// avvio timers...
startTimers();
}
#endregion Public Constructors
#region Public Properties
public MessagePipe blinkPipe { get; set; } = null!;
public MessagePipe dataPipe { get; set; } = null!;
#endregion Public Properties
#region Public Methods
public new void Dispose()
{
base.Dispose();
stopTimers();
}
/// <summary>
/// Impostazione forzata timer refresh
/// </summary>
/// <param name="FastTimerMs"></param>
public void setTimers(int FastTimerMs)
{
stopTimers();
fastRefreshMs = FastTimerMs;
// avvio timers...
startTimers();
}
public void startTimers()
{
fastTimer = new System.Timers.Timer(fastRefreshMs);
fastTimer.Elapsed += ElapsedFastTimer;
fastTimer.Enabled = true;
fastTimer.Start();
}
public void stopTimers()
{
// stop timers
fastTimer.Elapsed -= ElapsedFastTimer;
fastTimer.Enabled = false;
fastTimer.Stop();
fastTimer.Dispose();
}
#endregion Public Methods
#region Private Fields
private static System.Timers.Timer fastTimer = new System.Timers.Timer(4000);
private static Logger Log = LogManager.GetCurrentClassLogger();
private int fastRefreshMs = 1000;
#endregion Private Fields
#region Private Methods
private void ElapsedFastTimer(object? source, System.Timers.ElapsedEventArgs e)
{
var pUpd = Task.Run(async () =>
{
// secondi pari --> blink, secondi dispari --> ricarica
DateTime adesso = DateTime.Now;
int resto = 0;
Math.DivRem(adesso.Second, 2, out resto);
if (resto == 0)
{
// invio in channel blink il segnale
blinkPipe.sendMessage("true");
Log.Debug("Elapsed Fast Timer Blink");
}
else
{
// invio in channel blink segnale false
blinkPipe.sendMessage("false");
// rileggo dati...
var newData = await MseGetAll();
// invio tramite la pipe...
dataPipe.sendMessage(JsonConvert.SerializeObject(newData));
Log.Debug("Elapsed Fast Timer reload");
}
});
pUpd.Wait();
}
#endregion Private Methods
}
}
+34 -5
View File
@@ -21,6 +21,25 @@ namespace MP.Data.Services
{
public class TabDataService : BaseServ, IDisposable
{
/// <summary>
/// Evento richiesta rilettura dati pagina (x refresh pagine aperte)
/// </summary>
public event EventHandler ReloadRequest = delegate { };
/// <summary>
/// Invio notifica rilettura (con parametro)
/// </summary>
/// <param name="message"></param>
public void NotifyReloadRequest(string message)
{
if (ReloadRequest != null)
{
// messaggio
ReloadEventArgs rea = new ReloadEventArgs(message);
ReloadRequest.Invoke(this, rea);
}
}
#region Public Constructors
/// <summary>
@@ -36,7 +55,7 @@ namespace MP.Data.Services
redisDb = redisConn.GetDatabase();
// conf DB
ConnStr = _configuration.GetConnectionString("Mp.All");
ConnStr = _configuration.GetConnectionString("MP.All");
if (string.IsNullOrEmpty(ConnStr))
{
Log.Error("ConnString empty!");
@@ -878,12 +897,19 @@ namespace MP.Data.Services
result = JsonConvert.DeserializeObject<IOB_data>($"{rawData}");
source = "REDIS";
}
else
{
Log.Error($"Errore: non trovato valore <IOB_data> valido in REDIS | key: {currKey}");
Log.Info($"REDIS | conf: {redisConn.Configuration}");
Log.Info($" --> Valore trovato:{Environment.NewLine}{rawData}");
}
if (result == null)
{
result = new IOB_data();
Log.Debug($"Init valore default <IOB_data> | IdxMacchina: {IdxMacchina}");
}
sw.Stop();
Log.Debug($"IobInfo | {source} | {sw.Elapsed.TotalMilliseconds}ms");
Log.Debug($"IobInfo per {IdxMacchina} | {source} | {sw.Elapsed.TotalMilliseconds}ms");
return result;
}
@@ -2142,7 +2168,7 @@ namespace MP.Data.Services
result = dbTabController.RegScartiGetFilt(idxMacchina, idxODL, dataFrom, dataTo, showMulti);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
await redisDb.StringSetAsync(currKey, rawData, LongCache);
}
if (result == null)
{
@@ -2400,6 +2426,7 @@ namespace MP.Data.Services
answ = dbTabController.RicalcMse(idxMacchina, maxAgeSec);
await FlushOdlCache();
await FlushCache(Constants.redisMseKey);
await FlushCache(Constants.redisMacchine);
return answ;
}
@@ -3137,7 +3164,7 @@ namespace MP.Data.Services
result = await Task.FromResult(dbTabController.VSOdlGetUnused(idxMacchina, showAll, numDayAdd));
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, UltraFastCache);
await redisDb.StringSetAsync(currKey, rawData, FastCache);
}
if (result == null)
{
@@ -3241,7 +3268,8 @@ namespace MP.Data.Services
answ = true;
}
}
// notifico update ai client in ascolto x reset cache
NotifyReloadRequest($"FlushRedisCache | {pattern}");
return answ;
}
@@ -3405,4 +3433,5 @@ namespace MP.Data.Services
#endregion Private Methods
}
}
+2 -2
View File
@@ -30,8 +30,8 @@ namespace MP.INVE.Data
_logger.LogInformation("Redis INIT");
// conf DB
string connStrData = _configuration.GetConnectionString("Mp.Data");
string connStrInve = _configuration.GetConnectionString("Mp.Inve");
string connStrData = _configuration.GetConnectionString("MP.Data");
string connStrInve = _configuration.GetConnectionString("MP.Inve");
if (string.IsNullOrEmpty(connStrData) || string.IsNullOrEmpty(connStrInve))
{
_logger.LogError($"DbController: ConnString empty! connStrData: {connStrData} | connStrInve: {connStrInve}");

Some files were not shown because too many files have changed in this diff Show More