Compare commits

...

672 Commits

Author SHA1 Message Date
Samuele Locatelli d5d47076df Merge branch 'release/AddConfMaxAge' 2022-07-15 17:36:41 +02:00
Samuele Locatelli 612c3c95f7 MON:
- fix: parametro MaxAge usato anche x redis
- cambio maxAge a 2000ms
2022-07-15 17:36:21 +02:00
Samuele Locatelli dddac15b52 MON:
- update x conf maxAge da appsetting.json
2022-07-15 17:23:58 +02:00
Samuele Locatelli a315e4f0ef Merge tag 'FixDisplayMonHours' into develop
Update x display ore in MON
2022-07-15 17:16:43 +02:00
Samuele Locatelli d71e9465e5 Merge branch 'release/FixDisplayMonHours' 2022-07-15 17:15:57 +02:00
Samuele Locatelli 876197b0ac Update display MON x vedere HH 2022-07-15 17:14:44 +02:00
Samuele Locatelli cd07a940d0 Merge tag 'UpdateLand4WCS' into develop
update x compatibilità con nuovi metodi WebConfigSetter
2022-07-14 17:55:44 +02:00
Samuele Locatelli d2f7dd53f3 Merge branch 'release/UpdateLand4WCS' 2022-07-14 17:55:28 +02:00
Samuele Locatelli 8c75556240 Update LAND:
- spostamento aree conf server in apposito blocco
- implementaizone compatibile con WebConfigSetter
2022-07-14 17:54:59 +02:00
Samuele Locatelli a025057865 Merge tag 'FixRedisNugetStat' into develop
Cambio modalità auto-reconnect e tentativi
2022-07-13 09:49:43 +02:00
Samuele Locatelli c5ebcd5b40 Merge branch 'release/FixRedisNugetStat' 2022-07-13 09:49:33 +02:00
Samuele Locatelli df1526d522 MP MON:
- cambio gestione auto-reconnect: più tentativi, per 10 minuti
2022-07-13 09:49:16 +02:00
Samuele Locatelli fb88e6e30d Merge tag 'FixRedisNugetStats' into develop
Fix nuget stats
2022-07-13 09:06:08 +02:00
Samuele Locatelli e83945488d Merge branch 'release/FixRedisNugetStats' 2022-07-13 09:05:53 +02:00
Samuele Locatelli 23835d330d Fix nuget redis x STATS 2022-07-13 09:05:36 +02:00
Samuele Locatelli b57885576e Merge tag 'FixRedisRegression' into develop
Update x fix regressione valore redis mal testato
2022-07-13 08:58:13 +02:00
Samuele Locatelli 417ea1a77d Merge branch 'release/FixRedisRegression' 2022-07-13 08:57:59 +02:00
Samuele Locatelli 335fdf78f0 Correzione regressione test valori redis 2022-07-13 08:57:33 +02:00
Samuele Locatelli d50e5a6860 Merge tag 'UpdatePack' into develop
Update nuget e eliminazione warnings
2022-07-13 08:29:21 +02:00
Samuele Locatelli 86d28f1901 Merge branch 'release/UpdatePack' 2022-07-13 08:28:57 +02:00
Samuele Locatelli 202c5f6faf Refresh pacchetti nuget + minor fix 2022-07-13 08:28:38 +02:00
Samuele Locatelli e2947d1017 Merge tag 'UpdateSlowTimerElapse' into develop
Aggiornamento slow time elapse (+/- 10%)
2022-07-13 07:57:33 +02:00
Samuele Locatelli 55faefcb9a Merge branch 'release/UpdateSlowTimerElapse' 2022-07-13 07:57:19 +02:00
Samuele Locatelli 1e5f894fd9 MON:
- attesa refresh variabile x client
- esclusione compilazione WASM (NON pronta)
2022-07-13 07:55:12 +02:00
Samuele Locatelli cf8baa054f Merge tag 'MonCleanup' into develop
Update con cleanup codice ed un paio di fix dispose
2022-07-12 19:06:59 +02:00
Samuele Locatelli 871a0c8ca5 Merge branch 'release/MonCleanup' 2022-07-12 19:05:53 +02:00
Samuele Locatelli 78cb17d8fc Cleanup MP/MON 2022-07-12 19:05:30 +02:00
Samuele Locatelli 22ff799204 Merge tag 'MonWithRedisChannels' into develop
Gestioen con redis channels (da ripulire...)
2022-07-12 18:45:32 +02:00
Samuele Locatelli a26408a21c Merge branch 'release/MonWithRedisChannels' 2022-07-12 18:45:18 +02:00
Samuele Locatelli ee043f81be Update MON:
- gestione tramite REDIS CHANNEL
- refresh sincrono
2022-07-12 18:44:57 +02:00
Samuele Locatelli 97741b4973 refresh libs 2022-07-12 18:44:35 +02:00
Samuele Locatelli 544c977740 Merge tag 'UpdateMonStandard' into develop
Update comportamento monitor standard
2022-07-12 17:10:37 +02:00
Samuele Locatelli dc38127291 Merge branch 'release/UpdateMonStandard' 2022-07-12 17:10:23 +02:00
Samuele Locatelli 8e7bdf2b77 Refresh bootstrap libs 2022-07-12 17:09:53 +02:00
Samuele Locatelli 7e922555b1 refresh MON principale 2022-07-12 17:08:48 +02:00
Samuele Locatelli acbbd5c9e6 Cambio metodi DB : asNoTracking 2022-07-12 17:08:19 +02:00
Samuele Locatelli 77f06c465e Update metodi WASM Server 2022-07-12 17:07:56 +02:00
Samuele Locatelli 4bfba522ce Complto review WASM client 2022-07-12 17:07:44 +02:00
Samuele Locatelli cbbdc8e8d8 Fix blink WASM client 2022-07-12 17:07:10 +02:00
Samuele Locatelli e8e3d63d09 Implementato dispose classe server 2022-07-11 18:46:53 +02:00
Samuele E. Locatelli 9dc73936da ancora pub profiles 2022-07-09 18:26:21 +02:00
Samuele E. Locatelli a2afeab317 refresh publish profiles 2022-07-09 18:26:15 +02:00
Samuele E. Locatelli 2c62abdf73 ancora refresh yaml e versione WASM 2022-07-09 18:21:04 +02:00
Samuele E. Locatelli d17cb03c7b Setup pubblicazione sito + test yaml (da validare) 2022-07-09 18:20:55 +02:00
Samuele Locatelli c749f10a8a UPdate MON da provare 2022-07-09 13:13:12 +02:00
Samuele Locatelli f2973cb0be Update refresh sincronizzato 2022-07-09 10:30:08 +02:00
Samuele Locatelli 8f2afd8ab5 MON Server / WASM
- fine tuning cache
- test velocità recupero dati
2022-07-09 09:53:21 +02:00
Samuele Locatelli 1d46b75608 Merge branch 'Feature/WASM' into develop 2022-07-08 19:53:00 +02:00
Samuele Locatelli 7c28833874 Update con cache REDIS x non chiamare sempre DB 2022-07-08 19:52:50 +02:00
Samuele Locatelli 1a019f1c72 refresh WASM 2022-07-08 19:51:24 +02:00
Samuele Locatelli cae553c47f Update progetto WASM con inclusione index page 2022-07-08 18:49:32 +02:00
Samuele Locatelli 7634fc42ba Bozza riscrittura WASM applicazione MON 2022-07-08 17:27:08 +02:00
Samuele Locatelli c24935afce WASM
- aggiunta preliminare progetto Web Assembly
2022-07-08 17:05:53 +02:00
Samuele Locatelli 2c4ce635c0 Merge tag 'FixPrerenderMonAndStressTest' into develop
Fix stress test e server prerender
2022-07-08 10:01:41 +02:00
Samuele Locatelli a4b01773ea Merge branch 'release/FixPrerenderMonAndStressTest' 2022-07-08 10:01:33 +02:00
Samuele Locatelli b076148e65 MON:
- Update con log esteso
- evitato server prerender x raddoppio pagina
- test stress (disabilitato)
2022-07-08 10:01:03 +02:00
Samuele Locatelli 02369f87f7 Merge tag 'UpgradeMapoCoreAll' into develop
Upgrade all MAPO-CORE
2022-07-07 18:58:43 +02:00
Samuele Locatelli 4b04feedff Merge branch 'release/UpgradeMapoCoreAll' 2022-07-07 18:58:34 +02:00
Samuele Locatelli e99def8664 Update LAND x refresh pagina 2022-07-07 18:57:34 +02:00
Samuele Locatelli a8744cfc56 Refresh STATS
- page reload
- Nuget upgrade
2022-07-07 18:52:53 +02:00
Samuele Locatelli 03761b81ec Merge tag 'UpgradeMapoMon' into develop
Update mapo MON x verificare reboot da Jetco
2022-07-07 18:49:28 +02:00
Samuele Locatelli dd4f403b7a Merge branch 'release/UpgradeMapoMon' 2022-07-07 18:49:16 +02:00
Samuele Locatelli c7d1ca046c Update/refresh MON:
- cambio logica reload blazor x MON
- update nuget vari
- rimozione warnings
2022-07-07 18:48:33 +02:00
Samuele Locatelli 2c3494f9f0 Merge tag 'UpdateAboutColorCheck' into develop
Update comportamento colori x About page e check licenze
2022-07-06 13:31:10 +02:00
Samuele Locatelli 7dc0aef175 Merge branch 'release/UpdateAboutColorCheck' 2022-07-06 13:30:49 +02:00
Samuele Locatelli e2afe6a586 Update display a + colori x check licenze 2022-07-06 13:30:22 +02:00
Samuele Locatelli e3ed9a7f35 Merge tag 'FixAboutPageError' into develop
Sistemato About page e suo errore x licenze cannate
2022-07-06 10:11:29 +02:00
Samuele Locatelli db003d2bc3 Merge branch 'release/FixAboutPageError' 2022-07-06 10:11:16 +02:00
Samuele Locatelli c203ab6eb3 Fix comportamento pagina About x check licenze 2022-07-06 10:10:50 +02:00
Samuele Locatelli c10633b6f1 Merge branch 'develop' 2022-07-05 10:00:30 +02:00
Samuele Locatelli a9fd0e2f83 Ancora fix sel reparto 2022-07-05 10:00:21 +02:00
Samuele Locatelli 112c73aea1 Merge tag 'FixSelReprtoAndSelEnabled' into develop
Fix: esclusi i gruppi con sel enabled se NON fossero tipo REPARTO
2022-07-05 09:57:19 +02:00
Samuele Locatelli 9e8e885ef9 Merge branch 'release/FixSelReprtoAndSelEnabled' 2022-07-05 09:56:59 +02:00
Samuele Locatelli 1f964ded92 Fix selezione gruppi
- prende SOLO reparto
- escluso gruppi con selEnabled
2022-07-05 09:56:28 +02:00
Samuele Locatelli eeba41cb5c Merge tag 'FixQrCodeJsConsoleLog' into develop
Eliminato console log inutile
2022-07-04 19:14:20 +02:00
Samuele Locatelli c418812ba2 Merge branch 'release/FixQrCodeJsConsoleLog' 2022-07-04 19:14:10 +02:00
Samuele Locatelli 6169d8cfcc Correzione jscript: niente console log 2022-07-04 19:13:28 +02:00
Samuele Locatelli 75596c61bc Merge tag 'FixQrUserDisplay' into develop
Fix comportamento display QrCode user
2022-07-04 19:12:39 +02:00
Samuele Locatelli b51e164c18 Merge branch 'release/FixQrUserDisplay' 2022-07-04 19:12:24 +02:00
Samuele Locatelli c35d625c36 Gestioen QRCode filt
- completata correzione selezione con distinct
- fix join come richeista Gian
2022-07-04 19:11:55 +02:00
Samuele Locatelli c893ce4d44 refresh pagina QR Card utenti 2022-07-04 18:48:58 +02:00
Samuele Locatelli c47fb1787c Aggiunta helper js x qrcode 2022-07-04 18:48:48 +02:00
Samuele Locatelli aca61c24dc Filtro gruppi:
- add componente filtro gruppi
- add meccanismo mesageService
2022-07-04 18:48:37 +02:00
Samuele Locatelli 167c9d89d4 Aggiunto modelli accesso dati x filtro QRCode utenti 2022-07-04 18:48:03 +02:00
Samuele Locatelli 2295f12958 Merge tag 'UpdateDisplayMonOverride' into develop
Update x MONitor: gestione override info x parameti FLog
2022-06-06 16:45:43 +02:00
Samuele Locatelli 9762628abc Merge branch 'release/UpdateDisplayMonOverride' 2022-06-06 16:45:23 +02:00
Samuele Locatelli a7918e1a89 Update con gestione override display da conf JSon 2022-06-06 16:42:49 +02:00
Samuele E. Locatelli 7a8e05462c Da testare: metodi redis da mostrare 2022-06-04 18:09:29 +02:00
Samuele E. Locatelli aaeae6e99e Riorganizzazione classe con CodeMaid 2022-06-04 17:44:37 +02:00
Samuele E. Locatelli 533f3f4f8f Update: spostao da DTO a conf la parte setup IOB + metodi ad avvio class MpDataService 2022-06-04 17:42:03 +02:00
Samuele E. Locatelli 5135987f1b Inizio update x gestione override dati in MON 2022-06-03 19:01:00 +02:00
Samuele Locatelli 458d788a13 Merge tag 'FixDownloadCsvOnDataPager' into develop
Fix gestione download csv da datapager (sparito in refactoring...)
2022-05-23 11:11:51 +02:00
Samuele Locatelli e842228baf Merge branch 'release/FixDownloadCsvOnDataPager' 2022-05-23 11:11:27 +02:00
Samuele Locatelli 25d2ada96e Fix errore eliminazione download csv da datapager 2022-05-23 11:10:04 +02:00
Samuele Locatelli f22933f925 Merge branch 'develop' 2022-05-03 14:49:30 +02:00
Samuele Locatelli 009b5f6452 Update x nuovo installer MON da testare 2022-05-03 14:49:22 +02:00
Samuele Locatelli 94c72b7e11 Merge tag 'FixSetupCssSemaforoAssente' into develop
Correzione mON nuovo: se manca colore semaforo x una macchina si pianta
--> metto nero (tipicamente al setup)
2022-05-02 19:06:09 +02:00
Samuele Locatelli 11a1925660 Merge branch 'release/FixSetupCssSemaforoAssente' 2022-05-02 19:05:10 +02:00
Samuele Locatelli 6ce8386248 Fix x caso colore semaforo assente (es setup iniziale) --> mette NERO 2022-05-02 19:04:26 +02:00
Samuele Locatelli 1739dcf38a Merge tag 'AddCheckLicMapo' into develop
Aggiunto controllo licenze in pagina about
2022-04-26 12:15:35 +02:00
Samuele Locatelli 1a42d581d4 Merge branch 'release/AddCheckLicMapo' 2022-04-26 12:15:22 +02:00
Samuele Locatelli 625433a3af Update visualizzazione licenze x MAPO 2022-04-26 12:14:52 +02:00
Samuele Locatelli 782a01a4b0 UIpdate pagina about x check licenze e server 2022-04-23 09:50:15 +02:00
Samuele Locatelli e65105b305 Merge tag 'FixDeployMaster' into develop
Sistemazione ciclo deploy su Master + fix vers number
2022-04-14 16:53:34 +02:00
Samuele Locatelli 0429ad398a Merge branch 'release/FixDeployMaster' 2022-04-14 16:53:21 +02:00
Samuele Locatelli 268ee1e2e0 Correzione gestione calcolo vers number 2022-04-14 16:52:57 +02:00
Samuele Locatelli d19dc0edb5 Merge tag 'CreatedCoreMON' into develop
Aggiunta progetto CORE MON
2022-04-14 16:29:38 +02:00
Samuele Locatelli bd770dcffb Merge branch 'release/CreatedCoreMON' 2022-04-14 16:29:23 +02:00
Samuele Locatelli d99f2d2144 Update display grafico testi MON 2022-04-14 16:19:42 +02:00
Samuele Locatelli f47cc1f505 Aggiunta dir resources 2022-04-14 14:58:26 +02:00
Samuele Locatelli edad6f24c0 Completato yaml da testare 2022-04-14 14:50:57 +02:00
Samuele Locatelli a296908697 update yaml 2022-04-14 14:46:53 +02:00
Samuele Locatelli 04d0b7e9a2 Proseguo yaml parametrico 2022-04-14 13:13:51 +02:00
Samuele Locatelli 5e6da5faa9 Fix yaml fino a test 2022-04-14 13:05:25 +02:00
Samuele Locatelli 63947b6662 cambio ordine comandi nuget-fix 2022-04-14 12:58:04 +02:00
Samuele Locatelli da39149575 cambio sintassi x nuget proxy fix 2022-04-14 12:56:43 +02:00
Samuele Locatelli 99e6973695 aggiunto nuget v3 2022-04-14 12:52:11 +02:00
Samuele Locatelli 60db6422e8 ancora typo correct 2022-04-14 12:47:35 +02:00
Samuele Locatelli e642d29605 typo 2022-04-14 12:45:24 +02:00
Samuele Locatelli 7a89db055c test cambio modalità nuget restore 2022-04-14 12:44:04 +02:00
Samuele Locatelli 703337fa9a UPdate nuget packages 2022-04-14 12:27:46 +02:00
Samuele Locatelli 54fab44687 correzione step restore sln 2022-04-14 12:18:42 +02:00
Samuele Locatelli 3b2b097626 Update YAML x build mon (e nuild con variabili) 2022-04-14 12:16:13 +02:00
Samuele Locatelli b9a115bb13 Aggiunta profili pubblicazione x MON 2022-04-14 12:15:59 +02:00
Samuele Locatelli 011fbe52d3 Fix display disegno/articolo + fix stile 2022-04-14 09:20:21 +02:00
Samuele Locatelli 84875e5c30 Tolto reload titolo se tanto ricarica pagina ogni 5-10 minuti 2022-04-13 20:12:29 +02:00
Samuele Locatelli 69ce7b5a0b Rimosso delay 2022-04-13 20:09:56 +02:00
Samuele Locatelli 31c142efa4 Completato MON AsIs in BLazor 2022-04-13 20:06:19 +02:00
Samuele Locatelli 116ec93bb6 Correzione display min/sec TCiclo 2022-04-13 17:40:18 +02:00
Samuele Locatelli e5ac829bd8 Completato allineamento a versioen attuale x comportamento blink 2022-04-13 17:26:53 +02:00
Samuele Locatelli 703bae704f Aggiunto reload generale dati ogni 2 sec come attuale 2022-04-13 17:19:52 +02:00
Samuele Locatelli fd63226051 Fix time blink x errore C101 2022-04-13 16:48:47 +02:00
Samuele Locatelli d3e7c224d3 creato componente e spostato li i dati di visualizzazione 2022-04-13 16:00:40 +02:00
Samuele Locatelli dc53a6f439 Ancora update su display 2022-04-13 11:11:01 +02:00
Samuele Locatelli 519c8d2130 Update MON 2022-04-13 10:58:13 +02:00
Samuele Locatelli f28f7ee815 Aggiunto controller al DB di base x MoonPro (no stats) 2022-04-13 08:20:42 +02:00
Samuele Locatelli 1848fef640 Update x predisporre display stato macchina 2022-04-12 17:45:06 +02:00
Samuele Locatelli 48d34590e4 Merge branch 'master' into develop 2022-04-12 17:29:29 +02:00
Samuele Locatelli 25505ad6d5 refresh componenti 2022-04-12 17:29:19 +02:00
Samuele Locatelli 997c870bcc Bozza sito MON in blazor 2022-04-12 17:29:12 +02:00
Samuele Locatelli 8f9ddc738b Merge tag 'UpdateAppName' into develop
Fix calcolo nome app x check licenze LAND
2022-03-29 10:38:32 +02:00
Samuele Locatelli 275b349c99 Merge branch 'release/UpdateAppName' 2022-03-29 10:38:20 +02:00
Samuele Locatelli 2a921eca4f Refresh vari + db DEV 2022-03-29 10:37:55 +02:00
Samuele Locatelli bbf7c78e28 refresh build 2022-03-29 10:37:30 +02:00
Samuele Locatelli 048be7b2c4 Forzata Applicazione = "MAPO" 2022-03-29 10:37:19 +02:00
Samuele Locatelli 3598051cb2 Merge tag 'UpdateReloadAuto' into develop
Modifica _Host x auto reload al rinnovo connessione
2022-02-27 15:55:13 +01:00
Samuele Locatelli dbebd11c14 Merge branch 'release/UpdateReloadAuto' 2022-02-27 15:54:50 +01:00
Samuele Locatelli 8c9027581e Fix comportamento reload pagina x LAND e PROG 2022-02-27 15:54:21 +01:00
Samuele Locatelli 75122f8ee1 Fix comportamento reload pagina x STAT 2022-02-27 15:52:27 +01:00
Samuele Locatelli 04a1f34aba Merge tag 'FixPublishProfiles' into develop
Fix profili di pubblicazione
2022-02-26 18:28:21 +01:00
Samuele Locatelli e458de6f21 Merge branch 'release/FixPublishProfiles' 2022-02-26 18:28:13 +01:00
Samuele Locatelli caadb95c91 ancora update publish profiles 2022-02-26 18:27:54 +01:00
Samuele Locatelli 6cfeea6fac Update profili pubblicazione x IIS01/02/03 2022-02-26 18:27:45 +01:00
Samuele Locatelli 124e6cdf61 Merge tag 'AddDichToUserLog' into develop
Aggiunta catena esecuzioni x mostrare dichiarazioni utente in UserLog
2022-02-26 18:17:04 +01:00
Samuele Locatelli d20767ec7e Merge branch 'release/AddDichToUserLog' 2022-02-26 18:16:48 +01:00
Samuele Locatelli 2e2639b94f COmpletato display x integrazione dichiarazioni operatore 2022-02-26 18:16:21 +01:00
Samuele Locatelli efa11f9452 Merge tag 'FixGraphBaseChartJs' into develop
Completata rimozione Blazorise + grafici nuovi basati su ChartJs
2022-02-26 14:27:42 +01:00
Samuele Locatelli a8fefca15f Merge branch 'release/FixGraphBaseChartJs' 2022-02-26 14:27:24 +01:00
Samuele Locatelli 3e5a36311c completato grafico anche x action: ora si passa a nuova pag 2022-02-26 14:26:56 +01:00
Samuele Locatelli f0fa776829 Fix grafici controlli 2022-02-26 14:18:47 +01:00
Samuele Locatelli a3a8c0ffaf Completato migrazione grafici x scarti 2022-02-26 13:38:45 +01:00
Samuele Locatelli f16d3a3275 udpate line graph 2022-02-26 12:58:27 +01:00
Samuele Locatelli 0e8fa72f36 Fix parametro x validazione input datetime x net6 2022-02-26 12:58:18 +01:00
Samuele Locatelli ac0ef3f62a Bozza visualizzazione linee TRS 2022-02-25 20:58:07 +01:00
Samuele Locatelli 557a9510d6 Fix grafico pareto guasti con componente standard! 2022-02-25 20:19:34 +01:00
Samuele Locatelli 349758a289 Ancora udpate comportamento grafico (aspect ratio) 2022-02-25 19:58:28 +01:00
Samuele Locatelli 5541d0dc83 Ancora update grafici 2022-02-25 18:51:29 +01:00
Samuele Locatelli 0798679629 Demo gestione array colori 2022-02-25 18:25:15 +01:00
Samuele Locatelli 0a26d475f9 Add piechart da raffinare 2022-02-25 12:15:17 +01:00
Samuele Locatelli 8e5a392c8c OK grafico linea non stepped 2022-02-25 11:59:49 +01:00
Samuele Locatelli f0beaaacc8 Fix bar plot vert/horiuz + freq hist test 2022-02-25 11:54:51 +01:00
Samuele Locatelli 0847014108 Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop 2022-02-24 12:09:36 +01:00
Samuele Locatelli d6c226ae1a Spostamento org classi chartJs + nuova opzione horiz chart 2022-02-24 12:09:33 +01:00
marco.locatelli@steamware.net 6d6bf242dd Upgrade a visualizzazione LAND / licenza programmi 2022-02-23 17:52:42 +01:00
Samuele Locatelli b760d4fa1a Update gestione pagina test con grafici 2022-02-22 17:27:38 +01:00
Samuele Locatelli aa65d48f5f Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop 2022-02-22 17:27:23 +01:00
marco.locatelli@steamware.net f1f5287d74 Merge remote-tracking branch 'origin/develop' into develop 2022-02-22 17:19:21 +01:00
marco.locatelli@steamware.net 94d0de796e Fix vista codici QR & Menu 2022-02-22 17:18:14 +01:00
Samuele Locatelli 70901c259b Rename componenti chart di base (da completare) 2022-02-22 16:42:09 +01:00
Samuele Locatelli f22bd910a2 fix pusblish profiles 2022-02-22 16:31:33 +01:00
Samuele Locatelli b85ed12f1c Eliminati (commentati) elementi grafici x fix compilazione 2022-02-22 16:28:20 +01:00
Samuele Locatelli fef6d4ccfc Continuo cleanup da Blazorise's components 2022-02-22 16:24:32 +01:00
Samuele Locatelli e345e61d8a refresh MP.Data 2022-02-22 16:02:35 +01:00
Samuele Locatelli 4d2dc10579 completo refresh progetto MP-PROG 2022-02-22 15:25:23 +01:00
Samuele Locatelli 9c98ee945a refresh MP prog 2022-02-22 15:25:14 +01:00
Samuele Locatelli 01270d6254 fix dotnet5 --> dotnet6 2022-02-22 15:07:51 +01:00
Samuele Locatelli 485cecc1a0 fix text plot 2022-02-21 19:19:53 +01:00
Samuele Locatelli be9cf76253 Merge remote-tracking branch 'origin/develop' into develop 2022-02-21 19:08:54 +01:00
Samuele Locatelli f89dc62a5b OK ripristino grafici di base x STAT 2022-02-21 19:08:50 +01:00
Samuele Locatelli 182d3c82f1 inizio merge gestione Chart senza blazorise 2022-02-21 18:30:44 +01:00
Samuele Locatelli 091d542084 fix client libs x chart 2022-02-21 18:30:21 +01:00
marco.locatelli@steamware.net c92b92b795 Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop 2022-02-21 17:44:44 +01:00
marco.locatelli@steamware.net 80837628ad Completato Fix - vista QR Code 2022-02-21 17:43:50 +01:00
Samuele Locatelli fa0c622c66 Merge remote-tracking branch 'origin/develop' into develop 2022-02-21 16:38:25 +01:00
Samuele Locatelli 7403002350 eliminato riferimento a blazorize bootstrap&fontawesome 2022-02-21 16:38:20 +01:00
Samuele Locatelli aa0aeb1552 aggiunte lib client locali 2022-02-21 16:38:06 +01:00
Samuele Locatelli 3d183abf41 Update progetti a Core6 2022-02-21 16:30:08 +01:00
marco.locatelli@steamware.net ce5e3c45c7 fix in progress - colonne qrcode e menù 2022-02-21 13:19:34 +01:00
Samuele Locatelli 9974cbb8b4 Merge tag 'UpdateLandDownload' into develop
UPdate gestione display + download LAND
2022-02-01 14:30:23 +01:00
Samuele Locatelli 279ef9d302 Merge branch 'release/UpdateLandDownload' 2022-02-01 14:29:56 +01:00
Samuele Locatelli cc21f4b719 Completato fix x download CTrack da elenco... 2022-02-01 12:49:49 +01:00
Samuele Locatelli 98d32300cf Completato test con chiavi licenza OK 2022-02-01 12:43:19 +01:00
Samuele Locatelli a77e88ca88 Update x gestione licenze nuove x MAPO 2022-02-01 12:31:51 +01:00
Samuele Locatelli 0b9211d26a Merge tag 'AddLicenzaOnSysInfo' into develop
Fix visualizzaizone codice licenza in LAND
2021-12-23 15:10:52 +01:00
Samuele Locatelli a6279ca047 Merge branch 'release/AddLicenzaOnSysInfo' 2021-12-23 15:07:47 +01:00
Samuele Locatelli 2cc8da110d Fix lettura dati da DB x licenza 2021-12-23 15:07:15 +01:00
Samuele Locatelli 985e429d34 Modifica x recuperare e msotrare cod licenza 2021-12-23 14:55:19 +01:00
Samuele Locatelli 1b95fa8d91 Update conf json x prod LAND 2021-12-06 11:01:21 +01:00
Samuele Locatelli a9dadb9d9c cleanup 2021-11-25 11:19:16 +01:00
Samuele Locatelli c358bddd36 Upgrade conf e favicon 2021-11-24 15:01:36 +01:00
Samuele Locatelli eca2aaae30 Merge tag 'FixAppSettingsLand' into develop
fix conf json x staging/prod
2021-11-24 14:55:10 +01:00
Samuele Locatelli a1b035c00a Merge branch 'release/FixAppSettingsLand' 2021-11-24 14:55:01 +01:00
Samuele Locatelli d702234b9c refresh 2021-11-24 14:54:34 +01:00
Samuele Locatelli 9d4b93b4ab update conf x prod/staging IIS01/IIS=2 di LAND 2021-11-24 14:54:31 +01:00
Samuele Locatelli 9cc4a5544c Merge branch 'master' into develop 2021-11-12 15:34:39 +01:00
Samuele Locatelli 23455acd67 Merge branch 'develop' 2021-11-12 15:34:22 +01:00
Samuele Locatelli b7bd3d77ad Merge remote-tracking branch 'origin/develop' 2021-11-12 15:34:12 +01:00
Samuele Locatelli 8e235aa282 refresh versione 2021-11-12 15:33:40 +01:00
Samuele Locatelli a3a0f72b02 Merge tag 'MapoLandAppDownloadLimited' into develop
Fix: scaricamento delle SOLE applicazioni effettivamente con licenza
2021-11-12 15:33:25 +01:00
Samuele Locatelli 362c526459 Merge branch 'release/MapoLandAppDownloadLimited' 2021-11-12 15:32:41 +01:00
Samuele Locatelli 46874d42d0 Update pagina download (solo app con licenza e auth) 2021-11-12 15:32:08 +01:00
Samuele Locatelli 39efd30bae Merge tag 'NumSearchTag' into develop
Aggiunta selezione tag ricerca (num char)
2021-10-15 10:46:34 +02:00
Samuele Locatelli b259a94ca8 Merge branch 'release/NumSearchTag' 2021-10-15 10:46:20 +02:00
Samuele Locatelli 4dbf8a6611 Aggiunta configurazione x numero caratteri minimi ricerca TAGS 2021-10-15 10:45:43 +02:00
Samuele Locatelli 7e06abd521 Merge tag 'FixLandOrdering' into develop
Fix LAND ordering
2021-10-13 10:51:47 +02:00
Samuele Locatelli 6c3f35f64b Merge branch 'release/FixLandOrdering' 2021-10-13 10:51:21 +02:00
Samuele Locatelli e21b7b9eee Update LAND x usare ordinamento corretto in display 2021-10-13 10:50:28 +02:00
Samuele Locatelli 7d6bef1a32 Merge tag 'CsvOutputSTATS03' into develop
Fix download page
2021-09-30 19:03:19 +02:00
Samuele Locatelli c297416f6c Merge branch 'release/CsvOutputSTATS03' 2021-09-30 19:01:39 +02:00
Samuele Locatelli 027a0b4b4c update favicon 2021-09-30 19:00:05 +02:00
Samuele Locatelli db5500b3a7 pulizia gitignore 2021-09-30 18:59:09 +02:00
Samuele Locatelli 8947a03e5a Cambio path x download page 2021-09-30 18:58:13 +02:00
Samuele Locatelli 08188ca2a0 Merge tag 'CsvOutputSTATS02' into develop
Fix (hope) path download files csv
2021-09-30 18:55:26 +02:00
Samuele Locatelli f9f3dd56bd Merge branch 'release/CsvOutputSTATS02' 2021-09-30 18:55:15 +02:00
Samuele Locatelli d81f448b08 update e refresh 2021-09-30 18:54:56 +02:00
Samuele Locatelli 1f48aad618 cambio calcolo path x download files 2021-09-30 18:54:42 +02:00
Samuele Locatelli b802a9b914 cambio logget NLog --> ILogger x statsservice 2021-09-30 18:54:31 +02:00
Samuele Locatelli 407308f26f Cambio paradigma db context (con using non static) 2021-09-30 18:54:17 +02:00
Samuele Locatelli 833e55ec20 Merge tag 'CsvOutputSTATS' into develop
Fix output csv x STATS + fix grafico diff x PROG
2021-09-30 16:13:57 +02:00
Samuele Locatelli f6ecbb94f3 Merge branch 'release/CsvOutputSTATS' 2021-09-30 16:13:37 +02:00
Samuele Locatelli d59ad82c87 Update visualizzazione differenze su PROG 2021-09-30 16:13:28 +02:00
Samuele Locatelli 03a3c78176 Aggiunto metodo x avere tutti i record da DB 2021-09-30 15:59:59 +02:00
Samuele Locatelli 9377d704e6 Aggiunto chiamate x export file csv 2021-09-30 15:59:40 +02:00
Samuele Locatelli a1ccaafcc6 Merge tag 'FixDisplayAndOldRev' into develop
Fix display differenze (sempre) + vecchie revisioni selezionabili +
display vari
2021-09-28 15:40:11 +02:00
Samuele Locatelli ab3c3c2122 Merge branch 'release/FixDisplayAndOldRev' 2021-09-28 15:39:52 +02:00
Samuele Locatelli 4468bdabb9 Modifica x gestione file inattivi (vecchie rev) + fix selezioni 2021-09-28 15:39:27 +02:00
Samuele Locatelli f9929d0b73 Modifica x visualizzare SEMPRE le differenze 2021-09-28 15:39:12 +02:00
Samuele Locatelli 226b26be5e Pulizia variabili inutilizzate 2021-09-23 10:02:02 +02:00
Samuele Locatelli 5190b5d62d Merge tag 'v_6.14_unificata' into develop
Fix vers 6.14
2021-09-22 17:40:35 +02:00
Samuele Locatelli 5805a3685a Merge branch 'release/v_6.14_unificata' 2021-09-22 17:40:23 +02:00
Samuele Locatelli f89faccdf4 Merge tag 'v_6.14_unificata' into develop
Fix vers number 6.14
2021-09-22 16:05:07 +02:00
Samuele Locatelli 7c760e5f18 Merge branch 'release/v_6.14_unificata' 2021-09-22 16:04:51 +02:00
Samuele Locatelli 79fa14549c Fix spacing index + refresh installers 2021-09-22 15:55:06 +02:00
Samuele Locatelli 11a4293138 Merge tag 'v_6.14_unificata' into develop
release unificata MAPO
2021-09-22 12:10:56 +02:00
Samuele Locatelli c1c5f2e16e Merge branch 'release/v_6.14_unificata' 2021-09-22 12:10:45 +02:00
Samuele Locatelli faba3fbe60 Fix deploy script x vers number unificato 2021-09-22 12:06:03 +02:00
Samuele Locatelli c911373036 Fix pubblicazione versioni x MP-CORE Land 2021-09-22 11:00:49 +02:00
Samuele Locatelli e9b283b910 Merge branch 'master' into develop 2021-09-21 19:06:21 +02:00
Samuele Locatelli fc20464958 Merge branch 'develop' 2021-09-21 19:06:16 +02:00
Samuele Locatelli 22e02bdd9e refresh vers numb 2021-09-21 19:06:13 +02:00
Samuele Locatelli f0bbeaff26 Refresh version 2021-09-21 19:05:52 +02:00
Samuele Locatelli 7861609072 Fix MP-PROG DB init 2021-09-21 19:05:00 +02:00
Samuele Locatelli c440c86068 Merge branch 'master' into develop 2021-09-21 18:39:06 +02:00
Samuele Locatelli e197245bec Merge branch 'develop' 2021-09-21 18:38:52 +02:00
Samuele Locatelli b316c81b96 Merge branch 'release/AddLandProj' 2021-09-21 18:38:28 +02:00
Samuele Locatelli f8f9b5bbe2 Fix URL e parametri 2021-09-21 18:33:40 +02:00
Samuele Locatelli d312fa1eb2 Fix conf deploy/nexus 2021-09-21 18:24:21 +02:00
Samuele Locatelli 57920f2b59 update conf x staging/dev/prod 2021-09-21 18:23:50 +02:00
Samuele Locatelli 546c8cc92b Merge branch 'feature/LAND-DEPLOY' into develop 2021-09-21 18:13:39 +02:00
Samuele Locatelli c348652291 Sistemato coda compilazione x develop 2021-09-21 18:13:26 +02:00
Samuele Locatelli 93e13da83b splitattato ogni step 2021-09-21 18:09:57 +02:00
Samuele Locatelli e5a611c844 Separato anche build e test 2021-09-21 18:06:51 +02:00
Samuele Locatelli 535cf8ecf2 Test separazione in 3 task deploy 2021-09-21 18:00:49 +02:00
Samuele Locatelli 54b384cb92 aggiunto test stage x feature 2021-09-21 17:55:47 +02:00
Samuele Locatelli 82f6d5a0c7 test deploy feature CI-CD 2021-09-21 17:54:43 +02:00
Samuele Locatelli b4af3bfd61 COmpletato modifica x test nuovo installer 2021-09-21 17:53:52 +02:00
Samuele Locatelli 0cb40dde36 Modifica conf installer Land x profili 2021-09-21 17:53:44 +02:00
Samuele Locatelli f1dc5253b6 Merge branch 'feature/MP-CORE-LAND' into develop 2021-09-21 17:29:29 +02:00
Samuele Locatelli 5c65b5c0e4 Refresh pre revisione installer 2021-09-21 17:29:21 +02:00
Samuele Locatelli 5e15c9f836 Fix reload doppio con reset pagina 1 2021-09-21 17:22:18 +02:00
Samuele Locatelli 15420f605e Aggiunta versione HwSwInfo preliminare 2021-09-21 17:15:23 +02:00
Samuele Locatelli 45c0337fe3 Cleanup 2021-09-21 16:18:15 +02:00
Samuele Locatelli 01ed314319 Ricerca cartellini (fixed) 2021-09-21 16:18:11 +02:00
Samuele Locatelli 77a45dbdc1 Fix Info/About page 2021-09-21 14:30:16 +02:00
Samuele Locatelli 1ac15dd9a0 Merge branch 'feature/MP-CORE-LAND' into develop 2021-09-20 20:36:34 +02:00
Samuele Locatelli abd652b944 Pagina Contacts 2021-09-20 20:36:27 +02:00
Samuele Locatelli 08a761c678 Pagina About 2021-09-20 20:28:31 +02:00
Samuele Locatelli 532862340e Completata review estetica alert download 2021-09-20 20:16:41 +02:00
Samuele Locatelli 97e0224e77 Display Update avanzamento download 2021-09-20 20:03:16 +02:00
Samuele Locatelli c740b4492f abbozzo download 2021-09-20 19:25:37 +02:00
Samuele Locatelli cd01907565 Merge branch 'feature/MP-CORE-LAND' into develop 2021-09-20 19:22:38 +02:00
Samuele Locatelli 4f4cd7bf2f Ok singolo download 2021-09-20 19:21:42 +02:00
Samuele Locatelli 5cdb0e077d Pulizia pagine inutilizzate 2021-09-20 16:53:36 +02:00
Samuele Locatelli 661d2580bc Cambio: home mostrata con componenti 2021-09-20 16:53:00 +02:00
Samuele Locatelli c9d75fc084 COmpletata review QRCode cards 2021-09-20 16:39:07 +02:00
Samuele Locatelli 397be33d04 Refresh 2021-09-20 16:24:54 +02:00
Samuele Locatelli a99406ca76 Fix x elementi non in stampa 2021-09-20 16:24:48 +02:00
Samuele Locatelli d5896b136b Aggiunta lib x qrcode 2021-09-20 16:24:38 +02:00
Samuele Locatelli c980019ca1 Fix modelli 2021-09-20 16:24:21 +02:00
Samuele Locatelli 521edc8f91 Pagina cartellino QR Operatori 2021-09-20 16:24:12 +02:00
Samuele Locatelli d4b8116fc1 Pulizia moduli inutilizzati 2021-09-20 16:23:40 +02:00
Samuele Locatelli f95d426953 review home 2021-09-20 15:20:15 +02:00
Samuele Locatelli cdd12bf764 Fix grafico pagina elenco 2021-09-20 13:15:17 +02:00
Samuele Locatelli 74c13ed1a7 Update display componenti in elenco 2021-09-20 12:43:34 +02:00
Samuele Locatelli 4070c4600f Fix chiamate vocabolario sovrapposte 2021-09-20 11:54:06 +02:00
Samuele Locatelli 3267f6a44d Implementazione vocabolario (sync) 2021-09-20 11:03:52 +02:00
Samuele Locatelli da65188ca9 Update NavMenu 2021-09-18 12:57:15 +02:00
Samuele Locatelli aa15b170be Merge branch 'feature/MP-CORE-LAND' into develop 2021-09-18 12:52:18 +02:00
Samuele Locatelli 8639fbfb9b Update home page LAND vers CORE 2021-09-18 12:52:01 +02:00
Samuele Locatelli 1c3785ee16 Update metodi di base x recupero dati in HOME 2021-09-18 11:57:33 +02:00
Samuele Locatelli 0ead243221 Restore client libs 2021-09-18 11:57:22 +02:00
Samuele Locatelli e4de6dc438 Refresh nuget EFCore 2021-09-18 11:00:44 +02:00
Samuele Locatelli f04d739e7b Prima vers land da completare 2021-09-18 10:55:24 +02:00
Samuele Locatelli 031676d783 Bozza migrazione controller DB 2021-09-17 19:42:03 +02:00
Samuele Locatelli f0419fdf72 Aggiunto pèrogetto CORE LAND x rifare LAND site 2021-09-17 19:14:45 +02:00
Samuele Locatelli 1c11e03d5f Merge tag 'FixNexusUpload' into develop
Fix nexus upload
2021-09-17 17:08:00 +02:00
Samuele Locatelli f7834d362e Merge branch 'release/FixNexusUpload' 2021-09-17 17:07:51 +02:00
Samuele Locatelli afb673bd79 Aggiornamenti x pubblicazione nexus nuovo formato 2021-09-17 17:07:32 +02:00
Samuele Locatelli b08eafe7f4 Merge tag 'FixStatsSlowInit' into develop
Fix caricamento init async x filtro
2021-09-16 17:37:23 +02:00
Samuele Locatelli 587f0accbe Merge branch 'release/FixStatsSlowInit' 2021-09-16 17:37:08 +02:00
Samuele Locatelli 8d57772e35 Merge branch 'feature/CheckStats' into develop 2021-09-16 17:36:39 +02:00
Samuele Locatelli c2464d2b47 COmpletato fix inizializzazione selettore filtro x errore se tarda caricamento 2021-09-16 17:36:30 +02:00
Samuele Locatelli 01adbcb666 Update NuGet EFCore 2021-09-16 17:27:39 +02:00
Samuele Locatelli 1ec0c7d5a9 Update NuGet Elmah 2021-09-16 17:25:39 +02:00
Samuele Locatelli a93d84eea1 update nuget NLog 2021-09-16 17:25:06 +02:00
Samuele Locatelli 88795e5991 Merge tag 'FixDeployNexus' into develop
Fix nexus deploy x zip e allegati
2021-09-16 12:53:09 +02:00
Samuele Locatelli a1486ad04b Merge branch 'release/FixDeployNexus' 2021-09-16 12:52:56 +02:00
Samuele Locatelli 14b808429d Fix NEXUS_PATH x deploy 2021-09-16 12:46:27 +02:00
Samuele Locatelli 4346cb5cca Merge tag 'Debounce' into develop
Fix debounce
2021-09-16 12:38:41 +02:00
Samuele Locatelli ca6eea7f80 Merge branch 'release/Debounce' 2021-09-16 12:38:36 +02:00
Samuele Locatelli 02bcec21ad Merge tag 'Vers_1.1' into develop
Inserimento progetto MP-PROG
2021-09-16 12:36:49 +02:00
Samuele Locatelli ae7213c5a7 Merge branch 'release/Vers_1.1' 2021-09-16 12:36:27 +02:00
Samuele Locatelli 2af0674f1f COmpletato debounce con componente ad hoc 2021-09-16 12:36:11 +02:00
Samuele Locatelli 27100c7d65 Completata search libera (senza debounce da sistemare) 2021-09-16 10:55:09 +02:00
Samuele Locatelli c27b81f506 Fix vari x logging + refresh 2021-09-16 09:08:05 +02:00
Samuele Locatelli 09b3c98199 update recupero vers number 2021-09-15 19:46:02 +02:00
Samuele Locatelli 92fd05d32d ancora correzione yaml 2021-09-15 19:41:00 +02:00
Samuele Locatelli e923a44d99 correzioni yaml 2021-09-15 19:36:07 +02:00
Samuele Locatelli 7cd141f10e http --> https x nexus 2021-09-15 19:30:01 +02:00
Samuele Locatelli 26cbdc88af fix nexus upload (maybe) 2021-09-15 19:28:43 +02:00
Samuele Locatelli 2898dcd433 Fix generazione versioni 2021-09-15 19:10:26 +02:00
Samuele Locatelli 13fc227875 Fix gesitone resources anche x MP-STATS 2021-09-15 19:09:24 +02:00
Samuele Locatelli f5a0b6a3a9 Fix MP.Prog x versNumb 2021-09-15 19:09:15 +02:00
Samuele Locatelli bf1df41d04 Aggiunto script x PostBuild 2021-09-15 18:49:53 +02:00
Samuele Locatelli ad83a7a14a Aggiunta resources in dir locale PROG 2021-09-15 18:49:46 +02:00
Samuele Locatelli 4c1c0bfac7 Fix configurazione DB x startup 2021-09-15 18:36:37 +02:00
Samuele Locatelli b0bfff9d9f Fix conf staging e produzione x DB 2021-09-15 18:30:43 +02:00
Samuele Locatelli 28e548003b Fix deploy x PROG appsettings.staging.json 2021-09-15 18:21:17 +02:00
Samuele Locatelli 0af4a4e488 Merge branch 'feature/DeployProg' into develop 2021-09-15 18:15:24 +02:00
Samuele Locatelli fea8d06a12 test yaml gitlab 2021-09-15 18:09:21 +02:00
Samuele Locatelli 5600427d71 Update file pubblicazione 2021-09-15 18:09:09 +02:00
Samuele Locatelli cf2f9de185 aggiunta publish profile prog 2021-09-15 18:08:53 +02:00
Samuele Locatelli e3f9f534da Introduzione Tag Search 2021-09-15 17:12:05 +02:00
Samuele Locatelli 3932a5330b Merge branch 'feature/SearchReview' into develop 2021-09-15 13:11:40 +02:00
Samuele Locatelli 2a42571375 Aggiunta ricerca "non taggati" 2021-09-15 13:11:19 +02:00
Samuele Locatelli 3aa8341c94 Ricerca x Tag (singolo) 2021-09-15 13:03:23 +02:00
Samuele Locatelli 18596a9168 Ricerca x nome file 2021-09-15 12:51:46 +02:00
Samuele Locatelli 5c49bb6b6a Merge branch 'feature/TagDecodeUpdate' into develop 2021-09-14 19:27:24 +02:00
Samuele Locatelli 3f4f9965e8 Ancora fix procedura decodifica tags 2021-09-14 19:27:16 +02:00
Samuele Locatelli 6fe3925ad8 Avanzamento gestione decodifica tornoss e MTH 2021-09-14 16:43:20 +02:00
Samuele Locatelli 1652697aff Conf x tornos TISIS + MTH 2021-09-14 16:43:08 +02:00
Samuele Locatelli cc9901e5f9 Merge branch 'feature/FilterUpdate' into develop 2021-09-14 13:15:23 +02:00
Samuele Locatelli c4acee1632 UPdate info in refresh ricalcolo 2021-09-14 13:15:14 +02:00
Samuele Locatelli 07a6978e01 Continuo pagina setup x ricalcolo completo archivio 2021-09-14 07:53:08 +02:00
Samuele Locatelli a5e0100cab Fix ricerca con paginazione da DB 2021-09-13 18:15:59 +02:00
Samuele Locatelli 6940a68c0c udpate paginazione dati solo decina apgine correnti 2021-09-13 18:05:43 +02:00
Samuele Locatelli 48ee4dcdae update datamodel file con indici 2021-09-13 18:05:31 +02:00
Samuele Locatelli 758810be12 Modifica comportamento UI x display update 2021-09-13 15:41:21 +02:00
Samuele Locatelli a8416ca3bc Spostato ricalcolo totale in setup 2021-09-13 15:40:49 +02:00
Samuele Locatelli fe279af47b Merge branch 'feature/TagArtDataModelFix' into develop 2021-09-13 11:43:43 +02:00
Samuele Locatelli 461b00dc90 Fix display update caricamento pagina 2021-09-13 11:43:30 +02:00
Samuele Locatelli 66a2fd0923 refresh con pager 2021-09-13 08:46:58 +02:00
Samuele Locatelli 7fb3e35416 Modifica controllo file (con ricerdca ultime modifiche) 2021-09-13 08:46:52 +02:00
Samuele Locatelli 7ce2d0720c Fix componente DataPager 2021-09-13 08:46:32 +02:00
Samuele Locatelli 3ae71e73a8 OK decode biglia 445 (tranne nomi file sbagliati) + fix 446 tags 2021-09-09 17:03:35 +02:00
Samuele Locatelli 60a8d3b8a6 update x step gestione conf serializzata json 2021-09-08 14:53:02 +02:00
Samuele Locatelli 93423b93b5 Cambio datamodel macchina x gestione ruoli json conf 2021-09-08 14:52:51 +02:00
Samuele Locatelli 08703a9593 Creato classe x parametrizzare gest TAGS 2021-09-08 13:28:48 +02:00
Samuele Locatelli 7633bf5040 Ok x importare maggioranza tags 2021-09-08 12:33:11 +02:00
Samuele Locatelli 8b3fa36524 Ancora update in import Tags 2021-09-08 11:00:34 +02:00
Samuele Locatelli 0f2013c75f Ok ricerca preliminare tags da file 2021-09-08 10:41:23 +02:00
Samuele Locatelli 82736ca983 update x nuova gestione senza articolo 2021-09-08 09:32:11 +02:00
Samuele Locatelli 9dfa8d2de5 Eliminaizone articolo da struttura DB 2021-09-08 09:32:04 +02:00
Samuele Locatelli 4377e1236c review migrazioni 2021-09-08 09:31:53 +02:00
Samuele Locatelli 1b9590e1eb Merge branch 'feature/GestUpdateMod' into develop 2021-09-07 19:17:41 +02:00
Samuele Locatelli 630f381674 COmpletato comportamento editing accetta/rifiuta 2021-09-07 19:17:32 +02:00
Samuele Locatelli a387d9cd77 Componente differ inserito ed aggiornato 2021-09-07 18:03:35 +02:00
Samuele Locatelli 0e2030ba9e Fix verifica modifica file 2021-09-07 14:22:30 +02:00
Samuele Locatelli 30172c3bfc Fix comportamento selezione attributo status file 2021-09-07 14:22:24 +02:00
Samuele Locatelli 98b9a83491 Update datamodel 2021-09-07 13:28:06 +02:00
Samuele Locatelli e5d6f579f4 refresh archive page 2021-09-07 12:03:09 +02:00
Samuele Locatelli 607e096609 modifica (importante) modallo dati x tags + MD% check 2021-09-07 12:03:01 +02:00
Samuele Locatelli 68b9cd4d78 Abbozzato controllo x filtraggio dati ricerca articoli 2021-09-06 18:34:38 +02:00
Samuele Locatelli c783a2d959 Aggiunta preliminare editor contenuto file 2021-09-06 15:40:58 +02:00
Samuele Locatelli 81430d9b27 refresh 2021-09-06 15:05:01 +02:00
Samuele Locatelli 44f148d41b Ancora update gestione editing file 2021-09-06 15:04:56 +02:00
Samuele Locatelli 13c7bb688c Inizio aggiunta controller editing file 2021-09-06 15:04:39 +02:00
Samuele Locatelli 54526335aa Merge branch 'feature/ArchivioFilePage' into develop 2021-09-03 18:31:08 +02:00
Samuele Locatelli d2300036db COmpletata visualizzazione ArchivioFilePage 2021-09-03 18:31:00 +02:00
Samuele Locatelli 7c80e1aaaf Prima versione caricamento dati NUOVI da filesystem 2021-09-03 18:01:58 +02:00
Samuele Locatelli 50ed15b0ca Update migrazione DB x size file 2021-09-03 18:01:45 +02:00
Samuele Locatelli 4d9563c4b7 Refresh 2021-09-03 16:30:38 +02:00
Samuele Locatelli b53ee95d24 Merge branch 'feature/MP.DataModelCreation' into develop 2021-09-03 16:30:04 +02:00
Samuele Locatelli b1fef48b1c Completata prima integrazione lettura dati dal DB 2021-09-03 16:29:55 +02:00
Samuele Locatelli 17ca3eee8e Fix init DB 2021-09-03 14:58:55 +02:00
Samuele Locatelli e54a77d85d Fix prima navigazione home/archivio programmi 2021-09-03 14:32:24 +02:00
Samuele Locatelli 4f62986402 Integrazione dati x archivio file 2021-09-03 13:24:02 +02:00
Samuele Locatelli 3993f8dc02 Update progetto e main layout 2021-09-03 11:49:34 +02:00
Samuele Locatelli 5e7d966a93 Fix model + migration x DB 2021-09-03 11:49:06 +02:00
Samuele Locatelli 4e64ddb80b refresh progetto 2021-09-03 11:17:15 +02:00
Samuele Locatelli 6e9e89cc85 Update modelli dati 2021-09-03 11:17:06 +02:00
Samuele Locatelli a6617038f7 Merge branch 'feature/MP.ProgManager' into develop 2021-09-02 18:37:20 +02:00
Samuele Locatelli ad2a56c486 Chiudo con implementazione modello dati 2021-09-02 18:37:11 +02:00
Samuele Locatelli 5099bdb1a4 refresh nuget 2021-09-02 18:18:46 +02:00
Samuele Locatelli e7ec7bab2f conf file json vari 2021-09-02 18:18:41 +02:00
Samuele Locatelli b8c7d3236b update librerie client 2021-09-02 18:18:33 +02:00
Samuele Locatelli 98c14b5f06 Update ed aggiunta preliminare componenti 2021-09-02 18:07:46 +02:00
Samuele Locatelli 7f4457783c Aggiunta preliminare progetto MP.Prog 2021-09-02 17:52:56 +02:00
Samuele Locatelli 195bb78554 Merge tag 'FixCICD' into develop
Fix tag win x build dei 2 nuovi runners
2021-09-02 12:52:43 +02:00
Samuele Locatelli 6d999f9eed Merge branch 'release/FixCICD' 2021-09-02 12:52:33 +02:00
Samuele Locatelli 9b4fa9f7f7 Refresh yaml gitalb x tag win 2021-09-02 12:52:01 +02:00
Samuele Locatelli 7785c4650e Merge tag 'ExportCsv' into develop
Completamento revisione export CSV
2021-07-02 19:20:43 +02:00
Samuele Locatelli 0e0269d8d7 Merge branch 'release/ExportCsv' 2021-07-02 19:20:20 +02:00
Samuele Locatelli 7864ec708d Merge branch 'feature/fixVisuals' into develop 2021-07-02 19:19:42 +02:00
Samuele Locatelli 355fa9e246 update note csv/xlsx + fix typo OEE 2021-07-02 19:19:36 +02:00
Samuele Locatelli e304c08e37 Refresh naming 2021-07-02 19:17:07 +02:00
Samuele Locatelli ed6d3d68f3 refresh gitignore 2021-07-02 19:07:00 +02:00
Samuele Locatelli a69100ad47 update gitignore 2021-07-02 19:06:25 +02:00
Samuele Locatelli 55b639c644 rimosso file 2021-07-02 19:06:18 +02:00
Samuele Locatelli 122b98a757 Ok gestione completa prime 2 pagine.. inizio refactor 2021-07-02 19:05:05 +02:00
Samuele Locatelli 595a09e0af Ok download anche del file x ODL 2021-07-02 18:56:40 +02:00
Samuele Locatelli ff2114a1e3 Bozza export data in CSV funzionante (da rivedere) 2021-07-02 18:23:18 +02:00
Samuele Locatelli e7c831d9a2 Fix scarti/rilav in ODL 2021-07-02 12:12:22 +02:00
Samuele Locatelli 54e62e59f0 Fix pagina OEE 2021-07-02 12:11:14 +02:00
Samuele Locatelli c35fd8b77e Merge branch 'develop' 2021-06-28 14:55:59 +02:00
Samuele Locatelli e9b18f8734 refresh vers 2021-06-28 14:55:53 +02:00
Samuele Locatelli 453ce2df39 Update modello QEE: calcolo durata turno variabile x calcolo OEE 2021-06-28 14:55:15 +02:00
Samuele Locatelli eecd7c2468 Merge branch 'develop' 2021-06-24 10:01:52 +02:00
Samuele Locatelli 8ac6ac5d17 Update filtro commesse con groupby 2021-06-24 10:01:26 +02:00
Samuele Locatelli d1be815f1f Update x fix filtraggio ODL --> v_UI_ODL 2021-06-24 09:42:12 +02:00
Samuele Locatelli b7f67488b2 Pulizia yaml install 2021-06-23 14:46:09 +02:00
Samuele Locatelli b5f5e1381a Merge tag 'FixDisplay_Durate_Articoli' into develop
Sistemate durate (display HH:mm:ss) + descrizione articoli
2021-06-23 13:16:54 +02:00
Samuele Locatelli 09822de144 Merge branch 'release/FixDisplay_Durate_Articoli' 2021-06-23 13:16:30 +02:00
Samuele Locatelli 13be2d8e40 refresh generalizzati 2021-06-23 13:15:38 +02:00
Samuele Locatelli e0505f4882 Omogenizzazione display pagine x durate, descr articolo, ... 2021-06-23 13:15:30 +02:00
Samuele Locatelli 45bf40496e metodi x calcolo hh-mm-ss da durate 2021-06-23 13:15:13 +02:00
Samuele Locatelli 9f8a452e40 Refresh modello dati x nuovi campi 2021-06-23 13:15:00 +02:00
Samuele Locatelli 27fd7d3b24 fix yaml 2021-06-21 18:28:46 +02:00
Samuele Locatelli eee46493c2 REFRESH 2021-06-21 18:20:30 +02:00
Samuele Locatelli 58823ab6ac Merge tag 'FixPagination' into develop
Inserita gestione paginazione per pagina DDB
2021-06-19 15:33:38 +02:00
Samuele Locatelli 8ab2255458 Merge branch 'release/FixPagination' 2021-06-19 15:33:14 +02:00
Samuele Locatelli 94190d0531 Merge branch 'feature/ReviewPaginazioneDDB' into develop 2021-06-19 14:35:12 +02:00
Samuele Locatelli fb92e08e53 Completata prima ottimizzazione caricamento dati paginato 2021-06-19 14:35:04 +02:00
Samuele Locatelli c8389f37b8 implementazione metodi paginati 2021-06-19 14:18:38 +02:00
Samuele Locatelli f1ddde0ff4 review struttura recupero dati da SQL paginati 2021-06-19 14:18:30 +02:00
Samuele Locatelli 560c0c400f start refresh 2021-06-19 14:18:13 +02:00
Samuele Locatelli 0e2a7907fa cambio parametro publish 2021-06-17 17:30:46 +02:00
Samuele Locatelli 15825cfb2d update path publish 2021-06-17 16:58:35 +02:00
Samuele Locatelli f40f9309a8 Merge branch 'develop' 2021-06-17 16:56:44 +02:00
Samuele Locatelli f81adbee29 provo modifiche x deploy su nexus 2021-06-17 16:56:16 +02:00
Samuele Locatelli d4c65cc8eb Merge remote-tracking branch 'origin/develop' into develop 2021-06-17 16:08:11 +02:00
Samuele Locatelli 2c50e8d762 nuovo ciclo yml da testare x MP-STATS su nexus 2021-06-17 16:07:41 +02:00
Samuele E. Locatelli ae655bebce Merge branch 'develop' 2021-06-15 18:57:52 +02:00
Samuele E. Locatelli d677d94cdc refresh 2021-06-15 18:57:45 +02:00
Samuele E. Locatelli c0f858335a Fix durata --> durata periodo 2021-06-15 18:57:40 +02:00
Samuele Locatelli f394827b10 fix inizio stato/inizio periodo 2021-06-15 10:43:50 +02:00
Samuele Locatelli 4652a92d42 update pagina dettaglio 2021-06-07 19:52:44 +02:00
Samuele Locatelli 3f5a8a0f05 Merge branch 'master' into develop 2021-06-03 10:32:54 +02:00
Samuele Locatelli 1fd7860e43 Fix init charts (si vedono da subito) 2021-06-03 10:32:42 +02:00
Samuele Locatelli efba20a614 Corrrezione yml 2021-05-27 14:34:53 +02:00
Samuele Locatelli 01ff6d7b32 Merge tag 'FullCiCd' into develop
Completata modifica CI/CD e testing x deploy su NEXUS
2021-05-27 14:32:41 +02:00
Samuele Locatelli 10e03c2c44 Merge branch 'release/FullCiCd' 2021-05-27 14:32:23 +02:00
Samuele Locatelli 4f31c0d62c Correzione path con "0" 2021-05-27 14:31:16 +02:00
Samuele Locatelli cfa522e6f8 Update default path x avere primo risultato 2021-05-27 13:32:04 +02:00
Samuele Locatelli 8fb10ea4d8 Update x pubblicazione su area _LATEST 2021-05-27 13:19:14 +02:00
Samuele Locatelli 8066f3b231 correzione x upload versioni storicizzate 2021-05-27 13:07:01 +02:00
Samuele Locatelli 4b4c2ac41c Update stage nexus upload 2021-05-27 12:49:56 +02:00
Samuele Locatelli f5bc1719db Altro test rilascio nexus 2021-05-27 12:29:18 +02:00
Samuele Locatelli 60780aa5c9 Modifica x copia ANCHE dei file x versione 2021-05-27 12:16:23 +02:00
Samuele Locatelli 57d9a0a6f7 fix filename (maybe) su nexus 2021-05-27 12:01:55 +02:00
Samuele Locatelli af0d71c915 Aggiunta copia foreach ricorsiva 2021-05-27 11:31:53 +02:00
Samuele Locatelli cb93b7a48f correzione fase pack + invio 2021-05-27 11:21:59 +02:00
Samuele Locatelli 36201de782 Cambio script pubblicazione zip package 2021-05-27 11:17:22 +02:00
Samuele Locatelli 551149f3d0 Modifica ciclo pubblicazione/zip/caricamento 2021-05-27 10:22:39 +02:00
Samuele Locatelli 732063abcb typo fix 2021-05-27 10:03:31 +02:00
Samuele Locatelli 788b865ccf Bozza gestione upload su nexus da provare 2021-05-27 09:58:34 +02:00
Samuele Locatelli 1b08de2be9 inizio bozza ultimo step (nexus) 2021-05-26 20:51:32 +02:00
Samuele Locatelli 05e15b6a9c Merge tag 'Vers_1.0' into develop
Versione Iniziale MP.STATS con CI/CD
2021-05-26 20:46:16 +02:00
Samuele Locatelli cb921f4a72 Merge branch 'release/Vers_1.0' 2021-05-26 20:45:54 +02:00
Samuele Locatelli a840b465e1 Merge branch 'feature/Deploy_CI_CD' into develop 2021-05-26 20:43:23 +02:00
Samuele Locatelli cc6659b0a8 aggiunta steps installaizone 2021-05-26 20:42:34 +02:00
Samuele Locatelli f6d4880308 update vers number x test deploy 2021-05-26 20:33:09 +02:00
Samuele Locatelli f512067457 ancora test x deploy 2021-05-26 20:30:37 +02:00
Samuele Locatelli 9aef411c5b ancora modifiche comando pubblicazione 2021-05-26 20:28:01 +02:00
Samuele Locatelli 8ac1fbb721 refresh launch json 2021-05-26 20:26:14 +02:00
Samuele Locatelli 02c16b71e2 cambio sintassi pubblicazione 2021-05-26 20:25:00 +02:00
Samuele Locatelli cd98fb6a7e update syntax yml 2021-05-26 20:20:42 +02:00
Samuele Locatelli f391c7abd8 cambio dipendenze compilazione 2021-05-26 20:19:11 +02:00
Samuele Locatelli 774ef6a68b refresh + test yml x staging build 2021-05-26 20:18:44 +02:00
Samuele Locatelli bdca17ebf0 Fix padding grafici 2021-05-26 19:47:29 +02:00
Samuele Locatelli bb08548f7c pulizia 2021-05-26 19:43:12 +02:00
Samuele Locatelli 84672fbd7d Aggiunto logging e misura tempi recupero dati 2021-05-26 19:43:08 +02:00
Samuele Locatelli 7139e722ca Aggiunto stage needs x precedenze 2021-05-25 19:45:35 +02:00
Samuele Locatelli c32240653b fix yml indent 2021-05-25 19:42:20 +02:00
Samuele Locatelli 4b526ad4d8 Update script versione 2021-05-25 19:37:28 +02:00
Samuele Locatelli e786a10511 modifica posizione pubblicazione file 2021-05-25 18:53:41 +02:00
Samuele Locatelli c6fcebcd75 correzione ramo x release 2021-05-25 18:44:46 +02:00
Samuele Locatelli aa94b5904a Aggiunta fase di release (test preliminare) 2021-05-25 18:41:51 +02:00
Samuele Locatelli 43d5069f42 Aggiunta fase test x CI/CD 2021-05-25 18:38:25 +02:00
Samuele Locatelli 56a02fe574 primo commit CI-CD 2021-05-25 18:22:02 +02:00
Samuele Locatelli 3491974cb7 Update config, funziona... 2021-05-25 18:12:32 +02:00
Samuele Locatelli 95914aa9f7 Aggiunta elmah nel progetto (in RAM) 2021-05-25 16:42:13 +02:00
Samuele Locatelli b7cba4236c fix async diario 2021-05-25 16:42:04 +02:00
Samuele Locatelli 0938c77d39 update profilo IIS01 x testing 2021-05-25 16:41:51 +02:00
Samuele Locatelli e32bcca1ce Aggiunta profili compilazione 2021-05-25 16:41:42 +02:00
Samuele Locatelli 5eb9192a41 update deploy script 2021-05-25 13:05:46 +02:00
Samuele Locatelli a88a06bbcf Conf script x staging e prod (da testare) 2021-05-25 12:22:18 +02:00
Samuele Locatelli 53d7de1ec8 bozza script installazione 2021-05-25 12:22:05 +02:00
Samuele Locatelli b74b55ded8 Merge branch 'feature/ExtendCharts' into develop 2021-05-24 18:49:42 +02:00
Samuele Locatelli 74af622b88 Aggiunto grafico OEE 2021-05-24 18:44:31 +02:00
Samuele Locatelli 251e98afbf Inizio customizzaizone grafici OEE 2021-05-24 18:32:49 +02:00
Samuele Locatelli 965eb3a842 Update selezione x poter disattivare le COMMESSE 2021-05-24 18:29:28 +02:00
Samuele Locatelli a909f5624a Completato vista UAL 2021-05-24 18:23:19 +02:00
Samuele Locatelli ad65ff417e Inizio chart userLog 2021-05-24 18:05:34 +02:00
Samuele Locatelli 83aff89211 update compilazione WSL & Console 2021-05-24 18:03:42 +02:00
Samuele Locatelli a658d7cf6f update model OEE 2021-05-24 18:03:22 +02:00
Samuele Locatelli 62055c60bd Fix comportamento button Charts 2021-05-24 18:03:10 +02:00
Samuele Locatelli cfe3edda0a OK, charting controlli 2021-05-24 16:46:05 +02:00
Samuele Locatelli d67744eccd ancora fix scarti 2021-05-24 16:35:50 +02:00
Samuele Locatelli 4271f611b6 Fix naming dati chart scarti 2021-05-24 16:35:39 +02:00
Samuele Locatelli 886d0a0135 Ok display chart x registro scarti, continuo... 2021-05-24 12:28:28 +02:00
Samuele Locatelli caf77e316b Correzione invio multiplo dati sul cambio pagina 2021-05-24 12:23:27 +02:00
Samuele Locatelli 360da3b658 MOdifica puntamento DataPager con parametri 2021-05-24 12:03:12 +02:00
Samuele Locatelli 6ba7b7d842 Merge branch 'feature/AddCharting' into develop 2021-05-24 11:12:16 +02:00
Samuele Locatelli 4026142b12 Eliminazione errore doppio plot (check null list) 2021-05-24 11:12:03 +02:00
Samuele Locatelli fe1153fd69 Ok scrolling elenco causali guasto 2021-05-24 10:31:46 +02:00
Samuele Locatelli 0ea29f61d4 refresh gestione scarti 2021-05-24 10:23:57 +02:00
Samuele Locatelli fb451384d2 Pulizia metodi pareto non utilizzati 2021-05-24 10:23:50 +02:00
Samuele Locatelli 51e54796ae fix spazi filtro 2021-05-24 09:48:02 +02:00
Samuele Locatelli e57755af2f Completata gestione filtro show/hide charts 2021-05-24 09:47:51 +02:00
Samuele E. Locatelli 567a0e3375 Group by giornaliero, da inserire date "vuote" 2021-05-22 17:37:18 +02:00
Samuele E. Locatelli dddeff9dff ok x stepped 2021-05-22 17:31:05 +02:00
Samuele E. Locatelli 9880ef3d75 update grafico come stepped line 2021-05-22 17:27:58 +02:00
Samuele E. Locatelli a961542d40 Abbozzato grafico a linea 2021-05-22 17:04:48 +02:00
Samuele E. Locatelli 04c6d0a317 ok ciclo colori 2021-05-22 16:56:27 +02:00
Samuele E. Locatelli 39d1eddb20 calcolo al volo dati x charting 2021-05-22 16:34:22 +02:00
Samuele E. Locatelli 2e9a774a47 Divisione codice/layout x chart scarti 2021-05-22 16:21:40 +02:00
Samuele E. Locatelli 42d93a1466 inizio gestione refresh chart on refilter 2021-05-22 15:26:51 +02:00
Samuele E. Locatelli 8a190f3da9 corretto recupero dati x scarti (pareto) 2021-05-22 14:33:33 +02:00
Samuele Locatelli 7c8040b441 Abbozzato recupero dati scarti 2021-05-22 12:42:30 +02:00
Samuele Locatelli a13a6832c6 Fix comportamento filtri dettaglio 2021-05-22 12:07:32 +02:00
Samuele Locatelli 9a6fe6773b Merge branch 'feature/ReviewLayoutHeader' into develop 2021-05-22 12:03:28 +02:00
Samuele Locatelli f8d2cc88b4 Update pagine x spostare filtro in header 2021-05-22 12:03:19 +02:00
Samuele Locatelli d6f2dfa96b Update layout filtro selezione 2021-05-22 12:03:03 +02:00
Samuele Locatelli 31182eb0fe Merge branch 'feature/ReviewLayoutHeader' into develop 2021-05-22 11:54:39 +02:00
Samuele Locatelli 6121255759 fix pagine x headers 2021-05-22 11:54:29 +02:00
Samuele Locatelli ddbba0e90e bozza gestione detail/jump oee 2021-05-22 11:54:20 +02:00
Samuele Locatelli 4ea64ea7d5 aggiunto valorie gestione messageservice 2021-05-22 11:54:08 +02:00
Samuele Locatelli 1a475550dc Merge branch 'feature/ReviewFiltering' into develop 2021-05-21 19:53:17 +02:00
Samuele Locatelli d03265321d OK anche filtro commessa 2021-05-21 19:53:05 +02:00
Samuele Locatelli 49241006b7 Ok modello prefiltraggio ddl x articoli 2021-05-21 19:39:18 +02:00
Samuele Locatelli e8d2afe273 Commentata selezione dettaglio OEE (temporaneamente) x sviluppo autocomplete 2021-05-21 17:46:51 +02:00
Samuele Locatelli ae625b5933 OK reset filtraggio 2021-05-21 17:41:53 +02:00
Samuele Locatelli 356cebf38e Modifica messaggio loading/no record in pagine 2021-05-21 17:29:23 +02:00
Samuele Locatelli 9bada60148 code cleanup 2021-05-21 16:59:31 +02:00
Samuele Locatelli d699b46e2d Completato aggancio filtri navigazione 2021-05-21 16:58:44 +02:00
Samuele Locatelli 9f077ad038 OK salvataggio filtri per componenti in modo separato prime pagine 2021-05-21 16:53:50 +02:00
Samuele Locatelli 8224d2765a OK filtro OEE --> CONTROLLI (da perfezionare grafica dettaglio) 2021-05-21 16:33:09 +02:00
Samuele Locatelli 4984fb8f39 Merge branch 'feature/ExtendCache' into develop 2021-05-21 14:48:08 +02:00
Samuele Locatelli 9c34eaa71c Update pagina UserLog 2021-05-21 14:47:01 +02:00
Samuele Locatelli 68c2e290ac Update pagina Scarti 2021-05-21 14:42:28 +02:00
Samuele Locatelli 8d169e011c conversione pagina Controlli 2021-05-21 14:35:30 +02:00
Samuele Locatelli 709e8c0ec7 fix grafici 2021-05-21 14:33:19 +02:00
Samuele Locatelli 2952046ae2 COmpletata review pagiazione 2021-05-21 13:38:10 +02:00
Samuele Locatelli 61db2f33e5 update pager con avanzamento random 2021-05-21 13:17:19 +02:00
Samuele Locatelli 50079ddb37 INSERIMENTO SERVIZIO TIMER (DA APPROFONDIRE) 2021-05-21 13:17:12 +02:00
Samuele Locatelli 229980b548 fix display 2021-05-21 08:11:33 +02:00
Samuele Locatelli e264ed05ea Cambio display datapager 2021-05-21 08:10:34 +02:00
Samuele Locatelli 1250367228 Fix display x diario 2021-05-20 19:38:27 +02:00
Samuele Locatelli 0e974c868d Fix doppio filtro diario... 2021-05-20 19:35:55 +02:00
Samuele Locatelli b5ab8f7302 Fix paginatore sul cambio pagina 2021-05-20 19:34:21 +02:00
Samuele Locatelli 728feeab66 Aggiunta apgiona diario a cache 2021-05-20 19:22:05 +02:00
Samuele Locatelli ad2a821a58 Merge branch 'feature/RedisCache' into develop 2021-05-20 19:12:29 +02:00
Samuele Locatelli 5c06e2258f Ok cache e filtro nuovi 2021-05-20 19:12:09 +02:00
Samuele Locatelli 47af4a2a86 Report ODL sotto cache redis e filtro! 2021-05-20 19:07:52 +02:00
Samuele Locatelli de187a5c83 Ok elemento paginazione e loading in reload 2021-05-20 18:28:03 +02:00
Samuele Locatelli b051d3e330 Ok pagina OEE, da estendere... 2021-05-20 18:22:53 +02:00
Samuele Locatelli eeb5e12bf0 Cache management refinement 2021-05-20 18:08:55 +02:00
Samuele Locatelli b826a6759a COmpletata riorganizzazione cache x OEE 2021-05-20 15:56:48 +02:00
Samuele Locatelli 29e4862e41 Primo prototipo OEE con cache funzionante 2021-05-20 15:33:57 +02:00
Samuele Locatelli ce77f20b68 Errore tipo async/await da debuggare.. 2021-05-20 12:40:46 +02:00
Samuele Locatelli 70369312b3 Install redis cache, nuget! 2021-05-20 12:21:43 +02:00
Samuele Locatelli 8392cd760c Merge branch 'feature/PaginaOEE' into develop 2021-05-20 12:20:50 +02:00
Samuele Locatelli 80705cb480 Fix display % x OEE 2021-05-20 12:20:40 +02:00
Samuele Locatelli dba6ab60ab Update visualizzazione OEE (da DB) 2021-05-20 12:08:03 +02:00
Samuele Locatelli 1121f0f3da Prima vers pagina OEE 2021-05-20 12:04:12 +02:00
Samuele Locatelli bbe18f38d6 update controlli recupero dati OEE 2021-05-20 12:04:06 +02:00
Samuele Locatelli 081a4792ba Completato calcoli OEE 2021-05-20 12:03:58 +02:00
Samuele Locatelli 7f3d789f2a Aggiunta classi x nuove estrazioni 2021-05-20 11:27:06 +02:00
Samuele Locatelli 52c263090b link pagina OEE 2021-05-20 08:04:48 +02:00
Samuele Locatelli c011f73bd8 Merge branch 'feature/Paginazione' into develop 2021-05-19 19:25:22 +02:00
Samuele Locatelli 03477da51a Update pagina ReportODL 2021-05-19 19:25:13 +02:00
Samuele Locatelli 0fdedd6884 Update pagina Diario 2021-05-19 19:22:54 +02:00
Samuele Locatelli 548e050094 Update pagina UserLog 2021-05-19 19:07:02 +02:00
Samuele Locatelli abdd9d9e39 Update pagina controlli 2021-05-19 19:02:33 +02:00
Samuele Locatelli e016aeaf02 Update scarti x nuovo datapager 2021-05-19 18:48:24 +02:00
Samuele Locatelli a758b0f95e Nuovo controllo DataPager 2021-05-19 18:48:15 +02:00
Samuele Locatelli f05f7b99c7 Merge branch 'feature/AddCharts' into develop 2021-05-19 17:49:26 +02:00
Samuele Locatelli 7487efb724 Inizio review paginazione 2021-05-19 17:49:19 +02:00
Samuele Locatelli f1c5d18d15 Completato pagina Test x grafici (da rivedere) 2021-05-19 17:48:09 +02:00
Samuele Locatelli 5c1ce470a7 Test page x chats 2021-05-19 12:27:09 +02:00
Samuele Locatelli 1e46acdfcc Aggiunta Blazorise components 2021-05-19 12:26:57 +02:00
Samuele Locatelli 3acecefa1a Bozza modifica x ricerca in Controlli.Note 2021-05-18 19:56:07 +02:00
Samuele Locatelli 8a980ead25 Merge branch 'feature/AddFilterOnDDB' into develop 2021-05-18 19:48:09 +02:00
Samuele Locatelli bca047742e Fix nomi pagine 2021-05-18 19:47:58 +02:00
Samuele Locatelli 4e43f39ba7 Add filtro in Diario (non connesso) 2021-05-18 19:47:48 +02:00
Samuele Locatelli 3c674fffbb Add filtro in report ODL (non connesso) 2021-05-18 19:47:38 +02:00
Samuele Locatelli 546a58750d Merge branch 'feature/AddBaseList' into develop 2021-05-18 19:34:07 +02:00
Samuele Locatelli 4a1dc5e1c7 Merge branch 'feature/CleanUpUnused' into develop 2021-05-18 19:33:48 +02:00
Samuele Locatelli 1a97e78665 cleanup Startup 2021-05-18 19:33:41 +02:00
Samuele Locatelli 7a32377ed3 rimozione pagina counter 2021-05-18 19:32:48 +02:00
Samuele Locatelli 38bf4b95e7 rimozione pagina fetchData 2021-05-18 19:32:27 +02:00
Samuele Locatelli 79eb24c1dc Eliminazione oggetti weather forecast in Data 2021-05-18 19:32:05 +02:00
Samuele Locatelli 9612d977f8 Aggiunta metodi search in MpStatService 2021-05-18 19:31:18 +02:00
Samuele Locatelli 050b9a9d4c Aggiunta metodi in controller 2021-05-18 19:29:39 +02:00
Samuele Locatelli 2730752df3 Aggiunta modelli e DbSet Articoli e Macchine 2021-05-18 19:26:49 +02:00
Samuele Locatelli 14a807e444 Merge branch 'feature/InsertSearch' into develop 2021-05-18 19:02:27 +02:00
Samuele Locatelli f84b42e101 update UserLog con ricerca 2021-05-18 19:02:21 +02:00
Samuele Locatelli 49b9ff4d07 update controlli con ricerca 2021-05-18 19:02:14 +02:00
Samuele Locatelli 70735a9970 update metodi x impiegare stored 2021-05-18 19:02:05 +02:00
Samuele Locatelli aac8c11585 Fix gestione scarti x init 2021-05-18 19:01:51 +02:00
Samuele Locatelli 1649cdd55e Merge branch 'feature/PaginaODL' into develop 2021-05-18 18:38:41 +02:00
Samuele Locatelli 91e29d0be1 Aggancio filtro x keyrichiesta 2021-05-18 18:15:35 +02:00
Samuele Locatelli bac6441fed Update pagina scarti con filtro 2021-05-18 18:06:04 +02:00
Samuele Locatelli b344b1fd0d Aggiunta preliminare componente selezione filtro 2021-05-18 18:05:55 +02:00
Samuele Locatelli 1d9ac27f6e Bozza ODL 2021-05-18 12:21:06 +02:00
Samuele Locatelli 74fe9e73d3 Merge branch 'feature/DiarioProduzione' into develop 2021-05-17 19:55:20 +02:00
Samuele Locatelli e31d71b4c0 Prima bozza corretta display durata DDB 2021-05-17 19:55:08 +02:00
Samuele Locatelli f7e19dcf9d Bozza pagina DDB 2021-05-17 19:46:29 +02:00
Samuele Locatelli 84a769cfcf Bozza gestione DDB 2021-05-17 19:28:41 +02:00
Samuele Locatelli 48fe831208 Renaming action(s) 2021-05-17 19:28:36 +02:00
Samuele Locatelli cf5f43f2e7 Bozza pagine diario produzione 2021-05-17 19:07:59 +02:00
Samuele Locatelli 046d428d90 Merge branch 'feature/FixScartiUlTemplate' into develop 2021-05-17 19:02:27 +02:00
Samuele Locatelli 060cc55717 udpate publish profiles 2021-05-17 18:04:14 +02:00
Samuele Locatelli f2fdd1a72f Fix tempalte e lettura dati UL / Scarti 2021-05-17 18:04:03 +02:00
Samuele Locatelli 8457e0e2bf Merge branch 'feature/NewViewserLog' into develop 2021-05-17 17:02:37 +02:00
Samuele Locatelli 8a8b9ab50a completato add UserLog con nuova vista 2021-05-17 17:02:26 +02:00
Samuele Locatelli 09d3f50de5 refresh view x UserAction in MP.Data 2021-05-17 16:55:43 +02:00
Samuele Locatelli 8494b25ef7 Merge branch 'feature/publishSetup' into develop 2021-05-17 16:52:17 +02:00
Samuele Locatelli c23d4d9449 update readme 2021-05-17 16:52:09 +02:00
Samuele Locatelli c6486d3456 fix profili pubblicazione 2021-05-17 16:48:43 +02:00
Samuele Locatelli 9a577c0e03 Merge branch 'feature/CleanupUnused' into develop 2021-05-17 15:42:56 +02:00
Samuele Locatelli dae22ba823 Merge branch 'feature/ScratchStatsPages' into develop 2021-05-17 15:42:39 +02:00
Samuele Locatelli 8f905c496c Completato review iniziale Scarti 2021-05-17 15:42:25 +02:00
Samuele Locatelli 2444dd49c8 Pulizia classi NON più impiegate 2021-05-17 15:41:59 +02:00
Samuele Locatelli ea6911080e review page loader progressbar 2021-05-17 15:26:07 +02:00
Samuele Locatelli d3b5811cdc Bozza pagine completata 2021-05-17 15:05:40 +02:00
Samuele Locatelli 21303b50a5 abbozzata aggiunta pagine statistiche 2021-05-17 14:44:00 +02:00
Samuele Locatelli b040c6d5fa Merge branch 'feature/ProjRename' into develop 2021-05-17 14:36:55 +02:00
Samuele Locatelli 5bd3ddbe4f fixcss 2021-05-17 14:36:46 +02:00
Samuele Locatelli a5d3eaa761 fix pager con selettore tendina 2021-05-17 14:36:30 +02:00
Samuele Locatelli a8a3bfdc0a Migrazione classe Mp.Stats 2021-05-17 13:35:20 +02:00
Samuele Locatelli 48d5671e53 RImozione old DataLayer 2021-05-17 13:33:28 +02:00
Samuele Locatelli a90a62cd7a COmpleto rename MP.Data 2021-05-17 13:33:13 +02:00
Samuele Locatelli 9aa783373f Rename MpDatalayer --> MP.Data 2021-05-17 13:27:11 +02:00
Samuele Locatelli ea08fb4b78 Aggiunta lettura RAW dati scarti 2021-05-17 13:18:15 +02:00
Samuele Locatelli ce1158cf73 Merge branch 'feature/EFCoreSetup' into develop 2021-05-15 18:17:34 +02:00
Samuele Locatelli e38972db54 Esclusione classi non impiegate 2021-05-15 18:17:23 +02:00
Samuele Locatelli 44824ee57e Appunti 2021-05-15 18:14:46 +02:00
Samuele Locatelli 719aac18de Modelli da scaffolding automatico (da rivedere) 2021-05-15 17:02:29 +02:00
Samuele Locatelli 1fc8d234f7 Inizio inserimento classi x EFCore 2021-05-15 16:36:53 +02:00
Samuele Locatelli 912852c4eb Merge tag 'RELEASE' into develop
RELEASE iniziale MP-STAT (setup di massima progetto)
2021-05-15 16:23:04 +02:00
3168 changed files with 572472 additions and 587 deletions
+8 -84
View File
@@ -4,96 +4,18 @@
*.pdb
.vs/*
#--------------------------------
# area MP.Stats
#--------------------------------
/Mp.FileData/temp/*.csv
*.bak
#--------------------------------
# Area VersGen
#--------------------------------
/VersGen/bin/*
/VersGen/obj/*
#--------------------------------
# area MapoDb
#--------------------------------
/MapoDb/bin/*
/MapoDb/obj/*
#--------------------------------
# area MP
#--------------------------------
/MP/bin/*
/MP/obj/*
MP/logs/*.txt
MP/logs/*.zip
MP-LAND/logs/
#--------------------------------
# Area MP-MON (MoonPro-MONitor)
#--------------------------------
/MP-MON/logs/*.zip
/MP-MON/logs/*.txt
/MP-MON/bin/*
/MP-MON/obj/*
/MP-MON/WebCharts/*.png
#--------------------------------
# Area MP-IO (MoonPro-IO)
#--------------------------------
/MP-IO/logs/*.zip
/MP-IO/logs/*.txt
/MP-IO/bin/*
/MP-IO/obj/*
/MP-IO/fileUpload/
!/MP-IO/fileUpload/.PlaceHolder.file
#--------------------------------
# Area MP-Admin
#--------------------------------
/MP-Admin/logs/*.zip
/MP-Admin/logs/*.txt
/MP-Admin/bin/*
/MP-Admin/obj/*
/MP-ADM/logs/*.zip
/MP-ADM/logs/*.txt
/MP-ADM/bin/*
/MP-ADM/obj/*
#--------------------------------
# Area ES3
#--------------------------------
/ES3/logs/*.zip
/ES3/logs/*.txt
/ES3/bin/*
/ES3/obj/*
#--------------------------------
# Area MoonProTablet
#--------------------------------
/MP-TAB/logs/*.zip
/MP-TAB/logs/*.txt
/MP-TAB/bin/*
/MP-TAB/obj/*
/MP-TAB/WebCharts/*.png
/MP-TAB/images/macchine/*.*
!/MP-TAB/images/macchine/Steamware.png
/MP-TAB/Files/Disegni/*.pdf
!/MP-TAB/Files/Disegni/ND.pdf
MP-TAB/logs/
#--------------------------------
# Area MoonPro
#--------------------------------
/MP-Site/logs/*.zip
/MP-Site/logs/*.txt
/MP-Site/bin/*
/MP-Site/obj/*
/MP-Site/WebCharts/*.png
/MP-Site/images/macchine/*.*
!/MP-Site/images/macchine/Steamware.png
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
@@ -423,3 +345,5 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
MP.Prog/Shared/MainLayout.razor
MP.Stats/temp/*.csv
+608
View File
@@ -0,0 +1,608 @@
variables:
NEXUS_PATH: 'MP-STATS'
PROJ_PATH: ''
APP_NAME: 'MP.Stats'
SOL_NAME: 'MP-STATS'
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
- |
echo "esecuzione Nuget FIX steps"
dotnet nuget list source
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy"
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
dotnet nuget remove source "`"Steamware Nexus Proxy`""
}
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus"
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
dotnet nuget remove source "`"Steamware Nexus`""
}
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3"
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
dotnet nuget remove source nexus-proxy-v3
}
dotnet nuget add source https://nexus.steamware.net/repository/nuget-proxy-v3/index.json -n nexus-proxy-v3 -u nugetUser -p viaDante16 --store-password-in-clear-text
echo "Has Source: $hasSource"
# helper creazione hash files x IIS
.hashBuild: &hashBuild
- |
$Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip"
$MD5 = Get-FileHash $Target -Algorithm MD5
$SHA1 = Get-FileHash $Target -Algorithm SHA1
New-Item $Target".md5"
New-Item $Target".sha1"
$MD5.Hash | Set-Content -Path $Target".md5"
$SHA1.Hash | Set-Content -Path $Target".sha1"
echo "Created HASH files for $Target"
# helper x send su NEXUS x pack
.nexusUpload: &nexusUpload
- |
Set-Alias mCurl C:\Windows\system32\curl.exe
$fileVers = $env:APP_NAME + "\Resources\VersNum.txt"
$VersNumb = Get-Content $fileVers
echo "Curr Version: $VersNumb"
if($CI_COMMIT_BRANCH -eq "master")
{
$version = "stable"
}
else
{
$version = "unstable"
}
$File2Send = Get-ChildItem($env:APP_NAME + "\bin\publish\*")
ForEach ($File in $File2Send) {
$FileName = Split-Path $File -leaf
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
}
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
# Stages previsti
stages:
- build
- test
- deploy
- installer
- release
LAND:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.Land
SOL_NAME: MP-LAND
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
PROG:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.Prog
SOL_NAME: MP-PROG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
STAT:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.Stats
SOL_NAME: MP-STATS
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
MON:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.Mon
SOL_NAME: MP-MON
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# WAMON:build:
# stage: build
# tags:
# - win
# variables:
# PROJ_PATH: MP.WASM.Mon\Server
# APP_NAME: MP.WASM.Mon.Server
# SOL_NAME: MP-WAMON
# before_script:
# - *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln"
# script:
# - dotnet build $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:test:
stage: test
tags:
- win
variables:
APP_NAME: MP.Land
SOL_NAME: MP-LAND
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["LAND:build"]
script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj
PROG:test:
stage: test
tags:
- win
variables:
APP_NAME: MP.Prog
SOL_NAME: MP-PROG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["PROG:build"]
script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj
STAT:test:
stage: test
tags:
- win
variables:
APP_NAME: MP.Stats
SOL_NAME: MP-STATS
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["STAT:build"]
script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj
MON:test:
stage: test
tags:
- win
variables:
APP_NAME: MP.Mon
SOL_NAME: MP-MON
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["MON:build"]
script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj
# WAMON:test:
# stage: test
# tags:
# - win
# variables:
# PROJ_PATH: MP.WASM.Mon\Server
# APP_NAME: MP.WASM.Mon.Server
# SOL_NAME: MP-WAMON
# before_script:
# - *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln"
# only:
# - develop
# needs: ["WAMON:build"]
# script:
# - dotnet test $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Land
SOL_NAME: MP-LAND
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["LAND:test"]
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
PROG:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Prog
SOL_NAME: MP-PROG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["PROG:test"]
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
STAT:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Stats
SOL_NAME: MP-STATS
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["STAT:test"]
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
MON:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Mon
SOL_NAME: MP-MON
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["MON:test"]
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
# WAMON:IIS01:deploy:
# stage: deploy
# tags:
# - win
# variables:
# PROJ_PATH: MP.WASM.Mon\Server
# APP_NAME: MP.WASM.Mon.Server
# SOL_NAME: MP-WAMON
# before_script:
# - *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln"
# only:
# - develop
# needs: ["WAMON:test"]
# script:
# - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:IIS02:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Land
SOL_NAME: MP-LAND
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- master
needs: ["LAND:build"]
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
PROG:IIS02:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Prog
SOL_NAME: MP-PROG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- master
needs: ["PROG:build"]
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
STAT:IIS02:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Stats
SOL_NAME: MP-STATS
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- master
needs: ["STAT:build"]
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
MON:IIS02:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.Mon
SOL_NAME: MP-MON
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- master
needs: ["MON:build"]
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
# WAMON:IIS02:deploy:
# stage: deploy
# tags:
# - win
# variables:
# PROJ_PATH: MP.WASM.Mon\Server
# APP_NAME: MP.WASM.Mon.Server
# SOL_NAME: MP-WAMON
# before_script:
# - *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln"
# only:
# - master
# needs: ["WAMON:build"]
# script:
# - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj
# - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:installer:
stage: installer
tags:
- win
variables:
APP_NAME: MP.Land
SOL_NAME: MP-LAND
NEXUS_PATH: MP-LAND
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
- master
needs: ["LAND:build"]
script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
PROG:installer:
stage: installer
tags:
- win
variables:
APP_NAME: MP.Prog
SOL_NAME: MP-PROG
NEXUS_PATH: MP-PROG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
- master
needs: ["PROG:build"]
script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
STAT:installer:
stage: installer
tags:
- win
variables:
APP_NAME: MP.Stats
SOL_NAME: MP-STATS
NEXUS_PATH: MP-STATS
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
- master
needs: ["STAT:build"]
script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
MON:installer:
stage: installer
tags:
- win
variables:
APP_NAME: MP.Mon
SOL_NAME: MP-MON
NEXUS_PATH: MP-MON
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
- master
needs: ["MON:build"]
script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
# WAMON:installer:
# stage: installer
# tags:
# - win
# variables:
# PROJ_PATH: MP.WASM.Mon\Server
# APP_NAME: MP.WASM.Mon.Server
# SOL_NAME: MP-WAMON
# NEXUS_PATH: MP-WAMON
# before_script:
# - *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln"
# only:
# - develop
# - master
# needs: ["WAMON:build"]
# script:
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:PROJ_PATH/$env:APP_NAME.csproj -o:publish
# # qui il deploy su nexus...
# - *hashBuild
# - *nexusUpload
LAND:release:
stage: release
tags:
- win
variables:
APP_NAME: MP.Land
SOL_NAME: MP-LAND
NEXUS_PATH: MP-LAND
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
#- feature/Deploy_CI_CD
# - master
- tags
except:
- branches
needs: ["LAND:build"]
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj
PROG:release:
stage: release
tags:
- win
variables:
APP_NAME: MP.Prog
SOL_NAME: MP-PROG
NEXUS_PATH: MP-PROG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
#- feature/Deploy_CI_CD
# - master
- tags
except:
- branches
needs: ["PROG:build"]
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj
STAT:release:
stage: release
tags:
- win
variables:
APP_NAME: MP.Stats
SOL_NAME: MP-STATS
NEXUS_PATH: MP-STATS
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
#- feature/Deploy_CI_CD
# - master
- tags
except:
- branches
needs: ["STAT:build"]
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj
MON:release:
stage: release
tags:
- win
variables:
APP_NAME: MP.Mon
SOL_NAME: MP-MON
NEXUS_PATH: MP-MON
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- tags
except:
- branches
needs: ["MON:build"]
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj
# WAMON:release:
# stage: release
# tags:
# - win
# variables:
# PROJ_PATH: MP.WASM.Mon\Server
# APP_NAME: MP.WASM.Mon.Server
# SOL_NAME: MP-WAMON
# NEXUS_PATH: MP-WAMON
# before_script:
# - *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln"
# only:
# - tags
# except:
# - branches
# needs: ["WAMON:build"]
# artifacts:
# paths:
# - publish/
# script:
# - dotnet publish -c Release -o ./publish $env:PROJ_PATH/$env:APP_NAME.csproj
+36
View File
@@ -0,0 +1,36 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/MP.Stats/bin/Debug/net6.0/MP.Stats.dll",
"args": [],
"cwd": "${workspaceFolder}/MP.Stats",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
+42
View File
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/MP.Stats/MP.Stats.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/MP.Stats/MP.Stats.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/MP.Stats/MP.Stats.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
+100
View File
@@ -0,0 +1,100 @@
#-------------------------------------------------------------------
# Egalware 2021.05.25
#
# .\AppDeploy.ps1 -AppPool MP.STATS -SourceDir c:\Steamware\installers\MP\STATS -ZipFile MP.STATS.zip -DestDir c:\inetpub\wwwroot\MP\STATS2
#
# Powershell script per deploy applicazione Blazor / dotnet core
#
# requisito: modulo powershell x 7zip:
# Set-ExecutionPolicy Bypass -Scope CurrentUser -Force
# Install-Module -Name 7Zip4Powershell
#-------------------------------------------------------------------
# step 0: lettura variabili
param (
[Parameter(Mandatory=$true)]
[ValidateNotNull()]
[string]$AppPool = "MP.STATS",
[Parameter(Mandatory=$true)]
[ValidateNotNull()]
[string]$SourceDir,
[Parameter(Mandatory=$true)]
[ValidateNotNull()]
[string]$ZipFile,
[Parameter(Mandatory=$true)]
[ValidateNotNull()]
[string]$DestDir
)
# conf x logging
$logDir = "c:\Steamware\tmp"
$logFile = "$logDir\Script.log"
$logMirror = "$logDir\Mirror.log"
$utilDir = "c:\Steamware\tmp"
$installDir = "c:\Steamware\installers\"
# recupera timestamp x logging
function Get-TimeStamp
{
return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date)
}
# registra log!
function DoLog($txt2log)
{
Write-Output "$(Get-TimeStamp) $txt2log" | Out-File $logFile -Append
}
# esegue e registra log
function ExecuteLog($txt2log)
{
Write-Output "-------------------------------------------------------------------------------------------------------------------------------------------------" | Out-File -FilePath "$logFile" -Append
Write-Output "$(Get-TimeStamp) $txt2log" | Out-File -FilePath "$logFile" -Append
Invoke-Expression "$txt2log 2>&1 | Out-File -FilePath $logFile -Append"
if( $LASTEXITCODE -ne 0)
{
Write-Host "Error during cmmand: $txt2log" -ForegroundColor Red ;
Write-Host "Exit...." -ForegroundColor Red ;
Set-Location $PSScriptRoot
exit
}
}
# fix cartelle...
If (!(test-path $logFile))
{
New-Item -ItemType Directory -Force -Path $logDir
New-Item -ItemType File -Force -Path $logFile
New-Item -ItemType File -Force -Path $logMirror
}
Write-Output "-------------------------------- START script --------------------------------" | Out-File $logFile
$StopWatch = New-Object System.Diagnostics.Stopwatch
$StopWatch.Start()
# step 1 : stop del pool applicazioni IIS
$currState = Get-WebAppPoolState -Name $AppPool
if($currState.value -eq "Started")
{
Write-Host "Stop AppPool"
ExecuteLog "Stop-WebAppPool -Name '$AppPool'"
}
# step 2 : cambio dir + unzip
Write-Host "Unzip"
cd $utilDir
ExecuteLog "7z x ""$SourceDir\$ZipFile"" "
# step 3 : replica applicazione
Write-Host "START copy step"
ExecuteLog "robocopy '$utilDir\publish\net6.0\' '$DestDir' /MIR /Z /LOG:'$logMirror'"
Write-Host "END copy step"
# step 4 : riavvio pool
Write-Host "Start AppPool"
ExecuteLog "Start-WebAppPool -Name '$AppPool'"
# step 5 : fix dir originale
cd $installDir
+9
View File
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+220
View File
@@ -0,0 +1,220 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Egw.Core
{
public class LiManObj
{
#region Public Enums
public enum StatoRichiesta
{
ND = 0,
Richiesta,
Valutazione,
Approvata,
Rifiutata
}
public enum TipoLicenza
{
ND = 0,
/// <summary>
/// Licenza LEgacy Steamware
/// </summary>
GLS,
/// <summary>
/// Master Key License, che ha una data di scadenza globale ed un token = numero di utenti/token massimi associati
/// </summary>
MasterKey,
/// <summary>
/// UserKey License (licenza che consuma un token utente della licenza master) - es GPW
/// </summary>
UserKey,
/// <summary>
/// Chiave tiupo Checksum basata su licenza masster + checksum MD5 di una serie di dati (child licenses)
/// </summary>
CheckSumKey
}
#endregion Public Enums
#region Public Classes
public class ApplicativoDTO
{
#region Public Properties
public string Chiave { get; set; } = "";
public string CodApp { get; set; } = "";
public string CodInst { get; set; } = "";
public DateTime DataEnigma { get; set; } = DateTime.Today.AddYears(-1);
public string Descrizione { get; set; } = "";
public string Enigma { get; set; } = "";
public int IdxLic { get; set; } = 0;
public bool IsActive
{
get => (Scadenza.Subtract(DateTime.Today).TotalDays > 0);
}
public bool Locked { get; set; } = false;
public int NumLicenze { get; set; } = 0;
public int NumLicenzeAttive { get; set; } = 0;
public string Payload { get; set; } = "";
public DateTime Scadenza { get; set; } = DateTime.Today.AddYears(-1);
public TipoLicenza Tipo { get; set; } = TipoLicenza.ND;
#endregion Public Properties
}
public class AttivazioneDTO
{
#region Public Properties
public string Chiave { get; set; } = "";
public string CodApp { get; set; } = "";
public string CodImpiego { get; set; } = "";
public string CodInst { get; set; } = "";
public string Descrizione { get; set; } = "";
public int IdxLic { get; set; } = 0;
public int IdxSubLic { get; set; } = 0;
public TipoLicenza Tipo { get; set; } = TipoLicenza.UserKey;
public DateTime VetoUnlock { get; set; } = DateTime.Today.AddMonths(2);
#endregion Public Properties
}
public class LicenseCoord
{
#region Public Properties
public string CodApp { get; set; } = "";
public string CodInst { get; set; } = "";
public string Enigma { get; set; } = "";
public string MasterKey { get; set; } = "";
#endregion Public Properties
}
public class SupportRequest
{
#region Public Properties
public string CodApp { get; set; } = "";
public string CodImp { get; set; } = "";
public string CodInst { get; set; } = "";
public string ContactEmail { get; set; } = "";
public string ContactName { get; set; } = "";
public string ContactPhone { get; set; } = "";
public int idxSubLic { get; set; } = 0;
public bool IsValid
{
get => !string.IsNullOrEmpty(MasterKey) && !string.IsNullOrEmpty(ContactName) && !string.IsNullOrEmpty(ContactEmail) && !string.IsNullOrEmpty(CodInst) && !string.IsNullOrEmpty(CodApp);
}
public string MasterKey { get; set; } = "";
public string ReqBody { get; set; } = "";
#endregion Public Properties
}
/// <summary>
/// Oggetto Ticket
/// </summary>
public class TicketDTO
{
#region Public Properties
/// <summary>
/// Codice univoco della sub licenza (opzionale)
/// </summary>
public string CodImpiego { get; set; } = "";
/// <summary>
/// Contatto email del cliente richiedente
/// </summary>
public string ContactEmail { get; set; } = "";
/// <summary>
/// Contatto del cliente richiedente
/// </summary>
public string ContactName { get; set; } = "";
/// <summary>
/// Contatto telefonico del cliente richiedente
/// </summary>
public string ContactPhone { get; set; } = "";
public DateTime DtReq { get; set; } = DateTime.Now;
/// <summary>
/// IDX licenza master
/// </summary>
public int IdxLic { get; set; } = 0;
/// <summary>
/// IDX licenza child (opzionale)
/// </summary>
public int IdxSubLic { get; set; } = 0;
public int IdxTicket { get; set; } = 0;
/// <summary>
/// Motivazione della richiesta
/// </summary>
public string ReqBody { get; set; } = "";
/// <summary>
/// Stato richiesta
/// </summary>
public StatoRichiesta Status { get; set; } = StatoRichiesta.ND;
/// <summary>
/// Risposta alla richiesta
/// </summary>
public string SupplAnsw { get; set; } = "";
/// <summary>
/// Email del responsabile dell'azione (interno - supplier)
/// </summary>
public string SupplEmail { get; set; } = "";
/// <summary>
/// Cod dell'user responsabile dell'azione (interno - supplier)
/// </summary>
public string SupplUserCode { get; set; } = "";
/// <summary>
/// Tipologia di licenza gestita
/// </summary>
public TipoLicenza Tipo { get; set; } = TipoLicenza.UserKey;
#endregion Public Properties
}
public class UserLicenseRequest
{
#region Public Properties
public string MasterKey { get; set; } = "";
public Dictionary<string, string> ParamDict { get; set; } = new Dictionary<string, string>();
#endregion Public Properties
}
#endregion Public Classes
}
}
+186
View File
@@ -0,0 +1,186 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Egw.Core
{
/// <summary>
/// utils x cifrature e Crypto
/// </summary>
public class SteamCrypto
{
#region Public Methods
/// <summary>
/// decifra un messaggio con una password
/// </summary>
/// <param name="Message"></param>
/// <param name="Passphrase"></param>
/// <returns></returns>
public static string DecryptString(string Message, string Passphrase)
{
string answ = Message;
byte[] Results = null;
UTF8Encoding UTF8 = new UTF8Encoding();
// Step 1. We hash the passphrase using MD5
// We use the MD5 hash generator as the result is a 128 bit byte array
// which is a valid length for the TripleDES encoder we use below
MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();
byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));
// Step 2. Create a new TripleDESCryptoServiceProvider object
TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();
// Step 3. Setup the decoder
TDESAlgorithm.Key = TDESKey;
TDESAlgorithm.Mode = CipherMode.ECB;
TDESAlgorithm.Padding = PaddingMode.PKCS7;
// Step 4. Convert the input string to a byte[]
byte[] DataToDecrypt = null;
try
{
DataToDecrypt = Convert.FromBase64String(Message);
}
catch
{ }
if (DataToDecrypt != null)
{
// Step 5. Attempt to decrypt the string
try
{
ICryptoTransform Decryptor = TDESAlgorithm.CreateDecryptor();
Results = Decryptor.TransformFinalBlock(DataToDecrypt, 0, DataToDecrypt.Length);
}
finally
{
// Clear the TripleDes and Hashprovider services of any sensitive information
TDESAlgorithm.Clear();
HashProvider.Clear();
}
// Step 6. Return the decrypted string in UTF8 format
answ = UTF8.GetString(Results);
}
return answ;
}
/// <summary>
/// cifra un messaggio con una password
/// </summary>
/// <param name="Message"></param>
/// <param name="Passphrase"></param>
/// <returns></returns>
public static string EncryptString(string Message, string Passphrase)
{
byte[] Results;
UTF8Encoding UTF8 = new UTF8Encoding();
// Step 1. We hash the passphrase using MD5
// We use the MD5 hash generator as the result is a 128 bit byte array
// which is a valid length for the TripleDES encoder we use below
MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();
byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));
// Step 2. Create a new TripleDESCryptoServiceProvider object
TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();
// Step 3. Setup the encoder
TDESAlgorithm.Key = TDESKey;
TDESAlgorithm.Mode = CipherMode.ECB;
TDESAlgorithm.Padding = PaddingMode.PKCS7;
// Step 4. Convert the input string to a byte[]
byte[] DataToEncrypt = UTF8.GetBytes(Message);
// Step 5. Attempt to encrypt the string
try
{
ICryptoTransform Encryptor = TDESAlgorithm.CreateEncryptor();
Results = Encryptor.TransformFinalBlock(DataToEncrypt, 0, DataToEncrypt.Length);
}
finally
{
// Clear the TripleDes and Hashprovider services of any sensitive information
TDESAlgorithm.Clear();
HashProvider.Clear();
}
// Step 6. Return the encrypted string as a base64 encoded string
return Convert.ToBase64String(Results);
}
/// <summary>
/// genera hash di una stringa in MD5 (es x hash gravatar)
/// </summary>
/// <param name="Message"></param>
/// <returns></returns>
public static string getHashStringMD5(string Message)
{
string hash = "";
using (MD5 md5Hash = MD5.Create())
{
hash = GetMd5Hash(md5Hash, Message);
}
return hash;
}
/// <summary>
/// Crea un hash MD5
/// </summary>
/// <param name="md5Hash"></param>
/// <param name="input"></param>
/// <returns></returns>
public static string GetMd5Hash(MD5 md5Hash, string input)
{
// Convert the input string to a byte array and compute the hash.
byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
// Create a new Stringbuilder to collect the bytes
// and create a string.
StringBuilder sBuilder = new StringBuilder();
// Loop through each byte of the hashed data
// and format each one as a hexadecimal string.
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
// Return the hexadecimal string.
return sBuilder.ToString();
}
/// <summary>
/// Verify a hash against a string.
/// </summary>
/// <param name="md5Hash"></param>
/// <param name="input"></param>
/// <param name="hash"></param>
/// <returns></returns>
public static bool VerifyMd5Hash(MD5 md5Hash, string input, string hash)
{
// Hash the input.
string hashOfInput = GetMd5Hash(md5Hash, input);
// Create a StringComparer an compare the hashes.
StringComparer comparer = StringComparer.OrdinalIgnoreCase;
if (0 == comparer.Compare(hashOfInput, hash))
{
return true;
}
else
{
return false;
}
}
#endregion Public Methods
}
}
+105
View File
@@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Egw.Core
{
/// <summary>
/// Gestione licenze applicativi GLS (Legacy SteamWare)
/// </summary>
public class licenseManGLS
{
#region Public Methods
/// <summary>
/// restituisce data decodificata da authKey + applicazione + cliente...
/// </summary>
/// <param name="cliente">The cliente.</param>
/// <param name="applicativo">The applicativo.</param>
/// <param name="licenze">The licenze.</param>
/// <param name="authKey">The authentication key.</param>
/// <returns></returns>
public static DateTime expiryDateByAuthKey(string cliente, string applicativo, int licenze, string authKey)
{
DateTime answ = DateTime.Today.AddYears(-10);
string plainAuthKey = "";
try
{
string passPhrase = string.Format("{0}|{1}", cliente.PadLeft(50, ':'), applicativo);
plainAuthKey = SteamCrypto.DecryptString(authKey, passPhrase); // uso combinazione cliente+applicativo come passphrase!
string datePart = plainAuthKey.Replace($"{cliente}#{applicativo.PadLeft(20, '-')}-", "").Replace($"%{licenze}%", "");
//string datePart = plainAuthKey.Replace(string.Format("{0}#{1}-", cliente, applicativo.PadLeft(20, '-')), "").Replace(string.Format("%{0}%", licenze), "");
// se non avesse "bonificato" la parte num licenze (es non corrisponde al max) forzo il trim
if (datePart.Contains("%"))
{
datePart = datePart.Substring(0, datePart.IndexOf("%"));
}
answ = Convert.ToDateTime(datePart);
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore decodifica auth key:{0}AuthKey: {1}{0}cliente:{2}{0}applicativo:{3}{0}errore:{4}", Environment.NewLine, authKey, cliente, applicativo, exc), tipoLog.EXCEPTION);
}
return answ;
}
/// <summary>
/// Fornisce chiave MD5 x un cliente/applicativo/expiryDate
/// </summary>
/// <param name="cliente"></param>
/// <param name="applicativo"></param>
/// <param name="licenze"></param>
/// <param name="expiryDate"></param>
/// <returns></returns>
public static string getAuthKey(string cliente, string applicativo, int licenze, DateTime expiryDate)
{
string answ = "";
// algoritmo MD5 formato cliente#applicativo#expDate, via SQLdiventa
// SELECT CONVERT(VARCHAR(32), HashBytes('MD5', 'ETS#GPW#2013/12/31'), 2)
string plainAuthKey = string.Format("{0}#{1}-{2}%{3}%", cliente, applicativo.PadLeft(20, '-'), expiryDate.ToString("yyyy/MM/dd"), licenze);
string passPhrase = string.Format("{0}|{1}", cliente.PadLeft(50, ':'), applicativo);
answ = SteamCrypto.EncryptString(plainAuthKey, passPhrase); // uso combinazione cliente+applicativo come passphrase!
return answ;
}
/// <summary>
/// Fornisce chiave MD5 x una chiave secondaria/di checksum data dai parametri in ingresso
/// MasterKey/string[] chiavi singole child/expiryDate
/// </summary>
/// <param name="MasterKey">Chiave master da cui si parte</param>
/// <param name="Payload">Payload che contiene le chiavi SUB (child) riferite alla master in formato JSon (compresso/no indent)</param>
/// <returns></returns>
public static string getChecksumKey(string MasterKey, string Payload)
{
string answ = "";
answ = SteamCrypto.EncryptString(Payload, MasterKey);
return answ;
}
/// <summary>
/// numero di licenze attive per cliente/applicativo
/// </summary>
/// <param name="cliente"></param>
/// <param name="applicativo"></param>
/// <returns></returns>
public static int getLicenseNum(string cliente, string applicativo)
{
// !!!FARE!!! chiamata a webservice 1/mese
int answ = 1;
// molto hard-coded e discutibile... licenze "perenni"
switch (cliente)
{
default:
answ = 1;
break;
}
return answ;
}
#endregion Public Methods
}
}
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Land", "MP.Land\MP.Land.csproj", "{D949AB45-9B65-4594-A97E-182BC3831707}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.AppAuth", "MP.AppAuth\MP.AppAuth.csproj", "{E8B1E617-87BC-4638-A8B6-04EEBA3B8F47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Egw.Core", "Egw.Core\Egw.Core.csproj", "{D3D348EF-1313-43DF-94FB-28CD38B68212}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D949AB45-9B65-4594-A97E-182BC3831707}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D949AB45-9B65-4594-A97E-182BC3831707}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D949AB45-9B65-4594-A97E-182BC3831707}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D949AB45-9B65-4594-A97E-182BC3831707}.Release|Any CPU.Build.0 = Release|Any CPU
{E8B1E617-87BC-4638-A8B6-04EEBA3B8F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8B1E617-87BC-4638-A8B6-04EEBA3B8F47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8B1E617-87BC-4638-A8B6-04EEBA3B8F47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8B1E617-87BC-4638-A8B6-04EEBA3B8F47}.Release|Any CPU.Build.0 = Release|Any CPU
{D3D348EF-1313-43DF-94FB-28CD38B68212}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3D348EF-1313-43DF-94FB-28CD38B68212}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3D348EF-1313-43DF-94FB-28CD38B68212}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3D348EF-1313-43DF-94FB-28CD38B68212}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {632D11D1-088B-4795-97E5-048534002558}
EndGlobalSection
EndGlobal
+31
View File
@@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Mon", "MP.Mon\MP.Mon.csproj", "{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.Build.0 = Release|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {632D11D1-088B-4795-97E5-048534002558}
EndGlobalSection
EndGlobal
+31
View File
@@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31229.75
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Prog", "MP.Prog\MP.Prog.csproj", "{3223DDE4-564E-4D58-8A94-E368B9778C67}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.FileData", "MP.FileData\MP.FileData.csproj", "{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3223DDE4-564E-4D58-8A94-E368B9778C67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3223DDE4-564E-4D58-8A94-E368B9778C67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3223DDE4-564E-4D58-8A94-E368B9778C67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3223DDE4-564E-4D58-8A94-E368B9778C67}.Release|Any CPU.Build.0 = Release|Any CPU
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {632D11D1-088B-4795-97E5-048534002558}
EndGlobalSection
EndGlobal
+4 -4
View File
@@ -1,11 +1,11 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31229.75
# Visual Studio Version 17
VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP-STATS", "MP-STATS\MP-STATS.csproj", "{D9901B50-E61C-400C-B62C-FA060CF72C29}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Stats", "MP.Stats\MP.Stats.csproj", "{D9901B50-E61C-400C-B62C-FA060CF72C29}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MpDataLayer", "MpDataLayer\MpDataLayer.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
-21
View File
@@ -1,21 +0,0 @@
<div class="input-group input-group-sm">
<input @bind-value="numRecord" @bind-value:event="oninput" type="text" class="form-control" />
<div class="input-group-append">
<button @onclick="reportChange" class="btn btn-success input-group-text"># record</button>
@*<span class="input-group-text"># record</span>*@
</div>
</div>
@code {
[Parameter]
public int numRecord { get; set; } = 10;
[Parameter]
public EventCallback<int> numRecordChanged { get; set; }
private async Task reportChange()
{
await numRecordChanged.InvokeAsync(numRecord);
}
}
-86
View File
@@ -1,86 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MP_STATS.Data
{
public class MessageService
{
#region Private Fields
private string searchVal;
private bool showSearch;
#endregion Private Fields
#region Public Events
public event Action EA_HideSearch;
public event Action EA_SearchUpdated;
public event Action EA_ShowSearch;
#endregion Public Events
#region Public Properties
public string SearchVal
{
get => searchVal;
set
{
if (searchVal != value)
{
searchVal = value;
if (EA_SearchUpdated != null)
{
EA_SearchUpdated?.Invoke();
}
}
}
}
public bool ShowSearch
{
get => showSearch;
set
{
if (showSearch != value)
{
showSearch = value;
if (showSearch)
{
if (EA_ShowSearch != null)
{
EA_ShowSearch?.Invoke();
}
}
else
{
if (EA_HideSearch != null)
{
EA_HideSearch?.Invoke();
}
}
}
}
}
#endregion Public Properties
#region Protected Methods
protected void ReportSearch()
{
if (EA_SearchUpdated != null)
{
EA_SearchUpdated?.Invoke();
}
}
#endregion Protected Methods
}
}
-25
View File
@@ -1,25 +0,0 @@
using System;
using System.Linq;
using System.Threading.Tasks;
namespace MP_STATS.Data
{
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
var rng = new Random();
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
}).ToArray());
}
}
}
-21
View File
@@ -1,21 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>MP_STATS</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MpDataLayer\MpDataLayer.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\" />
</ItemGroup>
<ItemGroup>
<None Update="logs\.placeholder">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
-5
View File
@@ -1,5 +0,0 @@
<h3>Controlli</h3>
@code {
}
-16
View File
@@ -1,16 +0,0 @@
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}
-46
View File
@@ -1,46 +0,0 @@
@page "/fetchdata"
@using MP_STATS.Data
@inject WeatherForecastService ForecastService
<h1>Weather forecast</h1>
<p>This component demonstrates fetching data from a service.</p>
@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}
@code {
private WeatherForecast[] forecasts;
protected override async Task OnInitializedAsync()
{
forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
}
}
-48
View File
@@ -1,48 +0,0 @@
@page "/"
@using MP_STATS.Components
@using MP_STATS.Data
<div class="jumbotron">
<div class="row">
<div class="col-12 col-lg-4">
<h1>MP STATS</h1>
<div>
Modulo Statistiche per MoonPro
</div>
</div>
<div class="col-12 col-lg-8 text-right">
<div class="text-light display-4">
<span class="oi oi-basket" aria-hidden="true"></span> | <span class="oi oi-cart" aria-hidden="true"></span> | <span class="oi oi-document" aria-hidden="true"></span> | <span class="oi oi-envelope-open" aria-hidden="true"></span> | <span class="oi oi-puzzle-piece" aria-hidden="true"></span> | <span class="oi oi-badge" aria-hidden="true"></span> | <span class="oi oi-wrench" aria-hidden="true"></span>
</div>
</div>
</div>
</div>
<div class="shortcuts mt-2">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header table-primary h1">@Anno</div>
<div class="card-body">
</div>
</div>
</div>
<div class="col-12">
<div class="row">
<div class="col-12">
<HomeButton NavLink="baskets" Icon="oi oi-basket" Descript="Baskets" />
<HomeButton NavLink="negotiations" Icon="oi oi-cart" Descript="Negoziazioni" />
<HomeButton NavLink="docs" Icon="oi oi-document" Descript="Documenti" />
@*<HomeButton NavLink="resources" Icon="oi oi-puzzle-piece" Descript="Risorse" />*@
<HomeButton NavLink="items" Icon="oi oi-badge" Descript="Items" />
<HomeButton NavLink="utility" Icon="oi oi-wrench" Descript="Utility" />
</div>
</div>
</div>
</div>
</div>
@code {
private int Anno { get; set; } = DateTime.Today.Year;
}
-5
View File
@@ -1,5 +0,0 @@
<h3>Scarti</h3>
@code {
}
-35
View File
@@ -1,35 +0,0 @@
@page "/"
@namespace MP_STATS.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MP-STATS</title>
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" />
<link href="MP-STATS.styles.css" rel="stylesheet" />
</head>
<body>
<component type="typeof(App)" render-mode="ServerPrerendered" />
<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
</body>
</html>
-26
View File
@@ -1,26 +0,0 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MP_STATS
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
"SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
}
-13
View File
@@ -1,13 +0,0 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
"SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
}
-12
View File
@@ -1,12 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
"SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
}
-10
View File
@@ -1,10 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
-11
View File
@@ -1,11 +0,0 @@
param([string]$ProjectDir, [string]$ProjectPath);
$MajMin="1.0."
$currentDate = get-date -format yyMM;
$currentTime = get-date -format HHmm;
$find = "<Version>(.|\n)*?</Version>";
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
$csproj = Get-Content $ProjectPath
$csprojUpdated = $csproj -replace $find, $replace
Set-Content -Path $ProjectPath -Value $csprojUpdated
+43
View File
@@ -0,0 +1,43 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Mon", "MP.Mon\MP.Mon.csproj", "{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Server", "MP.WASM.Mon\Server\MP.WASM.Mon.Server.csproj", "{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Client", "MP.WASM.Mon\Client\MP.WASM.Mon.Client.csproj", "{9BF7BDE7-016A-458C-8791-494FD4204301}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.Build.0 = Release|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.Build.0 = Release|Any CPU
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Release|Any CPU.Build.0 = Release|Any CPU
{9BF7BDE7-016A-458C-8791-494FD4204301}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BF7BDE7-016A-458C-8791-494FD4204301}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BF7BDE7-016A-458C-8791-494FD4204301}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BF7BDE7-016A-458C-8791-494FD4204301}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {632D11D1-088B-4795-97E5-048534002558}
EndGlobalSection
EndGlobal
+147
View File
@@ -0,0 +1,147 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MP.AppAuth.Models;
using NLog;
using System;
namespace MP.AppAuth
{
public partial class AppAuthContext : DbContext
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
[Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")]
public AppAuthContext()
{
}
public AppAuthContext(IConfiguration configuration)
{
_configuration = configuration;
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 01");
}
}
public AppAuthContext(DbContextOptions<AppAuthContext> options) : base(options)
{
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 02");
}
}
#endregion Public Constructors
#region Public Properties
public virtual DbSet<AnagraficaGruppi> DbSetAnagraficaGruppi { get; set; }
public virtual DbSet<AnagraficaOperatori> DbSetAnagOpr { get; set; }
public virtual DbSet<Gruppi2Operatori> DbSetGruppi2Oper { get; set; }
public virtual DbSet<UpdMan> DbSetUpdMan { get; set; }
public virtual DbSet<Vocabolario> DbSetVocabolario { get; set; }
#endregion Public Properties
#region Private Methods
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
#endregion Private Methods
#region Protected Methods
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("MP.Land");
if (!string.IsNullOrEmpty(connString))
{
optionsBuilder.UseSqlServer(connString);
}
else
{
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;");
}
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
modelBuilder.Entity<Vocabolario>(entity =>
{
entity.HasKey(e => new { e.Lingua, e.Lemma });
entity.ToTable("Vocabolario");
entity.Property(e => e.Lingua).HasMaxLength(3);
entity.Property(e => e.Lemma).HasMaxLength(50);
entity.Property(e => e.Traduzione)
.IsRequired()
.HasMaxLength(500);
});
modelBuilder.Entity<AnagraficaGruppi>(entity =>
{
entity.HasKey(e => e.CodGruppo);
entity.ToTable("AnagraficaGruppi");
entity.Property(e => e.CodGruppo).HasMaxLength(50);
entity.Property(e => e.DescrGruppo)
.IsRequired()
.HasMaxLength(250)
.HasDefaultValueSql("('')");
entity.Property(e => e.SelEnabled).HasComment("Indica se sia selezionabile a livello di tendina x inserimento BCode");
entity.Property(e => e.TipoGruppo)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('REPARTO')")
.HasComment("tipo gruppo: reparto (es x gestione operatori assegnati), GRUPPO FASE (es macchien che fanno lo stesso tipo di lavoro), ...");
});
modelBuilder.Entity<Gruppi2Operatori>(entity =>
{
entity.HasKey(e => new { e.MatrOpr, e.CodGruppo });
entity.ToTable("Gruppi2Operatori");
entity.Property(e => e.CodGruppo).HasMaxLength(50);
});
//
modelBuilder.Seed();
OnModelCreatingPartial(modelBuilder);
}
#endregion Protected Methods
}
}
+193
View File
@@ -0,0 +1,193 @@
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.AppAuth.Controllers
{
public class AppAuthController : IDisposable
{
#region Private Fields
private static IConfiguration _configuration;
private static AppAuthContext dbCtx;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
public AppAuthController(IConfiguration configuration)
{
_configuration = configuration;
dbCtx = new AppAuthContext(configuration);
Log.Info("Avviata classe AppAuthController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Elenco Record x Gruppi
/// </summary>
/// <returns></returns>
public List<Models.AnagraficaGruppi> AnagGruppiFilt(string codTipo)
{
List<Models.AnagraficaGruppi> dbResult = new List<Models.AnagraficaGruppi>();
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
{
dbResult = localDbCtx
.DbSetAnagraficaGruppi
.Where(x => x.TipoGruppo == codTipo)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco Record x Gruppi
/// </summary>
/// <returns></returns>
public List<Models.AnagraficaGruppi> AnagGruppiGetAll()
{
List<Models.AnagraficaGruppi> dbResult = new List<Models.AnagraficaGruppi>();
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
{
dbResult = localDbCtx
.DbSetAnagraficaGruppi
.ToList();
}
return dbResult;
}
public List<Models.AnagraficaOperatori> AnagOpGetAll(string searchVal)
{
List<Models.AnagraficaOperatori> dbResult = new List<Models.AnagraficaOperatori>();
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
{
if (!string.IsNullOrEmpty(searchVal))
{
dbResult = localDbCtx
.DbSetAnagOpr
.Where(x => x.Cognome.Contains(searchVal) || x.Nome.Contains(searchVal))
.ToList();
}
else
{
dbResult = localDbCtx
.DbSetAnagOpr
.ToList();
}
}
// ritorno
return dbResult;
}
public List<Models.AnagraficaOperatori> AnagOpByGruppoGetFilt(string codGruppo, string searchVal)
{
List<Models.AnagraficaOperatori> dbResult = new List<Models.AnagraficaOperatori>();
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
{
if (!string.IsNullOrEmpty(searchVal))
{
dbResult = localDbCtx
.DbSetGruppi2Oper
.Where(x => x.CodGruppo == codGruppo || string.IsNullOrEmpty(codGruppo))
.Join(
localDbCtx.DbSetAnagOpr.Where(x => x.Cognome.Contains(searchVal) || x.Nome.Contains(searchVal)),
gruppo => gruppo.MatrOpr,
operatore => operatore.MatrOpr,
(gruppo, operatore) => operatore
)
.ToList();
}
else
{
dbResult = localDbCtx
.DbSetGruppi2Oper
.Where(x => x.CodGruppo == codGruppo || string.IsNullOrEmpty(codGruppo))
.Join(
localDbCtx.DbSetAnagOpr,
gruppo => gruppo.MatrOpr,
operatore => operatore.MatrOpr,
(gruppo, operatore) => operatore
)
.ToList();
}
}
// ritorno
return dbResult;
}
public void Dispose()
{
// Clear database context
dbCtx.Dispose();
}
public void ResetController()
{
dbCtx = new AppAuthContext(_configuration);
Log.Info("Effettuato reset AppAuthController");
}
/// <summary>
/// Annulla modifiche su una specifica entity (cancel update)
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool RollBackEntity(object item)
{
bool answ = false;
try
{
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
{
dbCtx.Entry(item).Reload();
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
/// Elenco Record x gestione Update
/// </summary>
/// <returns></returns>
public List<Models.UpdMan> UpdManGetAll()
{
List<Models.UpdMan> dbResult = new List<Models.UpdMan>();
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
{
dbResult = localDbCtx
.DbSetUpdMan
.OrderBy(x => x.Ordinal)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco Record x gestione Update
/// </summary>
/// <returns></returns>
public List<Models.Vocabolario> VocabolarioGetAll()
{
List<Models.Vocabolario> dbResult = new List<Models.Vocabolario>();
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
{
dbResult = localDbCtx
.DbSetVocabolario
.ToList();
}
return dbResult;
}
#endregion Public Methods
}
}
+61
View File
@@ -0,0 +1,61 @@
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MP.AppAuth.Controllers
{
public class MPController : IDisposable
{
#region Public Fields
public static AppAuth.Controllers.MPController dbController;
#endregion Public Fields
#region Public Constructors
public MPController(IConfiguration configuration)
{
_configuration = configuration;
Log.Info("Avviata classe MpController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Elenco Record x AnagKeyValue
/// </summary>
/// <returns></returns>
public List<Models.AnagKeyValueModel> AnagKeyValuesGetAll()
{
List<Models.AnagKeyValueModel> dbResult = new List<Models.AnagKeyValueModel>();
using (MoonProContext localDbCtx = new MoonProContext(_configuration))
{
dbResult = localDbCtx
.DbSetAnagKeyValues
.ToList();
}
return dbResult;
}
public void Dispose()
{
// Clear database controller
dbController.Dispose();
}
#endregion Public Methods
#region Private Fields
private static IConfiguration _configuration;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
+276
View File
@@ -0,0 +1,276 @@
using NLog;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace MP.AppAuth
{
/// <summary>
/// Helper x estrarre dati sintetici su HW, Software, librerie installate...
/// </summary>
public class HwSwInfo
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Protected Fields
/// <summary>
/// Assembly di base
/// </summary>
protected Assembly assembly = Assembly.GetExecutingAssembly();
#endregion Protected Fields
#region Public Constructors
/// <summary>
/// Istanza base
/// </summary>
public HwSwInfo()
{
assembly = Assembly.GetExecutingAssembly();
}
public HwSwInfo(Assembly targetAssembly)
{
assembly = targetAssembly;
}
#endregion Public Constructors
#if false
/// <summary>
/// Singleton!
/// </summary>
public static HwSwInfo man = new HwSwInfo();
#endif
#region Public Properties
/// <summary>
/// Statistiche IIS
/// </summary>
public string IISStats
{
get
{
StringBuilder sb = new StringBuilder();
using (var iis = Process.GetCurrentProcess())
{
//Process iis = Process.GetCurrentProcess();
sb.AppendLine(string.Format("UPTIME: {0}", ToDateString(DateTime.Now - iis.StartTime)));
sb.AppendLine(string.Format("Priority: {0}", iis.PriorityClass));
sb.AppendLine(string.Format("Physical Memory Used: {0}", memFormat(iis.WorkingSet64)));
sb.AppendLine(string.Format("Virtual Memory Used: {0}", memFormat(iis.VirtualMemorySize64)));
}
return sb.ToString();
}
}
/// <summary>
/// Versioni di ogni libreria compresa
/// </summary>
public string librariesVers
{
get
{
string answ = "";
try
{
AssemblyName[] referencedAssemblyNames = assembly.GetReferencedAssemblies();
foreach (AssemblyName referencedAssemblyName in referencedAssemblyNames.OrderBy(n => n.Name))
{
answ += referencedAssemblyName.FullName + Environment.NewLine;
}
}
catch
{ }
return answ;
}
}
/// <summary>
/// Nome MainAssembly
/// </summary>
public string mainAssembly
{
get
{
string answ = "";
try
{
answ = assembly.FullName;
}
catch
{ }
return answ;
}
}
/// <summary>
/// Num di librerie inserite
/// </summary>
public int numLibraries
{
get
{
int numLib = 0; ;
try
{
AssemblyName[] referencedAssemblyNames = assembly.GetReferencedAssemblies();
foreach (AssemblyName referencedAssemblyName in referencedAssemblyNames.OrderBy(n => n.Name))
{
numLib++;
}
}
catch
{ }
return numLib;
}
}
///// <summary>
///// Dati sui server redis...
///// </summary>
//public string redisServersData
//{
// get
// {
// StringBuilder sb = new StringBuilder();
// try
// {
// var servData = memLayer.ML.redServInfo();
// foreach (var item in servData)
// {
// sb.AppendLine(string.Format("Server: {0} | {1} | {2}", item, item.Version, item.ServerType));
// // da completare con altre info?!?
// var srvInfo = item.Info();
// // esporto un pò di info x gruppo...
// foreach (IGrouping<string, System.Collections.Generic.KeyValuePair<string, string>> capitolo in srvInfo)
// {
// sb.AppendLine("----------------------------------------------");
// sb.AppendLine(string.Format("Capitolo: {0}", capitolo.Key));
// sb.AppendLine("----------------------------------------------");
// foreach (var kvp in capitolo)
// {
// sb.AppendLine(string.Format("{0}:{1}", kvp.Key, kvp.Value));
// }
// sb.AppendLine();
// }
// }
// }
// catch (Exception exc)
// {
// Log.Error($"Errore in redisServersData{Environment.NewLine}{exc}");
// }
// return sb.ToString();
// }
//}
/// <summary>
/// Runtime assembly
/// </summary>
public string runtimeImg
{
get
{
string answ = "";
try
{
answ = assembly.ImageRuntimeVersion;
}
catch
{ }
return answ;
}
}
/// <summary>
/// Statistiche server
/// </summary>
public string ServerStats
{
get
{
StringBuilder sb = new StringBuilder();
try
{
// calcoli preliminari
// compongo output
sb.AppendLine(string.Format("NAME: {0}", Environment.MachineName));
sb.AppendLine(System.Runtime.InteropServices.RuntimeInformation.OSDescription);
sb.AppendLine(System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription);
sb.AppendLine(string.Format("OS 64bit: {0} | PROC 64bit: {1}", Environment.Is64BitOperatingSystem, Environment.Is64BitProcess));
//sb.AppendLine(string.Format("SYS UPTIME: {0}", ToDateString(uptime)));
sb.AppendLine(string.Format("CPU: {0}", Environment.ProcessorCount));
//sb.AppendLine(string.Format("RAM: {0}", memFormat(computer.TotalPhysicalMemory)));
//sb.AppendLine(string.Format("Virtual Memory: {0}", memFormat(computer.TotalVirtualMemory)));
//sb.AppendLine(string.Format("Available RAM: {0}", memFormat(computer.AvailablePhysicalMemory)));
//sb.AppendLine(string.Format("Available Virtual Memory: {0}", memFormat(computer.AvailableVirtualMemory)));
sb.AppendLine(string.Format("DIR: {0}", Environment.CurrentDirectory));
sb.AppendLine(string.Format("USER: {0} | USER: {1}", Environment.UserDomainName, Environment.UserName));
}
catch (Exception exc)
{
Log.Error($"Errore in ServerStats{Environment.NewLine}{exc}");
}
return sb.ToString();
}
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// Singleton!
/// </summary>
public static HwSwInfo man(Assembly targetAssembly)
{
HwSwInfo answ = new HwSwInfo(targetAssembly);
return answ;
}
/// <summary>
/// Formatta un numero da int a size in Kb/Mb/Gb/Tb
/// </summary>
/// <param name="rawSize"></param>
/// <returns></returns>
public string memFormat(double rawSize)
{
string[] sizes = { "B", "KB", "MB", "GB", "TB" };
int order = 0;
while (rawSize >= 1024 && order < sizes.Length - 1)
{
order++;
rawSize = rawSize / 1024;
}
// Adjust the format string to your preferences. For example "{0:0.#}{1}" would
// show a single decimal place, and no space.
return String.Format("{0:0.##} {1}", rawSize, sizes[order]);
}
/// <summary>
/// Stringa timing in gg, ore, ... da timespan
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public string ToDateString(TimeSpan time)
{
return string.Format("{0}gg, {1:00}:{2:00}:{3:00} (h:m:s)", time.Days, time.Hours, time.Minutes, time.Seconds);
}
#endregion Public Methods
}
}
+30
View File
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Egw.Core\Egw.Core.csproj" />
</ItemGroup>
</Project>
+28
View File
@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.AppAuth
{
public static class ModelBuilderExtensions
{
#region Public Methods
/// <summary>
/// Estensione per seed iniziale dei dati nel DB
/// </summary>
/// <param name="modelBuilder"></param>
public static void Seed(this ModelBuilder modelBuilder)
{
//// inizializzazione dei valori di default x MACCHINA
//modelBuilder.Entity<MacchinaModel>().HasData(
// new MacchinaModel { IdxMacchina = "0", RuleName = "0", Descrizione = "--- Tutte ---", Nome = "--- Tutte ---", BasePath = "", ImgUrl = "", Note = "", ShowOrder = 0 }
// );
}
#endregion Public Methods
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagArticoli
{
#region Public Properties
public string CodArticolo { get; set; }
public string CurrRev { get; set; }
public string DescArticolo { get; set; }
public string Disegno { get; set; }
public bool? FlagIsNew { get; set; }
public string ProdRev { get; set; }
public string Tipo { get; set; }
#endregion Public Properties
}
}
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagClassiTempo
{
#region Public Properties
public string ClasseTempo { get; set; }
public string Descrizione { get; set; }
#endregion Public Properties
}
}
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
namespace MP.AppAuth.Models
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("AnagKeyValue")]
public partial class AnagKeyValueModel
{
#region Public Properties
[Key]
public string NomeVar { get; set; }
public int? ValInt { get; set; }
public double? ValFloat { get; set; }
public string ValString { get; set; }
public string Descrizione { get; set; }
#endregion Public Properties
}
}
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagraficaCausaliScarto
{
#region Public Properties
public string Causale { get; set; }
public string CssClass { get; set; }
public string Descrizione { get; set; }
public string Icona { get; set; }
#endregion Public Properties
}
}
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagraficaFlussi
{
#region Public Properties
public string CodFlux { get; set; }
public string DescrFlux { get; set; }
#endregion Public Properties
}
}
+15
View File
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagraficaGruppi
{
public string CodGruppo { get; set; }
public string TipoGruppo { get; set; }
public string DescrGruppo { get; set; }
public bool SelEnabled { get; set; }
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagraficaIngressi
{
#region Public Properties
public string Descrizione { get; set; }
public int IdxFamigliaIngresso { get; set; }
public int ValoreIngresso { get; set; }
#endregion Public Properties
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class AnagraficaMicroStati
{
#region Public Properties
public string Descrizione { get; set; }
public int IdxFamigliaIngresso { get; set; }
public int IdxMicroStato { get; set; }
#endregion Public Properties
}
}
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
namespace MP.AppAuth.Models
{
[Table("AnagraficaOperatori")]
public partial class AnagraficaOperatori
{
#region Public Properties
public string AuthKey { get; set; }
public string CodOprExt { get; set; }
public string Cognome { get; set; }
public bool? IsAdmin { get; set; }
[Key]
public int MatrOpr { get; set; }
public string Nome { get; set; }
#endregion Public Properties
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class Config
{
#region Public Properties
public string Chiave { get; set; }
public string Note { get; set; }
public string Valore { get; set; }
public string ValoreStd { get; set; }
#endregion Public Properties
}
}
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class DatiMacchine
{
#region Public Properties
public string CodArticoloA { get; set; }
public string CodArticoloB { get; set; }
public bool HasCounter { get; set; }
public string IdxMacchina { get; set; }
public bool? InsEnabled { get; set; }
public bool? IsTrigerDbon { get; set; }
public bool? PalletChange { get; set; }
public int? RefreshPeriod { get; set; }
public string SerialPort { get; set; }
public bool? SimplePallet { get; set; }
public bool? Simulazione { get; set; }
public bool SLogEnabled { get; set; }
#endregion Public Properties
}
}
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class FamigliaTipoIngressi
{
#region Public Properties
public string DescrizioneIngresso { get; set; }
public int IdxFamigliaIngresso { get; set; }
#endregion Public Properties
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class FamiglieMacchine
{
#region Public Properties
public string Descrizione { get; set; }
public bool? HasIob { get; set; }
public bool? HasUdi { get; set; }
public int IdxFamiglia { get; set; }
#endregion Public Properties
}
}
+13
View File
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class Gruppi2Operatori
{
public int MatrOpr { get; set; }
public string CodGruppo { get; set; }
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class KeepAlive
{
#region Public Properties
public DateTime? DataOraMacchina { get; set; }
public DateTime? DataOraServer { get; set; }
public DateTime? DataOraStart { get; set; }
public string IdxMacchina { get; set; }
#endregion Public Properties
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class LinkMenuJqm
{
#region Public Properties
public string Icona { get; set; }
public int IdxLink { get; set; }
public string NavigateUrl { get; set; }
public int? Ordine { get; set; }
public string Testo { get; set; }
public string TipoLink { get; set; }
#endregion Public Properties
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class ListValue
{
#region Public Properties
public string FieldName { get; set; }
public string Label { get; set; }
public int? Ordinal { get; set; }
public string TableName { get; set; }
public string Value { get; set; }
#endregion Public Properties
}
}
+25
View File
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.AppAuth.Models
{
public partial class Macchine
{
#region Public Properties
public string CodMacchina { get; set; }
public int ColNum { get; set; }
public string Css { get; set; }
public string Descrizione { get; set; }
public string IdxMacchina { get; set; }
public string Locazione { get; set; }
public string Nome { get; set; }
public string Note { get; set; }
public int RowNum { get; set; }
public string Url { get; set; }
#endregion Public Properties
}
}
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
namespace MP.AppAuth.Models
{
[Table("UpdMan")]
public partial class UpdMan
{
#region Public Properties
[Key]
public string AppName { get; set; }
public string AppUrl { get; set; }
public bool IsAuth { get; set; } = false;
public string LicenseKey { get; set; }
public string LocalRepo { get; set; }
public string ManifestUrl { get; set; }
public int Ordinal { get; set; } = 1;
public string PackName { get; set; }
#endregion Public Properties
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.AppAuth.Models
{
[Table("Vocabolario")]
public partial class Vocabolario
{
#region Public Properties
public string Lemma { get; set; }
public string Lingua { get; set; }
public string Traduzione { get; set; }
#endregion Public Properties
}
}
+513
View File
@@ -0,0 +1,513 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MP.AppAuth.Models;
using NLog;
using System;
namespace MP.AppAuth
{
public partial class MoonProContext : DbContext
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
[Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")]
public MoonProContext()
{
}
public MoonProContext(IConfiguration configuration)
{
_configuration = configuration;
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 01");
}
}
public MoonProContext(DbContextOptions<MoonProContext> options) : base(options)
{
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 02");
}
}
#endregion Public Constructors
#region Public Properties
public virtual DbSet<AnagArticoli> AnagArticolis { get; set; }
public virtual DbSet<AnagClassiTempo> AnagClassiTempos { get; set; }
public virtual DbSet<AnagraficaCausaliScarto> AnagraficaCausaliScartos { get; set; }
public virtual DbSet<AnagraficaFlussi> AnagraficaFlussis { get; set; }
public virtual DbSet<AnagraficaIngressi> AnagraficaIngressis { get; set; }
public virtual DbSet<AnagraficaMicroStati> AnagraficaMicroStatis { get; set; }
public virtual DbSet<AnagraficaOperatori> AnagraficaOperatoris { get; set; }
public virtual DbSet<Config> Configs { get; set; }
public virtual DbSet<DatiMacchine> DatiMacchines { get; set; }
public virtual DbSet<AnagKeyValueModel> DbSetAnagKeyValues { get; set; }
public virtual DbSet<FamigliaTipoIngressi> FamigliaTipoIngressis { get; set; }
public virtual DbSet<FamiglieMacchine> FamiglieMacchines { get; set; }
public virtual DbSet<KeepAlive> KeepAlives { get; set; }
public virtual DbSet<LinkMenuJqm> LinkMenuJqms { get; set; }
public virtual DbSet<ListValue> ListValues { get; set; }
public virtual DbSet<Macchine> Macchines { get; set; }
public virtual DbSet<UpdMan> UpdMan { get; set; }
public virtual DbSet<Vocabolario> DbSetVocabolario { get; set; }
#endregion Public Properties
#region Private Methods
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
#endregion Private Methods
#region Protected Methods
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("MP.Land");
if (!string.IsNullOrEmpty(connString))
{
optionsBuilder.UseSqlServer(connString);
}
else
{
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;");
}
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
modelBuilder.Entity<AnagArticoli>(entity =>
{
entity.HasKey(e => e.CodArticolo);
entity.ToTable("AnagArticoli");
entity.Property(e => e.CodArticolo).HasMaxLength(50);
entity.Property(e => e.CurrRev)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')");
entity.Property(e => e.DescArticolo)
.IsRequired()
.HasMaxLength(250)
.HasDefaultValueSql("('')");
entity.Property(e => e.Disegno)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')");
entity.Property(e => e.FlagIsNew).HasComputedColumnSql("(case when [CurrRev]=[ProdRev] then CONVERT([bit],(0),(0)) else CONVERT([bit],(1),(0)) end)", false);
entity.Property(e => e.ProdRev)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')");
entity.Property(e => e.Tipo)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('ART')")
.HasComment("Tipo di articolo: ART, KIT, ...");
});
modelBuilder.Entity<AnagClassiTempo>(entity =>
{
entity.HasKey(e => e.ClasseTempo);
entity.ToTable("AnagClassiTempo");
entity.Property(e => e.ClasseTempo).HasMaxLength(50);
entity.Property(e => e.Descrizione).HasMaxLength(500);
});
modelBuilder.Entity<AnagKeyValueModel>(entity =>
{
entity.HasKey(e => e.NomeVar);
entity.ToTable("AnagKeyValue");
entity.Property(e => e.NomeVar)
.HasMaxLength(50)
.HasColumnName("nomeVar");
entity.Property(e => e.Descrizione)
.HasMaxLength(250)
.HasColumnName("descrizione")
.HasDefaultValueSql("('-')");
entity.Property(e => e.ValFloat)
.HasColumnName("valFloat")
.HasDefaultValueSql("((0))");
entity.Property(e => e.ValInt)
.HasColumnName("valInt")
.HasDefaultValueSql("((0))");
entity.Property(e => e.ValString)
.HasMaxLength(250)
.HasColumnName("valString")
.HasDefaultValueSql("('')");
});
modelBuilder.Entity<AnagraficaCausaliScarto>(entity =>
{
entity.HasKey(e => e.Causale);
entity.ToTable("AnagraficaCausaliScarto");
entity.Property(e => e.Causale)
.HasMaxLength(50)
.HasDefaultValueSql("('ND')");
entity.Property(e => e.CssClass)
.IsRequired()
.HasMaxLength(50)
.HasColumnName("cssClass")
.HasDefaultValueSql("('')");
entity.Property(e => e.Descrizione)
.IsRequired()
.HasMaxLength(250)
.HasDefaultValueSql("('ND')");
entity.Property(e => e.Icona)
.IsRequired()
.HasMaxLength(50)
.HasColumnName("icona")
.HasDefaultValueSql("('')");
});
modelBuilder.Entity<AnagraficaFlussi>(entity =>
{
entity.HasKey(e => e.CodFlux);
entity.ToTable("AnagraficaFlussi");
entity.Property(e => e.CodFlux).HasMaxLength(50);
entity.Property(e => e.DescrFlux).HasMaxLength(50);
});
modelBuilder.Entity<AnagraficaIngressi>(entity =>
{
entity.HasKey(e => new { e.IdxFamigliaIngresso, e.ValoreIngresso });
entity.ToTable("AnagraficaIngressi");
entity.Property(e => e.Descrizione).HasMaxLength(50);
});
modelBuilder.Entity<AnagraficaMicroStati>(entity =>
{
entity.HasKey(e => new { e.IdxFamigliaIngresso, e.IdxMicroStato });
entity.ToTable("AnagraficaMicroStati");
entity.Property(e => e.Descrizione).HasMaxLength(250);
});
modelBuilder.Entity<AnagraficaOperatori>(entity =>
{
entity.HasKey(e => e.MatrOpr);
entity.ToTable("AnagraficaOperatori");
entity.Property(e => e.MatrOpr).ValueGeneratedNever();
entity.Property(e => e.AuthKey)
.HasMaxLength(50)
.HasColumnName("authKey")
.HasDefaultValueSql("('12345')");
entity.Property(e => e.CodOprExt)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')")
.HasComment("Codice operatore per sistema esterno");
entity.Property(e => e.Cognome).HasMaxLength(50);
entity.Property(e => e.IsAdmin).HasColumnName("isAdmin");
entity.Property(e => e.Nome).HasMaxLength(50);
});
modelBuilder.Entity<Config>(entity =>
{
entity.HasKey(e => e.Chiave);
entity.ToTable("Config");
entity.Property(e => e.Chiave)
.HasMaxLength(50)
.HasColumnName("chiave");
entity.Property(e => e.Note).HasColumnName("note");
entity.Property(e => e.Valore).HasColumnName("valore");
entity.Property(e => e.ValoreStd)
.HasColumnName("valoreStd")
.HasComment("Valore di default/riferimento per la variabile");
});
modelBuilder.Entity<DatiMacchine>(entity =>
{
entity.HasKey(e => e.IdxMacchina);
entity.ToTable("DatiMacchine");
entity.Property(e => e.IdxMacchina)
.HasMaxLength(50)
.HasColumnName("idxMacchina");
entity.Property(e => e.CodArticoloA)
.HasMaxLength(50)
.HasColumnName("CodArticolo_A");
entity.Property(e => e.CodArticoloB)
.HasMaxLength(50)
.HasColumnName("CodArticolo_B");
entity.Property(e => e.HasCounter)
.HasColumnName("hasCounter")
.HasComment("Indica se la macchina abbia un COUNTER (assoluto) o meno, tipicamente true x IOB-WIN, false per IOB-PI");
entity.Property(e => e.InsEnabled)
.HasColumnName("insEnabled")
.HasDefaultValueSql("((1))")
.HasComment("definisce se l'INSERT sia abilitato per la macchina (disabilitato in fase di ricostruzione batch...)");
entity.Property(e => e.IsTrigerDbon)
.IsRequired()
.HasColumnName("isTrigerDBOn")
.HasDefaultValueSql("((1))")
.HasComment("Abilita o meno il trigger su DiarioDiBordo x ricalcolo eventi");
entity.Property(e => e.PalletChange).HasColumnName("palletChange");
entity.Property(e => e.RefreshPeriod).HasColumnName("refreshPeriod");
entity.Property(e => e.SLogEnabled)
.HasColumnName("sLogEnabled")
.HasComment("definisce se sia abilitata la registrazione di TUTTI gli invii di dati in ingresso da questa specifica macchina");
entity.Property(e => e.SerialPort)
.HasMaxLength(50)
.HasColumnName("serialPort");
entity.Property(e => e.SimplePallet).HasColumnName("simplePallet");
entity.Property(e => e.Simulazione).HasColumnName("simulazione");
});
modelBuilder.Entity<FamigliaTipoIngressi>(entity =>
{
entity.HasKey(e => e.IdxFamigliaIngresso);
entity.ToTable("FamigliaTipoIngressi");
entity.Property(e => e.IdxFamigliaIngresso).ValueGeneratedNever();
entity.Property(e => e.DescrizioneIngresso).HasMaxLength(250);
});
modelBuilder.Entity<FamiglieMacchine>(entity =>
{
entity.HasKey(e => e.IdxFamiglia);
entity.ToTable("FamiglieMacchine");
entity.Property(e => e.Descrizione)
.IsRequired()
.HasMaxLength(250);
entity.Property(e => e.HasIob)
.IsRequired()
.HasColumnName("HasIOB")
.HasDefaultValueSql("((1))")
.HasComment("Indica se la famiglia macchina prevede una IOB x alimentare dati in AUTOMATICO da impianto");
entity.Property(e => e.HasUdi)
.IsRequired()
.HasColumnName("HasUDI")
.HasDefaultValueSql("((1))")
.HasComment("Indica se la famiglia macchina prevede UserDataInput ovvero inserimento MANUALE informazioni");
});
modelBuilder.Entity<KeepAlive>(entity =>
{
entity.HasKey(e => e.IdxMacchina);
entity.ToTable("KeepAlive");
entity.Property(e => e.IdxMacchina).HasMaxLength(50);
entity.Property(e => e.DataOraMacchina).HasColumnType("datetime");
entity.Property(e => e.DataOraStart).HasColumnType("datetime");
});
modelBuilder.Entity<LinkMenuJqm>(entity =>
{
entity.HasKey(e => e.IdxLink)
.HasName("PK_linkMenuJQM");
entity.ToTable("LinkMenuJQM");
entity.Property(e => e.IdxLink).HasColumnName("idxLink");
entity.Property(e => e.Icona)
.HasMaxLength(50)
.HasColumnName("icona");
entity.Property(e => e.NavigateUrl).HasMaxLength(50);
entity.Property(e => e.Ordine).HasColumnName("ordine");
entity.Property(e => e.Testo).HasMaxLength(50);
entity.Property(e => e.TipoLink).HasMaxLength(50);
});
modelBuilder.Entity<ListValue>(entity =>
{
entity.HasKey(e => new { e.TableName, e.FieldName, e.Value });
entity.Property(e => e.TableName).HasMaxLength(50);
entity.Property(e => e.FieldName).HasMaxLength(50);
entity.Property(e => e.Value)
.HasMaxLength(50)
.HasColumnName("value");
entity.Property(e => e.Label)
.HasMaxLength(50)
.HasColumnName("label");
entity.Property(e => e.Ordinal).HasColumnName("ordinal");
});
modelBuilder.Entity<Macchine>(entity =>
{
entity.HasKey(e => e.IdxMacchina);
entity.ToTable("Macchine");
entity.Property(e => e.IdxMacchina).HasMaxLength(50);
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.Css)
.IsRequired()
.HasMaxLength(50)
.HasColumnName("css")
.HasDefaultValueSql("('col text-center')")
.HasComment("Classe container standard (col, col-2, ...)");
entity.Property(e => e.Descrizione).HasMaxLength(50);
entity.Property(e => e.Locazione)
.HasMaxLength(50)
.HasColumnName("locazione");
entity.Property(e => e.Nome).HasMaxLength(50);
entity.Property(e => e.Note).HasMaxLength(50);
entity.Property(e => e.Url)
.HasMaxLength(250)
.HasColumnName("url");
});
modelBuilder.Entity<UpdMan>(entity =>
{
entity.HasKey(e => e.AppName)
.HasName("PK_UpdateMan");
entity.ToTable("UpdMan");
entity.Property(e => e.AppName).HasMaxLength(50);
entity.Property(e => e.AppUrl)
.IsRequired()
.HasMaxLength(250)
.HasDefaultValueSql("('')");
entity.Property(e => e.IsAuth)
.IsRequired()
.HasDefaultValueSql("((1))");
entity.Property(e => e.LicenseKey)
.IsRequired()
.HasDefaultValueSql("('')");
entity.Property(e => e.LocalRepo)
.IsRequired()
.HasMaxLength(250);
entity.Property(e => e.ManifestUrl)
.IsRequired()
.HasMaxLength(250);
entity.Property(e => e.PackName)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')");
});
modelBuilder.Entity<Vocabolario>(entity =>
{
entity.HasKey(e => new { e.Lingua, e.Lemma });
entity.ToTable("Vocabolario");
entity.Property(e => e.Lingua).HasMaxLength(3);
entity.Property(e => e.Lemma).HasMaxLength(50);
entity.Property(e => e.Traduzione)
.IsRequired()
.HasMaxLength(500);
});
OnModelCreatingPartial(modelBuilder);
}
#endregion Protected Methods
}
}
+270
View File
@@ -0,0 +1,270 @@
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace MP.AppAuth
{
/// <summary>
/// Object of this class gives you all the details about the update useful in handling the update logic yourself.
/// </summary>
public class UpdateInfoEventArgs : EventArgs
{
#region Public Properties
/// <summary>
/// URL of the webpage specifying changes in the new update.
/// </summary>
public string ChangelogURL { get; set; }
/// <summary>
/// Returns newest version of the application available to download.
/// </summary>
public Version CurrentVersion { get; set; }
/// <summary>
/// Download URL of the update file.
/// </summary>
public string DownloadURL { get; set; }
/// <summary>
/// Returns version of the application currently installed on the user's PC.
/// </summary>
public Version InstalledVersion { get; set; }
/// <summary>
/// If new update is available then returns true otherwise false.
/// </summary>
public bool IsUpdateAvailable { get; set; }
/// <summary>
/// Shows if the update is required or optional.
/// </summary>
public bool Mandatory { get; set; }
#endregion Public Properties
}
/// <summary>
/// Gestione update applicazioni
/// </summary>
public class UpdateMan
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Protected Fields
protected bool doAuth = false;
#endregion Protected Fields
#region Public Fields
/// <summary>
/// Init classe
/// </summary>
public static UpdateMan obj = new UpdateMan();
#endregion Public Fields
#region Public Constructors
/// <summary>
/// Init classe
/// </summary>
public UpdateMan()
{ }
/// <summary>
/// Init classe
/// </summary>
/// <param name="user"></param>
/// <param name="pwd"></param>
public UpdateMan(string user, string pwd)
{
userName = user;
passwd = pwd;
doAuth = !string.IsNullOrEmpty($"{userName}{passwd}");
}
#endregion Public Constructors
#region Protected Properties
protected string passwd { get; set; } = "";
protected string userName { get; set; } = "";
#endregion Protected Properties
#region Public Methods
/// <summary>
/// Effettua download ultima versione applicativo
/// </summary>
/// <param name="remoteUrl"></param>
/// <param name="localRepo"></param>
/// <param name="packName"></param>
public long downloadLatest(string remoteUrl, string localRepo, string packName)
{
long size = 0;
// verifico directory
if (!Directory.Exists(localRepo))
{
Directory.CreateDirectory(localRepo);
}
string localFile = "";
string localLast = "";
string DownloadURL = "";
try
{
// in primis scarico update info...
UpdateInfoEventArgs updateData = getUpdateInfo(remoteUrl);
if (updateData.IsUpdateAvailable)
{
DownloadURL = updateData.DownloadURL;
localFile = string.Format(@"{0}\{1}_Build_{2}.zip", localRepo, packName, updateData.CurrentVersion);
localLast = string.Format(@"{0}\{1}.zip", localRepo, packName);
// scarica file e salva in directory locale...
using (var http = new HttpClient())
{
//var client = new WebClient();
//bool doAuth = !string.IsNullOrEmpty($"{userName}{passwd}");
if (doAuth)
{
//client.Credentials = new System.Net.NetworkCredential(userName, passwd);
http.DefaultRequestHeaders.Accept.Clear();
var byteArray = System.Text.ASCIIEncoding.UTF8.GetBytes($"{userName}:{passwd}");
http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
}
//client.DownloadFile(updateData.DownloadURL, localFile);
// url da chiamare
http.BaseAddress = new Uri(DownloadURL);
// lettura
var data = http.GetAsync(DownloadURL).Result;
using (var myReader = data.Content.ReadAsStreamAsync())
{
//var myReader = data.Content.ReadAsStreamAsync();
if (data.StatusCode != HttpStatusCode.OK)
{
Log.Info($"Errore in chiamata getUpdateInfo per URL {remoteUrl}: status code: {data.StatusCode}");
}
else
{
using (Stream outStream = File.OpenWrite(localFile))
{
myReader.Result.CopyTo(outStream);
}
// ora lo copio come latest...
File.Copy(localFile, localLast, true);
// indico come fatto!
var thisFile = new FileInfo(localLast);
size = thisFile.Length;
}
}
}
}
else
{
localFile = string.Format(@"{0}\Error.log", localRepo);
// scrivo file in area target...
using (StreamWriter sw = File.AppendText(localFile))
{
sw.WriteLine($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} ATTENZIONE! Installer NON disponibile | {remoteUrl}");
}
}
}
catch (Exception exc)
{
localFile = string.Format(@"{0}\Error.log", localRepo);
// scrivo file in area target...
using (StreamWriter sw = File.AppendText(localFile))
{
sw.WriteLine($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} Errore in fase di download installers{Environment.NewLine}XML: {remoteUrl}{Environment.NewLine}URL: {DownloadURL}");
sw.WriteLine(exc.ToString());
}
}
return size;
}
/// <summary>
/// Recupera l'ultima versione disponibile
/// </summary>
/// <param name="remoteUrl"></param>
/// <returns></returns>
public UpdateInfoEventArgs getUpdateInfo(string remoteUrl)
{
//bool doAuth = !string.IsNullOrEmpty($"{userName}{passwd}");
UpdateInfoEventArgs args = new UpdateInfoEventArgs();
Version CurrentVersion;
bool Mandatory;
XmlDocument recXml = new XmlDocument();
try
{
// recupero dati
using (var http = new HttpClient())
{
if (doAuth)
{
http.DefaultRequestHeaders.Accept.Clear();
var byteArray = System.Text.ASCIIEncoding.UTF8.GetBytes($"{userName}:{passwd}");
http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
}
// url da chiamare
http.BaseAddress = new Uri(remoteUrl);
// lettura
var data = http.GetAsync(remoteUrl).Result;
var myReader = data.Content.ReadAsStreamAsync();
if (data.StatusCode != HttpStatusCode.OK)
{
Log.Info($"Errore in chiamata getUpdateInfo per URL {remoteUrl}: status code: {data.StatusCode}");
}
else
{
recXml.Load(myReader.Result);
XmlNodeList recData = recXml.SelectNodes("item");
if (recData != null)
{
foreach (XmlNode item in recData)
{
XmlNode appCastVersion = item.SelectSingleNode("version");
Version.TryParse(appCastVersion?.InnerText, out CurrentVersion);
args.CurrentVersion = CurrentVersion;
XmlNode appCastChangeLog = item.SelectSingleNode("changelog");
args.ChangelogURL = appCastChangeLog?.InnerText;
XmlNode appCastUrl = item.SelectSingleNode("url");
args.DownloadURL = appCastUrl?.InnerText;
XmlNode mandatory = item.SelectSingleNode("mandatory");
Boolean.TryParse(mandatory?.InnerText, out Mandatory);
args.Mandatory = Mandatory;
args.IsUpdateAvailable = true;
}
}
}
}
}
catch (Exception exc)
{
Log.Info($"Eccezione in getUpdateInfo:{Environment.NewLine}{exc}");
// metto versione = 0 + errore...
args.IsUpdateAvailable = false;
args.CurrentVersion = new Version("0.0.0.0");
}
return args;
}
#endregion Public Methods
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data.Conf
{
/// <summary>
/// Struttura conf del file conf TAG x IOB
/// </summary>
public class IobTags
{
/// <summary>
/// Oggetto dizionario di configurazione x IOB
/// </summary>
public Dictionary<string, List<TagData>> IobSetup = new Dictionary<string, List<TagData>>();
}
}
+44
View File
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data.Conf
{
/// <summary>
/// Item da mostrare nei blocchi MON degli impianti come override ai dati MSE
/// </summary>
public class TagData
{
/// <summary>
/// Indice della colonna (ordine) del dato
/// </summary>
public int ColNum { get; set; } = 0;
/// <summary>
/// Indice della riga del dato
/// </summary>
public int RowNum { get; set; } = 0;
/// <summary>
/// Override CSS (es fontSmall)
/// </summary>
public string TagCss { get; set; } = "";
/// <summary>
/// Etichetta da mostrare
/// </summary>
public string TagName { get; set; } = "";
/// <summary>
/// Indicazione della chiave REDIS dove recuperare il tag indicato (già in formato string)
/// </summary>
public string TagLocation { get; set; } = "";
/// <summary>
/// Clone dell'oggetto
/// </summary>
/// <returns></returns>
public TagData Clone()
{
return (TagData)this.MemberwiseClone();
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data
{
public class Constants
{
// dati conf REDIS Cache
public static readonly string BASE_HASH = "MAPO";
// REDIS KEY Dati correnti
public static readonly string CONF_MON_KEY = $"{BASE_HASH}:Conf:MonDispData";
public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE";
public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink";
}
}
+142
View File
@@ -0,0 +1,142 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MP.Data.Controllers
{
public class MpMonController : IDisposable
{
#region Private Fields
private static IConfiguration _configuration;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
public MpMonController(IConfiguration configuration)
{
_configuration = configuration;
Log.Info("Avviata classe MpMonController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Elenco tabella Articoli da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.AnagArticoli> ArticoliGetSearch(int numRecord, string searchVal = "")
{
List<DatabaseModels.AnagArticoli> dbResult = new List<DatabaseModels.AnagArticoli>();
using (var dbCtx = new MoonProContext(_configuration))
{
dbResult = dbCtx
.DbSetArticoli
.AsNoTracking()
.Where(x => x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal) || string.IsNullOrEmpty(searchVal))
.OrderBy(x => x.CodArticolo)
.Take(numRecord)
.ToList();
}
return dbResult;
}
public void Dispose()
{
}
/// <summary>
/// Elenco da tabella Macchine
/// </summary>
/// <returns></returns>
public List<DatabaseModels.Macchine> MacchineGetAll()
{
List<DatabaseModels.Macchine> dbResult = new List<DatabaseModels.Macchine>();
using (var dbCtx = new MoonProContext(_configuration))
{
dbResult = dbCtx
.DbSetMacchine
.AsNoTracking()
.OrderBy(x => x.IdxMacchina)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco da tabella Macchine
/// </summary>
/// <returns></returns>
public List<DatabaseModels.ConfigModel> ConfigGetAll()
{
List<DatabaseModels.ConfigModel> dbResult = new List<DatabaseModels.ConfigModel>();
using (var dbCtx = new MoonProContext(_configuration))
{
dbResult = dbCtx
.DbSetConfig
.AsNoTracking()
.OrderBy(x => x.Chiave)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco da tabella MappaStatoExpl
/// </summary>
/// <returns></returns>
public List<DatabaseModels.MappaStatoExpl> MseGetAll(int maxAge = 2000)
{
List<DatabaseModels.MappaStatoExpl> dbResult = new List<DatabaseModels.MappaStatoExpl>();
using (var dbCtx = new MoonProContext(_configuration))
{
var maxAgeSec = new SqlParameter("@maxAgeSec", maxAge);
dbResult = dbCtx
.DbSetMSE
.FromSqlRaw("EXEC stp_MSE_getData @maxAgeSec", maxAgeSec)
.AsNoTracking()
.ToList();
}
return dbResult;
}
/// <summary>
/// Annulla modifiche su una specifica entity (cancel update)
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool RollBackEntity(object item)
{
bool answ = false;
using (var dbCtx = new MoonProContext(_configuration))
{
try
{
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
{
dbCtx.Entry(item).Reload();
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}");
}
}
return answ;
}
#endregion Public Methods
}
}
+330
View File
@@ -0,0 +1,330 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MP.Data.Controllers
{
public class MpStatsController : IDisposable
{
#region Private Fields
private static IConfiguration _configuration;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
public MpStatsController(IConfiguration configuration)
{
_configuration = configuration;
Log.Info("Avviata classe MpStatsController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Elenco Azioni (decodifica)
/// </summary>
/// <returns></returns>
public List<DatabaseModels.AzioniUL> ActionsGetAll()
{
List<DatabaseModels.AzioniUL> dbResult = new List<DatabaseModels.AzioniUL>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
dbResult = dbCtx
.DbSetAzioniUL
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella Articoli da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.AnagArticoli> ArticoliGetSearch(int numRecord, string searchVal = "")
{
List<DatabaseModels.AnagArticoli> dbResult = new List<DatabaseModels.AnagArticoli>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
dbResult = dbCtx
.DbSetArticoli
.Where(x => x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal) || string.IsNullOrEmpty(searchVal))
.OrderBy(x => x.CodArticolo)
.Take(numRecord)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella Articoli da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.ODL> CommesseGetSearch(int numRecord, string searchVal = "")
{
List<DatabaseModels.ODL> dbResult = new List<DatabaseModels.ODL>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
dbResult = dbCtx
.DbSetODL
.Where(x => x.KeyRichiesta.Contains(searchVal) || string.IsNullOrEmpty(searchVal))
.OrderBy(x => x.KeyRichiesta)
.Take(numRecord)
.ToList();
}
return dbResult;
}
public void Dispose()
{
}
/// <summary>
/// Elenco da tabella Macchine
/// </summary>
/// <returns></returns>
public List<DatabaseModels.Macchine> MacchineGetAll()
{
List<DatabaseModels.Macchine> dbResult = new List<DatabaseModels.Macchine>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
dbResult = dbCtx
.DbSetMacchine
.OrderBy(x => x.IdxMacchina)
.ToList();
}
return dbResult;
}
/// <summary>
/// Annulla modifiche su una specifica entity (cancel update)
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool RollBackEntity(object item)
{
bool answ = false;
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
try
{
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
{
dbCtx.Entry(item).Reload();
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}");
}
}
return answ;
}
/// <summary>
/// Elenco tabella controlli da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.ResControlli> StatControlliGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo)
{
List<DatabaseModels.ResControlli> dbResult = new List<DatabaseModels.ResControlli>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
var dataFrom = new SqlParameter("@dataFrom", DataStart);
var dataTo = new SqlParameter("@dataTo", DataEnd);
var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina);
var idxODL = new SqlParameter("@IdxODL", IdxODL);
var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta);
var codArticolo = new SqlParameter("@CodArticolo", CodArticolo);
dbResult = dbCtx
.DbSetControlli
.FromSqlRaw("EXEC stp_UI_RC_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella DDB da filtro
/// </summary>
/// <param name="DataStart"></param>
/// <param name="DataEnd"></param>
/// <param name="IdxMacchina"></param>
/// <param name="IdxODL"></param>
/// <param name="KeyRichiesta"></param>
/// <param name="CodArticolo"></param>
/// <param name="FirstRecord"></param>
/// <param name="NumRecord"></param>
/// <returns></returns>
public List<DatabaseModels.DdbTurni> StatDdbGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo, int FirstRecord, int NumRecord)
{
List<DatabaseModels.DdbTurni> dbResult = new List<DatabaseModels.DdbTurni>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
var dataFrom = new SqlParameter("@dataFrom", DataStart);
var dataTo = new SqlParameter("@dataTo", DataEnd);
var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina);
var idxODL = new SqlParameter("@IdxODL", IdxODL);
var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta);
var codArticolo = new SqlParameter("@CodArticolo", CodArticolo);
var firstRecord = new SqlParameter("@FirstRecord", FirstRecord);
var numRecord = new SqlParameter("@NumRecord", NumRecord);
dbResult = dbCtx
.DbSetDdbTurni
.FromSqlRaw("EXEC stp_UI_DDBTurni_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo,@FirstRecord,@NumRecord", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo, firstRecord, numRecord)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella DDB da filtro
/// </summary>
/// <param name="DataStart"></param>
/// <param name="DataEnd"></param>
/// <param name="IdxMacchina"></param>
/// <param name="IdxODL"></param>
/// <param name="KeyRichiesta"></param>
/// <param name="CodArticolo"></param>
/// <returns></returns>
public int StatDdbGetCount(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo)
{
int numResult = 0;
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
numResult = dbCtx
.DbSetDdbTurni
.Where(x => (x.IdxMacchina == IdxMacchina || IdxMacchina == "*") && (x.IdxOdl == IdxODL || IdxODL == -999) && (x.KeyRichiesta == KeyRichiesta || KeyRichiesta == "*") && (x.CodArticolo == CodArticolo || CodArticolo == "*") && (x.InizioPeriodo >= DataStart && x.InizioPeriodo <= DataEnd))
.Count();
}
return numResult;
}
/// <summary>
/// Elenco tabella ODL da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.ODL> StatOdlGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo)
{
List<DatabaseModels.ODL> dbResult = new List<DatabaseModels.ODL>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
var dataFrom = new SqlParameter("@dataFrom", DataStart);
var dataTo = new SqlParameter("@dataTo", DataEnd);
var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina);
var idxODL = new SqlParameter("@IdxODL", IdxODL);
var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta);
var codArticolo = new SqlParameter("@CodArticolo", CodArticolo);
dbResult = dbCtx
.DbSetODL
.FromSqlRaw("EXEC stp_UI_Odl_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella scarti da filtro
/// </summary>
/// <param name="DataStart"></param>
/// <param name="DataEnd"></param>
/// <param name="IdxMacchina"></param>
/// <param name="DataEnd"></param>
/// <returns></returns>
public List<DatabaseModels.ResScarti> StatScartiGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo)
{
List<DatabaseModels.ResScarti> dbResult = new List<DatabaseModels.ResScarti>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
var dataFrom = new SqlParameter("@dataFrom", DataStart);
var dataTo = new SqlParameter("@dataTo", DataEnd);
var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina);
var idxODL = new SqlParameter("@IdxODL", IdxODL);
var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta);
var codArticolo = new SqlParameter("@CodArticolo", CodArticolo);
dbResult = dbCtx
.DbSetScarti
.FromSqlRaw("EXEC stp_UI_RS_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella TurniOee da filtro
/// </summary>
/// <param name="DataStart"></param>
/// <param name="DataEnd"></param>
/// <param name="IdxMacchina"></param>
/// <param name="DataEnd"></param>
/// <returns></returns>
public List<DatabaseModels.TurniOee> StatTurniOeeGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo)
{
List<DatabaseModels.TurniOee> dbResult = new List<DatabaseModels.TurniOee>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
var dataFrom = new SqlParameter("@dataFrom", DataStart);
var dataTo = new SqlParameter("@dataTo", DataEnd);
var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina);
var idxODL = new SqlParameter("@IdxODL", IdxODL);
var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta);
var codArticolo = new SqlParameter("@CodArticolo", CodArticolo);
dbResult = dbCtx
.DbSetTurniOee
.FromSqlRaw("EXEC stp_UI_TurniOee_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo)
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco tabella UserLog da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.UserActionLog> StatUserLogGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo)
{
List<DatabaseModels.UserActionLog> dbResult = new List<DatabaseModels.UserActionLog>();
using (var dbCtx = new MoonPro_STATSContext(_configuration))
{
var dataFrom = new SqlParameter("@dataFrom", DataStart);
var dataTo = new SqlParameter("@dataTo", DataEnd);
var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina);
var idxODL = new SqlParameter("@IdxODL", IdxODL);
var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta);
var codArticolo = new SqlParameter("@CodArticolo", CodArticolo);
dbResult = dbCtx
.DbSetUserLog
.FromSqlRaw("EXEC stp_UI_UL_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo)
.ToList();
}
return dbResult;
}
#endregion Public Methods
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class AnagArticoli
{
#region Public Properties
public string CodArticolo { get; set; }
public string DescArticolo { get; set; }
public string Disegno { get; set; }
public string Tipo { get; set; }
#endregion Public Properties
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class AzioniUL
{
#region Public Properties
public string Azione { get; set; }
public string Class { get; set; }
public string Descrizione { get; set; }
#endregion Public Properties
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace MP.Data.DatabaseModels
{
[Table("Config")]
public partial class ConfigModel
{
public string Chiave { get; set; }
public string Valore { get; set; }
/// <summary>
/// Valore di default/riferimento per la variabile
/// </summary>
public string ValoreStd { get; set; }
public string Note { get; set; }
}
}
+52
View File
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class DdbTurni
{
#region Public Properties
public string ClasseTempo { get; set; }
public string CodArticolo { get; set; }
public string CodMacchina { get; set; }
public DateTime DataRif { get; set; }
public DateTime? DataTurnoFine { get; set; }
public DateTime? DataTurnoInizio { get; set; }
public string DescArticolo { get; set; } = "";
public string Descrizione { get; set; }
[NotMapped]
[DisplayFormat(DataFormatString = "{0:N2}", ApplyFormatInEditMode = true)]
public long DurataMin
{
get
{
long answ = (long)(DurataStato != null ? DurataStato : 0);
return answ / 60000;
}
}
public long? DurataPeriodo { get; set; }
public long? DurataStato { get; set; }
public DateTime? FinePeriodo { get; set; }
public DateTime FineStato { get; set; }
public string IdxMacchina { get; set; }
public int? IdxOdl { get; set; }
public int IdxStato { get; set; }
public DateTime InizioPeriodo { get; set; }
public DateTime InizioStato { get; set; }
public string KeyRichiesta { get; set; }
public string Pallet { get; set; }
public int? PzPalletProd { get; set; }
public decimal? TempoCicloBase { get; set; }
public int TotPzProd { get; set; }
public string Turno { get; set; }
#endregion Public Properties
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Macchine
{
#region Public Properties
public string CodMacchina { get; set; }
public string Descrizione { get; set; }
public string IdxMacchina { get; set; }
public string Nome { get; set; }
#endregion Public Properties
}
}
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
namespace MP.Data.DatabaseModels
{
public partial class MappaStatoExpl
{
public int RowNum { get; set; }
public DateTime? LastUpdate { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string Nome { get; set; }
public string Url { get; set; }
public int? IdxOdl { get; set; }
public string CodArticolo { get; set; }
public string Disegno { get; set; }
public int? NumPezzi { get; set; }
public decimal? TCAssegnato { get; set; }
public DateTime? DataInizioOdl { get; set; }
public string Semaforo { get; set; }
public int? IdxStato { get; set; }
public string DescrizioneStato { get; set; }
public double? Durata { get; set; }
public int? PezziProd { get; set; }
public int? PezziConf { get; set; }
public decimal? TempoOn { get; set; }
public decimal? TempoAuto { get; set; }
public decimal? TempoRun { get; set; }
public decimal? TCMedio { get; set; }
public decimal? TCLav { get; set; }
public decimal? TCEff { get; set; }
public decimal? TCMedioRt { get; set; }
public decimal? TCLavRT { get; set; }
public decimal? TCEffRT { get; set; }
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class ODL
{
#region Public Properties
public string CodArticolo { get; set; } = "";
public string CodArticoloParent { get; set; }
public DateTime? DataFine { get; set; }
public DateTime? DataInizio { get; set; }
public string DescArticolo { get; set; } = "";
public DateTime? DueDate { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public string KeyRichiestaParent { get; set; }
public int NumPezzi { get; set; }
public int NumPezziEv { get; set; }
public int NumPezziRil { get; set; }
public int NumPezziSca { get; set; }
public int? PzPallet { get; set; }
public decimal Tcassegnato { get; set; }
#endregion Public Properties
}
}
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class ResControlli
{
#region Public Properties
public string CodArticolo { get; set; }
public string CodMacchina { get; set; } = "";
public string Cognome { get; set; } = "";
public DateTime DataOra { get; set; }
public string DescArticolo { get; set; } = "";
public bool EsitoOk { get; set; }
public int IdxControllo { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public int MatrOpr { get; set; }
public string Nome { get; set; } = "";
public string Note { get; set; }
#endregion Public Properties
}
}
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class ResScarti
{
#region Public Properties
public string Causale { get; set; }
public string CodArticolo { get; set; }
public string CodMacchina { get; set; }
public string Cognome { get; set; }
public DateTime DataOraRif { get; set; }
public string DescArticolo { get; set; } = "";
public string Descrizione { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public int MatrOpr { get; set; }
public string Nome { get; set; }
public string Note { get; set; }
public int Qta { get; set; }
#endregion Public Properties
}
}
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class TurniOee
{
#region Public Properties
public string ClasseTempo { get; set; }
public string CodArticolo { get; set; }
public string CodMacchina { get; set; }
public DateTime DataRif { get; set; }
public string DescArticolo { get; set; }
public string IdxMacchina { get; set; }
[NotMapped]
[DisplayFormat(DataFormatString = "{0:N2}", ApplyFormatInEditMode = true)]
public double OEE => (double)TotPeriodo / (double)TotTurno;
[DisplayFormat(DataFormatString = "{0:N2}", ApplyFormatInEditMode = true)]
public decimal TotPeriodo { get; set; }
public int? TotPz { get; set; }
public int? TotTurno { get; set; } = 1;
public string Turno { get; set; }
#endregion Public Properties
}
}
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class UserActionLog
{
#region Public Properties
public string Azione { get; set; }
public string CodArticolo { get; set; }
public string CodMacchina { get; set; }
public string Cognome { get; set; }
public DateTime DataOraRif { get; set; }
public string DescArticolo { get; set; } = "";
public int IdxLog { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public int MatrOpr { get; set; }
public string Nome { get; set; }
public decimal Qta { get; set; }
public string Valore { get; set; }
#endregion Public Properties
}
}
+19
View File
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>MP.Data</AssemblyName>
<RootNamespace>MP.Data</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="4.7.10" />
</ItemGroup>
</Project>
+25
View File
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>MP.Data</AssemblyName>
<RootNamespace>MP.Data</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Remove="DatabaseModels\TurniPareto.cs" />
<Compile Remove="DatabaseModels\TurniParetoOdl.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.7" />
<PackageReference Include="NLog" Version="5.0.1" />
</ItemGroup>
</Project>
+135
View File
@@ -0,0 +1,135 @@
using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data
{
public class MessagePipe
{
#region Private Fields
private bool enableLog = false;
private IConnectionMultiplexer redis;
private IDatabase? redisDb;
#endregion Private Fields
#region Protected Fields
protected static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Protected Fields
#region Public Constructors
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
{
_channel = channelName;
redis = redisConn;
redisDb = redis.GetDatabase();
this.enableLog = enableLog;
// aggiungo sottoscrittore
setupSubscriber();
}
#endregion Public Constructors
#region Public Events
public event EventHandler EA_NewMessage = delegate { };
#endregion Public Events
#region Private Properties
/// <summary>
/// Canale associato al gestore pipeline messaggi
/// </summary>
private string _channel { get; set; } = "";
#endregion Private Properties
#region Private Methods
private void setupSubscriber()
{
ISubscriber sub = redis.GetSubscriber();
//Subscribe to the channel named messages
sub.Subscribe(_channel, (channel, message) =>
{
Log.Trace($"ch {channel} | {message}");
// messaggio
PubSubEventArgs mea = new PubSubEventArgs(message);
// se qualcuno ascolta sollevo evento nuovo valore...
if (EA_NewMessage != null)
{
EA_NewMessage(this, mea);
}
});
Log.Info($"Subscribed {_channel}");
}
#endregion Private Methods
#region Public Methods
public bool saveAndSendMessage(string memKey, string message)
{
bool answ = false;
// invio notifica tramite il canale richiesto
answ = sendMessage(message);
if (redisDb != null)
{
redisDb.StringSetAsync(memKey, message);
if (enableLog)
{
Log.Info($"Redis Cache Key: {memKey}");
}
}
return answ;
}
/// <summary>
/// Invio messaggio sul canale
/// </summary>
/// <param name="newMess"></param>
/// <returns></returns>
public bool sendMessage(string newMess)
{
bool answ = false;
ISubscriber sub = redis.GetSubscriber();
sub.Publish(_channel, newMess);
return answ;
}
#endregion Public Methods
/// <summary>
/// Invio messaggio sul canale + salvataggio in cache REDIS
/// </summary>
/// <param name="memKey">Chiave REDIS x salvare valore</param>
/// <param name="message"></param>
}
public class PubSubEventArgs : EventArgs
{
#region Public Constructors
public PubSubEventArgs(string messaggio)
{
this.newMessage = messaggio;
}
#endregion Public Constructors
#region Public Properties
public string newMessage { get; set; } = "";
#endregion Public Properties
}
}
+232
View File
@@ -0,0 +1,232 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.Extensions.Configuration;
using MP.Data.DatabaseModels;
using NLog;
#nullable disable
namespace MP.Data
{
public partial class MoonProContext : DbContext
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
public MoonProContext(IConfiguration configuration)
{
_configuration = configuration;
}
public MoonProContext(DbContextOptions<MoonProContext> options) : base(options)
{
}
#endregion Public Constructors
#region Public Properties
public virtual DbSet<AnagArticoli> DbSetArticoli { get; set; }
public virtual DbSet<Macchine> DbSetMacchine { get; set; }
public virtual DbSet<MappaStatoExpl> DbSetMSE { get; set; }
public virtual DbSet<ConfigModel> DbSetConfig { get; set; }
#endregion Public Properties
#region Private Methods
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
#endregion Private Methods
#region Protected Methods
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Mon");
optionsBuilder.UseSqlServer(connString);
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;");
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
modelBuilder.Entity<AnagArticoli>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_AnagArticoli");
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.DescArticolo)
.IsRequired()
.HasMaxLength(250);
entity.Property(e => e.Disegno)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Tipo)
.IsRequired()
.HasMaxLength(50);
});
modelBuilder.Entity<Macchine>(entity =>
{
entity.HasNoKey();
entity.ToView("Macchine");
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.Descrizione).HasMaxLength(50);
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Nome).HasMaxLength(50);
});
modelBuilder.Entity<MappaStatoExpl>(entity =>
{
entity.HasKey(e => e.RowNum);
entity.ToTable("MappaStatoExpl");
entity.Property(e => e.CodArticolo)
.HasMaxLength(50)
.HasDefaultValueSql("('-')");
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.DataInizioOdl)
.HasColumnType("datetime")
.HasColumnName("DataInizioODL");
entity.Property(e => e.DescrizioneStato)
.HasMaxLength(50)
.HasDefaultValueSql("('n.d.')");
entity.Property(e => e.Disegno)
.HasMaxLength(50)
.HasDefaultValueSql("('')");
entity.Property(e => e.Durata)
.HasColumnName("durata")
.HasDefaultValueSql("((0))");
entity.Property(e => e.IdxMacchina).HasMaxLength(50);
entity.Property(e => e.IdxOdl).HasColumnName("idxODL");
entity.Property(e => e.IdxStato)
.HasColumnName("idxStato")
.HasDefaultValueSql("((0))");
entity.Property(e => e.LastUpdate)
.HasColumnType("datetime")
.HasColumnName("lastUpdate");
entity.Property(e => e.Nome).HasMaxLength(50);
entity.Property(e => e.PezziConf).HasDefaultValueSql("((0))");
entity.Property(e => e.PezziProd).HasDefaultValueSql("((0))");
entity.Property(e => e.Semaforo)
.HasMaxLength(50)
.HasDefaultValueSql("('')");
entity.Property(e => e.TCAssegnato)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCAssegnato")
.HasDefaultValueSql("((1))");
entity.Property(e => e.TCEff)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCEff")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TCEffRT)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCEffRT")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TCLav)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCLav")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TCLavRT)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCLavRT")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TCMedio)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCMedio")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TCMedioRt)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCMedioRT")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TempoAuto)
.HasColumnType("decimal(18, 8)")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TempoOn)
.HasColumnType("decimal(18, 8)")
.HasDefaultValueSql("((0))");
entity.Property(e => e.TempoRun)
.HasColumnType("decimal(18, 8)")
.HasDefaultValueSql("((0))");
entity.Property(e => e.Url)
.HasMaxLength(250)
.HasColumnName("url");
});
modelBuilder.Entity<ConfigModel>(entity =>
{
entity.HasKey(e => e.Chiave);
entity.ToTable("Config");
entity.Property(e => e.Chiave)
.HasMaxLength(50)
.HasColumnName("chiave");
entity.Property(e => e.Note).HasColumnName("note");
entity.Property(e => e.Valore).HasColumnName("valore");
entity.Property(e => e.ValoreStd)
.HasColumnName("valoreStd")
.HasComment("Valore di default/riferimento per la variabile");
});
OnModelCreatingPartial(modelBuilder);
}
#endregion Protected Methods
}
}
+377
View File
@@ -0,0 +1,377 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.Extensions.Configuration;
using MP.Data.DatabaseModels;
using NLog;
#nullable disable
namespace MP.Data
{
public partial class MoonPro_STATSContext : DbContext
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
public MoonPro_STATSContext(IConfiguration configuration)
{
_configuration = configuration;
}
public MoonPro_STATSContext(DbContextOptions<MoonPro_STATSContext> options) : base(options)
{
}
#endregion Public Constructors
#region Public Properties
public virtual DbSet<AnagArticoli> DbSetArticoli { get; set; }
public virtual DbSet<AzioniUL> DbSetAzioniUL { get; set; }
public virtual DbSet<ResControlli> DbSetControlli { get; set; }
public virtual DbSet<DdbTurni> DbSetDdbTurni { get; set; }
public virtual DbSet<Macchine> DbSetMacchine { get; set; }
public virtual DbSet<ODL> DbSetODL { get; set; }
public virtual DbSet<ResScarti> DbSetScarti { get; set; }
public virtual DbSet<TurniOee> DbSetTurniOee { get; set; }
public virtual DbSet<UserActionLog> DbSetUserLog { get; set; }
#endregion Public Properties
#region Private Methods
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
#endregion Private Methods
#region Protected Methods
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("Mp.Stats");
optionsBuilder.UseSqlServer(connString);
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;");
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
modelBuilder.Entity<TurniOee>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_OEE_Turni");
entity.Property(e => e.ClasseTempo).HasMaxLength(50);
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.DataRif).HasColumnType("datetime");
entity.Property(e => e.DescArticolo).HasMaxLength(250);
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.TotPeriodo).HasColumnName("totPeriodo");
entity.Property(e => e.Turno)
.IsRequired()
.HasMaxLength(5);
});
modelBuilder.Entity<AnagArticoli>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_AnagArticoli");
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.DescArticolo)
.IsRequired()
.HasMaxLength(250);
entity.Property(e => e.Disegno)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Tipo)
.IsRequired()
.HasMaxLength(50);
});
modelBuilder.Entity<Macchine>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_Macchine");
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.Descrizione).HasMaxLength(50);
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Nome).HasMaxLength(50);
});
modelBuilder.Entity<DdbTurni>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_DDB_Turni");
entity.Property(e => e.ClasseTempo).HasMaxLength(50);
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.DataRif).HasColumnType("datetime");
entity.Property(e => e.DataTurnoFine).HasColumnType("datetime");
entity.Property(e => e.DataTurnoInizio).HasColumnType("datetime");
entity.Property(e => e.Descrizione).HasMaxLength(50);
entity.Property(e => e.FinePeriodo).HasColumnType("datetime");
entity.Property(e => e.FineStato).HasColumnType("datetime");
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.IdxOdl).HasColumnName("IdxODL");
entity.Property(e => e.InizioPeriodo).HasColumnType("datetime");
entity.Property(e => e.InizioStato).HasColumnType("datetime");
entity.Property(e => e.KeyRichiesta).HasMaxLength(50);
entity.Property(e => e.Pallet)
.HasMaxLength(20)
.HasColumnName("pallet");
entity.Property(e => e.TempoCicloBase).HasColumnType("decimal(18, 8)");
entity.Property(e => e.Turno)
.IsRequired()
.HasMaxLength(5);
});
modelBuilder.Entity<AzioniUL>(entity =>
{
entity.HasKey(e => e.Azione);
entity.ToTable("AAUL");
entity.Property(e => e.Azione)
.HasMaxLength(50)
.HasDefaultValueSql("('ND')")
.HasComment("Azione dell'operatore");
entity.Property(e => e.Class)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')");
entity.Property(e => e.Descrizione)
.IsRequired()
.HasMaxLength(50)
.HasDefaultValueSql("('')");
});
modelBuilder.Entity<ResScarti>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_RS");
entity.Property(e => e.Causale)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.Cognome)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.DataOraRif).HasColumnType("datetime");
entity.Property(e => e.Descrizione)
.IsRequired()
.HasMaxLength(250);
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.IdxOdl).HasColumnName("IdxODL");
entity.Property(e => e.KeyRichiesta)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Nome)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Note)
.IsRequired()
.HasMaxLength(250);
});
modelBuilder.Entity<ResControlli>(entity =>
{
entity.HasNoKey();
entity.ToView("vRC");
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.DataOra).HasColumnType("datetime");
entity.Property(e => e.EsitoOk).HasColumnName("EsitoOK");
entity.Property(e => e.IdxControllo).ValueGeneratedOnAdd();
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.IdxOdl).HasColumnName("IdxODL");
entity.Property(e => e.Note)
.IsRequired()
.HasMaxLength(250);
});
modelBuilder.Entity<UserActionLog>(entity =>
{
entity.HasNoKey();
entity.ToView("v_UI_UL");
entity.Property(e => e.Azione)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodMacchina).HasMaxLength(50);
entity.Property(e => e.Cognome)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.DataOraRif).HasColumnType("datetime");
entity.Property(e => e.IdxMacchina)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.IdxOdl).HasColumnName("IdxODL");
entity.Property(e => e.KeyRichiesta)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Nome)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.Qta).HasColumnType("decimal(18, 8)");
entity.Property(e => e.Valore)
.IsRequired()
.HasMaxLength(250);
});
modelBuilder.Entity<ODL>(entity =>
{
entity.HasKey(e => e.IdxOdl)
.HasName("PK_ODL_1");
entity.ToTable("v_UI_ODL");
entity.Property(e => e.IdxOdl)
.ValueGeneratedNever()
.HasColumnName("IdxODL");
entity.Property(e => e.CodArticolo)
.IsRequired()
.HasMaxLength(50);
entity.Property(e => e.CodArticoloParent)
.IsRequired()
.HasDefaultValueSql("('')");
entity.Property(e => e.DataFine).HasColumnType("datetime");
entity.Property(e => e.DataInizio).HasColumnType("datetime");
entity.Property(e => e.DueDate).HasColumnType("datetime");
entity.Property(e => e.IdxMacchina).HasMaxLength(50);
entity.Property(e => e.KeyRichiesta)
.IsRequired()
.HasMaxLength(50)
.HasComment("Chiave: ordine esterno o KIT");
entity.Property(e => e.KeyRichiestaParent)
.IsRequired()
.HasDefaultValueSql("('')")
.HasComment("Chiave: ordine esterno o KIT");
entity.Property(e => e.PzPallet).HasDefaultValueSql("((1))");
entity.Property(e => e.Tcassegnato)
.HasColumnType("decimal(18, 8)")
.HasColumnName("TCAssegnato");
});
OnModelCreatingPartial(modelBuilder);
}
#endregion Protected Methods
}
}
+26
View File
@@ -0,0 +1,26 @@
# Appunti gestione MP-STAT DB
Per la gestione dell'accesso al DB statistiche si opera con EFCore --> app blazor server
## Scaffolding
Per generare le classi da un DB esistente con cui operare EFCore CodeFirst usare lo scaffolding coi seguenti comandi.
Attenzione: la classe DbCOntext viene creata INSIEME alle viste nella folder DatabaseModel (nell'esempio seguente...)
### DB iniziale
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels
### SOLO di tabelle/viste selezionate (con force update)
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels -Tables v_RS, v_TC_Stat, v_TCR, v_TCR_Day, v_UL
## Approfondimenti
Qualche link di approfondimento:
- https://docs.microsoft.com/en-us/ef/core/
- https://docs.microsoft.com/en-us/ef/core/extensions/
- https://www.entityframeworktutorial.net/efcore/create-model-for-existing-database-in-ef-core.aspx
- https://entityframework.net/ef-code-first
Binary file not shown.
+44
View File
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data
{
public class Utils
{
#region Public Methods
public static string ConvMinToTime(double minutes)
{
// FIXME TODO: da rendere parametrico da appsettings.json...
var ts = TimeSpan.FromMinutes(minutes);
string answ = $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}"; //.{ts.Milliseconds}
return answ;
}
public static string ConvMsecToTime(long milliseconds)
{
// FIXME TODO: da rendere parametrico da appsettings.json...
var ts = TimeSpan.FromMilliseconds(milliseconds);
string answ = $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}"; //.{ts.Milliseconds}
return answ;
}
public static async Task SaveToCsv<T>(List<T> reportData, string path)
{
var lines = new List<string>();
IEnumerable<PropertyDescriptor> props = TypeDescriptor.GetProperties(typeof(T)).OfType<PropertyDescriptor>();
var header = string.Join(";", props.ToList().Select(x => x.Name));
lines.Add(header);
var valueLines = reportData.Select(row => string.Join(";", header.Split(';').Select(a => row.GetType().GetProperty(a).GetValue(row, null))));
lines.AddRange(valueLines);
await Task.Run(() => File.WriteAllLines(path, lines.ToArray()));
}
#endregion Public Methods
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
namespace MP.Data
{
public class chartJsData
{
#region Public Classes
public class chartJsTSerie
{
#region Public Properties
public DateTime x { get; set; }
public double y { get; set; }
#endregion Public Properties
}
public class chartJsXY
{
#region Public Properties
public double x { get; set; }
public double y { get; set; }
#endregion Public Properties
}
#endregion Public Classes
}
}
File diff suppressed because it is too large Load Diff
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.FileData.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ArchiveStatusDTO
{
/// <summary>
/// Idx macchina
/// </summary>
public string IdxMacchina { get; set; } = "";
/// <summary>
/// Nome macchina
/// </summary>
public string Nome { get; set; } = "";
/// <summary>
/// Descrizione macchina
/// </summary>
public string Descrizione { get; set; } = "";
/// <summary>
/// Percorso base x macchina
/// </summary>
public string BasePath { get; set; } = "";
/// <summary>
/// Totale file della amcchina
/// </summary>
public int TotFile { get; set; } = 0;
/// <summary>
/// NBumero file modificati da confermare/rifiutare
/// </summary>
public int NumChanged { get; set; } = 0;
/// <summary>
/// Conteggio totale tags x macchina
/// </summary>
public int TotalTags { get; set; }
/// <summary>
/// Numero di file SENZA tag
/// </summary>
public int NoTags { get; set; }
}
}
+60
View File
@@ -0,0 +1,60 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace MP.FileData.DatabaseModels
{
/// <summary>
/// Tabella archivio dei File Programma
/// </summary>
[Table("Files")]
[Index(nameof(IdxMacchina), nameof(Active), nameof(DiskStatus))]
public partial class FileModel
{
#region Public Properties
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int FileId { get; set; }
public bool Active { get; set; } = true;
public string IdxMacchina { get; set; } = "";
public string Name { get; set; } = "";
public int Rev { get; set; } = 0;
public DateTime LastMod { get; set; }
public long Size { get; set; } = 0;
public string Path { get; set; } = "";
public string MimeType { get; set; } = "";
public string MD5 { get; set; } = "";
public FileState DiskStatus { get; set; } = FileState.Ok;
public DateTime LastCheck { get; set; } = DateTime.Now.AddYears(-1);
public byte[] FileContent { get; set; }
public ICollection<TagModel> Tags { get; set; }
[NotMapped]
public string FileStringContent
{
get
{
return Encoding.UTF8.GetString(FileContent);
}
set
{
// serializzo a byte
FileContent = Encoding.ASCII.GetBytes(value);
}
}
[ForeignKey("IdxMacchina")]
public virtual MacchinaModel Macchina { get; set; }
#endregion Public Properties
}
}
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace MP.FileData.DatabaseModels
{
[Table("Macchine")]
public partial class MacchinaModel
{
#region Public Properties
[Key]
public string IdxMacchina { get; set; } = "";
public string RuleName { get; set; } = "";
public string Nome { get; set; } = "";
public string Descrizione { get; set; } = "";
public string BasePath { get; set; } = "";
public string ImgUrl { get; set; } = "";
public string Note { get; set; } = "";
public int ShowOrder { get; set; } = 999;
#endregion Public Properties
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace MP.FileData.DatabaseModels
{
[Table("Tags")]
public partial class TagModel
{
[Key]
public string TagId { get; set; }
public ICollection<FileModel> Files { get; set; }
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.FileData
{
/// <summary>
/// Stato File
/// </summary>
public enum FileState
{
ND = 0,
Changed,
Deleted,
Ok
}
}
+44
View File
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.FileData
{
public class FileUtils
{
#region Public Methods
/// <summary>
/// Elenco dei file data la directory da controllare
/// </summary>
/// <param name="path"></param>
/// <param name="searchPattern"></param>
/// <returns></returns>
public static FileInfo[] GetFileList(string path, string searchPattern)
{
//string[] answ = Directory.GetFiles(path, searchPattern);
DriveInfo di = new DriveInfo(path);
DirectoryInfo dirInfo = di.RootDirectory;
FileInfo[] answ = dirInfo.GetFiles("*.*");
return answ;
}
public static async Task SaveToCsv<T>(List<T> reportData, string path)
{
var lines = new List<string>();
IEnumerable<PropertyDescriptor> props = TypeDescriptor.GetProperties(typeof(T)).OfType<PropertyDescriptor>();
var header = string.Join(";", props.ToList().Select(x => x.Name));
lines.Add(header);
var valueLines = reportData.Select(row => string.Join(";", header.Split(';').Select(a => row.GetType().GetProperty(a).GetValue(row, null))));
lines.AddRange(valueLines);
await Task.Run(() => File.WriteAllLines(path, lines.ToArray()));
}
#endregion Public Methods
}
}
+27
View File
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="NLog" Version="4.7.11" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>
+170
View File
@@ -0,0 +1,170 @@
// <auto-generated />
using System;
using MP.FileData;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace MP.FileData.Migrations
{
[DbContext(typeof(MoonPro_ProgContext))]
[Migration("20210913153816_InitDb")]
partial class InitDb
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.9")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("FileModelTagModel", b =>
{
b.Property<int>("FilesFileId")
.HasColumnType("int");
b.Property<string>("TagsTagId")
.HasColumnType("nvarchar(450)");
b.HasKey("FilesFileId", "TagsTagId");
b.HasIndex("TagsTagId");
b.ToTable("FileModelTagModel");
});
modelBuilder.Entity("MP.FileData.DatabaseModels.FileModel", b =>
{
b.Property<int>("FileId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<bool>("Active")
.HasColumnType("bit");
b.Property<int>("DiskStatus")
.HasColumnType("int");
b.Property<byte[]>("FileContent")
.HasColumnType("varbinary(max)");
b.Property<string>("IdxMacchina")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("LastCheck")
.HasColumnType("datetime2");
b.Property<DateTime>("LastMod")
.HasColumnType("datetime2");
b.Property<string>("MD5")
.HasColumnType("nvarchar(max)");
b.Property<string>("MimeType")
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("Path")
.HasColumnType("nvarchar(max)");
b.Property<int>("Rev")
.HasColumnType("int");
b.Property<long>("Size")
.HasColumnType("bigint");
b.HasKey("FileId");
b.HasIndex("IdxMacchina", "Active", "DiskStatus");
b.ToTable("Files");
});
modelBuilder.Entity("MP.FileData.DatabaseModels.MacchinaModel", b =>
{
b.Property<string>("IdxMacchina")
.HasColumnType("nvarchar(450)");
b.Property<string>("BasePath")
.HasColumnType("nvarchar(max)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("ImgUrl")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Note")
.HasColumnType("nvarchar(max)");
b.Property<string>("RuleName")
.HasColumnType("nvarchar(max)");
b.Property<int>("ShowOrder")
.HasColumnType("int");
b.HasKey("IdxMacchina");
b.ToTable("Macchine");
b.HasData(
new
{
IdxMacchina = "0",
BasePath = "",
Descrizione = "--- Tutte ---",
ImgUrl = "",
Nome = "--- Tutte ---",
Note = "",
RuleName = "0",
ShowOrder = 0
});
});
modelBuilder.Entity("MP.FileData.DatabaseModels.TagModel", b =>
{
b.Property<string>("TagId")
.HasColumnType("nvarchar(450)");
b.HasKey("TagId");
b.ToTable("Tags");
});
modelBuilder.Entity("FileModelTagModel", b =>
{
b.HasOne("MP.FileData.DatabaseModels.FileModel", null)
.WithMany()
.HasForeignKey("FilesFileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MP.FileData.DatabaseModels.TagModel", null)
.WithMany()
.HasForeignKey("TagsTagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("MP.FileData.DatabaseModels.FileModel", b =>
{
b.HasOne("MP.FileData.DatabaseModels.MacchinaModel", "Macchina")
.WithMany()
.HasForeignKey("IdxMacchina");
b.Navigation("Macchina");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,124 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace MP.FileData.Migrations
{
public partial class InitDb : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Macchine",
columns: table => new
{
IdxMacchina = table.Column<string>(type: "nvarchar(450)", nullable: false),
RuleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
Nome = table.Column<string>(type: "nvarchar(max)", nullable: true),
Descrizione = table.Column<string>(type: "nvarchar(max)", nullable: true),
BasePath = table.Column<string>(type: "nvarchar(max)", nullable: true),
ImgUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
Note = table.Column<string>(type: "nvarchar(max)", nullable: true),
ShowOrder = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Macchine", x => x.IdxMacchina);
});
migrationBuilder.CreateTable(
name: "Tags",
columns: table => new
{
TagId = table.Column<string>(type: "nvarchar(450)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Tags", x => x.TagId);
});
migrationBuilder.CreateTable(
name: "Files",
columns: table => new
{
FileId = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Active = table.Column<bool>(type: "bit", nullable: false),
IdxMacchina = table.Column<string>(type: "nvarchar(450)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Rev = table.Column<int>(type: "int", nullable: false),
LastMod = table.Column<DateTime>(type: "datetime2", nullable: false),
Size = table.Column<long>(type: "bigint", nullable: false),
Path = table.Column<string>(type: "nvarchar(max)", nullable: true),
MimeType = table.Column<string>(type: "nvarchar(max)", nullable: true),
MD5 = table.Column<string>(type: "nvarchar(max)", nullable: true),
DiskStatus = table.Column<int>(type: "int", nullable: false),
LastCheck = table.Column<DateTime>(type: "datetime2", nullable: false),
FileContent = table.Column<byte[]>(type: "varbinary(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Files", x => x.FileId);
table.ForeignKey(
name: "FK_Files_Macchine_IdxMacchina",
column: x => x.IdxMacchina,
principalTable: "Macchine",
principalColumn: "IdxMacchina",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "FileModelTagModel",
columns: table => new
{
FilesFileId = table.Column<int>(type: "int", nullable: false),
TagsTagId = table.Column<string>(type: "nvarchar(450)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FileModelTagModel", x => new { x.FilesFileId, x.TagsTagId });
table.ForeignKey(
name: "FK_FileModelTagModel_Files_FilesFileId",
column: x => x.FilesFileId,
principalTable: "Files",
principalColumn: "FileId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_FileModelTagModel_Tags_TagsTagId",
column: x => x.TagsTagId,
principalTable: "Tags",
principalColumn: "TagId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "Macchine",
columns: new[] { "IdxMacchina", "BasePath", "Descrizione", "ImgUrl", "Nome", "Note", "RuleName", "ShowOrder" },
values: new object[] { "0", "", "--- Tutte ---", "", "--- Tutte ---", "", "0", 0 });
migrationBuilder.CreateIndex(
name: "IX_FileModelTagModel_TagsTagId",
table: "FileModelTagModel",
column: "TagsTagId");
migrationBuilder.CreateIndex(
name: "IX_Files_IdxMacchina_Active_DiskStatus",
table: "Files",
columns: new[] { "IdxMacchina", "Active", "DiskStatus" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "FileModelTagModel");
migrationBuilder.DropTable(
name: "Files");
migrationBuilder.DropTable(
name: "Tags");
migrationBuilder.DropTable(
name: "Macchine");
}
}
}
@@ -0,0 +1,168 @@
// <auto-generated />
using System;
using MP.FileData;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace MP.FileData.Migrations
{
[DbContext(typeof(MoonPro_ProgContext))]
partial class MoonPro_ProgContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.9")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("FileModelTagModel", b =>
{
b.Property<int>("FilesFileId")
.HasColumnType("int");
b.Property<string>("TagsTagId")
.HasColumnType("nvarchar(450)");
b.HasKey("FilesFileId", "TagsTagId");
b.HasIndex("TagsTagId");
b.ToTable("FileModelTagModel");
});
modelBuilder.Entity("MP.FileData.DatabaseModels.FileModel", b =>
{
b.Property<int>("FileId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<bool>("Active")
.HasColumnType("bit");
b.Property<int>("DiskStatus")
.HasColumnType("int");
b.Property<byte[]>("FileContent")
.HasColumnType("varbinary(max)");
b.Property<string>("IdxMacchina")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("LastCheck")
.HasColumnType("datetime2");
b.Property<DateTime>("LastMod")
.HasColumnType("datetime2");
b.Property<string>("MD5")
.HasColumnType("nvarchar(max)");
b.Property<string>("MimeType")
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("Path")
.HasColumnType("nvarchar(max)");
b.Property<int>("Rev")
.HasColumnType("int");
b.Property<long>("Size")
.HasColumnType("bigint");
b.HasKey("FileId");
b.HasIndex("IdxMacchina", "Active", "DiskStatus");
b.ToTable("Files");
});
modelBuilder.Entity("MP.FileData.DatabaseModels.MacchinaModel", b =>
{
b.Property<string>("IdxMacchina")
.HasColumnType("nvarchar(450)");
b.Property<string>("BasePath")
.HasColumnType("nvarchar(max)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("ImgUrl")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Note")
.HasColumnType("nvarchar(max)");
b.Property<string>("RuleName")
.HasColumnType("nvarchar(max)");
b.Property<int>("ShowOrder")
.HasColumnType("int");
b.HasKey("IdxMacchina");
b.ToTable("Macchine");
b.HasData(
new
{
IdxMacchina = "0",
BasePath = "",
Descrizione = "--- Tutte ---",
ImgUrl = "",
Nome = "--- Tutte ---",
Note = "",
RuleName = "0",
ShowOrder = 0
});
});
modelBuilder.Entity("MP.FileData.DatabaseModels.TagModel", b =>
{
b.Property<string>("TagId")
.HasColumnType("nvarchar(450)");
b.HasKey("TagId");
b.ToTable("Tags");
});
modelBuilder.Entity("FileModelTagModel", b =>
{
b.HasOne("MP.FileData.DatabaseModels.FileModel", null)
.WithMany()
.HasForeignKey("FilesFileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MP.FileData.DatabaseModels.TagModel", null)
.WithMany()
.HasForeignKey("TagsTagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("MP.FileData.DatabaseModels.FileModel", b =>
{
b.HasOne("MP.FileData.DatabaseModels.MacchinaModel", "Macchina")
.WithMany()
.HasForeignKey("IdxMacchina");
b.Navigation("Macchina");
});
#pragma warning restore 612, 618
}
}
}
+29
View File
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore;
using MP.FileData.DatabaseModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.FileData
{
public static class ModelBuilderExtensions
{
#region Public Methods
/// <summary>
/// Estensione per seed iniziale dei dati nel DB
/// </summary>
/// <param name="modelBuilder"></param>
public static void Seed(this ModelBuilder modelBuilder)
{
// inizializzazione dei valori di default x MACCHINA
modelBuilder.Entity<MacchinaModel>().HasData(
new MacchinaModel { IdxMacchina = "0", RuleName = "0", Descrizione = "--- Tutte ---", Nome = "--- Tutte ---", BasePath = "", ImgUrl = "", Note = "", ShowOrder = 0 }
);
}
#endregion Public Methods
}
}
+104
View File
@@ -0,0 +1,104 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.Extensions.Configuration;
using MP.FileData.DatabaseModels;
using NLog;
namespace MP.FileData
{
public partial class MoonPro_ProgContext : DbContext
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
[Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")]
public MoonPro_ProgContext()
{
}
public MoonPro_ProgContext(IConfiguration configuration)
{
_configuration = configuration;
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 01");
}
}
public MoonPro_ProgContext(DbContextOptions<MoonPro_ProgContext> options) : base(options)
{
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 02");
}
}
#endregion Public Constructors
#region Public Properties
public virtual DbSet<MacchinaModel> DbSetMacchine { get; set; }
public virtual DbSet<FileModel> DbSetProgFile { get; set; }
public virtual DbSet<TagModel> DbSetTags { get; set; }
#endregion Public Properties
#region Private Methods
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
#endregion Private Methods
#region Protected Methods
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("MP.Prog");
if (!string.IsNullOrEmpty(connString))
{
optionsBuilder.UseSqlServer(connString);
}
else
{
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_PROG;Trusted_Connection=True;");
}
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
//
modelBuilder.Seed();
OnModelCreatingPartial(modelBuilder);
}
#endregion Protected Methods
}
}
+83
View File
@@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.FileData
{
public enum SearchMode
{
/// <summary>
/// Ricerca occorrenze di una RegExp dentro il contenuto del file
/// </summary>
StringOnFile,
/// <summary>
/// Cerca da path relativo + nome file
/// </summary>
PathAndName
}
public class SearchRules
{
#region Public Properties
/// <summary>
/// Estensioni file esclusi
/// </summary>
public List<string> ExcludedFileExt { get; set; } = new List<string>();
/// <summary>
/// Pattern esclusione Tags (stop-words)
/// </summary>
public List<string> ExcludedTags { get; set; } = new List<string>();
/// <summary>
/// Pattern in formato RegExp
/// </summary>
public Dictionary<string, string> FileNameExtReplace { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Quantità massima di caratteri da analizzare, 0 = tutti
/// </summary>
public int MaxChar2Search { get; set; } = 100;
/// <summary>
/// Modalità ricerca
/// </summary>
public SearchMode Mode { get; set; } = SearchMode.StringOnFile;
/// <summary>
/// Nome della regola di ricerca
/// </summary>
public string Name { get; set; } = "ND";
/// <summary>
/// Configurazione opzionale x rimozione filename da output finali
/// </summary>
public bool OutExcludeFileName { get; set; } = true;
/// <summary>
/// Replace in uscita per "bonificare" il tag
/// </summary>
public Dictionary<string, string> OutReplace { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Pattern in formato RegExp
/// </summary>
public string RegExPattern { get; set; } = "";
/// <summary>
/// Configurazione opzionale x sostituzione placeholder {{fileName}} in RegExp con il VERO nome file
/// </summary>
public bool RegExRepFileName { get; set; } = true;
/// <summary>
/// Configurazione opzionale x sostituzione carriage return --> spazi
/// </summary>
public bool ReplaceCR { get; set; } = true;
#endregion Public Properties
}
}
+158
View File
@@ -0,0 +1,158 @@
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace MP.FileData
{
/// <summary>
/// Helper estrazione tag x programmi
/// </summary>
public class TagsUtils
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Protected Fields
protected static List<string> ExcludeTags = new List<string>();
#endregion Protected Fields
#region Public Methods
/// <summary>
/// Cerca tag a aprtire da directory + nome file, ignorando delle stopword
///
/// es: ...\BUSSOLE.WPD\172L_EST8.MPF --> "BUSSOLE", "172L_EST8"
/// </summary>
/// <param name="filePath">Nome del file (path completo)</param>
/// <param name="currRule">Parametri analisi</param>
/// <returns></returns>
public static List<string> searchPathName(string filePath, string basePath, SearchRules currRule)
{
List<string> answ = new List<string>();
string fileName = Path.GetFileName(filePath);
#if false
// dal nome se richeisto estraggo...
if (!currRule.OutExcludeFileName)
{
// bonifico
foreach (var item in currRule.OutReplace)
{
fileName = fileName.Replace(item.Key, item.Value);
}
// aggiungo fileName
answ.Add(fileName);
}
#endif
// ora da path... escludo base e file...
string dirPath = filePath.Replace(basePath, "");
// bonifico
foreach (var item in currRule.OutReplace)
{
dirPath = dirPath.Replace(item.Key, item.Value);
}
// splitto per "/"
var pathTags = dirPath.Split(@"\");
foreach (var item in pathTags)
{
if (!string.IsNullOrWhiteSpace(item))
{
// fix replace filtro
answ.Add(item);
}
}
// se nullo --> segnalo!
if (answ.Count == 0)
{
Log.Warn($"searchPathName Attenzione Tag non trovati | {filePath} | basePath: {basePath}");
}
return answ;
}
/// <summary>
/// Cerca tag di commento inseriti nel formato
/// NOME_PROG(commento)
///
/// es: O00123(172L D20.5) --> estrae 172L, D20.5
/// </summary>
/// <param name="fileName">Nome del file (da cercare per contenuto)</param>
/// <param name="fileContent">Contenuto del file da analizzare</param>
/// <param name="currRule">Parametri analisi</param>
/// <returns></returns>
public static List<string> searchProgComment(string fileName, string fileContent, SearchRules currRule)
{
// verifico se trimmare contenuto file
if (fileContent.Length > currRule.MaxChar2Search && currRule.MaxChar2Search > 0)
{
fileContent = fileContent.Substring(0, currRule.MaxChar2Search);
}
// bonifico: a capo --> spazi
fileContent = fileContent.Replace(Environment.NewLine, " ").ToUpper();
//string pattern = $"\\b{fileName}" + @".{0,2}\([\w\d\s.]+\)";
string pattern = currRule.RegExPattern;
if (currRule.RegExRepFileName)
{
pattern = pattern.Replace("{{fileName}}", fileName);
}
List<string> answ = new List<string>();
if (fileContent.Length > 0)
{
// uso regexp
MatchCollection matchTags = Regex.Matches(fileContent, pattern);
if (matchTags.Count > 0)
{
for (int count = 0; count < matchTags.Count; count++)
{
string currMatch = matchTags[count].Value;
// bonifica preliminare (se richiesta)
if (currRule.OutExcludeFileName)
{
currMatch = currMatch.Replace(fileName, "");
}
if (currRule.OutReplace.Count > 0)
{
foreach (var item in currRule.OutReplace)
{
currMatch = currMatch.Replace(item.Key, item.Value);
}
}
// trim finale
currMatch = currMatch.Trim();
// split con spazi
var splitTags = currMatch.Split(" ");
foreach (var item in splitTags)
{
if (!string.IsNullOrEmpty(item))
{
if (!currRule.ExcludedTags.Contains(item) && item != fileName)
{
// esclusione valori ignorati
answ.Add(item);
}
}
}
}
}
}
// se nullo --> segnalo!
if (answ.Count == 0)
{
Log.Warn($"searchProgComment Attenzione Tag non trovati | {fileName} | pattern: {pattern}{Environment.NewLine}{fileContent}");
}
return answ;
}
#endregion Public Methods
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"version": 1,
"isRoot": true,
"tools": {}
}

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