587 Commits

Author SHA1 Message Date
Samuele Locatelli d527f97067 Merge branch 'release/FixUpdatePipe_10' 2025-12-04 09:29:21 +01:00
Samuele Locatelli 48d5586866 Distinzione eventi task/update in InstallInfoStats + refresh 2025-12-04 09:29:02 +01:00
Samuele Locatelli cd6313e82f Merge tag 'FixUpdatePipe_09' into develop
Fix gestione eliminazione chiavi scadute x licenze app aggiornate
2025-12-03 19:09:06 +01:00
Samuele Locatelli 8c07e5ba01 Merge branch 'release/FixUpdatePipe_09' 2025-12-03 19:08:53 +01:00
Samuele Locatelli 99268f7d79 Correzione controlli eliminazione subLic x app controllate 2025-12-03 19:08:37 +01:00
Samuele Locatelli 31b4bb344f Merge tag 'FixUpdatePipe_08' into develop
Cambio condizione eliminabilità record vecchi
2025-12-03 18:27:03 +01:00
Samuele Locatelli 7d04ddf25f Merge branch 'release/FixUpdatePipe_08' 2025-12-03 18:26:54 +01:00
Samuele Locatelli 7a0c6efbe1 Modifica condizione eliminazione record scaduti 2025-12-03 18:26:37 +01:00
Samuele Locatelli f07e4d4a76 Merge tag 'FixUpdatePipe_07' into develop
Ancora update gestione licenze scadute
2025-12-03 18:21:23 +01:00
Samuele Locatelli 59a01f3af6 Merge branch 'release/FixUpdatePipe_07' 2025-12-03 18:21:04 +01:00
Samuele Locatelli 406931a475 Update catena aggiornamento (da riprovare) 2025-12-03 18:20:48 +01:00
Samuele Locatelli 54f499f2d3 Merge tag 'FixUpdatePipe_06' into develop
Ottimizzazione gestione licenze scadute con cleanup (da provare...)
2025-12-03 17:44:36 +01:00
Samuele Locatelli 237f4472ee Merge branch 'release/FixUpdatePipe_06' 2025-12-03 17:44:22 +01:00
Samuele Locatelli 4ad5aca746 Metodo alternativo cleanup lcenze scadute 2025-12-03 17:44:05 +01:00
Samuele Locatelli 78cf9e354d Merge tag 'FixUpdatePipe_05' into develop
Modifica condizione upsert info versione da check CodApp preliminare
2025-12-03 17:15:34 +01:00
Samuele Locatelli e03e581ae0 Merge branch 'release/FixUpdatePipe_05' 2025-12-03 17:15:09 +01:00
Samuele Locatelli 08677aabbe Modifica condizione update info con check esistenza CodApp vs log 2025-12-03 17:14:53 +01:00
Samuele Locatelli dc3e48e7c6 Merge tag 'FixUpdatePipe_04' into develop
Update nuova tab log cambio CodImp
2025-12-03 16:55:08 +01:00
Samuele Locatelli e7b0b15a57 Merge branch 'release/FixUpdatePipe_04' 2025-12-03 16:54:55 +01:00
Samuele Locatelli c6dfa7915b Aggiunta
- gestione LogCodImp
- migrazione
2025-12-03 16:52:22 +01:00
Samuele Locatelli 925715095a Merge tag 'FixUpdatePipe_03' into develop
Update x gestione log e check subLic migliorato
2025-12-03 15:45:27 +01:00
Samuele Locatelli c0991acd28 Merge branch 'release/FixUpdatePipe_03' 2025-12-03 15:45:16 +01:00
Samuele Locatelli 25af587aec Fix gestione errori e log x licenze mismatch 2025-12-03 15:44:59 +01:00
Samuele Locatelli f09147d98b Merge tag 'FixUpdatePipe_02' into develop
Update display versioni x cliente
2025-12-03 12:16:44 +01:00
Samuele Locatelli 4b9358556e Merge branch 'release/FixUpdatePipe_02' 2025-12-03 12:16:29 +01:00
Samuele Locatelli aec80af8bd update order display(vers, cli, install) 2025-12-03 12:16:11 +01:00
Samuele Locatelli 896e1e8fc6 Merge tag 'FixUpdatePipe_01' into develop
Update pipe messaggi (ope) + update nuget vari
2025-12-03 11:18:14 +01:00
Samuele Locatelli f2c7832ecb Merge branch 'release/FixUpdatePipe_01' 2025-12-03 11:18:02 +01:00
Samuele Locatelli c9a2e3f7f6 Update nuget più urgenti 2025-12-03 11:17:17 +01:00
Samuele Locatelli 5b0101c30a Gestione message pipe
- review naming task/update
- review condizioni invio
2025-12-03 10:56:07 +01:00
Samuele Locatelli 24387b2432 ancora update display info vers 2025-12-03 09:03:03 +01:00
Samuele Locatelli 058abcfa95 Aggiunta metodo reset stato install + cambio x display info aggiornate immediato 2025-12-03 09:02:46 +01:00
Samuele Locatelli 86e8011c2c Merge tag 'FixFlushRedis_01' into develop
Fix gestione flush cache Redis
2025-09-12 12:17:56 +02:00
Samuele Locatelli 48f1931f25 Merge branch 'release/FixFlushRedis_01' 2025-09-12 12:17:47 +02:00
Samuele Locatelli 4f4e163b6e Fix modalità flush cache Redis come da pattern MAPO 2025-09-12 12:17:07 +02:00
Samuele Locatelli 2fb1960f80 Merge tag 'FixRedisSentinel_01' into develop
modifica conf redis in ufficiox  sentinel (riduzione da 11)
2025-05-13 14:54:10 +02:00
Samuele Locatelli 1b03858140 Merge branch 'release/FixRedisSentinel_01' 2025-05-13 14:53:58 +02:00
Samuele Locatelli eb36a7459e Fix conf redis ufficio x sentinel 2025-05-13 14:53:15 +02:00
Samuele Locatelli 297a69cb68 update conf 2025-05-07 08:35:21 +02:00
Samuele Locatelli 062bd1e0a0 update pwd x invio email 2025-05-07 08:34:50 +02:00
Samuele Locatelli dba1fcb6e9 Merge tag 'FixReportStats_01' into develop
Fix gestione ricerca dati DTO da enroll con SubLic
2025-04-03 18:16:46 +02:00
Samuele Locatelli 9a79f0d179 Merge branch 'release/FixReportStats_01' 2025-04-03 18:16:26 +02:00
Samuele Locatelli 501c472c6a Ancora bonifica info app non attive 2025-04-03 18:15:55 +02:00
Samuele Locatelli 5d72d21fb1 Stat installazioni:
Update gestione paginazione (visibile solo dove serve) + fix calcolo di alcuni intems male filtrati
2025-04-03 17:47:31 +02:00
Samuele Locatelli 8c0aee6662 Merge tag 'EnrollSearchFix_01' into develop
Update LiMan.UI x ricerca enroll passati
2025-03-25 18:09:07 +01:00
Samuele Locatelli 079eefa03e Merge branch 'release/EnrollSearchFix_01' 2025-03-25 18:08:51 +01:00
Samuele Locatelli 50d77248f9 LiMan.UI
- fix ricerca ultime attivazioni con sel periodo
- trim elenco clienti attivazioni da elenco
2025-03-25 18:03:51 +01:00
Samuele Locatelli 75eaa34e07 Merge tag 'AddDeleteEnroll_05' into develop
Fix display azioni x licenze enroll accettate in modale
2025-02-07 16:54:31 +01:00
Samuele Locatelli 1f0bcf7de2 Merge branch 'release/AddDeleteEnroll_05' 2025-02-07 16:54:15 +01:00
Samuele Locatelli ae1d5c2758 Update display UI enroll accettati 2025-02-07 16:53:56 +01:00
Samuele Locatelli c1f4b88908 Merge tag 'AddDeleteEnroll_04' into develop
Update rec licenza
2025-02-06 17:13:51 +01:00
Samuele Locatelli 8af0fb00fc Merge branch 'release/AddDeleteEnroll_04' 2025-02-06 17:13:44 +01:00
Samuele Locatelli e3b4c87e46 Ancora update eliminazione rec install vecchi x rimozione licenza 2025-02-06 17:13:26 +01:00
Samuele Locatelli b6ff4a90ce Merge tag 'AddDeleteEnroll_03' into develop
Fix editing licenza come modale x evitare cambio selezione
2025-02-06 16:34:58 +01:00
Samuele Locatelli 2c56252ac5 Merge branch 'release/AddDeleteEnroll_03' 2025-02-06 16:29:29 +01:00
Samuele Locatelli 1d98249fed update pagina edit enroll e licenze come modale 2025-02-06 16:29:11 +01:00
Samuele Locatelli 69200f1335 Merge tag 'AddDeleteEnroll_02' into develop
Aggiunta cancellazione impiego licenza
2025-02-06 15:23:26 +01:00
Samuele Locatelli 2b92533d47 Merge branch 'release/AddDeleteEnroll_02' 2025-02-06 15:23:16 +01:00
Samuele Locatelli 061c528ea5 Modifica cancellazione lic + attivazione 2025-02-06 15:22:54 +01:00
Samuele Locatelli f03eb81d7e Merge tag 'AddDeleteEnroll_01' into develop
Aggiunto cancellazione record enroll
2025-02-06 12:07:13 +01:00
Samuele Locatelli a2a7b66241 Merge branch 'release/AddDeleteEnroll_01' 2025-02-06 12:06:53 +01:00
Samuele Locatelli 92295f29be Update x cancellazione richieste enroll da LiMan UI 2025-02-06 12:06:25 +01:00
Samuele Locatelli 9667c07689 Merge tag 'CleanOldRedisCache_03' into develop
Update comportamenti selezioni varie
2025-02-03 19:20:52 +01:00
Samuele Locatelli 3874950313 Merge branch 'release/CleanOldRedisCache_03' 2025-02-03 19:20:41 +01:00
Samuele Locatelli 42d07b113c Update comportamenti perdita selezioni varie 2025-02-03 19:20:21 +01:00
Samuele Locatelli 45aefc8a48 Merge tag 'CleanOldRedisCache_02' into develop
Integrazione DataAccess methods tra UI ed API + prime chiamate
 multi-client
2025-02-03 18:16:36 +01:00
Samuele Locatelli e30b1f34c4 Merge branch 'release/CleanOldRedisCache_02' 2025-02-03 18:15:30 +01:00
Samuele Locatelli 2c42844dee Riorganizzazione codice DataServices tra UI e API, riorg chiamate globali multi-inst 2025-02-03 18:15:07 +01:00
Samuele Locatelli ef16416821 Continuo riorganizzazione codice API in classe common: resta da verificare metodi commentati prima del delivery in prod 2025-02-01 12:44:40 +01:00
Samuele Locatelli b9f5c3c92b Riorganizzazione codice strati DataAdapter (Common/UI) 2025-02-01 10:21:40 +01:00
Samuele Locatelli 6fb1743507 Merge tag 'CleanOldRedisCache_01' into develop
Rimozione vecchi riferimenti cache distribuita redis
2025-01-29 10:14:01 +01:00
Samuele Locatelli 6484635d7f Merge branch 'release/CleanOldRedisCache_01' 2025-01-29 10:13:36 +01:00
Samuele Locatelli 290af1b978 Completo rimozione pacchetto cache vecchio + riferimenti e nuget 2025-01-29 10:12:57 +01:00
Samuele Locatelli 1a3ee2a946 Ancora rimozione metodi cache obsoleti 2025-01-29 09:49:25 +01:00
Samuele Locatelli 9210e4c092 Continuo migrazione servizio cache Redis 2025-01-29 09:35:10 +01:00
Samuele Locatelli fcdef662b2 Fix gestione filtri NLog x eventi MS indesiderati + update gestione redis new x UI 2025-01-29 09:06:21 +01:00
Samuele Locatelli 798acb1392 Merge tag 'AddActiveCheck_02' into develop
Update metodi REDIS x registrazione statistiche uso
2025-01-29 07:41:59 +01:00
Samuele Locatelli df9225b6ae Merge branch 'release/AddActiveCheck_02' 2025-01-29 07:41:40 +01:00
Samuele Locatelli 24b56588ae Update gestione counter azioni 2025-01-29 07:41:18 +01:00
Samuele Locatelli 19be2f8878 Merge tag 'AddActiveCheck_01' into develop
Aggiunta rec info updater attivi x action tramite API
2025-01-29 07:15:57 +01:00
Samuele Locatelli 964dc647a3 Merge branch 'release/AddActiveCheck_01' 2025-01-29 07:15:26 +01:00
Samuele Locatelli 8f3a1d2b90 Aggiunta traking azioni (generico) di ogni updater attivo 2025-01-29 07:14:58 +01:00
Samuele Locatelli 2b15354156 Merge tag 'AddBackupConf_01' into develop
Update x metodi salvataggio conf da remoto
2025-01-28 18:55:25 +01:00
Samuele Locatelli 89c8577080 Merge branch 'release/AddBackupConf_01' 2025-01-28 18:54:41 +01:00
Samuele Locatelli 349192f648 Update x gestione nuovi metodi da EgwACC aggiornato (upload conf) 2025-01-28 18:53:44 +01:00
Samuele Locatelli a4021798ac Merge tag 'AddMassiveCmd_04' into develop
Ancora update display stats aggregate comandi
2025-01-25 10:41:31 +01:00
Samuele Locatelli 7583f8df7d Merge branch 'release/AddMassiveCmd_04' 2025-01-25 10:40:32 +01:00
Samuele Locatelli 4c5ce09b9b Update navigazione dettaglio update richieste aperte x ACC 2025-01-25 10:40:07 +01:00
Samuele Locatelli 439654a945 Continuo riorganizzazione servizi da specifico a common x UI 2025-01-24 19:07:20 +01:00
Samuele Locatelli 8eadd17ad6 Correzione display status ACC in comunicazione 2025-01-24 19:00:56 +01:00
Samuele Locatelli a126e4ec1d Merge tag 'AddMassiveCmd_03' into develop
Aggiunta metodi x spsotare classi apps in common class
2025-01-24 18:52:43 +01:00
Samuele Locatelli 536f90e95d Merge branch 'release/AddMassiveCmd_03' 2025-01-24 18:52:21 +01:00
Samuele Locatelli 3fcb4fff25 spostamento ulteriori metodi in classe common 2025-01-24 18:52:03 +01:00
Samuele Locatelli 7014819b14 Merge tag 'AddMassiveCmd_02' into develop
Update x gestione ritorni massivi da API + inizio accorpamento servizi
DB
2025-01-24 18:22:41 +01:00
Samuele Locatelli 84c00577a1 Merge branch 'release/AddMassiveCmd_02' 2025-01-24 18:22:20 +01:00
Samuele Locatelli b85b70847d Update API x record avanzamento list task 2025-01-24 18:16:11 +01:00
Samuele Locatelli 360836d005 Merge tag 'AddMassiveCmd_01' into develop
Test invio massivo comandi (da provare)
2025-01-24 08:29:46 +01:00
Samuele Locatelli fcf9291808 Merge branch 'release/AddMassiveCmd_01' 2025-01-24 08:29:36 +01:00
Samuele Locatelli 6886cc6810 Aggiunta gestione massiva richiesta status e device info... 2025-01-24 08:28:58 +01:00
Samuele Locatelli 9865de3c3d Inizio revisone pagina statistiche da separare 2025-01-23 19:47:17 +01:00
Samuele Locatelli 9680272843 Merge tag 'AddConfMan_03' into develop
Fix condizione selezione in cascata errata
2025-01-21 16:29:13 +01:00
Samuele Locatelli cf13c89346 Merge branch 'release/AddConfMan_03' 2025-01-21 16:28:50 +01:00
Samuele Locatelli d3469fbca8 Fix condizione selezione errata in cascata 2025-01-21 16:28:29 +01:00
Samuele Locatelli d92df51ced Merge tag 'AddConfMan_02' into develop
Aggiunta metodi x richiesta update app remote
2025-01-21 15:42:43 +01:00
Samuele Locatelli 54ccb074dd Merge branch 'release/AddConfMan_02' 2025-01-21 15:42:24 +01:00
Samuele Locatelli 4e6d69cc89 Aggiunta metodi x invio richiesta update apps 2025-01-21 15:42:06 +01:00
Samuele Locatelli 0496d5b2e9 Merge tag 'AddConfMan_01' into develop
Aggiunta gestione editing conf + fix vari
2025-01-21 12:22:43 +01:00
Samuele Locatelli 8a8d90f9ab Merge branch 'release/AddConfMan_01' 2025-01-21 12:22:25 +01:00
Samuele Locatelli e0a9eb4966 Aggiunta task x richiesta salvataggio conf aggiornata al device remoto + update gestione conf con delete e ordinamento 2025-01-21 12:22:05 +01:00
Samuele Locatelli 388d776308 Aggiunta metodi gestione editing config, ok add/delete/update 2025-01-21 10:56:14 +01:00
Samuele Locatelli b913f27265 Merge tag 'AddLicData_02' into develop
Update x dsplay info ip/startup
2025-01-20 20:10:22 +01:00
Samuele Locatelli 921753f162 Merge branch 'release/AddLicData_02' 2025-01-20 20:10:06 +01:00
Samuele Locatelli d849c87ccd Update display info Ip/Startup 2025-01-20 20:09:49 +01:00
Samuele Locatelli e9d4be90cc Merge tag 'AddLicData_01' into develop
Aggiunta ricerca (preliminare) tipologia licenza e display relativi
2025-01-20 17:44:59 +01:00
Samuele Locatelli b174792613 Merge branch 'release/AddLicData_01' 2025-01-20 17:44:30 +01:00
Samuele Locatelli 492f502fb5 Update filtro tipo app + display info lic 2025-01-20 17:44:01 +01:00
Samuele Locatelli d795f303a0 Merge tag 'AppTask_09' into develop
Update visualizzazione dettaglio macchina
2025-01-20 09:27:26 +01:00
Samuele Locatelli 7dded7438c Merge branch 'release/AppTask_09' 2025-01-20 09:26:32 +01:00
Samuele Locatelli bae4c8a03d Refresh details 2025-01-20 09:26:05 +01:00
Samuele Locatelli 68cc736725 Merge tag 'AppTask_08' into develop
Completata prima review grafica con i dati task da inviare e ricevere
 (manca risposta da EgwACC...)
2025-01-18 16:59:42 +01:00
Samuele Locatelli 25a67b0898 Merge branch 'release/AppTask_08' 2025-01-18 16:59:18 +01:00
Samuele Locatelli 247f74a575 Completata UI + API x richiesta task e display task specifici (da completare lato EgwAppControlCenter ora) 2025-01-18 16:58:59 +01:00
Samuele Locatelli 228d2af96c Ok display devinfo e ritorno app info 2025-01-18 15:44:11 +01:00
Samuele Locatelli 158f1f1493 Merge tag 'AppTask_07' into develop
Aggiunto messagepipe tra API e UI x update task results
2025-01-18 14:58:33 +01:00
Samuele Locatelli 036bb412e8 Merge branch 'release/AppTask_07' 2025-01-18 14:58:20 +01:00
Samuele Locatelli 8aeab39353 Aggiunta MessagePipe task da API a UI (e intra UI) 2025-01-18 14:58:01 +01:00
Samuele Locatelli f194ad34ee Bozza display dettagli task... 2025-01-17 19:17:56 +01:00
Samuele Locatelli a77276559b Merge tag 'AppTask_06' into develop
Cleanup metodi API x invio task
2025-01-17 18:02:24 +01:00
Samuele Locatelli e7e05fd127 Merge branch 'release/AppTask_06' 2025-01-17 18:02:14 +01:00
Samuele Locatelli 3574978aae BugFix metodi API x trasferimento task 2025-01-17 18:01:54 +01:00
Samuele Locatelli de0fac3be6 Merge tag 'AppTask_05' into develop
Aggiunta gestione corretta puntamento redis x task API
2025-01-17 16:58:39 +01:00
Samuele Locatelli 2b10d4f867 Merge branch 'release/AppTask_05' 2025-01-17 16:58:27 +01:00
Samuele Locatelli 12a02e8baf Fix api redis pointer 2025-01-17 16:58:06 +01:00
Samuele Locatelli e9b222942d Merge tag 'AppTask_04' into develop
Aggiunta metodi insert/rimozione task di base
2025-01-17 12:03:42 +01:00
Samuele Locatelli d142e72e6c Merge branch 'release/AppTask_04' 2025-01-17 12:03:23 +01:00
Samuele Locatelli 1f408ea5a5 Aggiunta task add/removal 2025-01-17 12:03:07 +01:00
Samuele Locatelli 5bf07d00f5 Fix ordering in pareto detail 2025-01-17 11:17:50 +01:00
Samuele Locatelli 3ab1e3681b Merge tag 'AppTask_03' into develop
Aggiunta gestione grafica update selezione dettagli cliente/device
2025-01-17 10:47:42 +01:00
Samuele Locatelli 58a1954c28 Merge branch 'release/AppTask_03' 2025-01-17 10:47:19 +01:00
Samuele Locatelli 73b73aa333 Completato review grafico sel cliente/device 2025-01-17 10:46:43 +01:00
Samuele Locatelli 216c5a4c2f ok bozza preliminare selezione cliente/device x dettagli 2025-01-17 09:56:04 +01:00
Samuele Locatelli 6fafc0fed1 Inizio revisione impostazione cliente/PC da elenco install 2025-01-17 08:19:27 +01:00
Samuele Locatelli f524cf74a2 tolto check spostamento task req/run 2025-01-17 07:27:32 +01:00
Samuele Locatelli 320382a5ed Merge tag 'AppTask_02' into develop
Update API x gestione task in 3 stati (req/run/done)
2025-01-17 07:26:13 +01:00
Samuele Locatelli cb87306a2f Merge branch 'release/AppTask_02' 2025-01-17 07:25:59 +01:00
Samuele Locatelli e57f6a1326 Modifica logica task:
- req/run/done state
- modifica api
2025-01-17 07:24:53 +01:00
Samuele Locatelli 39d56aa23b Update UI x gestione dettaglio INST su richiesta (inizio) 2025-01-16 19:52:27 +01:00
Samuele Locatelli e236f0989b Merge tag 'AppTask_01' into develop
Prima versione API x controllo richiesta esecuzione Task da EgwACC
2025-01-16 18:51:47 +01:00
Samuele Locatelli 7f3e958d64 Merge branch 'release/AppTask_01' 2025-01-16 18:50:59 +01:00
Samuele Locatelli 52d5a6e832 Completata prima release gestioine controller AppTask 2025-01-16 18:49:14 +01:00
Samuele Locatelli ab6227a198 Merge tag 'EmailTest_01' into develop
Update email: conf fix + api rest x test invio
2025-01-16 12:33:05 +01:00
Samuele Locatelli ddebec6963 Merge branch 'release/EmailTest_01' 2025-01-16 12:32:49 +01:00
Samuele Locatelli 5afbd33648 Email
- update conf
- aggiunta metodo test invio email
2025-01-16 12:32:27 +01:00
Samuele Locatelli fc82226dd0 Merge tag 'Task2ExeMan_01' into develop
Aggiunta bozza gestione Task2Exe preliminare (segnaposto metodi empty)
2025-01-16 12:06:23 +01:00
Samuele Locatelli 916d92b498 Merge branch 'release/Task2ExeMan_01' 2025-01-16 12:06:06 +01:00
Samuele Locatelli 429c91f364 Aggiunta mockup metodi gestione task2exe 2025-01-16 12:05:43 +01:00
Samuele Locatelli d0e107a57f Merge tag 'InstallStats_09' into develop
Update comportamento API x salvataggio dati history + update grafico UI
2025-01-15 15:14:13 +01:00
Samuele Locatelli 3619526fd3 Merge branch 'release/InstallStats_09' 2025-01-15 15:13:47 +01:00
Samuele Locatelli f19b882ea2 Update API e UI 2025-01-15 15:13:25 +01:00
Samuele Locatelli 36fe5c1bcc Merge tag 'InstallStats_08' into develop
Fix gestione MAN con licenze 0 --> conta istanze
2025-01-15 12:50:13 +01:00
Samuele Locatelli 08025c395d Merge branch 'release/InstallStats_08' 2025-01-15 12:50:01 +01:00
Samuele Locatelli 38cbf40ad2 Fix display pareto: usa conteggio se non usate licenze 2025-01-15 12:49:39 +01:00
Samuele Locatelli 0ef65b3cff Modifica con metodo esplicito x chiamata salvataggio rel history forzato... 2025-01-15 12:35:02 +01:00
Samuele Locatelli f539948a2a Merge tag 'AddRelHistoryTrack_01' into develop
Aggiunta preliminare RelHistoryTrack
2025-01-15 12:22:29 +01:00
Samuele Locatelli eddc97b829 Merge branch 'release/AddRelHistoryTrack_01' 2025-01-15 12:22:20 +01:00
Samuele Locatelli 177629448e Aggiunta bozza metodo gestione relhistory 2025-01-15 12:21:50 +01:00
Samuele Locatelli 6d8c91d423 Aggiunta track dati e migration x RelHistory 2025-01-15 12:21:46 +01:00
Samuele Locatelli e0b4c6bd47 Merge branch 'main' into develop 2025-01-14 19:25:26 +01:00
Samuele Locatelli 88b3873437 Update x gestione filtro e ordinamento (salvato in pref redis...) 2025-01-14 19:24:41 +01:00
Samuele Locatelli 51976f1027 Merge branch 'main' into develop 2025-01-14 16:17:04 +01:00
Samuele Locatelli 9b94bd924e Merge tag 'ReleaseCleanup_02' into develop
Fix email in UI e API
2025-01-14 16:16:53 +01:00
Samuele Locatelli 2fc28e2d82 Update email x API 2025-01-14 16:16:45 +01:00
Samuele Locatelli 5effbd862e Merge branch 'release/ReleaseCleanup_02' 2025-01-14 16:16:19 +01:00
Samuele Locatelli ed9a6d2bef Update email conf su services 2025-01-14 16:16:01 +01:00
Samuele Locatelli 00a54581d8 Merge tag 'ReleaseCleanup_01' into develop
pulizia release install non gestite da EgwAppCenter
2025-01-14 16:11:05 +01:00
Samuele Locatelli 25cec0bb30 Merge branch 'release/ReleaseCleanup_01' 2025-01-14 16:10:44 +01:00
Samuele Locatelli 993438cdd4 Aggiunta gestione pulizia release scadute/non + gestite 2025-01-14 16:10:18 +01:00
Samuele Locatelli bff5ac2ef3 Merge tag 'InstallStats_07' into develop
Aggiunta registrazione da API degli impieghi esatti delle versioni
rilasciate da EgwAppControlCenter
2025-01-13 19:46:24 +01:00
Samuele Locatelli 5731209938 Merge branch 'release/InstallStats_07' 2025-01-13 19:46:01 +01:00
Samuele Locatelli 5e7f63dc49 Aggiunta possibilità gestione NumImp da DTO release x record esatto da EgcACC 2025-01-13 19:45:41 +01:00
Samuele Locatelli 4df12c70e3 Merge tag 'InstallStats_06' into develop
Vari update grafici status installazioni
2025-01-13 19:32:43 +01:00
Samuele Locatelli fa26de23fb Merge branch 'release/InstallStats_06' 2025-01-13 19:32:33 +01:00
Samuele Locatelli 6f42cb3b95 Refresh grafici vari status update 2025-01-13 19:32:15 +01:00
Samuele Locatelli f47b472e9f Merge tag 'InstallStats_05' into develop
Fix display torta con aggregati x num versione
2025-01-13 17:28:45 +01:00
Samuele Locatelli 8d1ecb7b27 Merge branch 'release/InstallStats_05' 2025-01-13 17:28:37 +01:00
Samuele Locatelli 4fdc49e230 Fix display grafico torta 2025-01-13 17:28:20 +01:00
Samuele Locatelli 368ab32248 Merge tag 'InstallStats_04' into develop
Fix condizione update record Sublic x  versioni verificate
2025-01-13 17:16:56 +01:00
Samuele Locatelli 022c80d17e Merge branch 'release/InstallStats_04' 2025-01-13 17:16:39 +01:00
Samuele Locatelli bff1753a64 Fix condizione update sublicenze 2025-01-13 17:16:21 +01:00
Samuele Locatelli fb6d7b762c Merge tag 'InstallStats_03' into develop
Priuma versione con grafico
2025-01-13 15:48:57 +01:00
Samuele Locatelli d0db8f0c72 Merge branch 'release/InstallStats_03' 2025-01-13 15:47:41 +01:00
Samuele Locatelli 183e5a7dd2 Aggiunto chart 2025-01-13 15:47:16 +01:00
Samuele Locatelli 569ac10492 Continuo dettaglio statistiche install 2025-01-13 15:20:24 +01:00
Samuele Locatelli d76bfabdd1 Merge tag 'InstallStats_02' into develop
Update pagina calcolo statistiche
2025-01-13 14:44:37 +01:00
Samuele Locatelli a81a0b21fc Merge branch 'release/InstallStats_02' 2025-01-13 14:44:29 +01:00
Samuele Locatelli 01f308743e Update stats page 2025-01-13 14:44:09 +01:00
Samuele Locatelli 30af6c43b6 Merge tag 'InstallStats_01' into develop
Inizio pagina statistiche + info assegnazione licenza
2025-01-13 09:54:07 +01:00
Samuele Locatelli d92bce92bb Merge branch 'release/InstallStats_01' 2025-01-13 09:53:54 +01:00
Samuele Locatelli 9f8d01ff02 Inizio pagina stats licenze 2025-01-13 09:53:25 +01:00
Samuele Locatelli 2b6c330ba6 Merge tag 'InstallRelTrack_03' into develop
Modificata registrazione release installazioni
2025-01-11 12:30:09 +01:00
Samuele Locatelli ccf88f2741 Merge branch 'release/InstallRelTrack_03' 2025-01-11 12:29:54 +01:00
Samuele Locatelli 5284300395 Update gestione LiMan x registrazione releases e versioni 2025-01-11 12:29:00 +01:00
Samuele Locatelli b75a240cd5 Merge tag 'InstallRelTrack_02' into develop
Fix gestione scrittura verifica versioni applicativi installati
2025-01-11 11:33:04 +01:00
Samuele Locatelli eee703d2e6 Merge branch 'release/InstallRelTrack_02' 2025-01-11 11:32:36 +01:00
Samuele Locatelli dde217cf11 Correzione struttura DB x registrazione licenze 2025-01-11 11:32:15 +01:00
Samuele Locatelli c58d5cc8d3 Merge tag 'InstallRelTrack_01' into develop
Aggiunta in API della registrazione delle richieste versioni x tracking
installato
2025-01-11 10:35:26 +01:00
Samuele Locatelli f7deaef0bf Merge branch 'release/InstallRelTrack_01' 2025-01-11 10:35:10 +01:00
Samuele Locatelli b8defd6f90 Aggiunta registrazione info versione registrata/impiegata x applicativo 2025-01-11 10:31:17 +01:00
Samuele Locatelli a5b0865e34 Aggiunta modello dati x tracking licenze impiegate 2025-01-11 10:14:09 +01:00
Samuele Locatelli 826e2c0e75 Merge tag 'Vers_2.1_05' into develop
Aggiunta refresh visualizzazione su azioni + filtro x licenza e sublic
2025-01-09 19:52:46 +01:00
Samuele Locatelli 28ba05bd7c Merge branch 'release/Vers_2.1_05' 2025-01-09 19:52:23 +01:00
Samuele Locatelli 2c846c5a84 bozza filtro licenza sel 2025-01-09 19:52:08 +01:00
Samuele Locatelli ff7ca06f16 LiManUI:
- Aggiunto comportamento refresh su azioni client
- Modifiche minori visualizzazione
2025-01-09 19:46:34 +01:00
Samuele Locatelli ae1b8ccb16 Merge tag 'Vers_2.1_04' into develop
Fix log se chaive uploader non fosse valida
2025-01-08 09:43:28 +01:00
Samuele Locatelli 24b38c5389 Merge branch 'release/Vers_2.1_04' 2025-01-08 09:43:08 +01:00
Samuele Locatelli 091be0fd00 Update API x salvataggio num vers: fix log x caso chiave non valida 2025-01-08 09:42:45 +01:00
Samuele Locatelli 7d08b91ab4 Merge tag 'Vers_2.1_03' into develop
Update x gestione scadenza richieste enroll
2025-01-07 10:52:04 +01:00
Samuele Locatelli a5867e996a Merge branch 'release/Vers_2.1_03' 2025-01-07 10:51:52 +01:00
Samuele Locatelli 0a47fa058b update readme 2025-01-07 10:51:25 +01:00
Samuele Locatelli b205b42839 Update x gestione Data Scadenza richieste Enroll apps 2025-01-07 10:50:37 +01:00
Samuele Locatelli dd8e000b42 Merge tag 'Vers_2.1_02' into develop
Fix nuget vari + vers numb proj
2025-01-04 13:06:28 +01:00
Samuele Locatelli 1e0c352dea Merge branch 'release/Vers_2.1_02' 2025-01-04 13:05:39 +01:00
Samuele Locatelli 003c464d01 Update versioni compilate + consolidamento nuget vari 2025-01-04 13:04:59 +01:00
Samuele Locatelli eaf786fb2d Merge tag 'Vers_2.1_01' into develop
Fix vers numbn in prod
2025-01-04 12:45:29 +01:00
Samuele Locatelli 1c99d1fd9d Merge branch 'release/Vers_2.1_01' 2025-01-04 12:45:20 +01:00
Samuele Locatelli 56d9e74b48 Update versNumb in MajMin vers file 2025-01-04 12:44:38 +01:00
Samuele Locatelli 661ec612a8 Merge tag 'Vers_1.2_init' into develop
Completamento gest vers 1.2 x Enroll applciazioni updateManager:wq
2025-01-04 12:34:29 +01:00
Samuele Locatelli a0768aeebc Merge branch 'release/Vers_1.2_init' 2025-01-04 12:34:11 +01:00
Samuele Locatelli bc96f156dc Aggiunta anche editing licenze esistenti
update README con versioni (macro)
2025-01-04 12:33:30 +01:00
Samuele Locatelli f2e3dc66d2 Completato review gestione richeiste/cleanup Enroll 2025-01-04 11:42:26 +01:00
Samuele Locatelli deaa451c63 Update gestione con evento refresh + interazioni varie 2025-01-04 11:03:45 +01:00
Samuele Locatelli 36fe231ae1 Update grafico selezione 2025-01-03 19:00:35 +01:00
Samuele Locatelli 0a6078f4c5 Completata gestione aggiunta lice x UpdateManager 2025-01-03 18:25:08 +01:00
Samuele Locatelli 0b78a66114 Ancora update gestione grafica richieste Enroll 2025-01-03 16:32:59 +01:00
Samuele Locatelli 057de6e3e2 inizio costruzione pagina gestione enroll 2025-01-03 12:18:17 +01:00
Samuele Locatelli a0ddbbf498 Update fontawesome iicons 2025-01-03 12:18:07 +01:00
Samuele Locatelli 9257d58fa6 Completata parte Api x gestione enroll da richiesta client 2025-01-03 11:45:51 +01:00
Samuele Locatelli 8e2ea9e05e Continuo metodi x gestione Enroll apps 2025-01-03 11:16:52 +01:00
Samuele Locatelli 5c1c4fd79f Continuo implementazione metodi TOTP 2025-01-03 09:51:22 +01:00
Samuele E. Locatelli 9c15cbba62 Aggiunta modello dati gestione enroll + metodi di base 2024-12-31 11:57:24 +01:00
Samuele Locatelli 40504644aa Messi appunti comunida EgwControlApp x update gestione auth 2024-12-28 10:38:11 +01:00
Samuele Locatelli 48911cbc61 Fix conf fileserver path 2024-10-23 19:22:40 +02:00
Samuele Locatelli 8175f1dc34 Merge tag 'AddZipUpload02' into develop
Fix post test upload zip + unzip ok (manca ancora approvazione su MP-IO)
2024-10-18 15:33:25 +02:00
Samuele Locatelli 11a7eecf11 Merge branch 'release/AddZipUpload02' 2024-10-18 15:33:01 +02:00
Samuele Locatelli 9cb63fb8d5 LiMan.API
- Minor cleanup x ZipUpload
2024-10-18 15:32:41 +02:00
Samuele Locatelli 06fd9a074f Merge tag 'AddZipUpload01' into develop
Aggiunta gestione upload file zip + unziop (con pwd)
2024-10-16 18:59:12 +02:00
Samuele Locatelli e6d9954ea6 Merge branch 'release/AddZipUpload01' 2024-10-16 18:50:44 +02:00
Samuele Locatelli af761f6fdb LiMan.API
- Aggiunta metodo upload zip configurazione
- gestione unzip
- da completare task approvazione
2024-10-16 18:50:01 +02:00
Samuele Locatelli d89bd9caf2 update yaml x eliminare parti spostate 2024-10-02 17:08:39 +02:00
Samuele Locatelli 01266a71a3 Pulizia progetti spostati altrove x framework differenti 2024-10-02 17:07:49 +02:00
Samuele Locatelli 83f0c76824 Merge tag 'LimanRelMgmt10' into develop
Fix condizione ricerca where x update versione
2024-10-02 11:47:46 +02:00
Samuele Locatelli 98ec5aea98 Merge branch 'release/LimanRelMgmt10' 2024-10-02 11:47:37 +02:00
Samuele Locatelli 780cd689e0 refresh versione 2024-10-02 11:47:22 +02:00
Samuele Locatelli ae1b3d6e38 Fix update release (errore in where condition 2024-10-02 11:47:11 +02:00
Samuele Locatelli f62f51331d Merge tag 'LimanRelMgmt09' into develop
Fix deploy pipeline x test API con doppia vers sovrascritta
2024-10-02 11:37:47 +02:00
Samuele Locatelli 29cf5691a6 Merge branch 'release/LimanRelMgmt09' 2024-10-02 11:37:24 +02:00
Samuele Locatelli 297476f05f in attesa di separare i proj net6, net8 e netframework, commentata CoreApp 2024-10-02 11:20:22 +02:00
Samuele Locatelli e3c662e723 fix variabile x develop deploy 2024-10-02 11:04:02 +02:00
Samuele Locatelli bd85e255c3 cambio sintassi yaml 2024-10-02 10:58:46 +02:00
Samuele Locatelli 5cc6367f03 Update nuget
update yaml zip syntax
2024-10-02 10:52:43 +02:00
Samuele Locatelli 2836a2e30f check yamkl syntax x var src zip 2024-10-02 10:33:34 +02:00
Samuele Locatelli 4b18be9f76 Fix deploy conditions x versNum API 2024-10-02 10:28:26 +02:00
Samuele Locatelli 580ed74f8f Merge tag 'LimanRelMgmt08' into develop
Fix inclusione rel mgmt x longNames x clickonce
2024-10-02 09:48:25 +02:00
Samuele Locatelli c8dc10b442 Merge branch 'release/LimanRelMgmt08' 2024-10-02 09:48:07 +02:00
Samuele Locatelli 9ed0df29dd Merge branch 'EgwAppControlCenter' into develop 2024-10-02 09:47:28 +02:00
Samuele Locatelli d08181d0d1 Merge tag 'LimanRelMgmt07' into develop
Fix gestione rel management x save con vers duplicata
2024-10-02 09:46:53 +02:00
Samuele Locatelli 51168cc145 Merge branch 'release/LimanRelMgmt07' 2024-10-02 09:46:31 +02:00
Samuele Locatelli 5a1075db98 update procedura save release aggiornate 2024-10-02 09:46:01 +02:00
Samuele Locatelli c5ce822bd4 Aggiunto env override verifica signature nuget x core8 2024-09-30 14:45:27 +02:00
Samuele Locatelli 0af8516020 test cambio yaml restore 2024-09-30 14:37:43 +02:00
Samuele Locatelli c9847e8acd ancora typo quote 2024-09-30 12:33:40 +02:00
Samuele Locatelli 5e2280bd33 altro test fix typo yaml x remove nuget 2024-09-30 12:26:42 +02:00
Samuele Locatelli b6bfd8b7cb yaml type fix? 2024-09-30 12:25:31 +02:00
Samuele Locatelli 103a1d5692 test sintassi alternativa sln 2024-09-30 12:03:39 +02:00
Samuele Locatelli 7f8de87683 spostamento step restore/deploy 2024-09-30 12:00:59 +02:00
Samuele Locatelli 90b43957ca test push nuovo YAML 2024-09-30 11:44:45 +02:00
Samuele Locatelli 4b27d51b6a Ancora test deploy con longpath... 2024-09-27 18:08:04 +02:00
Samuele Locatelli 9922330b9f test restore su proj 2024-09-27 17:28:32 +02:00
Samuele Locatelli b183ea2301 tolto build post restore x publish 2024-09-27 17:25:54 +02:00
Samuele Locatelli 6cea09e97d Update analyzers sul proj core 2024-09-27 17:24:21 +02:00
Samuele Locatelli 06fcd2ee9b Update esplicito analyzers x build 2024-09-27 17:19:09 +02:00
Samuele Locatelli 747510ac30 Target portable exec s dotnet8 (test x publish clickonce in yaml) 2024-09-27 17:09:33 +02:00
Samuele Locatelli 4961026cb8 update conf target publish 2024-09-27 17:04:13 +02:00
Samuele Locatelli c071f70011 update yaml 2024-09-27 16:42:15 +02:00
Samuele Locatelli f06cfc203f Modifica MsBuild x compilazione e publish clickOnce (da provare) 2024-09-27 16:40:08 +02:00
Samuele Locatelli 86aaf5438c Test modifica senza bootstrapper (setup x dotnet8) 2024-09-27 16:35:48 +02:00
Samuele Locatelli 965a44e677 Cleanup pagine e riferimenti 2024-09-27 16:30:29 +02:00
Samuele Locatelli cb8ca635ec ACC:
- CleanUp codice
YAML:
- continuo fix pipeline
2024-09-27 16:25:01 +02:00
Samuele Locatelli c9eafd8caf Merge branch 'EgwAppControlCenter' of https://gitlab.steamware.net/egalware/limanapp into EgwAppControlCenter 2024-09-27 16:07:32 +02:00
Samuele Locatelli 55f40bf640 Update sintassi yaml 2024-09-27 16:07:13 +02:00
Samuele Emilio Locatelli cdf5f57109 Update .gitlab-ci.yml file 2024-09-27 14:05:47 +00:00
Samuele Locatelli 87246d16a9 update yamlx escludere da build le cose non impiegate 2024-09-27 16:04:12 +02:00
Samuele Locatelli b54de6961f update yaml 2024-09-27 16:01:26 +02:00
Samuele Locatelli 78f7768dad Modifica yaml x nuovo ramo... 2024-09-27 15:59:52 +02:00
Samuele Locatelli f2d5147336 Merge tag 'LimanRelMgmt06' into develop
Update gestione releases
2024-09-27 12:21:21 +02:00
Samuele Locatelli 9693422b8f Merge branch 'release/LimanRelMgmt06' 2024-09-27 12:21:08 +02:00
Samuele Locatelli 83bd8a1945 Completata gestione info in caso di chiamata cloud con "sgancio" await in attesa 2024-09-27 12:20:51 +02:00
Samuele Locatelli 82e837a856 ACC:
- Fix hang x call async
- fix reset su dati amncanti
- aggiunto controllo server-health preliminare
2024-09-27 11:40:05 +02:00
Samuele Locatelli 5d0255ef59 ACC
- ok check critical
- ok timeout (1 min)
- revisione timing controlli/veto
2024-09-27 10:41:06 +02:00
Samuele Locatelli f268862b82 Ottimizzato chiamata LINQ x recupero rel critical 2024-09-26 19:48:33 +02:00
Samuele Locatelli 43f69f83de Aggiunto metodo x fornire elenco rel critical attive... 2024-09-26 19:35:43 +02:00
Samuele Locatelli 2e61d79eed Merge tag 'LimanRelMgmt05' into develop
Fix gestione licenze in risposta chiamate post x releases
2024-09-26 15:24:12 +02:00
Samuele Locatelli a81adba017 Merge branch 'release/LimanRelMgmt05' 2024-09-26 15:23:54 +02:00
Samuele Locatelli b46cde8dcf Prima vers metodi controllo licenze (per ora "light" in verifica versioni 2024-09-26 15:23:17 +02:00
Samuele Locatelli b53e3e1a7d LiMan.UI
- Fix machineKeyGen modal display
- fix gestione permessi con LUT x ottimizzare in memoria
2024-09-26 14:02:23 +02:00
Samuele Locatelli 16c9ae5e8d Aggiunto filtro tipo app su licenze 2024-09-26 12:03:46 +02:00
Samuele Locatelli 36571c02e1 refresh timestamp 2024-09-26 11:42:32 +02:00
Samuele Locatelli 9523281212 Ok pre-build Ev
OK resize e display events
- fix update veto Time in caso di modifica config + save
2024-09-26 11:41:49 +02:00
Samuele Locatelli 577c2dd4ae ACC:
- aggiunta x test pre-build event
2024-09-26 10:58:40 +02:00
Samuele Locatelli 6af8564ef3 Aggiunta cleanup registro vecchie icone 2024-09-26 10:58:28 +02:00
Samuele Locatelli 8a97bfe6bf Update rel vers x ACC 2024-09-26 08:47:07 +02:00
Samuele Locatelli 9d098ef794 Merge tag 'LimanRelMgmt04' into develop
Update gestione rinnovo key/impiego x UpdateManager
2024-09-26 08:18:54 +02:00
Samuele Locatelli 4cd9f7e8f2 Merge branch 'release/LimanRelMgmt04' 2024-09-26 08:18:35 +02:00
Samuele Locatelli c4529affab Completata review metodo update licenza 2024-09-26 08:18:19 +02:00
Samuele Locatelli e8ae99a5d8 ACC:
- update nuova gestione AppKey
2024-09-26 08:05:52 +02:00
Samuele Locatelli d466baa1d9 LiMan.UI:
- Update decodifica controller AppKey da CodApp
2024-09-26 08:05:41 +02:00
Samuele Locatelli ff865edaf7 ACC:
- update gestione reset key e cod impiego
- test registrazione in debug
- ok generazione nuove KEY
2024-09-25 19:41:52 +02:00
Samuele Locatelli d828dad852 Merge tag 'LimanRelMgmt03' into develop
Gestione release non attive che rispondono con eccezione ad insert
record
2024-09-25 17:55:25 +02:00
Samuele Locatelli db85526528 Merge branch 'release/LimanRelMgmt03' 2024-09-25 17:55:05 +02:00
Samuele Locatelli 5e1398b580 update parziale gestione auth ACC 2024-09-25 17:54:50 +02:00
Samuele Locatelli d6f0770990 Modifica registrazione versioni x recuperare un record anche x release future (=NON attive...) 2024-09-25 17:54:41 +02:00
Samuele Locatelli e6f8363821 Merge tag 'LimanRelMgmt02' into develop
Update management x release duplicata
2024-09-25 16:13:30 +02:00
Samuele Locatelli 9437522d93 Merge branch 'release/LimanRelMgmt02' 2024-09-25 16:13:21 +02:00
Samuele Locatelli f25615fa6d refresh conf ACC 2024-09-25 16:13:06 +02:00
Samuele Locatelli 4d780620e3 Update gedstione release con upsert x casi di release duplicata 2024-09-25 16:13:03 +02:00
Samuele Locatelli ba684302e0 Merge tag 'LimanRelMgmt01' into develop
Aggiunta gestione ricerca e veto rel non ancora rilasciate
2024-09-25 10:12:46 +02:00
Samuele Locatelli f192f8a37e Merge branch 'release/LimanRelMgmt01' 2024-09-25 10:12:32 +02:00
Samuele Locatelli 2ee644b637 ACC:
- Update (parziale) gestione key auth
2024-09-25 10:12:16 +02:00
Samuele Locatelli b3214245d6 Fix releaseDTO: mostra solo vers già davvero rilascaite 2024-09-25 10:11:29 +02:00
Samuele Locatelli ca50422d44 Fix reload versioni + ricerca 2024-09-25 10:09:00 +02:00
Samuele Locatelli 4a734a12f8 Fix display: solo releases valide (=rilasciate) in LiMan.UI 2024-09-25 09:45:53 +02:00
Samuele Locatelli ab3b32a780 ACC:
- Fix single click sx/dx
- add paginazione se > 5
- test vari componenti razor
- gestione paginazione
2024-09-24 16:39:37 +02:00
Samuele Locatelli 49dbe7a085 Modifica x spostare config files fuori dal singleFile 2024-09-24 14:51:09 +02:00
Samuele Locatelli f344af5756 Update x gestione appData... 2024-09-24 12:02:58 +02:00
Samuele Locatelli 1e5fda085d ACC:
- modifica default data conf (non roaming)
- eliminate notifiche multiple
- update msg doppia esecuzione
2024-09-24 11:30:18 +02:00
Samuele Locatelli d7a22a62a8 Update display app:
- forza reload post edit config
- single click display notifyIcon
- fix condizione doppio avvio
- vari fix from Luca
2024-09-23 18:33:22 +02:00
Samuele Locatelli ecc62f269f Liman.UI
- fix display footer che passa in second piano
- fix spazio sotto area main layout x paginatore che scompare
- fx reload post delete release
2024-09-23 17:46:12 +02:00
Samuele Locatelli b34a0062b6 refresh vers 2024-09-23 14:19:06 +02:00
Samuele Locatelli d37755f5d7 Update num versione, aggiunta pubprofile xml 2024-09-23 14:19:02 +02:00
Samuele Locatelli bfab8d3ef6 Update modalità display edit setup 2024-09-23 14:17:24 +02:00
Samuele Locatelli ab211bc75c ACC:
- Prima e seconda vers ClickOnce
- fix deploy senza js di fontawesome
- continuo test deploy
2024-09-23 11:08:50 +02:00
Samuele Locatelli 9847374501 EACC
- ok notifica in tray
2024-09-23 09:25:35 +02:00
Samuele Locatelli 5a3c338238 Modifica init app blazor x tray
Share servizio controllo tra winform e blazor
2024-09-23 08:26:22 +02:00
Samuele Locatelli c8b049be4f Update display aggiornamenti
- maca gestione timer autorefresh componente
- manca testing finale
- manca clickonce finale
2024-09-21 12:44:06 +02:00
Samuele Locatelli e3421fb657 Ok componente editing config! 2024-09-21 10:26:46 +02:00
Samuele Locatelli 365a3653b4 Ancora blazor Hybrid updated 2024-09-20 17:27:18 +02:00
Samuele Locatelli fe2bc0cfa6 ACC:
- Update rel pubblicata
- Aggiunto progetto Blazor Hybrid da testare
2024-09-20 17:27:03 +02:00
Samuele Locatelli e025a9939d Fix dettagli finestre... 2024-09-19 17:32:22 +02:00
Samuele Locatelli 04bc2fab4c ACC:
- Update posizionamento finestre config in centro
2024-09-19 17:18:49 +02:00
Samuele Locatelli 503dde2df3 Update versione: gestione edit completato x refresh + veto 2024-09-19 17:06:59 +02:00
Samuele Locatelli c96f942187 Sistemato ctrl passwd x ACC 2024-09-19 16:50:11 +02:00
Samuele Locatelli 6dcd1ef03c ACC ClickOnce test
- Update profilo pubblicazione
- spostamento conf files
2024-09-19 14:49:38 +02:00
Samuele Locatelli 01e4ac887c firso publish profile 2024-09-19 14:48:30 +02:00
Samuele Locatelli bfb34ec81a Merge tag 'LiManApprelDisplay01' into develop
Update display desc x release
2024-09-19 11:33:51 +02:00
Samuele Locatelli 76a0824310 Merge branch 'release/LiManApprelDisplay01' 2024-09-19 11:33:09 +02:00
Samuele Locatelli 637a04509e Refresh ordinamento release LiMan 2024-09-19 11:32:40 +02:00
Samuele Locatelli a721f7bd51 Merge tag 'AddVersOnLimanAndACC' into develop
Aggiornamento display versione last x liman + update componente client x
versione
2024-09-19 10:48:37 +02:00
Samuele Locatelli 8ddcffa7b1 Merge branch 'release/AddVersOnLimanAndACC' 2024-09-19 10:48:24 +02:00
Samuele Locatelli c0afb1a9bb Update x display num vers 2024-09-19 10:47:38 +02:00
Samuele Locatelli 97a2b3fc65 Update controlCenter 2024-09-19 10:07:57 +02:00
Samuele Locatelli 46345e3393 Update AppControlCenter
- aggiunto tooltip su update trovato
- posizionato form in basso a sx
2024-09-19 08:10:46 +02:00
Samuele Locatelli 530ded0ff1 Aggiunto timer + auto-update (rapido 1 sec x ora...) 2024-09-18 19:22:04 +02:00
Samuele Locatelli 1d39502225 Completata parte gestione recupero info locali/remote raw 2024-09-18 19:04:14 +02:00
Samuele Locatelli abf15345e4 Ok fase check locale + check remoto... 2024-09-18 18:51:41 +02:00
Samuele Locatelli 7a7a8c0bf8 Continuo aggiunta WinFormx controllo versioni in tray 2024-09-18 12:32:25 +02:00
Samuele Locatelli c3d558e3f4 Merge tag 'FixVersCalc01' into develop
Fix gestione calcolo num versione + fix recupero x CodApp da limite vers
2024-09-18 12:03:35 +02:00
Samuele Locatelli f942bd3607 Merge branch 'release/FixVersCalc01' 2024-09-18 12:03:17 +02:00
Samuele Locatelli 1b466e4f71 Fix filtraggio codApp x versioni + fix calcolo versione errata 2024-09-18 12:02:48 +02:00
Samuele Locatelli da9fe9f0e5 Update REST call x POST releases 2024-09-18 07:43:37 +02:00
Samuele Locatelli c971db0056 Merge tag 'AddRelMan02' into develop
Update x refresh nuget + fix gestione salvataggio num righe in
applicazioni/releases
2024-09-18 07:31:53 +02:00
Samuele Locatelli a838138df2 Merge branch 'release/AddRelMan02' 2024-09-18 07:31:32 +02:00
Samuele Locatelli 9049241bd7 Updage nuget vari
Fix salvataggio num righe sel x applicazioni + releases
2024-09-18 07:31:12 +02:00
Samuele Locatelli e1d36ff1de Merge tag 'AddRelMan01' into develop
Aggiunta gestione filtro x tipo app
2024-09-17 16:05:19 +02:00
Samuele Locatelli 16a4633aa6 Merge branch 'release/AddRelMan01' 2024-09-17 16:05:11 +02:00
Samuele Locatelli 0b181c92da Aggiunta gestione release e ricerca, ricerca x tipo 2024-09-17 16:04:58 +02:00
Samuele Locatelli 33ffe764e2 Merge tag 'AddRelupload01' into develop
COmpletata revisione API e UI x gestione nuove info x releases
2024-09-17 12:27:05 +02:00
Samuele Locatelli ca43087a1e Merge branch 'release/AddRelupload01' 2024-09-17 12:26:36 +02:00
Samuele Locatelli f4867366aa Completato gestione editing applicazioni e release x nuovi campi da UI 2024-09-17 12:26:26 +02:00
Samuele Locatelli ade4d736a0 Update x gestione release macchine
- esteso modello info x applicazione e release
- nuovi metodi rest x caricare release
- creazione app mancanti
2024-09-17 12:21:24 +02:00
Samuele Locatelli aebd673b08 Merge tag 'AddAppRelMgmt05' into develop
Fix gestione calcolo versione in show all
2024-08-08 18:02:06 +02:00
Samuele Locatelli 5af1a06f3a Merge branch 'release/AddAppRelMgmt05' 2024-08-08 18:01:50 +02:00
Samuele Locatelli 309065c0ee Correzione calcolo relVal x getAll 2024-08-08 18:01:09 +02:00
Samuele Locatelli 09705bb31f Merge tag 'AddAppRelMgmt04' into develop
Fix chiamate con limite versione aggiornabile esplicitato
2024-08-08 17:56:15 +02:00
Samuele Locatelli cf39bceb89 Merge branch 'release/AddAppRelMgmt04' 2024-08-08 17:56:03 +02:00
Samuele Locatelli d0aa1e6904 Update json call + fix test VB x chiamate limit 2024-08-08 17:55:39 +02:00
Samuele Locatelli 00e6b19eba Aggiunta chiamate con versione limitata 2024-08-08 17:34:40 +02:00
Samuele Locatelli a566e94c88 Merge tag 'AddAppRelMgmt03' into develop
Aggiunta oggetto versione (nativo) + chiamata nuova x controllo num
versione
2024-08-08 17:32:21 +02:00
Samuele Locatelli 64beb99dba Merge branch 'release/AddAppRelMgmt03' 2024-08-08 17:32:07 +02:00
Samuele Locatelli 2d3cfabdf1 Aggiunto oggetto versione (nativo) + permesso con nuovo metodo ricerca 2024-08-08 17:31:37 +02:00
Samuele Locatelli 8bde0ce0cd Merge tag 'AddAppRelMgmt02' into develop
Fix modalità comparazione num versioni: string sbaglia x cui usato obj
Version in c# (non translabile in SQL da EF)
2024-08-08 17:00:57 +02:00
Samuele Locatelli 30dd6cbd51 Merge branch 'release/AddAppRelMgmt02' 2024-08-08 17:00:17 +02:00
Samuele Locatelli fcdb23d281 Fix confronto numero versione: non come stringa ma come obj version 2024-08-08 16:59:56 +02:00
Samuele Locatelli 493215ee33 Conferma ok ping x versione nuova SDK nuget 2024-08-07 18:58:00 +02:00
Samuele Locatelli 6d7214a274 Fix ping server 2024-08-07 18:48:42 +02:00
Samuele Locatelli 56785369ab Merge tag 'AddAppRelMgmt01' into develop
Aggiunta gestione edit/delete/insert delle releases
2024-08-07 18:43:49 +02:00
Samuele Locatelli 301b69026d Merge branch 'release/AddAppRelMgmt01' 2024-08-07 18:43:32 +02:00
Samuele Locatelli 7a0bc3a9f9 Completato editing releases applicazone 2024-08-07 18:41:05 +02:00
Samuele Locatelli 2c1919c290 Bozza gestione release applicativi 2024-08-07 17:34:12 +02:00
Samuele Locatelli 5274068c09 Merge tag 'WinFormNuget02' into develop
Update link pacchetto stabile nuget
2024-08-07 09:36:20 +02:00
Samuele Locatelli 281e24423b Merge branch 'release/WinFormNuget02' 2024-08-07 09:35:42 +02:00
Samuele Locatelli 26acf3c185 Merge branch 'SDK' into develop 2024-08-07 09:34:23 +02:00
Samuele Locatelli 8d0adc92ee Update nuget a apcchetto stabile 2024-08-07 09:34:09 +02:00
Samuele Locatelli 0d919556ad Merge tag 'WinFormNuget01' into develop
Completamento x release primo nuget stabile di comunicazione
2024-08-07 09:14:55 +02:00
Samuele Locatelli 7bb56a9f1c Merge branch 'release/WinFormNuget01' 2024-08-07 09:14:41 +02:00
Samuele Locatelli 3a391b090c Completata winform x test 2024-08-07 09:14:06 +02:00
Samuele Locatelli 122fd0bf0e Fix restore su WinForm 2024-08-07 09:07:45 +02:00
Samuele Locatelli ae174cb094 Fix compilazione con dipendenze RestSharp 111.2 2024-08-07 09:03:54 +02:00
Samuele Locatelli 93f284790b Merge branch 'feature/TestWinFormNuget' into develop 2024-08-07 08:58:35 +02:00
Samuele Locatelli 5b8c294136 Update nuspec generico 2024-08-07 08:56:58 +02:00
Samuele Locatelli 32c75cdd05 update vers restsharp x WinForm 2024-08-07 08:56:49 +02:00
Samuele Locatelli ff8f86c9ca update target framework 2024-08-07 08:54:38 +02:00
Samuele Locatelli 4b6218ff75 Ancora update progetto VF (framework 4.7.2) 2024-08-07 08:54:26 +02:00
Samuele Locatelli b409e698b7 Aggiunta nuget proxy x WinFormVB 2024-08-07 08:38:20 +02:00
Samuele Locatelli 927a89d388 fix deploy stage x nuget 2024-08-07 08:35:04 +02:00
Samuele Locatelli 5e172e1022 Inizio setup app winform 2024-08-07 08:30:44 +02:00
Samuele Locatelli fcd1f16071 Fix yaml x componenti nuspec 2024-08-07 08:29:41 +02:00
Samuele Locatelli ba91bd9edb Update yaml x produrre nuget package 2024-08-07 08:26:42 +02:00
Samuele Locatelli 9fbd8600ab Update controller output dati filtrati 2024-08-06 19:14:07 +02:00
Samuele Locatelli f6a91943b0 Update insomnia test file 2024-08-06 19:13:56 +02:00
Samuele Locatelli 3f90dc6016 Completato ConsoleTestApp con tutto e filtrato 2024-08-06 19:13:45 +02:00
Samuele Locatelli a4b4b47231 Merge tag 'AddRelVersMan02' into develop
pubblicazione metodi x ricerca filtrata x version number minimo
2024-08-06 18:33:45 +02:00
Samuele Locatelli 21ef7c6e73 Merge branch 'release/AddRelVersMan02' 2024-08-06 18:33:34 +02:00
Samuele Locatelli f5a6ad0033 TypoFix 2024-08-06 18:33:19 +02:00
Samuele Locatelli c38445b1cd Bozza EgwProxy x chaimate REST controllo licenze 2024-08-06 18:32:56 +02:00
Samuele Locatelli e90c52a744 LiMan: ReleasesVers:
- Aggiunta ricerca filtrata per versione minima
- Update API controller
2024-08-06 18:32:36 +02:00
Samuele Locatelli c7fcfa748c Merge tag 'AddRelVersMan01' into develop
Gestione preliminare elenco RelVers
2024-08-06 17:04:25 +02:00
Samuele Locatelli c3c81755b0 Merge branch 'release/AddRelVersMan01' 2024-08-06 17:04:10 +02:00
Samuele Locatelli 97d9395f4a Completato primo metodo x recupero di TUTTE Le versioni registrate di un applicativo 2024-08-06 16:56:24 +02:00
Samuele Locatelli c787b575b4 Aggiunta preliminare controller release (da completare)
Aggiunta DTO
2024-08-06 16:41:33 +02:00
Samuele Locatelli 0a91b1413f Aggiunta modello Release x gest segnalazione aggiornamenti 2024-08-06 16:41:11 +02:00
Samuele Locatelli 2a2b2b3f31 Merge tag 'AddSyncApiRestCall' into develop
Aggiunte call REST API x sync tabelle DB di conf
2024-07-18 17:58:31 +02:00
Samuele Locatelli aaba44f575 Merge branch 'release/AddSyncApiRestCall' 2024-07-18 17:58:20 +02:00
Samuele Locatelli 5d6de5e7fc Completato nuove chiamate x fare sync tabelle DB (x ora conf solo MAPO) 2024-07-18 17:57:52 +02:00
Samuele Locatelli e857b8a714 update file rest x chiamate aggiornate 2024-07-18 17:14:43 +02:00
Samuele Locatelli 96b9402bf4 Completata implementazione iniziale show config da LiMan 2024-07-18 16:19:30 +02:00
Samuele Locatelli b5568d6d7e Merge tag 'AddUserManAndLicSearch03' into develop
Completato editing utenti
2024-07-15 19:38:27 +02:00
Samuele Locatelli 60f961d5dd Merge branch 'release/AddUserManAndLicSearch03' 2024-07-15 19:37:52 +02:00
Samuele Locatelli 9842dcd70d Fix 2 altri topic x user std 2024-07-15 19:37:40 +02:00
Samuele Locatelli 1a6b7093c0 COmpletato editing claims/ruoli x utente AD 2024-07-15 19:32:34 +02:00
Samuele Locatelli 7974b9c2a9 Fix search licenze 2024-07-15 17:58:44 +02:00
Samuele Locatelli a58513d719 Update display info licenza 2024-07-15 17:40:48 +02:00
Samuele Locatelli 4a9e129071 Update condizioni ricerca x licenza e relazioni 2024-07-15 16:53:12 +02:00
Samuele Locatelli 57bd776be3 Merge tag 'AddUserManAndLicSearch02' into develop
Continuo gest editing utenti (mostra chi esiste...)
2024-07-15 12:06:00 +02:00
Samuele Locatelli 828c2c57f6 Merge branch 'release/AddUserManAndLicSearch02' 2024-07-15 12:05:50 +02:00
Samuele Locatelli c881b12524 update x iniziare editing utenti 2024-07-15 12:05:29 +02:00
Samuele Locatelli 623d9d3e6d Uldate filtraggio ruoli e nomi utente 2024-07-15 12:04:28 +02:00
Samuele Locatelli b522bd4ec0 Merge tag 'AddUserManAndLicSearch01' into develop
Aggiunto primo step gesitone utenti + ricerca licenze
2024-07-15 11:23:22 +02:00
Samuele Locatelli 0eb8d93241 Merge branch 'release/AddUserManAndLicSearch01' 2024-07-15 11:23:09 +02:00
Samuele Locatelli 86ca7fa93c Fix update display 2024-07-15 11:22:39 +02:00
Samuele Locatelli 97038f5ff7 Update gestione filtro menù sx 2024-07-15 09:46:49 +02:00
Samuele Locatelli 660f8fd356 Merge remote-tracking branch 'origin/develop' into develop 2024-07-15 07:07:45 +02:00
Samuele E. Locatelli 2e9f816685 Update x eseguire fix user/claim se auth di base fornita 2024-07-13 16:54:31 +02:00
Samuele E. Locatelli 2b14b256c1 Completata gestione metodi Auth da service controller con DB + REDIS 2024-07-13 16:22:48 +02:00
Samuele E. Locatelli f84dd6e9fe Aggiunta su DB gestione nuovi Auth 2024-07-13 15:41:56 +02:00
Samuele E. Locatelli 39d4d61f12 refresh app + DB 2024-07-13 15:27:59 +02:00
Samuele E. Locatelli af06c24d7a Aggiunta DbModels e migrazioni x gestione custom role/claims 2024-07-13 15:27:53 +02:00
Samuele E. Locatelli a9dff7d43b ancora fix yaml 2024-07-12 17:26:51 +02:00
Samuele E. Locatelli db8f2da831 fix yaml x nuget restore 2024-07-12 17:24:33 +02:00
Samuele E. Locatelli b2ebe8e674 Ancora update nuget API 2024-07-12 17:14:25 +02:00
Samuele E. Locatelli ab550f8468 Update pacchetti x API 2024-07-12 17:12:54 +02:00
Samuele E. Locatelli d062c60073 Ancora update nuget x fix deploy CI/CD 2024-07-12 17:03:17 +02:00
Samuele E. Locatelli 4e75085d1f Refresh pacchetti x problemi compilazione 2024-07-12 16:56:19 +02:00
Samuele E. Locatelli 71ca2d7e69 COmpletata review modulo out ricerca licenze 2024-07-12 16:25:17 +02:00
Samuele E. Locatelli 780eef4459 Aggiunta search prodotti 2024-07-12 16:04:41 +02:00
Samuele E. Locatelli 9163841613 Update grafici pagina keys 2024-07-12 15:55:25 +02:00
Samuele E. Locatelli 543428608f Aggiunto modulo ricerca solo KEY 2024-07-12 15:17:45 +02:00
Samuele E. Locatelli 5c7bfada7e Aggiunta preliminare classe gestione lettura da DB MySql 2024-07-12 12:42:47 +02:00
Samuele E. Locatelli c5092e711b Review colori x differenziazione template 2024-07-12 09:56:25 +02:00
Samuele Locatelli 0c86362d41 Refresh API test 2024-06-01 12:33:12 +02:00
Samuele Locatelli c864a7df5f Completata review B5 + loading iniziale pagina num call 2024-06-01 12:17:15 +02:00
Samuele Locatelli f306683687 aNCORA UPDATE NUGET E BOOTSTRAP5 2024-06-01 11:52:48 +02:00
Samuele Locatelli a8743bec74 Global update post upgrade bootstrap 2024-06-01 10:45:48 +02:00
Samuele Locatelli db5638e776 Ssostituzione bootstrao 4--> 5 (da completare) 2024-06-01 10:45:41 +02:00
Samuele Locatelli 9ddf247346 Inizio insert pag stats call
- test migration
- aggiunta pagina iniziale
- update nuget
2024-06-01 09:55:14 +02:00
Samuele Locatelli 32397cead9 Aggiunta riferimento EgwProxy
- x chiamate DB MAPO x sync Config + Vocabolario
- update nuget vari
2024-05-31 19:25:26 +02:00
Samuele Locatelli 6ccbffdecf Aggiunta modello + vista e stored x calcolo statistiche chiamate 2024-05-31 19:24:36 +02:00
Samuele Locatelli a714b5388b Merge tag 'FixEmailRev01' into develop
Fix email reversed
2023-11-06 11:09:38 +01:00
Samuele Locatelli 2633d7af0a Merge branch 'release/FixEmailRev01' 2023-11-06 11:09:29 +01:00
Samuele Locatelli ea148e953c Fix email pwd (valore, read) 2023-11-06 11:08:47 +01:00
Samuele Locatelli ea5f4b2284 Merge tag 'FixIIs04TargetDeploy' into develop
fix deploy x MsDeploy path
2023-03-14 15:27:48 +01:00
Samuele Locatelli 55cfed26bb Merge branch 'release/FixIIs04TargetDeploy' 2023-03-14 15:27:39 +01:00
Samuele Locatelli c4f646a8b0 cambio path x deploy su liman x API 2023-03-14 15:27:07 +01:00
Samuele Locatelli 2e852b0893 pulizia pubxml 2023-03-14 15:26:17 +01:00
Samuele Locatelli 94f22f8fa4 fix yaml x variables 2023-03-14 15:07:24 +01:00
Samuele Locatelli 0f75ef1633 Merge tag 'UpdateIis04Pubxml' into develop
fix pub iis04
2023-03-14 14:36:16 +01:00
Samuele Locatelli 05b6a42db1 Merge branch 'release/UpdateIis04Pubxml' 2023-03-14 14:36:10 +01:00
Samuele Locatelli 872b5ca316 fix x IIS04 2023-03-14 14:35:48 +01:00
Samuele Locatelli c7f4c97700 ancora udpate CI/CD 2023-03-14 14:33:33 +01:00
Samuele Locatelli d7d1698a10 Update vari pubxml x CI/CD 2023-03-14 14:33:28 +01:00
Samuele Locatelli 34d23a6b80 Merge tag 'FixCiCdOnMain' into develop
Fix deploy on main
2023-03-14 12:10:14 +01:00
Samuele Locatelli 09f4c3c5f9 Merge branch 'release/FixCiCdOnMain' 2023-03-14 12:10:08 +01:00
Samuele Locatelli 5ace18880b Fix yaml CI/CD 2023-03-14 12:07:34 +01:00
Samuele Locatelli 78fb307cbb Merge tag 'FixCodeOptimOnDebug' into develop
Ottimizzazione codice in debug esclusa (x problema testing...)
2023-03-14 12:04:33 +01:00
Samuele Locatelli cb185b8786 Merge branch 'release/FixCodeOptimOnDebug' 2023-03-14 12:04:21 +01:00
Samuele Locatelli 3462046e42 refresh progetto LiMan:
- compilazione senza ottimizzaizoni in debug
- verifica problema update licenze da GPW CORE NEXT
2023-03-14 11:43:50 +01:00
Samuele Locatelli 4821f441b6 Fix configurazione DB! 2023-02-03 19:37:52 +01:00
Samuele Locatelli 816a7278aa Code cleanup (typo) 2022-07-06 09:38:43 +02:00
Samuele Locatelli b502420309 Merge tag 'UpdateKeyGenProcess' into develop
Aggiornamento processo KeyGen
2022-06-08 19:13:57 +02:00
Samuele Locatelli ab1556058a Merge branch 'release/UpdateKeyGenProcess' 2022-06-08 19:13:37 +02:00
Samuele Locatelli 00ec07453b Update keygen process 2022-06-08 19:12:03 +02:00
Samuele Locatelli c924e5b4e7 Merge tag 'FixKeyGen' into develop
Update x generazione KEY
2022-06-08 14:59:44 +02:00
Samuele Locatelli 6ba7564862 Merge branch 'release/FixKeyGen' 2022-06-08 14:59:19 +02:00
Samuele Locatelli ecaabd56ec Update display multiline x KeyGen da MachineInfo 2022-06-08 14:58:58 +02:00
Samuele Locatelli bf8f455c0c Update aspetto grafico recupero key licenza 2022-06-08 12:48:13 +02:00
Samuele Locatelli f5884e371d Aggiunta classi e componenti x generazione key auth hashed 2022-06-08 12:43:20 +02:00
Samuele Locatelli 4b6c6c7360 Merge tag 'FixSmtpRelay' into develop
Completato fix invio SMTP con server outlook vs gmail
2022-06-08 11:30:38 +02:00
Samuele Locatelli b5866beb43 Merge branch 'release/FixSmtpRelay' 2022-06-08 11:30:20 +02:00
Samuele Locatelli 72063ec338 refresh data 2022-06-08 11:29:34 +02:00
Samuele Locatelli 704169ea7a update conf SMTP gmail --> outlook 2022-06-08 11:29:25 +02:00
Samuele Locatelli 8fd4d39bb5 Aggiunto try/catch x invio email + avvio con security opt auto 2022-06-08 11:29:14 +02:00
Samuele Locatelli 4dbe99f2f1 typo 2022-06-08 10:05:15 +02:00
Samuele Locatelli c7320338d7 Merge tag 'FixEmailSubject' into develop
Fix testo email
2022-05-17 13:05:29 +02:00
Samuele Locatelli ff05e237a6 Merge branch 'release/FixEmailSubject' 2022-05-17 13:05:22 +02:00
Samuele Locatelli c3ec21979c ancora fix testo 2022-05-17 13:05:13 +02:00
Samuele Locatelli a7d27169f1 Typo email message update 2022-05-17 13:04:34 +02:00
Samuele Locatelli a1f3703c1b Merge tag 'CheckLicenzeScadute' into develop
Aggiunta servizio x check licenze scadute
2022-05-16 18:15:24 +02:00
Samuele Locatelli 46937deb89 Merge branch 'release/CheckLicenzeScadute' 2022-05-16 18:15:12 +02:00
Samuele Locatelli 065d6bd7e9 Merge remote-tracking branch 'origin/develop' into develop 2022-05-16 18:14:58 +02:00
Samuele Locatelli 2df65a3f81 Refresh 2022-05-16 18:14:32 +02:00
Samuele Locatelli 42a9bb0939 Update x invio notifica licenze scadute 2022-05-16 18:14:28 +02:00
Marco Salvi 02d47189c7 Update per master 2022-04-26 15:59:40 +00:00
Marco Salvi 82f29a64c9 Update per upload zip ui e api su nexus 2022-04-26 14:25:48 +00:00
Marco Salvi 2c0ef38c8f Update per upload zip ui e api su nexus 2022-04-26 14:19:09 +00:00
Marco Salvi 0946620767 Update .gitlab-ci.yml 2022-04-26 14:04:21 +00:00
Samuele Locatelli 4e0c53a875 typo 2022-04-26 14:25:49 +02:00
Samuele Locatelli 2409d677b3 Merge tag 'AddHealthCheck' into develop
Aggiunta health check generale
2022-04-22 16:35:55 +02:00
Samuele Locatelli 57f7a58298 Merge branch 'release/AddHealthCheck' 2022-04-22 16:35:45 +02:00
Samuele Locatelli a5d70ede6a Aggiunto health check generale: .../api/health + update insomnia call 2022-04-22 16:35:10 +02:00
Samuele Locatelli 42fc9a9db1 Merge branch 'main' into develop 2022-04-22 15:59:52 +02:00
Samuele Locatelli 7a2c227296 Update conf x call insomnia 2022-04-22 15:59:43 +02:00
Samuele Locatelli daa6a793d8 Merge branch 'develop' 2022-04-22 15:34:06 +02:00
Samuele Locatelli 0e9d9aade2 Update x liman APi: anche qui selezione file share secondo tipo HostOs 2022-04-22 15:33:59 +02:00
Samuele Locatelli d59f2489d0 Merge branch 'main' into develop 2022-04-22 11:47:01 +02:00
Samuele Locatelli e2bd1bc4ca Refresh 2022-04-22 11:45:49 +02:00
Samuele Locatelli 26c3321461 Modifica startup: verifica HostOs x decidere COME montare la cartella unsafe_uploads 2022-04-22 11:45:42 +02:00
marco.salvi acd0b7fed1 Modifica comportamento pagina ticket per essere uniforme al comportamento in homepage 2022-03-21 18:47:17 +01:00
marco.salvi d8ca11601d Merge branch 'develop' of https://gitlab.steamware.net/egalware/limanapp into develop 2022-03-18 16:28:04 +01:00
marco.salvi baf3c89c10 Modifica visualizzazione ticket homepage 2022-03-18 16:27:47 +01:00
Samuele Locatelli 3ac94e4a14 Merge tag 'PubblicazioneModificheTicketMarco' into develop
Pubblicazione modifiche ticket by Marco
2022-03-18 12:37:02 +01:00
Samuele Locatelli 0bdc4ef879 Merge branch 'release/PubblicazioneModificheTicketMarco' 2022-03-18 12:36:55 +01:00
marco.salvi 53f6712d86 Merge branch 'develop' of https://gitlab.steamware.net/egalware/limanapp into develop 2022-03-18 12:31:50 +01:00
marco.salvi 431690be9d Modificata visualizzaizone ticket in homepage in base al tipo se licenza o fileupload 2022-03-18 12:29:24 +01:00
Samuele Locatelli f23d19cf64 Merge tag 'FixDeployTransfer' into develop
Fix deploy transfer: non è + un single page app
2022-03-17 19:32:11 +01:00
Samuele Locatelli 3584075fcf Merge branch 'release/FixDeployTransfer' 2022-03-17 19:31:55 +01:00
Samuele Locatelli bc59b06b6e Levato single APP... 2022-03-17 19:30:30 +01:00
Samuele Locatelli c70e6151d9 test build/publish 2022-03-17 19:28:00 +01:00
Samuele Locatelli b8ec296dc6 Update x ridurre errori compilazione 2022-03-17 19:20:35 +01:00
Samuele Locatelli 8bfa06ec0a cambio opzione framework dependancy x Transfer APP 2022-03-17 18:39:40 +01:00
Samuele Locatelli 39388f44c7 Typo fix 2022-03-17 18:38:31 +01:00
Samuele Locatelli 9fd6736f27 refresh conf x transfer program 2022-03-17 18:22:58 +01:00
Samuele Locatelli ad9e9fc957 test fix transfer CI/CD 2022-03-17 18:12:14 +01:00
Samuele Locatelli 46dd6e0cc3 Typo vari 2022-03-17 18:10:50 +01:00
Samuele Locatelli bd8617750f Merge tag 'FixTransferProgramEnums' into develop
Fix enum da core x transfer program
2022-03-17 14:41:24 +01:00
Samuele Locatelli f4fa99c0c2 Merge branch 'release/FixTransferProgramEnums' 2022-03-17 14:41:16 +01:00
Samuele Locatelli 3c271dd802 Fix using x Transfer program 2022-03-17 14:40:50 +01:00
Samuele Locatelli d285162d63 Merge tag 'AddClosedTicketFromApi' into develop
Aggiunta nell'elenco ticket da installaizone anche quelli chiusi
2022-03-17 14:39:34 +01:00
Samuele Locatelli 9604e12b21 Merge branch 'release/AddClosedTicketFromApi' 2022-03-17 14:39:17 +01:00
Samuele Locatelli 4298d1d8be Update: mostra TUTTI i ticket via REST 2022-03-17 14:38:51 +01:00
Samuele Locatelli 61340fe6dc Merge tag 'InizioFixGestioneTicket' into develop
Inizio gestione ticket licenze come prima
2022-03-17 13:01:23 +01:00
Samuele Locatelli 5f0a82ab67 Merge branch 'release/InizioFixGestioneTicket' 2022-03-17 13:01:03 +01:00
marco.salvi ce071c8cfd Ripristinato funzionamento originario gestione ticket su pagina principale, più fix chiusura pannello relativo 2022-03-17 12:58:35 +01:00
Samuele Locatelli b5d72a18bb Merge tag 'AddEmailOnTicket' into develop
Aggiunta notifica email x nuovi ticket (da testare!)
2022-03-16 18:43:02 +01:00
Samuele Locatelli 1c7aef0bad Merge branch 'release/AddEmailOnTicket' 2022-03-16 18:42:52 +01:00
Samuele Locatelli 0b6851eefb Update x invio notifica email dei tickets 2022-03-16 18:42:24 +01:00
Samuele Locatelli 74db3e9c0c Merge tag 'FixSwaggerDisplay' into develop
Fix display route swagger solo in develop / staging
2022-03-02 19:01:10 +01:00
Samuele Locatelli a0503bb07e Merge branch 'release/FixSwaggerDisplay' 2022-03-02 19:00:52 +01:00
Samuele Locatelli 78da4b0922 Fix display swagger solo in development/staging 2022-03-02 19:00:25 +01:00
Samuele Locatelli 74b640efe3 refresh DataService class 2022-02-14 15:53:16 +01:00
Samuele Locatelli c2da7c5590 Merge tag 'FixDotnet' into develop
Fix dotnet 5--> 6 che dava problema CI/CD
2022-02-11 14:57:06 +01:00
Samuele Locatelli 951cc064c7 Merge branch 'release/FixDotnet' 2022-02-11 14:56:51 +01:00
Samuele Locatelli c2f469cd29 refresh versioni dotnet 2022-02-11 14:54:20 +01:00
Samuele Locatelli c0638513cb Merge tag 'DotNet6AndFilter' into develop
Inserimento modifica x passaggio net 5 --> net 6 + update filtraggio
tickets
2022-02-11 14:38:43 +01:00
Samuele Locatelli 094750f247 Merge branch 'release/DotNet6AndFilter' 2022-02-11 14:38:19 +01:00
Samuele Locatelli 28f2dbf2e3 Merge remote-tracking branch 'origin/NetCore6Up' into develop 2022-02-11 14:35:24 +01:00
Samuele Locatelli 7841e5ebbc update e pulizia codice 2022-02-11 14:34:20 +01:00
marco.salvi da56ffcca8 Pagina lista ticket aggiunto filtro per applicazione e installazione 2022-02-11 14:22:01 +01:00
marco.salvi a5ec8f2105 Inserita paginazione lista ticket, modifica visualizzazione e campi relativi 2022-02-09 16:50:34 +01:00
marco.salvi 5a8b618a68 Merge remote-tracking branch 'origin/develop' into NetCore6Up 2022-02-09 15:59:33 +01:00
Samuele Locatelli fcdb96834e Modifica ticketDTO x recupero app/inst 2022-02-09 15:32:12 +01:00
marco.salvi 6b868ee1a0 Merge branch 'feature/NewTicketUI' into NetCore6Up 2022-02-09 14:46:24 +01:00
marco.salvi c35afc82c6 test upgrade core6 2022-02-09 14:44:34 +01:00
marco.salvi 45c5de32a8 Merge remote-tracking branch 'origin/develop' into feature/NewTicketUI 2022-02-09 12:49:31 +01:00
Samuele Locatelli 5d49772dba Merge tag 'AddWindowsAuth' into develop
Aggiunta windows auth
2022-02-09 12:48:13 +01:00
Samuele Locatelli 017f3ea2b1 Merge branch 'release/AddWindowsAuth' 2022-02-09 12:48:08 +01:00
Samuele Locatelli 5eb53c677d Fix gestione autenticazione in progetto 2022-02-09 12:47:20 +01:00
Samuele Locatelli 20fc4f1793 Aggiunta gestione AUTH su pagine 2022-02-09 12:47:12 +01:00
Samuele Locatelli 1239951b72 Merge remote-tracking branch 'origin/feature/NewTicketUI' into develop 2022-02-09 12:30:01 +01:00
518 changed files with 133306 additions and 79122 deletions
+4
View File
@@ -0,0 +1,4 @@
[*.cs]
# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none
+154 -152
View File
@@ -1,17 +1,32 @@
variables:
NEXUS_PATH: 'LiMan'
APP_NAME: 'LiMan.UI'
VERS_MAIN: '2.1'
NEXUS_PATH: 'LiMan'
APP_NAME: 'LiMan.UI'
SOL_NAME: 'LiMan.UI'
NUGET_PATH: 'C:\Tools\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
SRC_ZIP_PATH: 'bin\publish\net6.0'
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
- |
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
if ($hasSource -eq 0) {
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
} else {
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
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"
}
echo $hasSource
$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-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
echo "Steamware Nexus Source added, final state:"
dotnet nuget list source
# helper creazione files zip
.zipper: &zipper
@@ -22,25 +37,12 @@ variables:
}
Set-Alias 7zip $7zipPath
$Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
$Source = "$env:APP_NAME\bin\publish\net6.0\*"
$Source = "$env:APP_NAME\$SRC_ZIP_PATH\*"
echo "calling 7zip $Source --> $Target"
7zip a -tzip $Target $Source -xr!DATA
echo "called ZIP $Source --> $Target"
#cd "$env:APP_NAME\bin\publish\net6.0"
# # helper creazione hash files x EXE
# .hashBuildExe: &hashBuildExe
# - |
# $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $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 creazione hash files x IIS
.hashBuild: &hashBuild
- |
@@ -78,201 +80,201 @@ variables:
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
echo "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 "$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
# mCurl -v -u $env:NEXUS_USER:$env:NEXUS_PASSWD --upload-file bin/release/$env:APP_NAME.zip $env:NEXUS_SERVER/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip
# image: mcr.microsoft.com/dotnet/sdk:6.0
# helper x fix version number
.version-fix: &version-fix
- |
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format ddHH)
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format dHH)
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMM)+"-beta."+(get-date -format dHH)
$env:NEW_COPYRIGHT = "EgalWare @ 2021-" + (get-date -format yyyy)
#$contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw
#$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
#$newContenuto = $newContenuto -replace 'EgalWare © 2021', $env:NEW_COPYRIGHT
#$newContenuto | Set-Content -Path 'VersGen\VersGen.cs'
# display versioni generate
$resoconto = "Effettuato fix file VersGen | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
Write-Output $resoconto;
echo "Replace completati"
# helper x fix nuspec file
.nuspec-fix: &nuspec-fix
- |
echo "Modifica dati file nuspec Release"
$currRelease = $env:NUM_REL
$currDebug = $env:NUM_DEB
$find = "<version>(.|\n)*?</version>";
$fileNameRel = "$env:APP_NAME.Release.nuspec";
$replRel = "<version>" + $currRelease + "</version>";
$nuspDataRel = Get-Content $fileNameRel;
$nuspDataRelUpd = $nuspDataRel -replace $find, $replRel;
$nuspDataRelUpd = $nuspDataRelUpd -replace "#copyright#", $replCopy;
$nuspDataRelUpd = $nuspDataRelUpd -replace "#releaseNotes#", "Build $adesso";
Set-Content -Path $fileNameRel -Value $nuspDataRelUpd;
echo "Modifica dati file nuspec Debug"
$fileNameDeb = "$env:APP_NAME.Debug.nuspec";
$replDeb = "<version>" + $currDebug + "</version>";
$nuspDataDeb = Get-Content $fileNameDeb;
$nuspDataDebUpd = $nuspDataDeb -replace $find, $replDeb;
$nuspDataDebUpd = $nuspDataDebUpd -replace "#copyright#", $replCopy;
$nuspDataDebUpd = $nuspDataDebUpd -replace "#releaseNotes#", "Build $adesso";
Set-Content -Path $fileNameDeb -Value $nuspDataDebUpd;
echo "replace completati"
stages:
- build
- test
- deploy
- release
# --------------------------------
# BUILD
# --------------------------------
UI:build:
stage: build
tags:
- win
except:
- EgwAppControlCenter
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.UI
before_script:
- *nuget-fix
- dotnet restore LiMan.sln
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build LiMan.UI/LiMan.UI.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
API:build:
stage: build
tags:
- win
except:
- EgwAppControlCenter
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.Api
before_script:
- *nuget-fix
- dotnet restore LiMan.sln
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build LiMan.Api/LiMan.Api.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
Transfer:build:
stage: build
tags:
- win
except:
- EgwAppControlCenter
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.Transfer
before_script:
- *nuget-fix
- dotnet restore LiMan.sln
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build LiMan.Transfer/LiMan.Transfer.csproj
UI:test:
stage: test
tags:
- win
only:
- develop
needs: ["UI:build"]
script:
- dotnet test LiMan.UI/LiMan.UI.csproj
API:test:
stage: test
tags:
- win
only:
- develop
needs: ["API:build"]
script:
- dotnet test LiMan.Api/LiMan.Api.csproj
Transfer:test:
stage: test
tags:
- win
needs: ["Transfer:build"]
script:
- dotnet test LiMan.Transfer/LiMan.Transfer.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# --------------------------------
# DEPLOY
# --------------------------------
UI:IIS01:deploy:
stage: deploy
tags:
- win
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.UI
SRC_ZIP_PATH: bin\Release\net6.0
only:
- develop
needs: ["UI:test"]
needs: ["UI:build"]
before_script:
- *nuget-fix
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.UI/LiMan.UI.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- *hashBuild
- *nexusUpload
API:IIS01:deploy:
stage: deploy
tags:
- win
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.Api
SRC_ZIP_PATH: bin\Release\net6.0
only:
- develop
needs: ["API:test"]
needs: ["API:build"]
before_script:
- *nuget-fix
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Api/LiMan.Api.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- *hashBuild
- *nexusUpload
UI:IIS02:deploy:
UI:IIS04:deploy:
stage: deploy
tags:
- win
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.UI
SRC_ZIP_PATH: bin\Release\net6.0
only:
- main
needs: ["UI:build"]
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.UI/LiMan.UI.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.UI/LiMan.UI.csproj
API:IIS02:deploy:
before_script:
- *nuget-fix
script:
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- *hashBuild
- *nexusUpload
API:IIS04:deploy:
stage: deploy
tags:
- win
except:
- EgwAppControlCenter
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.Api
SRC_ZIP_PATH: bin\Release\net6.0
only:
- main
needs: ["API:build"]
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Api/LiMan.Api.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Api/LiMan.Api.csproj
before_script:
- *nuget-fix
script:
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- *hashBuild
- *nexusUpload
Transfer:deploy:
stage: deploy
tags:
- win
except:
- EgwAppControlCenter
variables:
SOL_NAME: LiMan
APP_NAME: LiMan.Transfer
needs: ["Transfer:test"]
needs: ["Transfer:build"]
before_script:
- *nuget-fix
script:
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Transfer/LiMan.Transfer.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- *hashBuild
- *nexusUpload
# UI:installer:
# stage: installer
# tags:
# - win
# only:
# - develop
# - main
# needs: ["UI:build"]
# variables:
# APP_NAME: LiMan.UI
# NEXUS_PATH: MP-LAND
# before_script:
# # - *nuget-fix
# # - dotnet restore
# script:
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.UI/LiMan.UI.csproj -o:publish
# # qui il deploy su nexus...
# - *hashBuild
# - *nexusUpload
# API:installer:
# stage: installer
# tags:
# - win
# only:
# - develop
# - main
# needs: ["API:build"]
# variables:
# APP_NAME: LiMan.Api
# NEXUS_PATH: MP-PROG
# before_script:
# # - *nuget-fix
# # - dotnet restore
# script:
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Api/LiMan.Api.csproj -o:publish
# # qui il deploy su nexus...
# - *hashBuild
# - *nexusUpload
# UI:release:
# stage: release
# tags:
# - win
# only:
# #- feature/Deploy_CI_CD
# # - main
# - tags
# except:
# - branches
# needs: ["UI:build"]
# artifacts:
# paths:
# - publish/
# script:
# - dotnet publish -c Release -o ./publish LiMan.UI/LiMan.UI.csproj
# API:release:
# stage: release
# tags:
# - win
# only:
# #- feature/Deploy_CI_CD
# # - main
# - tags
# except:
# - branches
# needs: ["API:build"]
# artifacts:
# paths:
# - publish/
# script:
# - dotnet publish -c Release -o ./publish LiMan.Api/LiMan.Api.csproj
+1 -1
View File
@@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/LiMan.UI/bin/Debug/net5.0/LiMan.UI.dll",
"program": "${workspaceFolder}/LiMan.UI/bin/Debug/net6.0/LiMan.UI.dll",
"args": [],
"cwd": "${workspaceFolder}/LiMan.UI",
"stopAtEntry": false,
+67
View File
@@ -0,0 +1,67 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
namespace Core
{
public class AppRelVersion
{
#region Public Properties
/// <summary>
/// Installazione funzionalità uploader
/// </summary>
public string CodInst { get; set; } = "";
/// <summary>
/// ID upload app
/// </summary>
public string UplAppID { get; set; } = "";
/// <summary>
/// Chiave di autorizzazione alla comunicazione
/// </summary>
public string MasterKey { get; set; } = "";
/// <summary>
/// Cod applicativo di riferimento
/// </summary>
public string CodApp { get; set; } = "";
/// <summary>
/// Tipo Applicazione
/// </summary>
public string Tipo { get; set; } = "";
/// <summary>
/// Versione applicativo formato semver numerico 4 blocchi
/// </summary>
public string VersNum { get; set; } = "0.0.0.0";
/// <summary>
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
/// </summary>
public string VersText { get; set; } = "a.b";
/// <summary>
/// Data di release
/// </summary>
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
/// <summary>
/// Tag associati a versione, comma separated
/// </summary>
public string RelTags { get; set; } = "";
public bool IsValid
{
get => !string.IsNullOrEmpty(CodInst) && !string.IsNullOrEmpty(UplAppID) && !string.IsNullOrEmpty(MasterKey) && !string.IsNullOrEmpty(CodApp) && !string.IsNullOrEmpty(VersNum) && !string.IsNullOrEmpty(VersText);
}
#endregion Public Properties
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core
{
public class Const
{
// classi utilità x cache REDIS dati DB
public const string redisBaseAddr = "LiMan:Ui";
public const string rKeyConfig = $"{redisBaseAddr}:Cache";
public const string ENRL_MSG_PIPE = $"{redisBaseAddr}:MPipe:Enroll";
public const string TASK_MSG_PIPE = $"{redisBaseAddr}:MPipe:Tasks";
public const string UPDT_MSG_PIPE = $"{redisBaseAddr}:MPipe:Update";
}
}
+3 -3
View File
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
+41
View File
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class AuthDataDTO
{
/// <summary>
/// Master Key
/// </summary>
public string MastKey { get; set; } = "";
/// <summary>
/// Codice Impiego istanza SubLic
/// </summary>
public string CodImp { get; set; } = "";
/// <summary>
/// Chiave SubLic
/// </summary>
public string AppKey { get; set; } = "";
/// <summary>
/// Verifica complessiva validità richiesta:
/// CodApp presente
/// - MainKey oppure CodImp + AppKey presenti
/// </summary>
[NotMapped]
public virtual bool IsValid
{
get => (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
}
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ManDeclareDTO : AuthDataDTO
{
/// <summary>
/// Elenco delle CodApp Gestite
/// </summary>
public List<string> ListCodApp { get; set; } = new List<string>();
/// <summary>
/// Verifica complessiva validità richiesta:
/// CodApp presente
/// - MainKey oppure CodImp + AppKey presenti
/// </summary>
[NotMapped]
public override bool IsValid
{
get => (ListCodApp != null && ListCodApp.Count > 0) && (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
}
}
}
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ReleaseReqDTO : AuthDataDTO
{
/// <summary>
/// CodApp Richiesta
/// </summary>
public string CodApp { get; set; } = "";
/// <summary>
/// Versione minima richiesta
/// </summary>
public string VersMin { get; set; } = "";
/// <summary>
/// Versione MAX richiesta
/// </summary>
public string VersMax { get; set; } = "";
/// <summary>
/// Numero di Impieghi attivi (es num di IOB relativi)
/// </summary>
public int NumImp { get; set; } = 1;
/// <summary>
/// Verifica complessiva validità richiesta:
/// CodApp presente
/// - MainKey oppure CodImp + AppKey presenti
/// </summary>
[NotMapped]
public override bool IsValid
{
get => !string.IsNullOrEmpty(CodApp) && (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
}
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class TaskResultDTO : AuthDataDTO
{
/// <summary>
/// Payload informazione ricevuto come dizionario chiavi/valore, il valore potrebbe essere un info ulteriormente serializzata
/// </summary>
public Dictionary<string,string> DataPayload { get; set; } = new Dictionary<string, string>();
}
}
+12
View File
@@ -1,11 +1,18 @@
using System;
using static Core.Enum;
namespace Core.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class TicketDTO
{
#region Public Properties
public string CodApp { get; set; } = "";
public string CodInst { get; set; } = "";
/// <summary>
/// Codice univoco della sub licenza (opzionale)
/// </summary>
@@ -33,6 +40,11 @@ namespace Core.DTO
/// </summary>
public int IdxLic { get; set; } = 0;
/// <summary>
/// Tipologia di ticket
/// </summary>
public TipologiaTicket TType { get; set; } = TipologiaTicket.Licenze;
/// <summary>
/// IDX licenza child (opzionale)
/// </summary>
+150 -32
View File
@@ -1,53 +1,171 @@
namespace Core
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Core
{
/// <summary>
/// Stato richieste x workflow interno
/// </summary>
public enum StatoRichiesta
public class Enum
{
ND = 0,
/// <summary>
/// Stato richieste x workflow interno
/// </summary>
public enum StatoRichiesta
{
ND = 0,
Richiesta,
Richiesta,
Valutazione,
Valutazione,
Approvata,
Approvata,
Rifiutata
}
Rifiutata
}
public enum TipoLicenza
{
ND = 0,
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 tipo Checksum basata su licenza master + checksum MD5 di una serie di dati (child licenses)
/// </summary>
CheckSumKey,
/// <summary>
/// Chiave tiupo SubLicenza applicativa (es AppControlCenter)
/// </summary>
AppSubLic
}
/// <summary>
/// Licenza LEgacy Steamware
/// Tipologia di ticket
/// </summary>
GLS,
public enum TipologiaTicket
{
ND = 0,
Licenze,
FileUpload
}
/// <summary>
/// Master Key License, che ha una data di scadenza globale ed un token = numero di utenti/token massimi associati
/// Elenco tipi app ammessi
/// </summary>
MasterKey,
public static Dictionary<string, string> AppType = new Dictionary<string, string>{
{ "", "---Selezionare---" },
{ "Cli", "Cli (Console)" },
{ "EgwACC", "EgwAppCtrCenter" },
{ "LicenceApp", "LicenceApp" },
{ "Machine", "Machine" },
{ "WebApp", "WebApp" },
{ "WinApp", "WinApp" }
};
#if false
[JsonConverter(typeof(StringEnumConverter))]
public enum AppType
{
None,
Cli,
Machine,
WebApp,
WinApp,
LicenceApp
}
#endif
/// <summary>
/// UserKey License (licenza che consuma un token utente della licenza master) - es GPW
/// Elenco tipi di azioni che si possono chiedere ad EgwACC
/// </summary>
UserKey,
[JsonConverter(typeof(StringEnumConverter))]
public enum EgwAccTask
{
/// <summary>
/// Non definito (init)
/// </summary>
ND = 0,
/// <summary>
/// Richiesta ricerca generica app da sorgenti mappate (registro, path...) ricevute in input
/// </summary>
AppSearch,
/// <summary>
/// Effettua backup ed invio cartella CONF delle app gestite x update
/// </summary>
BackupSendConf,
/// <summary>
/// Richiesta info device (analoghe a quelle del setup iniziale in Enroll)
/// </summary>
DeviceInfoGet,
/// <summary>
/// Richiesta verifica forzata da remoto
/// </summary>
ForceCheck,
/// <summary>
/// Richiede reload forzato (come da tray menu con Reload senza check update)
/// </summary>
ForceReload,
/// <summary>
/// Richiede update forzato (come da tray menu con restart tramite bootstrap process esterno)
/// </summary>
ForceUpdate,
/// <summary>
/// Info tipo License (Oxysec key)
/// </summary>
OxyLicenseGet,
/// <summary>
/// Forza Reset parametri opzionali impostabili da remoto
/// </summary>
ParamDictReset,
/// <summary>
/// Upsert di parametri operativi (gestiti in remoto)
/// </summary>
ParamUpsert,
/// <summary>
/// Upsert valori TargetList (gestiti in remoto)
/// </summary>
TargetListUpsert,
/// <summary>
/// Aggiorno di un applicazione richiamato da remoto
/// </summary>
TargetAppUpdate
}
/// <summary>
/// Chiave tiupo Checksum basata su licenza masster + checksum MD5 di una serie di dati (child licenses)
/// /Status di aggiornamento di un applicativo updater
/// </summary>
CheckSumKey
}
/// <summary>
/// Tipologia di ticket
/// </summary>
public enum TipologiaTicket
{
ND = 0,
Licenze,
FileUpload
[JsonConverter(typeof(StringEnumConverter))]
public enum UpdStatus
{
None,
Pending,
Running,
Done
}
}
}
+153
View File
@@ -0,0 +1,153 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
namespace Core
{
/// <summary>
/// Init classe validatore
/// </summary>
public class MachineDataValidator
{
#region Public Constructors
/// <summary>
/// Init classe validatore
/// </summary>
/// <param name="currMachineData"></param>
public MachineDataValidator(string rawData)
{
// inizializzo info di base
Dictionary<string, string> currMachineData = new Dictionary<string, string>();
if (!string.IsNullOrEmpty(rawData))
{
try
{
currMachineData = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
}
catch(Exception exc)
{ }
}
machTestData = currMachineData;
}
#endregion Public Constructors
#region Public Properties
/// <summary>
/// Restituisce HASH del codice impiego = payload utente
/// </summary>
/// <returns></returns>
public string machineKeyHash
{
get => calcMachineHash();
}
#endregion Public Properties
#region Private Fields
/// <summary>
/// Dati rispetto cui fare i calcoli di validazione
/// </summary>
private Dictionary<string, string> machTestData = new Dictionary<string, string>();
#endregion Private Fields
#region Private Methods
/// <summary>
/// Calcola HASH del codice impiego = payload utente
/// </summary>
/// <returns></returns>
private string calcMachineHash()
{
string hash = "";
string buffData = currBaseBuffer();
if (!string.IsNullOrEmpty(buffData))
{
// hashing!
using (var hAlgo = SHA512.Create())
//using (var hAlgo = MD5.Create())
{
byte[] InputBytes = Encoding.UTF8.GetBytes(buffData);
var byteHash = hAlgo.ComputeHash(InputBytes);
hash = BitConverter.ToString(byteHash).Replace("-", "").Replace("/", "").Replace("\\", "").ToLowerInvariant();
}
}
return hash;
}
public bool hasValidData
{
get => machTestData != null && machTestData.Count > 0;
}
/// <summary>
/// Calcola hash key da info PC
/// </summary>
/// <returns></returns>
private string currBaseBuffer()
{
string answ = "????????????????????????????????????????????";
StringBuilder sb = new StringBuilder();
try
{
// calcolo hashKey da alcuni valori solamente
sb.Append($"{machTestData["SystemName"]}|");
sb.Append($"{machTestData["ProcessorId"]}|");
sb.Append($"{machTestData["PartNumber"]}|");
sb.Append($"{machTestData["MACAddress"]}|");
sb.Append($"{machTestData["SerialNumber"]}|");
sb.Append($"{machTestData["OSArchitecture"]}|");
sb.Append($"{machTestData["SoftwareElementID"]}|");
sb.Append($"{machTestData["SystemBiosMajorVersion"]}|");
sb.Append($"{machTestData["SystemBiosMinorVersion"]}|");
sb.Append($"{machTestData["CpuVersion"]}|");
sb.Append($"{machTestData["BiosVersion"]}|");
if (sb.Length > 0)
{
answ = sb.ToString();
// lo uso 2 volte dritto e reverse...
answ += ReverseString(sb.ToString());
}
}
catch
{ }
return answ;
}
/// <summary>
/// Recupera info da dictionary
/// </summary>
/// <param name="keyName"></param>
/// <returns></returns>
private string getDictVal(string keyName)
{
string answ = $"{keyName}{keyName}";
if (machTestData.ContainsKey(keyName))
{
answ = machTestData[keyName];
}
return answ;
}
/// <summary>
/// Esegue reverse delal stringa
/// </summary>
/// <param name="myStr"></param>
/// <returns></returns>
private string ReverseString(string myStr)
{
char[] myArr = myStr.ToCharArray();
Array.Reverse(myArr);
return new string(myArr);
}
#endregion Private Methods
}
}
+53
View File
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core
{
public class MeasureUtils
{
#region Public Fields
public static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
#endregion Public Fields
#region Public Methods
/// <summary>
/// Calcola dimensione file automaticamwente secondo dimensione
/// </summary>
/// <param name="value"></param>
/// <param name="decimalPlaces"></param>
/// <returns></returns>
/// <exception cref="ArgumentOutOfRangeException"></exception>
public static string SizeSuffix(Int64 value, int decimalPlaces = 1)
{
if (decimalPlaces < 0) { throw new ArgumentOutOfRangeException("decimalPlaces"); }
if (value < 0) { return "-" + SizeSuffix(-value, decimalPlaces); }
if (value == 0) { return string.Format("{0:n" + decimalPlaces + "} bytes", 0); }
// mag is 0 for bytes, 1 for KB, 2, for MB, etc.
int mag = (int)Math.Log(value, 1024);
// 1L << (mag * 10) == 2 ^ (10 * mag) [i.e. the number of bytes in the unit
// corresponding to mag]
decimal adjustedSize = (decimal)value / (1L << (mag * 10));
// make adjustment when the value is large enough that it would round up to 1000 or more
if (Math.Round(adjustedSize, decimalPlaces) >= 1000)
{
mag += 1;
adjustedSize /= 1024;
}
return string.Format("{0:n" + decimalPlaces + "} {1}",
adjustedSize,
SizeSuffixes[mag]);
}
#endregion Public Methods
}
}
+45
View File
@@ -0,0 +1,45 @@
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core.Models
{
public class ControlTarget
{
[Key]
public int Idx { get; set; } = 0;
/// <summary>
/// Tipo applicazione da monitorare
/// </summary>
public string ApplicationType { get; set; } = "";
#if false
[JsonConverter(typeof(StringEnumConverter))]
public CoreEnum.AppType ApplicationType { get; set; } = CoreEnum.AppType.None;
#endif
/// <summary>
/// Path di base da monitorare
/// </summary>
public string BasePath { get; set; } = "";
/// <summary>
/// Pattern di ricerca
/// </summary>
public string SearchPattern { get; set; } = "";
/// <summary>
/// Indica se il path sia abilitato
/// </summary>
public bool IsEnabled { get; set; } = true;
/// <summary>
/// Indica se sia abilitato l'update x l'item
/// </summary>
public bool UpdateEnabled { get; set; } = false;
}
}
@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiMan.UI.Data
namespace Core
{
public class SelectData
{
@@ -55,4 +56,4 @@ namespace LiMan.UI.Data
#endregion Public Methods
}
}
}
+2 -1
View File
@@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
namespace Core
{
@@ -37,7 +38,7 @@ namespace Core
{ }
/// <summary>
/// Istanzia un nuovo ogetto richeista supporto
/// Istanzia un nuovo ogetto richiesta supporto
/// </summary>
/// <param name="codApp">Codice Applicazione (es EBW-UP)</param>
/// <param name="codImp">Codice Impegno (es codice chiave HW)</param>
+4 -4
View File
@@ -2,9 +2,9 @@
{
public class UploadResult
{
public bool Uploaded { get; set; }
public string? FileName { get; set; }
public string? StoredFileName { get; set; }
public int ErrorCode { get; set; }
public bool Uploaded { get; set; } = false;
public string FileName { get; set; } = "";
public string StoredFileName { get; set; } = "";
public int ErrorCode { get; set; } = 0;
}
}
+2
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
namespace Core
{
@@ -11,6 +12,7 @@ namespace Core
#region Public Properties
public string MasterKey { get; set; } = "";
public TipoLicenza LicType { get; set; } = TipoLicenza.UserKey;
public Dictionary<string, string> ParamDict { get; set; } = new Dictionary<string, string>();
#endregion Public Properties
+55
View File
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core
{
public class Utils
{
/// <summary>
/// Effettua arrotondamento di un timespan ad un dato step di minuti
///
/// vedere qui: https://stackoverflow.com/questions/1393696/rounding-datetime-objects
/// </summary>
/// <param name="TSpanOrig">DataOra originale</param>
/// <param name="roundMin">Minuti di arrotondamento richeisti</param>
/// <param name="isFloor">Arrotondamento x difetto (floor = true) o eccesso (false)</param>
/// <returns></returns>
public static TimeSpan TSpanRounded(TimeSpan TSpanOrig, int roundMin, bool isFloor)
{
long ticks = 0;
roundMin = roundMin <= 0 ? 1 : roundMin;
TimeOnly step = new TimeOnly(0, roundMin);
if (isFloor)
{
ticks = TSpanOrig.Ticks / step.Ticks;
}
else
{
ticks = (TSpanOrig.Ticks + step.Ticks - 1) / step.Ticks;
}
TimeSpan answ = new TimeSpan(ticks * step.Ticks);
return answ;
}
/// <summary>
/// Effettua arrotondamento di un timespan ad un dato step di minuti
///
/// vedere qui: https://stackoverflow.com/questions/1393696/rounding-datetime-objects
/// </summary>
/// <param name="DateOrig">DataOra originale</param>
/// <param name="roundMin">Minuti di arrotondamento richeisti</param>
/// <returns></returns>
public static TimeSpan TSpanRounded(TimeSpan TSpanOrig, int roundMin)
{
long ticks = 0;
roundMin = roundMin <= 0 ? 1 : roundMin;
TimeOnly step = new TimeOnly(0, roundMin);
ticks = (TSpanOrig.Ticks + step.Ticks / 2) / step.Ticks;
TimeSpan answ = new TimeSpan(ticks * step.Ticks);
return answ;
}
}
}
+2 -4
View File
@@ -32,10 +32,8 @@ namespace Core
plainAuthKey = SteamCrypto.DecryptString(authKey, passPhrase); // uso combinazione cliente+applicativo come passphrase!
answ = Convert.ToDateTime(plainAuthKey.Replace(string.Format("{0}#{1}-", cliente, applicativo.PadLeft(20, '-')), "").Replace(string.Format("%{0}%", licenze), ""));
}
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);
}
catch
{ }
return answ;
}
File diff suppressed because one or more lines are too long
+357
View File
@@ -0,0 +1,357 @@
using Core;
using Core.DTO;
using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.Zip;
using LiMan.APi.Data;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace LiMan.APi.Controllers
{
[Route("api/apptask")]
[ApiController]
public class AppTaskController : ControllerBase
{
#region Public Constructors
/// <summary>
/// Init generico
/// </summary>
/// <param name="configuration"></param>
/// <param name="DataService"></param>
/// <param name="env"></param>
public AppTaskController(IConfiguration configuration, ApiDataService DataService, IWebHostEnvironment env)
{
_configuration = configuration;
this.env = env;
dataService = DataService;
Log.Info("Avviata classe TaskController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Elimina tutte le registrazioni req/run/done x device
/// </summary>
/// <param name="dev">dev richiedente</param>
/// <param name="CurrReq">Obj AuthDataDTO con chiavi (master o app)</param>
[HttpDelete("cleanup/{dev}")]
public async Task<Dictionary<string, string>> TaskClearAll(string dev, [FromBody] TaskResultDTO CurrReq)
{
Dictionary<string, string> result = new Dictionary<string, string>();
// verifica validità richiesta...
if (CurrReq.IsValid)
{
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
// elimina tutte le richieste x la macchina...
var rawData = dataService.TaskListReset(CurrReq.CodImp);
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "TaskClearAll");
if (rawData != null)
{
result = rawData;
}
// salva in redis e toglie dai task da eseguire la richiesta relativa...
// registro infine chiamata
await dataService.recordCall(dev, CurrReq.CodImp, $"POST:api/apptask/clear/ | {CurrReq.MastKey} | {CurrReq.CodImp}");
}
return result;
}
/// <summary>
/// Richiede elenco di task da eseguire x il dev richiedente
/// </summary>
/// <param name="dev">dev richiedente</param>
/// <param name="AppKey">Cod Auth applicativo</param>
/// <param name="CodImp">CodImp del dev</param>
[HttpGet("pend/{dev}")]
public async Task<Dictionary<string, string>> TaskGetPending(string dev, [FromHeader] string AppKey, [FromHeader] string CodImp)
//public async Task<ActionResult<Dictionary<string, string>>> TaskGetPending(string dev, [FromHeader] string CodInst, [FromHeader] string CodImp)
{
Dictionary<string, string> result = new Dictionary<string, string>();
// verifica validità richiesta...
if (!string.IsNullOrEmpty(AppKey) && !string.IsNullOrEmpty(CodImp))
{
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
// recupero da REDIS le richieste pending x la macchina...
result = dataService.TaskListGet(CodImp);
// registro updater...
dataService.UpdaterRecordAction(CodImp, "TaskGetPending");
// registro infine chiamata
await dataService.recordCall(dev, CodImp, $"POST:api/apptask/pending/ | {dev} | {CodImp} | {AppKey}");
}
return result;
}
/// <summary>
/// Registra risultato esecuzione task richiesti al device
/// </summary>
/// <param name="dev">dev richiedente</param>
/// <param name="CurrReq">Obj AuthDataDTO con chiavi (master o app)</param>
[HttpPost("done/{dev}")]
public async Task<string> TaskSetDone(string dev, [FromBody] TaskResultDTO CurrReq)
{
string result = "NA";
// verifica validità richiesta...
if (CurrReq.IsValid)
{
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
// recupero da REDIS le richieste pending x la macchina...
int numDone = dataService.TaskSetDone(CurrReq.CodImp, CurrReq.DataPayload);
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "TaskSetDone");
result = $"saved {numDone}/{CurrReq.DataPayload.Count}";
// salva in redis e toglie dai task da eseguire la richiesta relativa...
// registro infine chiamata
await dataService.recordCall(CurrReq.CodImp, CurrReq.CodImp, $"POST:api/apptask/done/ | {CurrReq.MastKey} | {CurrReq.CodImp}");
}
return result;
}
/// <summary>
/// Registra in esecuzione itask richiesti al device
/// </summary>
/// <param name="dev">dev richiedente</param>
/// <param name="CurrReq">Obj AuthDataDTO con chiavi (master o app)</param>
[HttpPost("running/{dev}")]
public async Task<string> TaskSetRunning(string dev, [FromBody] TaskResultDTO CurrReq)
{
string result = "NA";
// verifica validità richiesta...
if (CurrReq.IsValid)
{
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
// recupero da REDIS le richieste pending x la macchina...
int numDone = dataService.TaskSetRunning(CurrReq.CodImp, CurrReq.DataPayload);
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "TaskSetRunning");
result = $"saved {numDone}/{CurrReq.DataPayload.Count}";
// registro infine chiamata
await dataService.recordCall(dev, CurrReq.CodImp, $"POST:api/apptask/running/ | {CurrReq.MastKey} | {CurrReq.CodImp}");
}
return result;
}
/// <summary>
/// Caricamento file backup applicativo in formato ZIP via FORM POST (backup configurazione applicativo)
/// </summary>
/// <param name="CodApp">Applicazione di riferimento</param>
/// <param name="AppKey">Chiave istanza</param>
/// <param name="CodImp">CodImpiego istanza</param>
/// <param name="DoUnzip">Richiesta UnZip file post caricamento</param>
/// <param name="ForceApprov">Richiesta di approvazione salvataggio files modificati post upload + unzip</param>
/// <param name="ZipFile">File da caricare ed estrarre</param>
/// <returns></returns>
[HttpPost("zipbackup")]
public async Task<ActionResult<UploadResult>> ZipFileSaveExtract([FromForm] string CodApp,
[FromForm] string AppKey,
[FromForm] string CodImp,
[FromForm] bool DoUnzip,
[FromForm] bool ForceApprov,
[FromForm] IFormFile ZipFile)
{
// preparo oggetti x risposta
var resourcePath = new Uri($"{Request.Scheme}://{Request.Host}/api/filesave/");
List<UploadResult> uploadResults = new List<UploadResult>();
var uploadResult = new UploadResult();
string CodInst = "";
// max 20 mb
long maxFileSize = 1024 * 1024 * 20;
// in primis verifica CodImp e AppKey
var sLicList = await SubLicGet(AppKey, CodImp);
if (sLicList == null || sLicList.Count == 0)
{
Log.Error($"ZipUpload backup failed: received code not validated | CodApp: {CodApp} | AppKey: {AppKey} | CodImp: {CodImp}");
uploadResult.ErrorCode = 3;
}
else
{
var fRec = sLicList.FirstOrDefault();
if (fRec == null || fRec.LicenzaNav == null)
{
Log.Error($"ZipUpload backup failed: Impossible to find CodInst for current data | CodApp: {CodApp} | AppKey: {AppKey} | CodImp: {CodImp}");
uploadResult.ErrorCode = 4;
}
else
{
CodInst = fRec.LicenzaNav.CodInst;
string fileDir = env.ContentRootPath;
string relDir = env.EnvironmentName;
string authKey = "";
uploadResult.FileName = ZipFile.FileName;
// controllo size e procedo
if (ZipFile.Length == 0)
{
Log.Info($"{ZipFile.FileName} length is 0 (Err: 1)");
uploadResult.ErrorCode = 1;
}
else if (ZipFile.Length > maxFileSize)
{
Log.Info($"{ZipFile.FileName} of {CalcSize(ZipFile.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
uploadResult.ErrorCode = 2;
}
else
{
try
{
relDir = _configuration["ServerConf:FileShareAppBackup"];
fileDir = Path.Combine(relDir, CodApp, CodInst);
if (!Directory.Exists(fileDir))
{
Directory.CreateDirectory(fileDir);
}
var filePath = Path.Combine(fileDir, ZipFile.FileName);
// elimino se ci fosse già il file...
if (System.IO.File.Exists(filePath))
{
System.IO.File.Delete(filePath);
}
// salvo da filestream a file locale
using (FileStream fs = new(filePath, FileMode.Create))
{
await ZipFile.CopyToAsync(fs);
}
// log!
Log.Info($"{ZipFile.FileName} saved at {filePath}");
uploadResult.Uploaded = true;
uploadResult.StoredFileName = ZipFile.FileName;
// se richiesto unzip eseguo
if (DoUnzip)
{
bool extractDone = false;
// recupero applicativi connessi
var listLic = await dataService.AppDtoSearch(CodInst, CodApp, false);
var currLic = listLic.Where(x => x.IsActive).FirstOrDefault();
// procedo SOLO SE ho una licenza attiva x questo cliente
if (currLic != null)
{
// esegue unzip
await Task.Run(() =>
{
System.IO.Compression.ZipFile.ExtractToDirectory(filePath, fileDir, true);
});
extractDone = true;
// elimino zip e altro...
if (extractDone)
{
System.IO.File.Delete(filePath);
}
// se richiesta auto approvazione eseguo...
string reqAppFile = Path.Combine(fileDir, "ChangeApprove.req");
if (System.IO.File.Exists(reqAppFile))
{
System.IO.File.Delete(reqAppFile);
}
if (ForceApprov)
{
// FixMe ToDo !!!
// deve chiamare metodo x approvare, in MP-PROG, la directory dei
// documenti caricati.. x ora segnaposto con file (così se scansiona
// trova e approva)...
System.IO.File.WriteAllText(reqAppFile, authKey);
}
}
}
}
catch (IOException ex)
{
Log.Error($"{ZipFile.FileName} error on upload (Err: 3): {ex.Message}");
uploadResult.ErrorCode = 3;
}
}
Log.Info($"ZipUpload backup completed | CodInst: {CodInst} | CodApp: {CodApp} | {uploadResults.Count} files");
}
}
uploadResults.Add(uploadResult);
// registro updater...
dataService.UpdaterRecordAction(CodImp, "ZipFileSaveExtract");
return new CreatedResult(resourcePath, uploadResult);
}
#endregion Public Methods
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Restituisce size calcolata
/// </summary>
/// <param name="origSize"></param>
/// <returns></returns>
protected string CalcSize(long origSize)
{
return MeasureUtils.SizeSuffix(origSize, 1);
}
#endregion Protected Methods
#region Private Fields
private static IConfiguration _configuration;
/// <summary>
/// Classe per logging
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
private readonly IWebHostEnvironment env;
#endregion Private Fields
#region Private Methods
/// <summary>
/// Verifica validità codici
/// </summary>
/// <param name="AppKey"></param>
/// <param name="CodImp"></param>
/// <returns></returns>
private async Task<List<DB.DBModels.SubLicenzaModel>> SubLicGet(string AppKey, string CodImp)
{
List<DB.DBModels.SubLicenzaModel> listRes = await dataService.AttivazioniGetAppImp(AppKey, CodImp);
return listRes;
}
#endregion Private Methods
}
}
@@ -21,7 +21,7 @@ namespace LiMan.APi.Controllers
/// <summary>
/// Classe per logging
/// </summary>
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
@@ -60,7 +60,7 @@ namespace LiMan.APi.Controllers
[HttpGet("{id}")]
public async Task<List<DB.DTO.ApplicativoDTO>> Get(string id, string CodApp)
{
var result = await dataService.ApplicativiSearch(id, CodApp, true);
var result = await dataService.AppDtoSearch(id, CodApp, true);
await dataService.recordCall(id, CodApp, $"GET:api/applicazione");
return result;
}
@@ -56,7 +56,7 @@ namespace LiMan.APi.Controllers
/// </summary>
// POST api/attivazioni/removeKey
[HttpPost("removeKey")]
public async Task<bool> Delete([FromBody] UserLicenseRequest CurrRequest)
public async Task<bool> removeKey([FromBody] UserLicenseRequest CurrRequest)
{
bool done = await dataService.AttivazioniDelete(CurrRequest.MasterKey, CurrRequest.ParamDict);
// se ho qualcosa da loggare...
@@ -93,9 +93,10 @@ namespace LiMan.APi.Controllers
public async Task<List<DB.DTO.AttivazioneDTO>> Post([FromBody] UserLicenseRequest CurrRequest)
{
List<DB.DTO.AttivazioneDTO> currData = new List<DB.DTO.AttivazioneDTO>();
// giorni veto riattivazione: 60 x lic utente GPW, 7 altrimenti
int dayVeto = CurrRequest.LicType == Core.Enum.TipoLicenza.UserKey ? 60 : 7;
// eseguo tentativo generazione attivazioni da licenza...
bool done = await dataService.AttivazioniTryAdd(CurrRequest.MasterKey, CurrRequest.ParamDict, 60);
bool done = await dataService.AttivazioniTryAdd(CurrRequest.MasterKey, CurrRequest.ParamDict, dayVeto, CurrRequest.LicType);
currData = await dataService.AttivazioniByMasterKey(CurrRequest.MasterKey, false);
// se ho qualcosa da loggare...
foreach (var item in CurrRequest.ParamDict)
@@ -147,7 +148,7 @@ namespace LiMan.APi.Controllers
/// <param name="chiave">Licenza MASTER</param>
/// <param name="codImpiego">Codice univoco impiego licenza</param>
/// <returns></returns>
// GET api/attivazioni/verifica/5
// GET api/attivazioni/verifica/5?codImpiego=abcd
[HttpGet("verifica")]
public async Task<DB.DTO.AttivazioneDTO> VerificaImpiego(string chiave, string codImpiego)
{
+108
View File
@@ -0,0 +1,108 @@
using LiMan.APi.Data;
using LiMan.DbSync.DbModels;
using LiMan.DbSync.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LiMan.APi.Controllers
{
/// <summary>
/// Controller per sync tabelle standard
/// </summary>
[Route("api/dbsync")]
[ApiController]
public class DbSyncController : ControllerBase
{
#region Public Constructors
/// <summary>
/// Init generico
/// </summary>
/// <param name="DataService"></param>
public DbSyncController(ApiDataService DataService, DbSyncService SyncService)
{
mainDataService = DataService;
syncDataService = SyncService;
Log.Info("Avviata classe DbSyncController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Recupera elenco dati Config x setup locale GET api/dbsync/conf/[id]?[CodApp]
/// </summary>
/// <param name="id">Codice cliente/Installazione</param>
/// <param name="CodApp">Codice Applicazione</param>
/// <returns></returns>
[HttpGet("conf/{id}")]
public async Task<List<ConfigModel>> Get(string id, string CodApp)
{
// ora recupero le info richieste dall'applicativo
List<ConfigModel> result = await syncDataService.ConfigGetAll(CodApp);
await mainDataService.recordCall(id, CodApp, $"GET:api/dbsync/conf/");
return result;
}
/// <summary>
/// Recupera elenco dati AnagKeyVal x setup locale GET api/dbsync/anagkeyval/[id]?[CodApp]
/// </summary>
/// <param name="id">Codice cliente/Installazione</param>
/// <param name="CodApp">Codice Applicazione</param>
/// <returns></returns>
[HttpGet("anagkeyval/{id}")]
public async Task<List<AnagKeyValueModel>> GetAnagKeyVal(string id, string CodApp)
{
// ora recupero le info richieste dall'applicativo
List<AnagKeyValueModel> result = await syncDataService.AnagKeyValGetAll(CodApp);
await mainDataService.recordCall(id, CodApp, $"GET:api/dbsync/anagkeyval/");
return result;
}
/// <summary>
/// Recupera elenco dati Vocabolario x setup locale GET api/dbsync/anagkeyval/[id]?[CodApp]
/// </summary>
/// <param name="id">Codice cliente/Installazione</param>
/// <param name="CodApp">Codice Applicazione</param>
/// <returns></returns>
[HttpGet("vocabolario/{id}")]
public async Task<List<VocabolarioModel>> GetVocabolario(string id, string CodApp)
{
// ora recupero le info richieste dall'applicativo
List<VocabolarioModel> result = await syncDataService.VocabolarioGetAll(CodApp);
await mainDataService.recordCall(id, CodApp, $"GET:api/dbsync/vocabolario/");
return result;
}
#endregion Public Methods
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService mainDataService { get; set; }
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected DbSyncService syncDataService { get; set; }
#endregion Protected Properties
#region Private Fields
/// <summary>
/// Classe per logging
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
+137
View File
@@ -0,0 +1,137 @@
using Core;
using LiMan.APi.Data;
using LiMan.DB.DBModels;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LiMan.APi.Controllers
{
/// <summary>
/// Controller livello APPLICAZIONE
/// </summary>
[Route("api/enroller")]
[ApiController]
public class EnrollerController : ControllerBase
{
#region Public Constructors
/// <summary>
/// Init generico
/// </summary>
/// <param name="DataService"></param>
public EnrollerController(ApiDataService DataService)
{
dataService = DataService;
Log.Info("Avviata classe ApplicazioneController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Recupera record di enroll di una richiesta x ricavarne ID licenza da applicare
/// </summary>
/// <param name="id">ID richiesta</param>
/// <param name="passcode">passcode associato</param>
/// <returns></returns>
[HttpGet("{id}")]
public async Task<EnrollRequestModel> Get(string id, int passcode)
{
string CodInst = "NA";
string CodApp = "Updater";
int reqId = 0;
int.TryParse(id, out reqId);
EnrollRequestModel reqRec = await dataService.EnrollReqGetById(reqId);
// solo se il passcode è corretto restituisco record, altrimenti fake one...
if (reqRec != null && reqRec.Passcode != passcode)
{
reqRec = new EnrollRequestModel() { IdReq = reqId };
}
await dataService.recordCall(CodInst, CodApp, $"GET:api/enroller/{id}");
return reqRec;
}
/// <summary>
/// Recupera record della licenza (mainKey) associata ad una richiesta date le sue info ID, passcode, ID licenza asegnata
/// </summary>
/// <param name="id">ID richiesta</param>
/// <param name="passcode">passcode associato</param>
/// <param name="idLic">ID licenza associato</param>
/// <returns></returns>
[HttpGet("getLicense/{id}")]
public async Task<LicenzaModel> GetLicData(string id, int passcode, int idLic)
{
string CodInst = "NA";
string CodApp = "Updater";
int reqId = 0;
int.TryParse(id, out reqId);
EnrollRequestModel reqRec = await dataService.EnrollReqGetById(reqId);
// init licenza non valida
LicenzaModel licRec = new LicenzaModel()
{
IdxLic = idLic,
Chiave = "",
CodInst = "NA",
CodApp = "None",
NumLicenze = 0,
Scadenza = DateTime.Today.AddYears(-1),
Payload = "",
Enigma = ""
};
// solo se sono corretti passcode e idLic corretto restituisco record, altrimenti fake one...
if (reqRec != null && reqRec.Passcode == passcode && reqRec.IdxLic == idLic)
{
licRec = await dataService.LicenzaById(idLic);
CodInst = licRec.CodInst;
CodApp = licRec.CodApp;
}
await dataService.recordCall(CodInst, CodApp, $"GET:api/enroller/getLicense/{id}");
return licRec;
}
/// <summary>
/// Richiesta di un record con codice TOTP per l'enroll di un app client
/// </summary>
[HttpPost("getNewEnrollRec")]
public async Task<EnrollRequestModel> GetNewEnrollRec([FromBody] Dictionary<string, string> MachineInfo)
{
string CodInst = "NA";
string CodApp = "Updater";
var newRec = await dataService.EnrollReqCreate(MachineInfo);
await dataService.recordCall(CodInst, CodApp, $"GET:api/enroller/GetEnrollRec");
return newRec;
}
#endregion Public Methods
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Private Fields
/// <summary>
/// Classe per logging
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Generatore pseudocasuale
/// </summary>
private Random rnd = new Random();
#endregion Private Fields
}
}
+206 -50
View File
@@ -1,4 +1,6 @@
using Core;
using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.Zip;
using LiMan.APi.Data;
using LiMan.DB.DBModels;
using Microsoft.AspNetCore.Hosting;
@@ -10,6 +12,7 @@ using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
@@ -22,19 +25,6 @@ namespace LiMan.APi.Controllers
[Route("api/filesave")]
public class FilesaveController : ControllerBase
{
#region Private Fields
private static IConfiguration _configuration;
/// <summary>
/// Classe per logging
/// </summary>
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IWebHostEnvironment env;
#endregion Private Fields
#region Public Constructors
/// <summary>
@@ -53,35 +43,6 @@ namespace LiMan.APi.Controllers
#endregion Public Constructors
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Calcolo correetto mimetype da nome file
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
protected string GetMimeType(string fileName)
{
var provider = new FileExtensionContentTypeProvider();
string contentType;
if (!provider.TryGetContentType(fileName, out contentType))
{
contentType = "application/octet-stream";
}
return contentType;
}
#endregion Protected Methods
#region Public Methods
/// GET api/filesave/id/filename
@@ -95,7 +56,7 @@ namespace LiMan.APi.Controllers
[HttpGet("{id}/{secureName}/{fileName}")]
public async Task<ActionResult> DownloadFile(string id, string secureName, string fileName)
{
string relDir = _configuration["FileShare"];
string relDir = _configuration["ServerConf:FileShareTickets"];
string ticketDir = Path.Combine(relDir, id);
var filePath = Path.Combine(ticketDir, secureName);
// verifico esistenza..
@@ -111,12 +72,11 @@ namespace LiMan.APi.Controllers
}
/// <summary>
/// Elenco files assaociati a ticket supporto
/// Elenco files associati a ticket supporto POST api/filesave/list/1
/// </summary>
/// <param name="id"></param>
/// <param name="CurrRequest"></param>
/// <returns></returns>
// POST api/filesave/list/1
[HttpPost("list/{id}")]
public async Task<List<FileAttachModel>> list(int id, [FromBody] SupportRequest CurrRequest)
{
@@ -168,7 +128,7 @@ namespace LiMan.APi.Controllers
}
else if (file.Length > maxFileSize)
{
Log.Info($"{trustedFileNameForDisplay} of {file.Length} bytes is larger than the limit of {maxFileSize} bytes (Err: 2)");
Log.Info($"{trustedFileNameForDisplay} of {CalcSize(file.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
uploadResult.ErrorCode = 2;
}
else
@@ -177,7 +137,7 @@ namespace LiMan.APi.Controllers
{
DateTime oggi = DateTime.Today;
trustedFileNameForFileStorage = Path.GetRandomFileName();
relDir = _configuration["FileShare"];
relDir = _configuration["ServerConf:FileShareTickets"];
fileDir = Path.Combine(relDir, ticketDir);
if (!Directory.Exists(fileDir))
{
@@ -220,7 +180,7 @@ namespace LiMan.APi.Controllers
/// Caricamento file effettivo via POST
/// </summary>
/// <param name="ticketId">TicketId x riferimento</param>
/// <param name="files">Elenco files da caricare</param>
/// <param name="file">Elenco files da caricare</param>
/// <returns></returns>
[HttpPost("single")]
public async Task<ActionResult<UploadResult>> PostSingleFile([FromForm] int ticketId, [FromForm] IFormFile file)
@@ -246,7 +206,7 @@ namespace LiMan.APi.Controllers
}
else if (file.Length > maxFileSize)
{
Log.Info($"{trustedFileNameForDisplay} of {file.Length} bytes is larger than the limit of {maxFileSize} bytes (Err: 2)");
Log.Info($"{trustedFileNameForDisplay} of {CalcSize(file.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
uploadResult.ErrorCode = 2;
}
else
@@ -255,7 +215,7 @@ namespace LiMan.APi.Controllers
{
DateTime oggi = DateTime.Today;
trustedFileNameForFileStorage = Path.GetRandomFileName();
relDir = _configuration["FileShare"];
relDir = _configuration["ServerConf:FileShareTickets"];
fileDir = Path.Combine(relDir, ticketDir);
if (!Directory.Exists(fileDir))
{
@@ -285,6 +245,202 @@ namespace LiMan.APi.Controllers
return new CreatedResult(resourcePath, uploadResult);
}
/// <summary>
/// Caricamento file backup applicativo in formato ZIP via FORM POST (backup configurazione applicativo, file protetto da masterKey)
/// </summary>
/// <param name="CodApp">Applicazione di riferimento</param>
/// <param name="CodInst">Installazione di riferimento</param>
/// <param name="DoUnzip">Richiesta UnZip file post caricamento</param>
/// <param name="ForceApprov">
/// Richiesta di approvazione salvataggio files modificati post upload + unzip
/// </param>
/// <param name="ZipFile">File da caricare ed estrarre</param>
/// <returns></returns>
[HttpPost("zipbackup")]
public async Task<ActionResult<UploadResult>> PostZipFile([FromForm] string CodApp, [FromForm] string CodInst, [FromForm] bool DoUnzip, [FromForm] bool ForceApprov, [FromForm] IFormFile ZipFile)
{
// max 200 mb
long maxFileSize = 1024 * 1024 * 200;
// preparo oggetti x risposta
var resourcePath = new Uri($"{Request.Scheme}://{Request.Host}/api/filesave/");
List<UploadResult> uploadResults = new List<UploadResult>();
string fileDir = env.ContentRootPath;
string relDir = env.EnvironmentName;
string authKey = "";
var uploadResult = new UploadResult();
uploadResult.FileName = ZipFile.FileName;
// controllo size e procedo
if (ZipFile.Length == 0)
{
Log.Info($"{ZipFile.FileName} length is 0 (Err: 1)");
uploadResult.ErrorCode = 1;
}
else if (ZipFile.Length > maxFileSize)
{
Log.Info($"{ZipFile.FileName} of {CalcSize(ZipFile.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
uploadResult.ErrorCode = 2;
}
else
{
try
{
DateTime oggi = DateTime.Today;
relDir = _configuration["ServerConf:FileShareAppBackup"];
fileDir = Path.Combine(relDir, CodApp, CodInst);
if (!Directory.Exists(fileDir))
{
Directory.CreateDirectory(fileDir);
}
var filePath = Path.Combine(fileDir, ZipFile.FileName);
// elimino se ci fosse già il file...
if (System.IO.File.Exists(filePath))
{
System.IO.File.Delete(filePath);
}
// salvo da filestream a file locale
using (FileStream fs = new(filePath, FileMode.Create))
{
await ZipFile.CopyToAsync(fs);
}
// log!
Log.Info($"{ZipFile.FileName} saved at {filePath}");
uploadResult.Uploaded = true;
uploadResult.StoredFileName = ZipFile.FileName;
// se richiesto unzip eseguo
if (DoUnzip)
{
bool extractDone = false;
// recupero applicativi connessi
var listLic = await dataService.AppDtoSearch(CodInst, CodApp, false);
var currLic = listLic.Where(x => x.IsActive).FirstOrDefault();
// procedo SOLO SE ho una licenza attiva x questo cliente
if (currLic != null)
{
//recupero authKey
authKey = currLic.Chiave;
using (ZipFile zf = new ZipFile(filePath))
{
zf.Password = authKey;
foreach (ZipEntry zipEntry in zf)
{
// Manipulate the output filename here as desired.
var entryFileName = zipEntry.Name;
var fullZipToPath = Path.Combine(fileDir, entryFileName);
Console.WriteLine(zipEntry.Name);
if (!zipEntry.IsFile)
{
Directory.CreateDirectory(fullZipToPath);
// Ignore directories
continue;
}
// 4K is optimum
var buffer = new byte[4096];
// Unzip file in buffered chunks. This is just as fast as
// unpacking to a buffer the full size of the file, but does not
// waste memory. The "using" will close the stream even if an
// exception occurs.
using (var zipStream = zf.GetInputStream(zipEntry))
{
using (Stream fsOutput = System.IO.File.Create(fullZipToPath))
{
StreamUtils.Copy(zipStream, fsOutput, buffer);
}
}
extractDone = true;
}
}
// elimino zip e altro...
if (extractDone)
{
System.IO.File.Delete(filePath);
}
// se richiesta auto approvazione eseguo...
string reqAppFile = Path.Combine(fileDir, "ChangeApprove.req");
if (System.IO.File.Exists(reqAppFile))
{
System.IO.File.Delete(reqAppFile);
}
if (ForceApprov)
{
// FixMe ToDo !!!
// deve chiamare metodo x approvare, in MP-PROG, la directory dei
// documenti caricati.. x ora segnaposto con file (così se scansiona
// trova e approva)...
System.IO.File.WriteAllText(reqAppFile, authKey);
}
}
}
}
catch (IOException ex)
{
Log.Error($"{ZipFile.FileName} error on upload (Err: 3): {ex.Message}");
uploadResult.ErrorCode = 3;
}
}
uploadResults.Add(uploadResult);
Log.Info($"ZipUpload backup completed | CodInst: {CodInst} | CodApp: {CodApp} | {uploadResults.Count} files");
return new CreatedResult(resourcePath, uploadResult);
}
#endregion Public Methods
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Restituisce size calcolata
/// </summary>
/// <param name="origSize"></param>
/// <returns></returns>
protected string CalcSize(long origSize)
{
return MeasureUtils.SizeSuffix(origSize, 1);
}
/// <summary>
/// Calcolo correetto mimetype da nome file
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
protected string GetMimeType(string fileName)
{
var provider = new FileExtensionContentTypeProvider();
string contentType;
if (!provider.TryGetContentType(fileName, out contentType))
{
contentType = "application/octet-stream";
}
return contentType;
}
#endregion Protected Methods
#region Private Fields
private static IConfiguration _configuration;
/// <summary>
/// Classe per logging
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
private readonly IWebHostEnvironment env;
#endregion Private Fields
}
}
+80
View File
@@ -0,0 +1,80 @@
using LiMan.APi.Data;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LiMan.APi.Controllers
{
/// <summary>
/// Controller livello Health
/// </summary>
[Route("api/health")]
[ApiController]
public class HealthController : ControllerBase
{
#region Private Fields
/// <summary>
/// Classe per logging
/// </summary>
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
/// <summary>
/// Init generico
/// </summary>
/// <param name="DataService"></param>
public HealthController(ApiDataService DataService)
{
dataService = DataService;
Log.Info("Avviata classe HealthController");
}
#endregion Public Constructors
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Public Methods
/// GET api/health
/// <summary>
/// Recupera elenco applicativi dati cliente
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult<string> Get()
{
return "OK";
}
/// GET api/health/id
/// <summary>
/// Restituisce info riguardo allo stato di salute di un servizio
/// </summary>
/// <param name="id">Tipo di servizio: db/redis/...</param>
/// <returns></returns>
[HttpGet("{id}")]
public async Task<string> Get(string id)
{
string result = "NA";
await Task.Delay(1);
return result;
}
#endregion Public Methods
}
}
+212 -23
View File
@@ -1,11 +1,13 @@
using Core;
using LiMan.APi.Data;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiMan.APi.Controllers
@@ -17,43 +19,30 @@ namespace LiMan.APi.Controllers
[ApiController]
public class LicenzaController : ControllerBase
{
#region Private Fields
/// <summary>
/// Classe per logging
/// </summary>
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
/// <summary>
/// Init generico
/// Init Controller Licenze
/// </summary>
/// <param name="configuration"></param>
/// <param name="emailSender"></param>
/// <param name="DataService"></param>
public LicenzaController(ApiDataService DataService)
public LicenzaController(IConfiguration configuration, IEmailSender emailSender, ApiDataService DataService)
{
_configuration = configuration;
_emailSender = emailSender;
dataService = DataService;
Log.Info("Avviata classe LicenzaController");
}
#endregion Public Constructors
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Public Methods
/// GET api/licenza/id
/// <summary>
/// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma + licenza ATTUALE
///
/// GET api/licenza/id?CodApp=xxx&Chiave=yyyy
/// </summary>
/// <param name="id">Codice cliente/Installazione</param>
/// <param name="CodApp">Codice Applicazione</param>
@@ -67,9 +56,83 @@ namespace LiMan.APi.Controllers
return result;
}
/// <summary>
/// Effettua verifica scadenze licenze secondo 3 livelli dati da diversi orizzonti temporali
/// - urgente: entro 1 settimana
/// - importante: entro 1 mese
/// - info: entro 2 mesi
/// </summary>
/// <returns></returns>
[HttpGet("CheckScadenze")]
public async Task<string> Get()
{
// oggetti base
string answ = "ND";
string msgBody = "";
StringBuilder sbMain = new StringBuilder();
StringBuilder sbActions = new StringBuilder();
StringBuilder sbAllProj = new StringBuilder();
// orizzonti da valutare
DateTime oggi = DateTime.Today;
doLog("Esito della verifica Licenze (scadute/in scadenza)", logType.info, ref sbMain);
// verifico quelle GIA' SCADUTE (< oggi)
List<DB.DTO.ApplicativoDTO> elencoScadute = await dataService.LicenzeExpiring(DateTime.MinValue, oggi);
List<DB.DTO.ApplicativoDTO> elencoWeek = await dataService.LicenzeExpiring(oggi, oggi.AddDays(8));
List<DB.DTO.ApplicativoDTO> elencoMonth = await dataService.LicenzeExpiring(oggi.AddDays(8), oggi.AddDays(1).AddMonths(1));
List<DB.DTO.ApplicativoDTO> elencoTrim = await dataService.LicenzeExpiring(oggi.AddDays(1).AddMonths(1), oggi.AddDays(1).AddMonths(3));
int numScadute = elencoScadute.Count;
int numWeek = elencoWeek.Count;
int numMonth = elencoMonth.Count;
int numTrim = elencoTrim.Count;
// display scadute scadute...
msgBody += formatCheckPeriodo(elencoScadute, "Licenze <b>SCADUTE</b>", "font-size: 1.3em; color: #D62424;");
msgBody += formatCheckPeriodo(elencoWeek, "Licenze in scadenza nella <b>SETTIMANA</b>", "font-size: 1.2em; color: #DF701C;");
msgBody += formatCheckPeriodo(elencoMonth, "Licenze in scadenza nel <b>MESE</b>", "font-size: 1.15em; color: #A99C45;");
msgBody += formatCheckPeriodo(elencoTrim, "Licenze in scadenza nel <b>TRIMESTRE</b>", "font-size: 1.1em; color: #9Dc935;");
// predispongo email
string msgTopic = "LiMan: verifica Licenze in scadenza";
// invio email
string destList = _configuration["MailDest:ExpiryNotify"];
await sendEmailExpiry(destList, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// ritorno solo LOG azioni
answ = $"Scadute {numScadute} | Settimana: {numWeek} | Mese: {numMonth} | Trimestre: {numTrim}";
return answ;
}
/// <summary>
/// Effettua test invio email
/// </summary>
/// <returns></returns>
[HttpGet("test-email")]
public async Task<string> TestEmail()
{
// oggetti base
string answ = "ND";
string msgBody = "Prova invio email a destinatari <b>MailDest:ExpiryNotify</b>";
// predispongo email
string msgTopic = "LiMan: Test invio email!";
// invio email
string destList = _configuration["MailDest:ExpiryNotify"];
await sendEmailExpiry(destList, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// ritorno solo LOG azioni
answ = $"Test effettuato!";
return answ;
}
/// POST api/licenza
/// <summary>
/// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma + licenza ATTUALE
/// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma +
/// licenza ATTUALE
/// </summary>
/// <param name="AppInfo">Info licenza in formato LicenseCoord</param>
/// <returns></returns>
@@ -95,5 +158,131 @@ namespace LiMan.APi.Controllers
}
#endregion Public Methods
#region Protected Enums
protected enum logType
{
none,
local,
trace,
info,
warn
}
#endregion Protected Enums
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Effettua log del tipo richiesto aggiungendo riga anche allo stringbuilder indicato
/// </summary>
/// <param name="message"></param>
/// <param name="tipoLog"></param>
/// <param name="currSB"></param>
protected void doLog(string message, logType tipoLog, ref StringBuilder currSB)
{
bool doLine = true;
switch (tipoLog)
{
case logType.info:
Log.Info(message);
break;
case logType.trace:
Log.Trace(message);
break;
case logType.warn:
Log.Warn(message);
break;
case logType.local:
break;
default:
case logType.none:
doLine = false;
break;
}
if (doLine)
{
currSB.AppendLine(message);
}
else
{
currSB.Append(message);
}
}
protected string formatCheckPeriodo(List<DB.DTO.ApplicativoDTO> elencoLicenze, string tipoVerifica, string titleStyle)
{
StringBuilder sbMain = new StringBuilder();
doLog($"<div style=\"{titleStyle}\">", logType.none, ref sbMain);
int numScadute = elencoLicenze.Count;
doLog($"{tipoVerifica}: <b>{numScadute}</b>", logType.info, ref sbMain);
doLog("<div style=\"font-size: 1em; color: black;\">", logType.none, ref sbMain);
if (elencoLicenze.Count == 0)
{
doLog($"&nbsp;- nessuna", logType.info, ref sbMain);
}
else
{
foreach (var item in elencoLicenze)
{
doLog($"&nbsp;- {item.Scadenza:yyyy.MM.dd} | <b>{item.CodInst}</b> | {item.Descrizione}", logType.info, ref sbMain);
}
}
doLog("</div>", logType.none, ref sbMain);
doLog("</div>", logType.none, ref sbMain);
return sbMain.ToString();
}
/// <summary>
/// Invio email a lista ExpiryNotify
/// </summary>
/// <param name="destList">Elenco destinatari comma separated</param>
/// <param name="subject">Oggetto Email</param>
/// <param name="message">MEssaggio</param>
/// <returns></returns>
protected async Task sendEmailExpiry(string destList, string subject, string message)
{
List<string> emailDestList = destList.Split(",").ToList();
foreach (var dest in emailDestList)
{
try
{
await _emailSender.SendEmailAsync(dest, subject, message);
}
catch (Exception exc)
{
Log.Error($"Eccezione durante invio email:{Environment.NewLine}dest: {dest} | subject {subject}{Environment.NewLine}{exc}");
}
}
}
#endregion Protected Methods
#region Private Fields
/// <summary>
/// Classe per logging
/// </summary>
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IEmailSender _emailSender;
private IConfiguration _configuration;
#endregion Private Fields
}
}
+426
View File
@@ -0,0 +1,426 @@
using Core.DTO;
using Core;
using LiMan.APi.Data;
using LiMan.DB.DTO;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NLog;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Linq;
using LiMan.DB.DBModels;
using Microsoft.Extensions.Configuration;
using Org.BouncyCastle.Asn1.Crmf;
using System;
namespace LiMan.APi.Controllers
{
/// <summary>
/// Controller gestione RELEASE applicativi
/// </summary>
[Route("api/release")]
[ApiController]
public class ReleaseController : ControllerBase
{
#region Public Constructors
/// <summary>
/// Init generico
/// </summary>
/// <param name="DataService"></param>
public ReleaseController(ApiDataService DataService)
{
dataService = DataService;
Log.Info("Avviata classe ReleaseController");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Recupera elenco dati Release (rilasciate) GET api/release/EgtBW
/// </summary>
/// <param name="id">Codice Applicazione</param>
/// <returns></returns>
[HttpGet("{id}")]
[Obsolete("Please use POST with api/release/getall instead.", false)]
public async Task<List<ReleaseDTO>> Get(string id)
{
var result = await dataService.ReleaseDtoGetByApp(id);
await dataService.recordCall(id, id, $"GET:api/release/{id}");
return result;
}
/// <summary>
/// Recupera elenco dati Release (rilasciate) data versione minima GET api/release/filt/EgtBW
/// </summary>
/// <param name="id">Codice Applicazione</param>
/// <param name="VersMin">Versione minima richiesta (attuale)</param>
/// <returns></returns>
[HttpGet("filt/{id}")]
[Obsolete("Please use POST with api/release/getfilt instead.", false)]
public async Task<List<ReleaseDTO>> GetFilt(string id, string VersMin)
{
var result = await dataService.ReleaseDtoGetByAppVers(id, VersMin);
Log.Warn($"Chiamato metodo legacy api/release/filt | id: {id} | vers: {VersMin}");
await dataService.recordCall(id, id, $"GET:api/release/filt/{id}");
return result;
}
/// <summary>
/// Recupera elenco dati Release (rilasciate) data versione minima e massima GET api/release/filtLimit/EgtBW
/// </summary>
/// <param name="id">Codice Applicazione</param>
/// <param name="VersMin">Versione minima richiesta (attuale)</param>
/// <param name="VersMax">Versione massima consentita</param>
/// <returns></returns>
[HttpGet("filtLimit/{id}")]
[Obsolete("Please use POST with api/release/getlimit instead.", false)]
public async Task<List<ReleaseDTO>> GetFiltLimit(string id, string VersMin, string VersMax)
{
var result = await dataService.ReleaseGetByAppVersLimit(id, VersMin, VersMax);
await dataService.recordCall(id, id, $"GET:api/release/filtLimit/{id}");
return result;
}
/// <summary>
/// Recupera elenco dati Release (rilasciate) POST api/release/getall
/// </summary>
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
[HttpPost("getall")]
public async Task<List<ReleaseDTO>> GetReleases([FromBody] ReleaseReqDTO CurrReq)
{
List<ReleaseDTO> result = new List<ReleaseDTO>();
// verifica validità richiesta...
if (CheckReqKeys(CurrReq))
{
result = await dataService.ReleaseDtoGetByApp(CurrReq.CodApp);
// non necessario notificare UI...
#if false
// invio notifica x app...
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
#endif
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleases");
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getall/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
}
return result;
}
/// <summary>
/// Recupera elenco dati Release CRITICHE rilasciate (se sono ultima per singola CodApp)
/// POST api/release/get-critical
/// </summary>
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
[HttpPost("getcritical")]
public async Task<Dictionary<string, ReleaseDTO>> GetReleasesCritical([FromBody] ReleaseReqDTO CurrReq)
{
Dictionary<string, ReleaseDTO> result = new Dictionary<string, ReleaseDTO>();
// verifica validità richiesta...
if (CheckReqKeys(CurrReq))
{
result = await dataService.ReleaseGetCritical();
// non necessario notificare UI...
#if false
// invio notifica x app...
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
#endif
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleasesCritical");
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getcritical/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
}
return result;
}
/// <summary>
/// Recupera elenco dati Release (rilasciate) data versione minima POST api/release/getfilt
/// </summary>
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
[HttpPost("getfilt")]
public async Task<List<ReleaseDTO>> GetReleasesFilt([FromBody] ReleaseReqDTO CurrReq)
{
List<ReleaseDTO> result = new List<ReleaseDTO>();
// verifica validità richiesta...
if (CheckReqKeys(CurrReq))
{
result = await dataService.ReleaseDtoGetByAppVers(CurrReq.CodApp, CurrReq.VersMin);
// registro stato applicativi (da richiesta...)
InstalledReleasesModel checkRec = new InstalledReleasesModel()
{
AppKey = CurrReq.AppKey,
CodApp = CurrReq.CodApp,
CodImp = CurrReq.CodImp,
DtCheck = DateTime.Now,
MastKey = CurrReq.MastKey,
NumImp = CurrReq.NumImp,
VersNum = CurrReq.VersMin
};
bool changed = dataService.InstallRelUpsert(checkRec);
// chiamata x effettuare eventuale snapshot sulle installazioni attive SE variato
await dataService.InstallRelHistSnapshot(changed);
if (changed)
{
// invio notifica x app...
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
}
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleasesFilt");
// registro infine chiamata
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getfilt/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
}
return result;
}
/// <summary>
/// Recupera elenco dati Release (rilasciate) data versione minima e massima POST api/release/getlimit
/// </summary>
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
[HttpPost("getlimit")]
public async Task<List<ReleaseDTO>> GetReleasesLimit([FromBody] ReleaseReqDTO CurrReq)
{
List<ReleaseDTO> result = new List<ReleaseDTO>();
// verifica validità richiesta...
if (CheckReqKeys(CurrReq))
{
result = await dataService.ReleaseGetByAppVersLimit(CurrReq.CodApp, CurrReq.VersMin, CurrReq.VersMax);
#if false
// invio notifica x app...
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
#endif
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleasesLimit");
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getlimit/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
}
return result;
}
/// <summary>
/// Salva una nuova release dell'applicativo (eventualmente sovrascrivendo) POST api/release/save
/// </summary>
/// <param name="CurrReq">Obj Richiesta</param>
[HttpPost("save")]
public async Task<ReleaseDTO> SaveRelease([FromBody] AppRelVersion CurrReq)
{
ReleaseDTO result = new ReleaseDTO()
{
CodApp = CurrReq.CodApp,
ReleaseDate = CurrReq.ReleaseDate,
VersNum = CurrReq.VersNum,
VersText = CurrReq.VersText,
RelTags = CurrReq.RelTags.ToUpper()
};
// controllo valori
if (CurrReq.IsValid)
{
// verifica preliminare licenza x upload
var licUploader = await dataService.LicenzeSearch(CurrReq.CodInst, CurrReq.UplAppID, CurrReq.MasterKey, false);
if (licUploader != null && licUploader.Count > 0)
{
// in primis cerco app...
var appList = await dataService.ApplicNextGetAll(true);
ApplicativoModel recApp = new ApplicativoModel();
if (appList != null)
{
recApp = appList.FirstOrDefault(x => x.CodApp == CurrReq.CodApp);
}
// nel caso mancasse la aggiungo
if (recApp == null || string.IsNullOrEmpty(recApp.CodApp) || recApp.CodApp != CurrReq.CodApp)
{
recApp = new ApplicativoModel()
{
CodApp = CurrReq.CodApp,
Descrizione = "Nuova APP da POST api/release/save",
TplConnString = "",
Tipo = CurrReq.Tipo
};
await dataService.ApplicNextUpdate(recApp);
}
//converto in una release...
ReleaseModel newRec = new ReleaseModel()
{
CodApp = CurrReq.CodApp,
ReleaseDate = CurrReq.ReleaseDate,
RelTags = CurrReq.RelTags.ToUpper(),
VersNum = CurrReq.VersNum,
VersText = CurrReq.VersText
};
// registro versione eventualmente gestendo nuovo applicativo
var insRes = await dataService.ReleaseUpsert(newRec);
if (insRes)
{
Log.Info($"Release recorded | {CurrReq.CodApp} | {CurrReq.VersNum} | {CurrReq.VersText} | {CurrReq.ReleaseDate} | {CurrReq.RelTags}");
}
}
else
{
Log.Error($"Errore: licenza UpdateManager non TROVATA | {CurrReq.MasterKey}");
await dataService.recordCall(CurrReq.CodInst, CurrReq.CodApp, $"ERROR POST:api/release/save:{CurrReq.CodApp} | {CurrReq.MasterKey}");
}
// recupero vers applicativo...
var rawResult = await dataService.ReleaseDtoGetByApp(CurrReq.CodApp);
if (rawResult != null && rawResult.Count > 0)
{
result = rawResult.Where(x => x.VersText == CurrReq.VersText).FirstOrDefault();
}
// fisso nostra install
await dataService.recordCall(CurrReq.CodInst, CurrReq.CodApp, $"POST:api/release/save:{CurrReq.CodApp}");
}
else
{
Log.Error($"Errore: licenza UpdateManager non VALIDA | {CurrReq.MasterKey}");
await dataService.recordCall(CurrReq.CodInst, CurrReq.CodApp, $"ERROR POST:api/release/save:{CurrReq.CodApp} | {CurrReq.MasterKey}");
}
return result;
}
/// <summary>
/// Esegue tentativo salvataggio rel history
/// </summary>
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
[HttpPost("save-history")]
public async Task<List<ReleaseDTO>> SaveRelHistory([FromBody] ReleaseReqDTO CurrReq)
{
List<ReleaseDTO> result = new List<ReleaseDTO>();
// verifica validità richiesta...
if (CheckReqKeys(CurrReq))
{
// chiamata x effettuare eventuale snapshot sulle installazioni attive
await dataService.InstallRelHistSnapshot(true);
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "SaveRelHistory");
// registro infine chiamata
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/save-history/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
}
return result;
}
/// <summary>
/// Conferma quale sia l'elenco delle app gestite POST api/release/setmanaged
/// </summary>
/// <param name="CurrReq">Obj ManDeclareDTO con chiavi + elenco app gestite (x eliminare altre)</param>
/// <returns>Numero di record eliminati</returns>
[HttpPost("setmanaged")]
public async Task<int> SetManaged([FromBody] ManDeclareDTO CurrReq)
{
int result = 0;
// verifica validità richiesta...
if (CheckReqKeys(CurrReq))
{
result = dataService.InstallRelClean(CurrReq.CodImp, CurrReq.AppKey, CurrReq.ListCodApp);
// registro updater...
dataService.UpdaterRecordAction(CurrReq.CodImp, "SetManaged");
// invio notifica x app...
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
}
await Task.Delay(1);
return result;
}
#endregion Public Methods
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Private Fields
/// <summary>
/// Classe per logging
/// </summary>
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Methods
/// <summary>
/// Verifica validità richiesta
/// - dati presenti in chiamata
/// - combinazioni CodApp + chiavi valide/attive
/// </summary>
/// <param name="currReq"></param>
/// <returns></returns>
private bool CheckReqKeys(ReleaseReqDTO currReq)
{
bool answ = currReq.IsValid;
if (answ)
{
// verifica validità chiavi... TBD!!!
}
return answ;
}
/// <summary>
/// Verifica validità richiesta
/// - dati presenti in chiamata
/// - combinazioni CodApp + chiavi valide/attive
/// </summary>
/// <param name="currReq"></param>
/// <returns></returns>
private bool CheckReqKeys(AuthDataDTO currReq)
{
bool answ = currReq.IsValid;
if (answ)
{
// verifica validità chiavi... TBD!!!
}
return answ;
}
/// <summary>
/// Verifica validità richiesta
/// - dati presenti in chiamata
/// - combinazioni CodApp + chiavi valide/attive
/// </summary>
/// <param name="currReq"></param>
/// <returns></returns>
private bool CheckReqKeys(ManDeclareDTO currReq)
{
bool answ = currReq.IsValid;
if (answ)
{
// verifica validità chiavi... TBD!!!
}
return answ;
}
#endregion Private Methods
#if false
/// <summary>
/// Verifica validità richiesta
/// - dati presenti in chiamata
/// - combinazioni CodApp + chiavi valide/attive
/// </summary>
/// <param name="currReq"></param>
/// <returns></returns>
private bool CheckReqKeys(TaskResultDTO currReq)
{
bool answ = currReq.IsValid;
if (answ)
{
// verifica validità chiavi... TBD!!!
}
return answ;
}
#endif
}
}
File diff suppressed because it is too large Load Diff
+25 -8
View File
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
@@ -6,31 +6,45 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>C:\Users\samuele\source\repos\LiManApp\LiMan.Api\LiMan.APi.xml</DocumentationFile>
<Optimize>true</Optimize>
<Optimize>False</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>True</Optimize>
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS03.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS04.pubxml" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS03.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS04.pubxml.user" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.28" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.11" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="StackExchange.Redis" Version="2.10.1" />
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="7.1.1" />
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="7.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.36.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LiMan.DbSync\LiMan.DbSync.csproj" />
<ProjectReference Include="..\LiMan.DB\LiMan.DB.csproj" />
<ProjectReference Include="..\LiMan.GLS\LiMan.GLS.csproj" />
</ItemGroup>
@@ -43,4 +57,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>
+3 -3
View File
@@ -154,7 +154,7 @@
Caricamento file effettivo via POST
</summary>
<param name="ticketId">TicketId x riferimento</param>
<param name="files">Elenco files da caricare</param>
<param name="file">Elenco files da caricare</param>
<returns></returns>
</member>
<member name="T:LiMan.APi.Controllers.InstallazioniController">
@@ -560,7 +560,7 @@
</member>
<member name="M:LiMan.APi.Data.ApiDataService.TicketAdd(Core.SupportRequest)">
<summary>
Esegue aggiunta Ticket richeisto + restitusice aperti x cliente
Esegue aggiunta Ticket richiesto + restitusice aperti x cliente
</summary>
<param name="currRequest"></param>
<returns></returns>
@@ -576,7 +576,7 @@
<param name="numRec"></param>
<returns></returns>
</member>
<member name="M:LiMan.APi.Data.ApiDataService.TicketUpdateState(System.Int32,Core.StatoRichiesta)">
<member name="M:LiMan.APi.Data.ApiDataService.TicketUpdateState(System.Int32,Core.Enum.StatoRichiesta)">
<summary>
Aggiornamentos tato ticket
</summary>
@@ -7,6 +7,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAADyvXRKpxfDWrEi+5cXyVPMAAAAAASAAACgAAAAEAAAAMRndt7QRE05+xDzpFe1wWwYAAAAfM5H5MJhxE4ciNpDlKikQFw6IBALwdj0FAAAAI8ZWcD16VBpqPQZ+tg+phFYzX1T</EncryptedPassword>
<History>True|2022-02-04T09:39:26.3565661Z;False|2022-02-04T10:38:16.4000573+01:00;False|2022-02-04T10:31:02.8361162+01:00;False|2022-02-04T10:29:23.4973985+01:00;False|2022-02-04T10:28:21.1773984+01:00;False|2022-02-04T10:25:50.0542905+01:00;False|2022-02-04T10:23:45.1840125+01:00;False|2022-02-04T10:23:24.8448115+01:00;False|2022-02-04T10:22:15.7243050+01:00;False|2022-02-04T10:21:53.7185925+01:00;False|2022-02-04T10:15:28.7942817+01:00;False|2022-02-04T10:12:36.7104601+01:00;True|2022-02-02T11:24:58.6066960+01:00;False|2021-11-16T14:49:02.9625741+01:00;True|2021-11-09T12:19:38.4459836+01:00;True|2021-11-09T12:19:33.2695831+01:00;True|2021-11-09T12:09:32.8676673+01:00;True|2021-11-09T12:09:26.5263401+01:00;True|2021-11-09T12:09:20.3614911+01:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
<History>True|2023-02-03T18:35:00.4015320Z;True|2022-02-04T10:39:26.3565661+01:00;False|2022-02-04T10:38:16.4000573+01:00;False|2022-02-04T10:31:02.8361162+01:00;False|2022-02-04T10:29:23.4973985+01:00;False|2022-02-04T10:28:21.1773984+01:00;False|2022-02-04T10:25:50.0542905+01:00;False|2022-02-04T10:23:45.1840125+01:00;False|2022-02-04T10:23:24.8448115+01:00;False|2022-02-04T10:22:15.7243050+01:00;False|2022-02-04T10:21:53.7185925+01:00;False|2022-02-04T10:15:28.7942817+01:00;False|2022-02-04T10:12:36.7104601+01:00;True|2022-02-02T11:24:58.6066960+01:00;False|2021-11-16T14:49:02.9625741+01:00;True|2021-11-09T12:19:38.4459836+01:00;True|2021-11-09T12:19:33.2695831+01:00;True|2021-11-09T12:09:32.8676673+01:00;True|2021-11-09T12:09:26.5263401+01:00;True|2021-11-09T12:09:20.3614911+01:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>liman.egalware.com/ELM.API</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>34200ca2-489c-435a-a60b-34de7b7ba04d</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://office.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>liman.egalware.com/ELM.API</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>true</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAADyvXRKpxfDWrEi+5cXyVPMAAAAAASAAACgAAAAEAAAAMRndt7QRE05+xDzpFe1wWwYAAAAfM5H5MJhxE4ciNpDlKikQFw6IBALwdj0FAAAAI8ZWcD16VBpqPQZ+tg+phFYzX1T</EncryptedPassword>
<History>True|2023-03-14T13:23:13.2505933Z;True|2023-03-14T14:22:47.9125658+01:00;True|2023-02-03T19:35:00.4015320+01:00;True|2022-02-04T10:39:26.3565661+01:00;False|2022-02-04T10:38:16.4000573+01:00;False|2022-02-04T10:31:02.8361162+01:00;False|2022-02-04T10:29:23.4973985+01:00;False|2022-02-04T10:28:21.1773984+01:00;False|2022-02-04T10:25:50.0542905+01:00;False|2022-02-04T10:23:45.1840125+01:00;False|2022-02-04T10:23:24.8448115+01:00;False|2022-02-04T10:22:15.7243050+01:00;False|2022-02-04T10:21:53.7185925+01:00;False|2022-02-04T10:15:28.7942817+01:00;False|2022-02-04T10:12:36.7104601+01:00;True|2022-02-02T11:24:58.6066960+01:00;False|2021-11-16T14:49:02.9625741+01:00;True|2021-11-09T12:19:38.4459836+01:00;True|2021-11-09T12:19:33.2695831+01:00;True|2021-11-09T12:09:32.8676673+01:00;True|2021-11-09T12:09:26.5263401+01:00;True|2021-11-09T12:09:20.3614911+01:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
+1 -1
View File
@@ -22,7 +22,7 @@
"dotnetRunMessages": "true",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "https://localhost:5003;http://localhost:5002",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
@@ -0,0 +1,27 @@
<body>
<i>License Manager</i>
<h4>Versione: {{CURRENT-REL}}</h4>
<br /> Note di rilascio:
<ul>
<li>
<b>Ultime modifiche:</b>
<ul>{{LAST-CHANGES}}</ul>
</li>
<li>
<b>v.1.* &rarr;</b>
<ul>
<li>Nuova release dotnet6</li>
<li>Prima release dotnet5</li>
<li>Integrazione EFCore</li>
</ul>
</li>
</ul>
<div>
<div style="float: left;">
<img src="logoSteamware.png" />
</div>
<div style="float: right;">
<a href="https://www.steamware.net/" target="_blank">&copy; Steamware 2006-2021</a>
</div>
</div>
</body>
+27
View File
@@ -0,0 +1,27 @@
<body>
<i>License Manager</i>
<h4>Versione: 2.1.2512.0409</h4>
<br /> Note di rilascio:
<ul>
<li>
<b>Ultime modifiche:</b>
<ul>{{LAST-CHANGES}}</ul>
</li>
<li>
<b>v.1.* &rarr;</b>
<ul>
<li>Nuova release dotnet6</li>
<li>Prima release dotnet5</li>
<li>Integrazione EFCore</li>
</ul>
</li>
</ul>
<div>
<div style="float: left;">
<img src="logoSteamware.png" />
</div>
<div style="float: right;">
<a href="https://www.steamware.net/" target="_blank">&copy; Steamware 2006-2021</a>
</div>
</div>
</body>
+1
View File
@@ -0,0 +1 @@
2.1.2512.0409
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.0.0</version>
<url>https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html</changelog>
<mandatory>false</mandatory>
</item>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>2.1.2512.0409</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
</item>
+65 -23
View File
@@ -1,5 +1,6 @@
using LiMan.APi.Data;
using LiMan.DB;
using LiMan.DbSync.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
@@ -9,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using StackExchange.Redis;
using StackExchange.Redis.Extensions.Core.Configuration;
using StackExchange.Redis.Extensions.Newtonsoft;
using System;
@@ -40,19 +42,20 @@ namespace LiMan.Serv
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
if (env.IsDevelopment() || env.IsStaging())
{
app.UseDeveloperExceptionPage();
}
app.UseSwagger(c =>
{
c.RouteTemplate = "/swagger/{documentName}/swagger.json";
});
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("v1/swagger.json", "LiMan.Api");
});
// valido solo in sviluppo
app.UseSwagger(c =>
{
c.RouteTemplate = "/swagger/{documentName}/swagger.json";
});
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("v1/swagger.json", "LiMan.Api");
});
}
app.UseHttpsRedirection();
@@ -60,14 +63,39 @@ namespace LiMan.Serv
app.UseAuthorization();
app.UseFileServer(new FileServerOptions
// verifico da conf se sia linux o windows x file da accedere...
if (Configuration["HostOs"] == "Win")
{
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\unsafe_uploads"),
RequestPath = new PathString("/unsafe_uploads"),
EnableDirectoryBrowsing = true
//EnableDirectoryBrowsing = false
});
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\unsafe_uploads"),
RequestPath = new PathString("/unsafe_uploads"),
EnableDirectoryBrowsing = true
//EnableDirectoryBrowsing = false
});
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\AppBackup"),
RequestPath = new PathString("/app_backup"),
EnableDirectoryBrowsing = false
});
}
else
{
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "unsafe_uploads")),
RequestPath = new PathString("/unsafe_uploads"),
EnableDirectoryBrowsing = true
//EnableDirectoryBrowsing = false
});
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "app_backup")),
RequestPath = new PathString("/app_backup"),
EnableDirectoryBrowsing = false
});
}
app.UseEndpoints(endpoints =>
{
@@ -94,25 +122,39 @@ namespace LiMan.Serv
options.Host_Address = Configuration["ExternalProviders:MailKit:SMTP:Address"];
options.Host_Port = Convert.ToInt32(Configuration["ExternalProviders:MailKit:SMTP:Port"]);
options.Host_Username = Configuration["ExternalProviders:MailKit:SMTP:Account"];
options.Host_Password = Configuration["ExternalProviders:MailKit:SMTP:Password"];
options.Host_Password = Configuration["ExternalProviders:MailKit:SMTP:Password"] ?? "";
options.Sender_EMail = Configuration["ExternalProviders:MailKit:SMTP:SenderEmail"];
options.Sender_Name = Configuration["ExternalProviders:MailKit:SMTP:SenderName"];
options.Host_SecureSocketOptions = MailKit.Security.SecureSocketOptions.Auto;
});
//services.AddStackExchangeRedisCache(options =>
//{
// options.Configuration = Configuration.GetConnectionString("Redis");
//});
services.AddControllers()
.AddJsonOptions(c => c.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve);
services.AddSingleton<ApiDataService>();
services.AddStackExchangeRedisExtensions<NewtonsoftSerializer>((options) =>
{
return Configuration.GetSection("Redis").Get<RedisConfiguration>();
});
services.AddSingleton<ApiDataService>();
// REDIS setup
var redisConnString = Configuration.GetConnectionString("Redis");
string connStringRedis = redisConnString ?? "localhost:6379, DefaultDatabase=1, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false";
string redisSrvAddr = "127.0.0.1";
if (connStringRedis.IndexOf(":") >= 0)
{
redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
}
// avvio oggetto shared x redis...
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
// Add services x accesso dati
services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
// aggiungo servizio sync DB
services.AddSingleton<DbSyncService>();
}
#endregion Public Methods
+10 -9
View File
@@ -1,11 +1,12 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Environment": "PROD"
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Environment": "PROD",
"HostOs": "Win"
}
+10 -9
View File
@@ -1,11 +1,12 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Environment": "STAG"
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Environment": "STAG",
"HostOs": "Win"
}
+15 -10
View File
@@ -8,25 +8,26 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"LiMan.GLS": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"LiMan.DB": "Server=SQLSTEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"Redis": "localhost:6379,DefaultDatabase=13"
"LiMan.GLS": "Server=W2019-SQL-STEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"LiMan.DB": "Server=W2019-SQL-STEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"Redis": "redis.ufficio:26379, serviceName=prod, DefaultDatabase=13, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG"
},
"ExternalProviders": {
"MailKit": {
"SMTP": {
"Address": "smtp.gmail.com",
"Port": "465",
"Account": "steamwarebot@gmail.com",
"Password": "drmfsls16",
"SenderEmail": "steamwarebot@gmail.com",
"Port": "587",
"Account": "services@steamware.net",
"Password": "ruejpcwgycvbmmsr",
"SenderEmail": "services@steamware.net",
"SenderName": "Steamware Email BOT"
}
}
},
"MailDest": {
"Admin": "samuele@steamware.net",
"ProcOp": "ceo@steamware.net"
"ExpiryNotify": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
"TicketNotify": "samuele.locatelli@egalware.com, info@egalware.com"
},
"Redis": {
"Password": "",
@@ -42,6 +43,10 @@
],
"Database": 14
},
"FileShare": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads",
"ApiUrl": "https://liman.egalware.com/"
"ServerConf": {
"FileShareAppBackup": "\\\\stor01\\AppBackup",
"FileShareTickets": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads"
},
"ApiUrl": "https://liman.egalware.com/",
"HostOs": "Win"
}
+32
View File
@@ -0,0 +1,32 @@
param([string]$ProjectDir, [string]$ProjectPath);
$FileMajMin = "..\MajMin.vers"
$FileVers = "Resources\VersNum.txt"
$FileManIn = "Resources\manifest-original.xml"
$FileManOut = "Resources\manifest.xml"
$FileCLogIn = "Resources\ChangeLog-original.html"
$FileCLogOut = "Resources\ChangeLog.html"
$MajMin = Get-Content $FileMajMin # "6.14."
$currentDate = get-date -format yyMM;
$currentTime = get-date -format ddHH;
$find = "<Version>(.|\n)*?</Version>";
$currRelNum = $MajMin + $currentDate +"." + $currentTime
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
$csproj = Get-Content $ProjectPath
$csprojUpdated = $csproj -replace $find, $replace
Set-Content -Path $ProjectPath -Value $csprojUpdated
Set-Content -Path $FileVers -Value $currRelNum
# replace x manifest
$manData = Get-Content $FileManIn
$manData = $manData -replace "1.0.0.0", $currRelNum
$manData = $manData -replace "{{DIRNAME}}", "LiMan"
$manData = $manData -replace "{{BRANCHNAME}}", "stable/LAST"
$manData = $manData -replace "{{PACKNAME}}", "LiMan.UI"
Set-Content -Path $FileManOut -Value $manData
# replace x ChangeLog
$clogData = Get-Content $FileCLogIn
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
Set-Content -Path $FileCLogOut -Value $clogData
File diff suppressed because it is too large Load Diff
+9 -12
View File
@@ -11,25 +11,22 @@ namespace LiMan.DB.DBModels
[Table("Applicativi")]
public partial class ApplicativoModel
{
#region Public Constructors
//public Applicativo()
//{
// LicenzeAttives = new HashSet<Licenza>();
//}
#endregion Public Constructors
#region Public Properties
[Key]
[MaxLength(50)]
public string CodApp { get; set; }
public string CodApp { get; set; } = "";
[MaxLength(250)]
public string Descrizione { get; set; }
public string Descrizione { get; set; } = "";
//public virtual ICollection<Licenza> LicenzeAttives { get; set; }
[MaxLength(2500)]
public string TplConnString { get; set; } = "";
/// <summary>
/// Tipo Applicazione
/// </summary>
public string Tipo { get; set; } = "";
#endregion Public Properties
}
+36
View File
@@ -0,0 +1,36 @@
using Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
namespace LiMan.DB.DBModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("AuthClaims")]
public partial class AuthClaimModel
{
#region Public Properties
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ClaimID { get; set; }
public int RoleID { get; set; }
public int UserID { get; set; }
public DateTime DtIns { get; set; } = DateTime.MinValue;
public DateTime DtMod { get; set; } = DateTime.Now;
[ForeignKey("RoleID")]
public virtual AuthRoleModel RoleNav { get; set; }
[ForeignKey("UserID")]
public virtual AuthUserModel UserNav { get; set; }
#endregion Public Properties
}
}
+34
View File
@@ -0,0 +1,34 @@
using Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
namespace LiMan.DB.DBModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("AuthRoles")]
public partial class AuthRoleModel
{
#region Public Properties
public AuthRoleModel()
{
Claims = new HashSet<AuthClaimModel>();
}
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int RoleID { get; set; }
public string Ruolo { get; set; }
public string Descrizione { get; set; }
public virtual ICollection<AuthClaimModel> Claims { get; set; }
#endregion Public Properties
}
}
+44
View File
@@ -0,0 +1,44 @@
using Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
namespace LiMan.DB.DBModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("AuthUsers")]
public partial class AuthUserModel
{
#region Public Properties
public AuthUserModel()
{
Claims = new HashSet<AuthClaimModel>();
}
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int UserID { get; set; }
public string Username { get; set; }
public string AD_Domain { get; set; } = "";
public string AD_User { get; set; } = "";
public string Cognome { get; set; } = "Cognome";
public string Nome { get; set; } = "Nome";
public virtual ICollection<AuthClaimModel> Claims { get; set; }
[NotMapped]
public bool IsActive
{
get => Claims != null && Claims.Count > 0;
}
#endregion Public Properties
}
}
+109
View File
@@ -0,0 +1,109 @@
using Newtonsoft.Json;
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 LiMan.DB.DBModels
{
[Table("EnrollRequest")]
public partial class EnrollRequestModel
{
/// <summary>
/// ID univoco
/// </summary>
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdReq { get; set; }
/// <summary>
/// Passcode usato per autorizzare (un valore random NON DUPLICATO con quelli attivi al momento della richiesta)
/// </summary>
public int Passcode { get; set; } = 0;
/// <summary>
/// Payload richiesta, ovvero la serializzazione json di un Dict[string,string] delle info ricevute
/// </summary>
public string ReqPayload { get; set; } = "";
/// <summary>
/// DataOra richiesta enroll
/// </summary>
public DateTime DtReq { get; set; } = DateTime.Now;
/// <summary>
/// DataOra approvazione
/// </summary>
public DateTime? DtAppr { get; set; } = null;
/// <summary>
/// Username approvatore
/// </summary>
public string UserAppr { get; set; } = "";
/// <summary>
/// Licenza fornita in risposta alla richiesta
/// </summary>
public int IdxLic { get; set; } = 0;
/// <summary>
/// Indica Scaduta se non approvata e richiesta da oltre 15 minuti
/// </summary>
[NotMapped]
public bool IsScaduta
{
get => DtAppr == null && DateTime.Now.Subtract(DtReq).TotalMinutes > minScad;
}
/// <summary>
/// DataOra Scadenza richiesta (periodo indicato - 10 sec)
/// </summary>
[NotMapped]
public DateTime DtScadenza
{
get => DtReq.AddSeconds(minScad * 60 - 10);
}
[NotMapped]
public Dictionary<string, string> DictAttrib
{
get
{
Dictionary<string, string> answ = new Dictionary<string, string>();
if (!string.IsNullOrEmpty(ReqPayload))
{
try
{
answ = JsonConvert.DeserializeObject<Dictionary<string, string>>(ReqPayload);
}
catch { }
}
return answ;
}
}
public int DictNumKVP()
{
return DictAttrib.Count;
}
public Dictionary<string, string> DictAttribShort(int numMax)
{
Dictionary<string, string> answ = DictAttrib;
if (answ.Count > numMax)
{
answ = answ.Take(numMax).ToDictionary(x => x.Key, x => x.Value);
}
return answ;
}
/// <summary>
/// Scadenza massima (in minuti) per la richiesta
/// </summary>
private const int minScad = 15;
}
}
@@ -0,0 +1,95 @@
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;
namespace LiMan.DB.DBModels
{
[Table("InstalledReleasesHistory")]
public partial class InstalledReleasesHistoryModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxInstRelHist { get; set; }
/// <summary>
/// Data di riferimento campionamento
/// </summary>
public DateTime DtRif { get; set; } = DateTime.Today;
/// <summary>
/// CodApp Richiesta
/// </summary>
[MaxLength(50)]
public string CodApp { get; set; } = "";
/// <summary>
/// Versione applicativo formato semver numerico 4 blocchi
/// </summary>
[MaxLength(50)]
public string VersNum { get; set; } = "0.0.0.0";
/// <summary>
/// Numero Copie Installate dell'applicativo
/// </summary>
public int NumInst { get; set; } = 1;
/// <summary>
/// Numero Impieghi dell'applicativo (es per MAPO IOB-WIN il num di iOB usati con uno specifico SW)
/// </summary>
public int NumImp { get; set; } = 1;
/// <summary>
/// Numero Installazioni con score 4 (tutti valori rel correnti M.m.r.b)
/// </summary>
public int NumIS4 { get; set; } = 0;
/// <summary>
/// Numero Installazioni con score 3 (3 valori rel correnti M.m.r.x)
/// </summary>
public int NumIS3 { get; set; } = 0;
/// <summary>
/// Numero Installazioni con score 2 (2 valori rel correnti M.m.x.x)
/// </summary>
public int NumIS2 { get; set; } = 0;
/// <summary>
/// Numero Installazioni con score 1 (3 valori rel correnti M.x.x.x)
/// </summary>
public int NumIS1 { get; set; } = 0;
/// <summary>
/// Numero Installazioni con score 0 (0 valori rel correnti x.x.x.x)
/// </summary>
public int NumIS0 { get; set; } = 0;
/// <summary>
/// Versione (calcolata) a partire dal valore Num
/// </summary>
[NotMapped]
public Version VersVal
{
get
{
Version answ = new Version();
try
{
// solo se è una versione valida: SemVer = 2/3 punti
int numPunti = VersNum.Length - VersNum.Replace(".", "").Length;
if (numPunti >= 2 && numPunti <= 3)
{
answ = !string.IsNullOrEmpty(VersNum) ? new Version(VersNum) : new Version();
}
}
catch { }
return answ;
}
}
[ForeignKey("CodApp")]
public virtual ApplicativoModel ApplicativoNav { get; set; }
}
}
@@ -0,0 +1,96 @@
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;
namespace LiMan.DB.DBModels
{
[Table("InstalledReleases")]
public partial class InstalledReleasesModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxInstall { get; set; }
/// <summary>
/// CodApp Richiesta
/// </summary>
[MaxLength(50)]
public string CodApp { get; set; } = "";
/// <summary>
/// Master Key
/// </summary>
[MaxLength(500)]
public string MastKey { get; set; } = "";
/// <summary>
/// Codice Impiego Istanza (SubLic)
/// </summary>
[MaxLength(500)]
public string CodImp { get; set; } = "";
/// <summary>
/// Chiave SubLic
/// </summary>
[MaxLength(500)]
public string AppKey { get; set; } = "";
/// <summary>
/// Versione applicativo formato semver numerico 4 blocchi
/// </summary>
[MaxLength(50)]
public string VersNum { get; set; } = "0.0.0.0";
/// <summary>
/// Numero impieghi dell'applicativo (es per MAPO IOB-WIN il num di iOB usati con uno specifico SW)
/// </summary>
public int NumImp { get; set; } = 1;
/// <summary>
/// Data di ultima verifica versione
/// </summary>
public DateTime DtCheck { get; set; } = DateTime.Today.AddYears(-1);
/// <summary>
/// Licenza associata
/// </summary>
public int IdxLic { get; set; } = 0;
/// <summary>
/// Istanza (SubLic) associata
/// </summary>
public int IdxSubLic { get; set; } = 0;
/// <summary>
/// Versione (calcolata) a partire dal valore Num
/// </summary>
[NotMapped]
public Version VersVal
{
get
{
Version answ = new Version();
try
{
// solo se è una versione valida: SemVer = 2/3 punti
int numPunti = VersNum.Length - VersNum.Replace(".", "").Length;
if (numPunti >= 2 && numPunti <= 3)
{
answ = !string.IsNullOrEmpty(VersNum) ? new Version(VersNum) : new Version();
}
}
catch { }
return answ;
}
}
[ForeignKey("CodApp")]
public virtual ApplicativoModel ApplicativoNav { get; set; }
[ForeignKey("IdxLic")]
public virtual LicenzaModel? LicenzaNav { get; set; }
}
}
+1
View File
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
+39
View File
@@ -0,0 +1,39 @@
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;
using static Core.Enum;
namespace LiMan.DB.DBModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
//[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))]
[Table("LogCodImp")]
public partial class LogCodImp
{
#region Public Properties
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxLogCodImp { get; set; }
public int IdxLic { get; set; } = 0;
public int IdxSubLic { get; set; } = 0;
public string CodApp { get; set; } = "";
public string CodImpOld { get; set; } = "";
public string CodImpNew { get; set; } = "";
public DateTime DtMod { get; set; } = DateTime.Now;
[ForeignKey("IdxLic")]
public virtual LicenzaModel LicenzaNav { get; set; }
[ForeignKey("CodApp")]
public virtual ApplicativoModel ApplicativoNav { get; set; }
#endregion Public Properties
}
}
+1
View File
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
+73
View File
@@ -0,0 +1,73 @@
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;
namespace LiMan.DB.DBModels
{
[Table("Releases")]
public partial class ReleaseModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxRel { get; set; }
/// <summary>
/// Codice/Nome applicativo
/// </summary>
public string CodApp { get; set; } = "";
/// <summary>
/// Versione applicativo formato semver numerico 4 blocchi
/// </summary>
public string VersNum { get; set; } = "0.0.0.0";
/// <summary>
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
/// </summary>
public string VersText { get; set; } = "0.1a2";
/// <summary>
/// Tag associati a versione, comma separated
/// </summary>
public string RelTags { get; set; } = "";
/// <summary>
/// Versione (calcolata) a partire dal valore Num
/// </summary>
[NotMapped]
public Version VersVal
{
get
{
Version answ = new Version();
try
{
// solo se è una versione valida: SemVer = 2/3 punti
int numPunti = VersNum.Length - VersNum.Replace(".", "").Length;
if (numPunti >= 2 && numPunti <= 3)
{
answ = !string.IsNullOrEmpty(VersNum) ? new Version(VersNum) : new Version();
}
}
catch { }
return answ;
}
}
[NotMapped]
public bool IsReleased
{
get => ReleaseDate <= DateTime.Now;
}
/// <summary>
/// Data di release
/// </summary>
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
[ForeignKey("CodApp")]
public virtual ApplicativoModel ApplicativoNav { get; set; }
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiMan.DB.DBModels
{
public partial class StatsCallModel
{
#region Public Properties
public int YearRef { get; set; } = 0;
public string CodInst { get; set; } = "";
public string CodApp { get; set; } = "";
public int TotCall { get; set; } = 0;
#endregion Public Properties
}
}
+1
View File
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
+1
View File
@@ -2,6 +2,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Core.Enum;
#nullable disable
+114
View File
@@ -0,0 +1,114 @@
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 LiMan.DB.DTO
{
/// <summary>
/// DTO relativo alle info di ogni singolo applicativo
/// </summary>
public class AppRelStatusDTO
{
/// <summary>
/// CodApp Richiesta
/// </summary>
public string CodApp { get; set; } = "";
/// <summary>
/// CodInstall collegato
/// </summary>
public string CodInst { get; set; } = "";
/// <summary>
/// CodImpiego collegato
/// </summary>
public string CodImp { get; set; } = "";
/// <summary>
/// Licenza Updater
/// </summary>
public int IdxLic { get; set; } = 0;
/// <summary>
/// Codice cliente
/// </summary>
public string Cliente { get; set; } = "";
/// <summary>
/// Istanza Updater (PC)
/// </summary>
public int IdxSubLic { get; set; } = 0;
/// <summary>
/// PC/Installazione specifica
/// </summary>
public string PcInst { get; set; } = "";
/// <summary>
/// Conteggio del numero totale degli impieghi attivi (es conteggio IOB)
/// </summary>
public int NumImp { get; set; } = 1;
/// <summary>
/// Versione Installata
/// </summary>
public string VersNumInstall { get; set; } = "0.0.0.0";
/// <summary>
/// Versione Release corrente
/// </summary>
public string VersNumCurrent { get; set; } = "0.0.0.0";
/// <summary>
/// Status aggiornamento:
/// 4 = corrente, 4 blocchi uguali (0.0.0.0)
/// 3 = 3 uguali, cambia 4 blocco (0.0.0.x)
/// 2 = 2 uguali, cambia 3 blocco (0.0.x.x)
/// 1 = 1 uguali, cambia 2 blocco (0.x.x.x)
/// 0 = 0 uguali, cambia 1 blocco (x.x.x.x)
/// </summary>
public int UpToDateStatus
{
get
{
int answ = 0;
if (VersNumCurrent == VersNumInstall)
{
answ = 4;
}
else
{
var tokInst = VersNumInstall.Split('.');
var tokCurr = VersNumCurrent.Split('.');
int numTok = tokCurr.Count();
// parto dal + basso ad assegnare punteggio...
for (int i = 0; i < numTok; i++)
{
// se diversi esco...
if (tokInst[i] != tokCurr[i])
{
break;
}
answ++;
}
}
return answ;
}
}
/// <summary>
/// Data Ora ultimo controllo
/// </summary>
public DateTime DtCheck { get; set; } = DateTime.Now;
}
}
+76
View File
@@ -0,0 +1,76 @@
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 LiMan.DB.DTO
{
/// <summary>
/// DTO relativo alle info RAGGRUPPATE x applicativo
/// </summary>
public class AppStatusDTO
{
/// <summary>
/// CodApp Richiesta
/// </summary>
public string CodApp { get; set; } = "";
/// <summary>
/// Conteggio del numero totale installazioni
/// </summary>
public int NumInst { get; set; } = 1;
/// <summary>
/// Conteggio del numero totale degli impieghi attivi (es conteggio IOB)
/// </summary>
public int NumImp { get; set; } = 1;
/// <summary>
/// Versione Release corrente
/// </summary>
public string VersNumCurrent { get; set; } = "0.0.0.0";
/// <summary>
/// Dizionario Versioni Installate
/// </summary>
public Dictionary<string, int> DictVersNumInst { get; set; } = new Dictionary<string, int>();
/// <summary>
/// Dizionario Stato Update, dove la chiave è UpToDateStatus come
/// 4 = corrente, 4 blocchi uguali (0.0.0.0)
/// 3 = 3 uguali, cambia 4 blocco (0.0.0.x)
/// 2 = 2 uguali, cambia 3 blocco (0.0.x.x)
/// 1 = 1 uguali, cambia 2 blocco (0.x.x.x)
/// 0 = 0 uguali, cambia 1 blocco (x.x.x.x)
/// </summary>
public Dictionary<int, int> DictUpdate { get; set; } = new Dictionary<int, int>();
/// <summary>
/// Dettaglio delle versioni installate con tutte le info
/// </summary>
public List<AppRelStatusDTO> DetailInstalled { get; set; } = new List<AppRelStatusDTO>();
/// <summary>
/// Score dello stato di aggiornamento complessivo
/// </summary>
public double UpdateScore
{
get => DictUpdate != null ? (double)(DictUpdate.Sum(x => x.Key * x.Value)) / (4 * DictUpdate.Sum(x => x.Value)) : 0;
}
/// <summary>
/// Data Ora ultimo controllo
/// </summary>
public DateTime DtCheck { get; set; } = DateTime.Now;
}
}
+1
View File
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
+1
View File
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
+22
View File
@@ -0,0 +1,22 @@
using Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace LiMan.DB.DTO
{
public class DeviceDTO
{
public string CodImp { get; set; } = "";
public string CodInst { get; set; } = "";
public string DevName { get; set; } = "";
public DateTime LastUpdate { get; set; } = DateTime.Today.AddYears(-1);
}
}
+113
View File
@@ -0,0 +1,113 @@
using LiMan.DB.DBModels;
using System;
using System.Collections.Generic;
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 LiMan.DB.DTO
{
/// <summary>
/// Resoconto informazioni per statistiche installazioni
/// </summary>
public class InstallStatusDTO
{
/// <summary>
/// Elenco delle licenze degli applicativi abilitati alla gestione verifica update
/// </summary>
public List<ApplicativoDTO> UpdaterList { get; set; } = new List<ApplicativoDTO>();
/// <summary>
/// Elenco chiamate con conteggio x CodApp
/// </summary>
public Dictionary<string, int> ReqCountApp { get; set; } = new Dictionary<string, int>();
/// <summary>
/// Lista delle ultime richieste registrate (TargetUrl like '%release%') come conteggio orario (tipicamente 15 gg)
/// </summary>
public Dictionary<DateTime, int> ReqCountHour { get; set; } = new Dictionary<DateTime, int>();
/// <summary>
/// Lista delle ultime richieste registrate (TargetUrl like '%release%') come conteggio giornaliero (tipicamente 1 anno)
/// </summary>
public Dictionary<DateTime, int> ReqCountDay { get; set; } = new Dictionary<DateTime, int>();
/// <summary>
/// Lista delle Releases Installate x le applicazioni gestite
/// </summary>
public List<AppRelStatusDTO> InstallRelList { get; set; } = new List<AppRelStatusDTO>();
/// <summary>
/// Statistica aggregata status applicativi
/// </summary>
public List<AppStatusDTO> InstallStatus { get; set; } = new List<AppStatusDTO>();
/// <summary>
/// Dizionario record Impiego/dati device
/// </summary>
public Dictionary<string, DeviceDTO> InstDevices { get; set; } = new Dictionary<string, DeviceDTO>();
[NotMapped]
public int LastCallHour
{
get => ReqCountHour != null && ReqCountHour.Count > 0 ? ReqCountHour.Last().Value : 0;
}
[NotMapped]
public int LastCallDay
{
get => ReqCountDay != null && ReqCountDay.Count > 0 ? ReqCountDay.Last().Value : 0;
}
[NotMapped]
public int TotalUpdaterAct
{
get
{
return UpdaterList.Sum(x => x.NumLicenzeAttive);
}
}
[NotMapped]
public double GlobalUpdateScore
{
get
{
return InstallStatus.Sum(x => x.UpdateScore * x.NumInst) / (InstallStatus.Sum(x => x.NumInst));
}
}
/// <summary>
/// Conteggio totale di tutte le applicazioni gestite, come somma CONTEGGIO degli applicativi diversi gestiti (per cliente)
/// </summary>
[NotMapped]
public int TotalManagedCount
{
get
{
return UpdaterList.Count + InstallRelList.Count;
}
}
/// <summary>
/// Conteggio totale di tutte le applicazioni gestite, come somma NumImpieghi di tutti gli applicativi + conteggio updater
/// </summary>
[NotMapped]
public int TotalManagedNum
{
get
{
return UpdaterList.Sum(x => x.NumLicenzeAttive) + InstallRelList.Sum(x => x.NumImp);
}
}
/// <summary>
/// Data Ora ultimo aggiornamento informazioni
/// </summary>
public DateTime LastUpdated { get; set; } = DateTime.Now;
}
}
+80
View File
@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace LiMan.DB.DTO
{
public class ReleaseDTO
{
/// <summary>
/// Codice/Nome applicativo
/// </summary>
public string CodApp { get; set; } = "";
/// <summary>
/// Versione applicativo formato semver numerico 4 blocchi
/// </summary>
public string VersNum { get; set; } = "0.0.0.0";
/// <summary>
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
/// </summary>
public string VersText { get; set; } = "a.b";
/// <summary>
/// Oggetto versione calcolato da VersNum
/// </summary>
public Version VersVal { get; set; } = new Version();
/// <summary>
/// Verifica se sia permessa la versione quando viene valutata la versione massima consentita
/// </summary>
public bool IsPermitted { get; set; } = false;
/// <summary>
/// Data di release
/// </summary>
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
/// <summary>
/// Tag associati a versione, comma separated
/// </summary>
public string RelTags { get; set; } = "";
/// <summary>
/// Url pagina web di changelog (traduzione gestita sul sito target) - calcolato da CodApp + vers
/// </summary>
//public string UrlChangelog { get; set; } = "http://releases.egalware.com";
[NotMapped]
public string UrlChangelog
{
get => $"https://releases.egalware.com/{CodApp}/{VersText}".ToLower();
}
/// <summary>
/// Url pagina web di changelog estesa (traduzione gestita sul sito target) - calcolato da CodApp + vers
/// </summary>
//public string UrlChangelogExt { get; set; } = "http://releases.egalware.com";
[NotMapped]
public string UrlChangelogExt
{
get => $"https://releases.egalware.com/ext_{CodApp}/{VersText}".ToLower();
}
/// <summary>
/// Attivo/Pubblico (qui calcolato, attivo se la data di release è passata, poi potrebbe essere gestito a parte da DB)
/// </summary>
[NotMapped]
public bool IsActive
{
get => (DateTime.Today.Subtract(ReleaseDate).TotalDays >= 0);
}
}
}
+64
View File
@@ -0,0 +1,64 @@
using Core;
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;
using static Core.Enum;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace LiMan.DB.DTO
{
public class UpdaterDTO
{
/// <summary>
/// Codice impiego (univoco x device)
/// </summary>
[Key]
public string CodImp { get; set; } = "";
/// <summary>
/// Nome App updater
/// </summary>
public string AppName { get; set; } = "Nemo";
/// <summary>
/// Versione updater
/// </summary>
public string AppVers { get; set; } = "0.0.0.0";
/// <summary>
/// Cod installazione
/// </summary>
public string CodInst { get; set; } = "";
/// <summary>
/// Cod Cliente
/// </summary>
public string Cliente { get; set; } = "";
/// <summary>
/// Data ora ultima comunicaziione
/// </summary>
public DateTime DtLastCom { get; set; } = DateTime.Today.AddYears(-1);
/// <summary>
/// Num App gestite
/// </summary>
public int NumApp { get; set; } = 0;
/// <summary>
/// Num file licenza gestite
/// </summary>
public int NumLicenze { get; set; } = 0;
/// <summary>
/// Numero Istsanze complessive (App x Istanze)
/// </summary>
public int NumIstanze { get; set; } = 0;
}
}
+20 -1
View File
@@ -53,9 +53,18 @@ namespace LiMan.DB
public virtual DbSet<InstallazioneModel> DbSetInst { get; set; }
public virtual DbSet<LicenzaModel> DbSetLicenze { get; set; }
public virtual DbSet<LogCallModel> DbSetLogCall { get; set; }
public virtual DbSet<LogCodImp> DbSetLogCodImp { get; set; }
public virtual DbSet<LogLicenzaModel> DbSetLogLicenze { get; set; }
public virtual DbSet<SubLicenzaModel> DbSetSubLicenze { get; set; }
public virtual DbSet<TicketModel> DbSetTicket { get; set; }
public virtual DbSet<StatsCallModel> DbSetStatCall { get; set; }
public virtual DbSet<AuthUserModel> DbSetUsers { get; set; }
public virtual DbSet<AuthRoleModel> DbSetRoles { get; set; }
public virtual DbSet<AuthClaimModel> DbSetClaims { get; set; }
public virtual DbSet<ReleaseModel> DbSetReleases { get; set; }
public virtual DbSet<EnrollRequestModel> DbSetEnrollReq { get; set; }
public virtual DbSet<InstalledReleasesModel> DbSetInstallRel { get; set; }
public virtual DbSet<InstalledReleasesHistoryModel> DbSetInstallRelHist { get; set; }
#endregion Public Properties
@@ -75,7 +84,9 @@ namespace LiMan.DB
}
else
{
optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=LiMan.DB;Trusted_Connection=True;");
//optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=LiMan.DB;Trusted_Connection=True;");
optionsBuilder.UseSqlServer("Server=W2019-SQL-STEAM;Database=LiMan.DB;Trusted_Connection=True;");
//optionsBuilder.UseSqlServer("Server=W2019-SQL-STEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI");
}
}
}
@@ -89,6 +100,14 @@ namespace LiMan.DB
entity.HasKey(e => new { e.DataRif, e.CodInst, e.CodApp, e.TargetUrl });
});
modelBuilder.Entity<StatsCallModel>(entity =>
{
entity.HasKey(e => new { e.YearRef, e.CodInst, e.CodApp });
entity.ToView("v_StatsCall");
});
OnModelCreatingPartial(modelBuilder);
}
+22 -9
View File
@@ -1,25 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="2.15.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.36" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.36" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.36" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.36" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.36" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.36">
<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" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.28" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.36.0" />
<PackageReference Include="NLog" Version="5.3.2" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.36.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="SqlScripts\Stored\stp_StatsCall_filt.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="SqlScripts\Views\v_StatsCall.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
+157
View File
@@ -0,0 +1,157 @@
using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiMan.DB
{
public class MessagePipe
{
#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 Public Methods
/// <summary>
/// Invio messaggio sul canale + salvataggio in cache REDIS
/// </summary>
/// <param name="memKey">Chiave REDIS x salvare valore</param>
/// <param name="message">Messaggio serializzato da inviare</param>
public bool saveAndSendMessage(string memKey, string message)
{
bool answ = false;
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
// invio notifica tramite il canale richiesto
answ = sendMessage(message);
if (redisDb != null)
{
redisDb.StringSetAsync(memKey, message);
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
if (numSent.ContainsKey(memKey))
{
numSent[memKey]++;
}
else
{
numSent.Add(memKey, 1);
}
if (enableLog || numSent[memKey] > 30)
{
Log.Info($"saveAndSendMessage| mKey {memKey} x {numSent[memKey]} | {message.Length} size | {ts.TotalMilliseconds} ms");
numSent[memKey] = 0;
}
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
#region Protected Fields
protected static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Protected Fields
#region Private Fields
private bool enableLog = false;
private Dictionary<string, int> numSent = new Dictionary<string, int>();
private IConnectionMultiplexer redis;
private IDatabase redisDb;
#endregion Private Fields
#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) =>
{
if (enableLog)
{
Log.Trace($"req setup ch {channel} | {message}");
}
// messaggio
PubSubEventArgs mea = new PubSubEventArgs(message);
// se qualcuno ascolta sollevo evento nuovo valore...
if (EA_NewMessage != null)
{
EA_NewMessage(this, mea);
}
});
if (enableLog)
{
Log.Info($"Subscribed {_channel}");
}
}
#endregion Private Methods
}
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
}
}
@@ -13,7 +13,7 @@ namespace LiMan.DB.Migrations
{
IdxTicket = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
DtReq = table.Column<DateTime>(type: "datetime2", nullable: false),
DtReq = table.Column<DateTime>(type: "datetime", nullable: false, defaultValue: DateTime.Now, defaultValueSql: "GETDATE()"),
Tipo = table.Column<int>(type: "int", nullable: false),
IdxLic = table.Column<int>(type: "int", nullable: false),
IdxSubLic = table.Column<int>(type: "int", nullable: false),
@@ -0,0 +1,401 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20240531171929_AddViewAndStored01")]
partial class AddViewAndStored01
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,50 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System.IO;
using System.Reflection;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddViewAndStored01 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
// aggiunta views
addView(migrationBuilder, "v_StatsCall");
// aggiunta stored
addStored(migrationBuilder, "stp_StatsCall_filt");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
// rimozione stored
remStored(migrationBuilder, "stp_StatsCall_filt");
// rimozione views
remView(migrationBuilder, "v_StatsCall");
}
private void addView(MigrationBuilder migrationBuilder, string viewName)
{
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "SqlScripts", "Views", $"{viewName}.sql");
string viewBody = File.ReadAllText(path);
migrationBuilder.Sql(viewBody);
}
private void addStored(MigrationBuilder migrationBuilder, string objName)
{
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "SqlScripts", "Stored", $"{objName}.sql");
string viewBody = File.ReadAllText(path);
migrationBuilder.Sql(viewBody);
}
private void remView(MigrationBuilder migrationBuilder, string viewName)
{
migrationBuilder.Sql($"EXEC('DROP VIEW IF EXISTS dbo.{viewName}');");
}
private void remStored(MigrationBuilder migrationBuilder, string objName)
{
migrationBuilder.Sql($"EXEC('DROP PROCEDURE IF EXISTS dbo.{objName}');");
}
}
}
@@ -0,0 +1,500 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20240713132356_AddUserRoleClaim01")]
partial class AddUserRoleClaim01
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,92 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddUserRoleClaim01 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AuthRoles",
columns: table => new
{
RoleID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Ruolo = table.Column<string>(type: "nvarchar(max)", nullable: true),
Descrizione = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AuthRoles", x => x.RoleID);
});
migrationBuilder.CreateTable(
name: "AuthUsers",
columns: table => new
{
UserID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Username = table.Column<string>(type: "nvarchar(max)", nullable: true),
AD_Domain = table.Column<string>(type: "nvarchar(max)", nullable: true),
AD_User = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AuthUsers", x => x.UserID);
});
migrationBuilder.CreateTable(
name: "AuthClaims",
columns: table => new
{
ClaimID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleID = table.Column<int>(type: "int", nullable: false),
UserID = table.Column<int>(type: "int", nullable: false),
DtIns = table.Column<DateTime>(type: "datetime2", nullable: false),
DtMod = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AuthClaims", x => x.ClaimID);
table.ForeignKey(
name: "FK_AuthClaims_AuthRoles_RoleID",
column: x => x.RoleID,
principalTable: "AuthRoles",
principalColumn: "RoleID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AuthClaims_AuthUsers_UserID",
column: x => x.UserID,
principalTable: "AuthUsers",
principalColumn: "UserID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AuthClaims_RoleID",
table: "AuthClaims",
column: "RoleID");
migrationBuilder.CreateIndex(
name: "IX_AuthClaims_UserID",
table: "AuthClaims",
column: "UserID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AuthClaims");
migrationBuilder.DropTable(
name: "AuthRoles");
migrationBuilder.DropTable(
name: "AuthUsers");
}
}
}
@@ -0,0 +1,506 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20240715060405_AddUserRoleClaim02")]
partial class AddUserRoleClaim02
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddUserRoleClaim02 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Cognome",
table: "AuthUsers",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Nome",
table: "AuthUsers",
type: "nvarchar(max)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Cognome",
table: "AuthUsers");
migrationBuilder.DropColumn(
name: "Nome",
table: "AuthUsers");
}
}
}
@@ -0,0 +1,510 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20240718060756_AddTplConnString01")]
partial class AddTplConnString01
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddTplConnString01 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "TplConnString",
table: "Applicativi",
type: "nvarchar(2500)",
maxLength: 2500,
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "TplConnString",
table: "Applicativi");
}
}
}
@@ -0,0 +1,546 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20240806142953_AddRelModel01")]
partial class AddRelModel01
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,45 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddRelModel01 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Releases",
columns: table => new
{
IdxRel = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CodApp = table.Column<string>(type: "nvarchar(50)", nullable: true),
VersNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
VersText = table.Column<string>(type: "nvarchar(max)", nullable: true),
ReleaseDate = table.Column<DateTime>(type: "datetime", nullable: false, defaultValue: DateTime.Now, defaultValueSql: "GETDATE()")
},
constraints: table =>
{
table.PrimaryKey("PK_Releases", x => x.IdxRel);
table.ForeignKey(
name: "FK_Releases_Applicativi_CodApp",
column: x => x.CodApp,
principalTable: "Applicativi",
principalColumn: "CodApp");
});
migrationBuilder.CreateIndex(
name: "IX_Releases_CodApp",
table: "Releases",
column: "CodApp");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Releases");
}
}
}
@@ -0,0 +1,552 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20240917090404_UpdRelModelAndApp01")]
partial class UpdRelModelAndApp01
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Tipo")
.HasColumnType("nvarchar(max)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("RelTags")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class UpdRelModelAndApp01 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "RelTags",
table: "Releases",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Tipo",
table: "Applicativi",
type: "nvarchar(max)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RelTags",
table: "Releases");
migrationBuilder.DropColumn(
name: "Tipo",
table: "Applicativi");
}
}
}
@@ -0,0 +1,583 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20241231105435_AddEnrollRequest")]
partial class AddEnrollRequest
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Tipo")
.HasColumnType("nvarchar(max)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
{
b.Property<int>("IdReq")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
b.Property<DateTime?>("DtAppr")
.HasColumnType("datetime2");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Passcode")
.HasColumnType("int");
b.Property<string>("ReqPayload")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserAppr")
.HasColumnType("nvarchar(max)");
b.HasKey("IdReq");
b.ToTable("EnrollRequest");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("RelTags")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,37 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddEnrollRequest : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "EnrollRequest",
columns: table => new
{
IdReq = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Passcode = table.Column<int>(type: "int", nullable: false),
ReqPayload = table.Column<string>(type: "nvarchar(max)", nullable: true),
DtReq = table.Column<DateTime>(type: "datetime2", nullable: false),
DtAppr = table.Column<DateTime>(type: "datetime2", nullable: true),
UserAppr = table.Column<string>(type: "nvarchar(max)", nullable: true),
IdxLic = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EnrollRequest", x => x.IdReq);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "EnrollRequest");
}
}
}
@@ -0,0 +1,639 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20250111112800_AddInstalledRelTrack")]
partial class AddInstalledRelTrack
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Tipo")
.HasColumnType("nvarchar(max)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
{
b.Property<int>("IdReq")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
b.Property<DateTime?>("DtAppr")
.HasColumnType("datetime2");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Passcode")
.HasColumnType("int");
b.Property<string>("ReqPayload")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserAppr")
.HasColumnType("nvarchar(max)");
b.HasKey("IdReq");
b.ToTable("EnrollRequest");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.Property<int>("IdxInstall")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
b.Property<string>("AppKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("CodImp")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<DateTime>("DtCheck")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("MastKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstall");
b.HasIndex("CodApp");
b.ToTable("InstalledReleases");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("RelTags")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddInstalledRelTrack : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "InstalledReleases",
columns: table => new
{
IdxInstall = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CodApp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
MastKey = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CodImp = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
AppKey = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
VersNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
NumImp = table.Column<int>(type: "int", nullable: false),
DtCheck = table.Column<DateTime>(type: "datetime2", nullable: false),
IdxLic = table.Column<int>(type: "int", nullable: false),
IdxSubLic = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_InstalledReleases", x => x.IdxInstall);
table.ForeignKey(
name: "FK_InstalledReleases_Applicativi_CodApp",
column: x => x.CodApp,
principalTable: "Applicativi",
principalColumn: "CodApp");
});
migrationBuilder.CreateIndex(
name: "IX_InstalledReleases_CodApp",
table: "InstalledReleases",
column: "CodApp");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "InstalledReleases");
}
}
}
@@ -0,0 +1,705 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20250115112104_AddInstRelHistTrack")]
partial class AddInstRelHistTrack
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Tipo")
.HasColumnType("nvarchar(max)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
{
b.Property<int>("IdReq")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
b.Property<DateTime?>("DtAppr")
.HasColumnType("datetime2");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Passcode")
.HasColumnType("int");
b.Property<string>("ReqPayload")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserAppr")
.HasColumnType("nvarchar(max)");
b.HasKey("IdReq");
b.ToTable("EnrollRequest");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
{
b.Property<int>("IdxInstRelHist")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstRelHist"), 1L, 1);
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DtRif")
.HasColumnType("datetime2");
b.Property<int>("NumIS0")
.HasColumnType("int");
b.Property<int>("NumIS1")
.HasColumnType("int");
b.Property<int>("NumIS2")
.HasColumnType("int");
b.Property<int>("NumIS3")
.HasColumnType("int");
b.Property<int>("NumIS4")
.HasColumnType("int");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<int>("NumInst")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstRelHist");
b.HasIndex("CodApp");
b.ToTable("InstalledReleasesHistory");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.Property<int>("IdxInstall")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
b.Property<string>("AppKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("CodImp")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<DateTime>("DtCheck")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("MastKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstall");
b.HasIndex("CodApp");
b.HasIndex("IdxLic");
b.ToTable("InstalledReleases");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("RelTags")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,72 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddInstRelHistTrack : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "InstalledReleasesHistory",
columns: table => new
{
IdxInstRelHist = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
DtRif = table.Column<DateTime>(type: "datetime2", nullable: false),
CodApp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
VersNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
NumInst = table.Column<int>(type: "int", nullable: false),
NumImp = table.Column<int>(type: "int", nullable: false),
NumIS4 = table.Column<int>(type: "int", nullable: false),
NumIS3 = table.Column<int>(type: "int", nullable: false),
NumIS2 = table.Column<int>(type: "int", nullable: false),
NumIS1 = table.Column<int>(type: "int", nullable: false),
NumIS0 = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_InstalledReleasesHistory", x => x.IdxInstRelHist);
table.ForeignKey(
name: "FK_InstalledReleasesHistory_Applicativi_CodApp",
column: x => x.CodApp,
principalTable: "Applicativi",
principalColumn: "CodApp");
});
migrationBuilder.CreateIndex(
name: "IX_InstalledReleases_IdxLic",
table: "InstalledReleases",
column: "IdxLic");
migrationBuilder.CreateIndex(
name: "IX_InstalledReleasesHistory_CodApp",
table: "InstalledReleasesHistory",
column: "CodApp");
migrationBuilder.AddForeignKey(
name: "FK_InstalledReleases_Licenze_IdxLic",
table: "InstalledReleases",
column: "IdxLic",
principalTable: "Licenze",
principalColumn: "IdxLic",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_InstalledReleases_Licenze_IdxLic",
table: "InstalledReleases");
migrationBuilder.DropTable(
name: "InstalledReleasesHistory");
migrationBuilder.DropIndex(
name: "IX_InstalledReleases_IdxLic",
table: "InstalledReleases");
}
}
}
@@ -0,0 +1,757 @@
// <auto-generated />
using System;
using LiMan.DB;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
[Migration("20251203155123_AddLogCodImp")]
partial class AddLogCodImp
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.36")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Tipo")
.HasColumnType("nvarchar(max)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
{
b.Property<int>("IdReq")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
b.Property<DateTime?>("DtAppr")
.HasColumnType("datetime2");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Passcode")
.HasColumnType("int");
b.Property<string>("ReqPayload")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserAppr")
.HasColumnType("nvarchar(max)");
b.HasKey("IdReq");
b.ToTable("EnrollRequest");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
b.Property<string>("FullStoragePath")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxTicket")
.HasColumnType("int");
b.Property<string>("OriginalName")
.HasColumnType("nvarchar(max)");
b.Property<string>("StorageName")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxFileAttach");
b.HasIndex("IdxTicket");
b.ToTable("FileAttach");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
{
b.Property<string>("CodInst")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Cliente")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Contatto")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Descrizione")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Email")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.HasKey("CodInst");
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
{
b.Property<int>("IdxInstRelHist")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstRelHist"), 1L, 1);
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DtRif")
.HasColumnType("datetime2");
b.Property<int>("NumIS0")
.HasColumnType("int");
b.Property<int>("NumIS1")
.HasColumnType("int");
b.Property<int>("NumIS2")
.HasColumnType("int");
b.Property<int>("NumIS3")
.HasColumnType("int");
b.Property<int>("NumIS4")
.HasColumnType("int");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<int>("NumInst")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstRelHist");
b.HasIndex("CodApp");
b.ToTable("InstalledReleasesHistory");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.Property<int>("IdxInstall")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
b.Property<string>("AppKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("CodImp")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<DateTime>("DtCheck")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("MastKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstall");
b.HasIndex("CodApp");
b.HasIndex("IdxLic");
b.ToTable("InstalledReleases");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DataEnigma")
.HasColumnType("datetime2");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Enigma")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Locked")
.HasColumnType("bit");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<string>("Payload")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.ToTable("Licenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
{
b.Property<DateTime>("DataRif")
.HasColumnType("datetime2");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(450)");
b.Property<int>("NumCall")
.HasColumnType("int");
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
{
b.Property<int>("IdxLogCodImp")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogCodImp"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodImpNew")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpOld")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.HasKey("IdxLogCodImp");
b.HasIndex("CodApp");
b.HasIndex("IdxLic");
b.ToTable("LogCodImp");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(50)");
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("NumLicenze")
.HasColumnType("int");
b.Property<DateTime>("Scadenza")
.HasColumnType("datetime2");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxLogLic");
b.HasIndex("CodApp");
b.HasIndex("CodInst");
b.HasIndex("IdxLic");
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("RelTags")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.Property<DateTime>("VetoUnlock")
.HasColumnType("datetime2");
b.HasKey("IdxSubLic");
b.HasIndex("IdxLic");
b.ToTable("SubLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ContactPhone")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("ReqBody")
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplAnsw")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplEmail")
.HasColumnType("nvarchar(max)");
b.Property<string>("SupplUserCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TType")
.HasColumnType("int");
b.Property<int>("Tipo")
.HasColumnType("int");
b.HasKey("IdxTicket");
b.HasIndex("IdxLic");
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
.WithMany()
.HasForeignKey("IdxTicket")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
.WithMany()
.HasForeignKey("CodInst");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("InstallazioneNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Attivazioni")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany("Tickets")
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
b.Navigation("Tickets");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddLogCodImp : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "LogCodImp",
columns: table => new
{
IdxLogCodImp = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
IdxLic = table.Column<int>(type: "int", nullable: false),
IdxSubLic = table.Column<int>(type: "int", nullable: false),
CodApp = table.Column<string>(type: "nvarchar(50)", nullable: true),
CodImpOld = table.Column<string>(type: "nvarchar(max)", nullable: true),
CodImpNew = table.Column<string>(type: "nvarchar(max)", nullable: true),
DtMod = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LogCodImp", x => x.IdxLogCodImp);
table.ForeignKey(
name: "FK_LogCodImp_Applicativi_CodApp",
column: x => x.CodApp,
principalTable: "Applicativi",
principalColumn: "CodApp");
table.ForeignKey(
name: "FK_LogCodImp_Licenze_IdxLic",
column: x => x.IdxLic,
principalTable: "Licenze",
principalColumn: "IdxLic",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_LogCodImp_CodApp",
table: "LogCodImp",
column: "CodApp");
migrationBuilder.CreateIndex(
name: "IX_LogCodImp_IdxLic",
table: "LogCodImp",
column: "IdxLic");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "LogCodImp");
}
}
}
+397 -14
View File
@@ -6,6 +6,8 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LiMan.DB.Migrations
{
[DbContext(typeof(LMDbContext))]
@@ -15,10 +17,11 @@ namespace LiMan.DB.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.10")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.36")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
{
@@ -30,17 +33,132 @@ namespace LiMan.DB.Migrations
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("Tipo")
.HasColumnType("nvarchar(max)");
b.Property<string>("TplConnString")
.HasMaxLength(2500)
.HasColumnType("nvarchar(2500)");
b.HasKey("CodApp");
b.ToTable("Applicativi");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.Property<int>("ClaimID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
b.Property<DateTime>("DtIns")
.HasColumnType("datetime2");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("RoleID")
.HasColumnType("int");
b.Property<int>("UserID")
.HasColumnType("int");
b.HasKey("ClaimID");
b.HasIndex("RoleID");
b.HasIndex("UserID");
b.ToTable("AuthClaims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Property<int>("RoleID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
b.Property<string>("Descrizione")
.HasColumnType("nvarchar(max)");
b.Property<string>("Ruolo")
.HasColumnType("nvarchar(max)");
b.HasKey("RoleID");
b.ToTable("AuthRoles");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
b.Property<string>("AD_Domain")
.HasColumnType("nvarchar(max)");
b.Property<string>("AD_User")
.HasColumnType("nvarchar(max)");
b.Property<string>("Cognome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Nome")
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("UserID");
b.ToTable("AuthUsers");
});
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
{
b.Property<int>("IdReq")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
b.Property<DateTime?>("DtAppr")
.HasColumnType("datetime2");
b.Property<DateTime>("DtReq")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("Passcode")
.HasColumnType("int");
b.Property<string>("ReqPayload")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserAppr")
.HasColumnType("nvarchar(max)");
b.HasKey("IdReq");
b.ToTable("EnrollRequest");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.Property<int>("IdxFileAttach")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
b.Property<DateTime>("DtEvent")
.HasColumnType("datetime2");
@@ -91,12 +209,109 @@ namespace LiMan.DB.Migrations
b.ToTable("Installazioni");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
{
b.Property<int>("IdxInstRelHist")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstRelHist"), 1L, 1);
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("DtRif")
.HasColumnType("datetime2");
b.Property<int>("NumIS0")
.HasColumnType("int");
b.Property<int>("NumIS1")
.HasColumnType("int");
b.Property<int>("NumIS2")
.HasColumnType("int");
b.Property<int>("NumIS3")
.HasColumnType("int");
b.Property<int>("NumIS4")
.HasColumnType("int");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<int>("NumInst")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstRelHist");
b.HasIndex("CodApp");
b.ToTable("InstalledReleasesHistory");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.Property<int>("IdxInstall")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
b.Property<string>("AppKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("CodApp")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("CodImp")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<DateTime>("DtCheck")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.Property<string>("MastKey")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("NumImp")
.HasColumnType("int");
b.Property<string>("VersNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("IdxInstall");
b.HasIndex("CodApp");
b.HasIndex("IdxLic");
b.ToTable("InstalledReleases");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Property<int>("IdxLic")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
@@ -162,12 +377,48 @@ namespace LiMan.DB.Migrations
b.ToTable("LogCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
{
b.Property<int>("IdxLogCodImp")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogCodImp"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("CodImpNew")
.HasColumnType("nvarchar(max)");
b.Property<string>("CodImpOld")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<int>("IdxLic")
.HasColumnType("int");
b.Property<int>("IdxSubLic")
.HasColumnType("int");
b.HasKey("IdxLogCodImp");
b.HasIndex("CodApp");
b.HasIndex("IdxLic");
b.ToTable("LogCodImp");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.Property<int>("IdxLogLic")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
@@ -204,12 +455,62 @@ namespace LiMan.DB.Migrations
b.ToTable("LogLicenze");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.Property<int>("IdxRel")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
b.Property<string>("CodApp")
.HasColumnType("nvarchar(50)");
b.Property<string>("RelTags")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("VersNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("VersText")
.HasColumnType("nvarchar(max)");
b.HasKey("IdxRel");
b.HasIndex("CodApp");
b.ToTable("Releases");
});
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
{
b.Property<int>("YearRef")
.HasColumnType("int");
b.Property<string>("CodInst")
.HasColumnType("nvarchar(450)");
b.Property<string>("CodApp")
.HasColumnType("nvarchar(450)");
b.Property<int>("TotCall")
.HasColumnType("int");
b.HasKey("YearRef", "CodInst", "CodApp");
b.ToView("v_StatsCall");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.Property<int>("IdxSubLic")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
b.Property<string>("Chiave")
.HasColumnType("nvarchar(max)");
@@ -237,8 +538,9 @@ namespace LiMan.DB.Migrations
{
b.Property<int>("IdxTicket")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
b.Property<string>("CodImpiego")
.HasColumnType("nvarchar(max)");
@@ -289,6 +591,25 @@ namespace LiMan.DB.Migrations
b.ToTable("TicketLog");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
{
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
.WithMany("Claims")
.HasForeignKey("RoleID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
.WithMany("Claims")
.HasForeignKey("UserID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RoleNav");
b.Navigation("UserNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
{
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
@@ -300,6 +621,32 @@ namespace LiMan.DB.Migrations
b.Navigation("TicketNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
@@ -315,6 +662,23 @@ namespace LiMan.DB.Migrations
b.Navigation("InstallazioneNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
.WithMany()
.HasForeignKey("IdxLic")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicativoNav");
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
@@ -338,6 +702,15 @@ namespace LiMan.DB.Migrations
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
{
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
.WithMany()
.HasForeignKey("CodApp");
b.Navigation("ApplicativoNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
{
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
@@ -360,6 +733,16 @@ namespace LiMan.DB.Migrations
b.Navigation("LicenzaNav");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
{
b.Navigation("Attivazioni");
@@ -1,9 +1,11 @@
using System;
using Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiMan.UI.Data
namespace LiMan.DB
{
public class SelectNext : SelectData
{
@@ -52,4 +54,4 @@ namespace LiMan.UI.Data
#endregion Public Methods
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,47 @@
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
DROP PROCEDURE IF EXISTS dbo.stp_StatsCall_filt;
GO
/*-- =============================================
-- Author: S.E.L.
-- Description: Estrazione dati statistiche call filtrati
EXEC dbo.stp_StatsCall_filt '2024-01-01', GETDATE(), ''
-- Mod. date: 2024.05.31
-- =============================================*/
CREATE PROCEDURE [dbo].[stp_StatsCall_filt]
(
@DtFrom DATETIME
,@DtTo DATETIME
,@SearchVal NVARCHAR(250)
)
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
WITH cteDati AS
(
SELECT YEAR(DataRif) AS YearRef, CodInst, CodApp, SUM(NumCall) AS TotCall
FROM LogCall
WHERE DataRif BETWEEN @DtFrom and @DtTo
AND (@SearchVal = '' OR TargetUrl LIKE '%'+@SearchVal+'%')
GROUP BY YEAR(DataRif), CodInst, CodApp
)
SELECT *
FROM cteDati
ORDER BY YearRef DESC, TotCall DESC
END
GO

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