From d764cf8fba3fd38fcb3209aea81a178a1b3e8242 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 10:13:56 +0100 Subject: [PATCH 01/15] test yaml modificato --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0905e64..b8b5d6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,6 +193,8 @@ Transfer:deploy: stage: deploy tags: - win + variables: + APP_NAME: LiMan.Transfer needs: ["Transfer:build"] script: - dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Transfer/LiMan.Transfer.csproj From 21b862a0cb62db8f363a05dfbc9ac9585434f6a0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 11:17:35 +0100 Subject: [PATCH 02/15] correzione yaml --- .gitlab-ci.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8b5d6b..b00ae32 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ variables: NEXUS_PATH: 'LiMan' APP_NAME: 'LiMan.UI' + ZIP_PATH: 'bin\publish' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix @@ -21,29 +22,30 @@ variables: throw "7 zip file '$7zipPath' not found" } Set-Alias 7zip $7zipPath - $Target = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" - cd "$env:APP_NAME\bin\publish\net6.0" - $Source = "*" + $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" + $Source = "$env:APP_NAME\$env:ZIP_PATH\net6.0\*" 7zip a -tzip $Target $Source -xr!DATA echo "called ZIP $Source --> $Target" -# helper creazione hash files x EXE -.hashBuildExe: &hashBuildExe - - | - $Target = "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" +#cd "$env:APP_NAME\bin\publish\net6.0" - echo "Created HASH files for $Target" +# # 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 - | - $Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip" + $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" @@ -70,7 +72,7 @@ variables: { $version = "unstable" } - $File2Send = Get-ChildItem($env:APP_NAME + "\bin\publish\*") + $File2Send = Get-ChildItem("$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\*") ForEach ($File in $File2Send) { $FileName = Split-Path $File -leaf mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName @@ -197,7 +199,7 @@ Transfer:deploy: APP_NAME: LiMan.Transfer needs: ["Transfer:build"] script: - - dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Transfer/LiMan.Transfer.csproj + - dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Transfer/LiMan.Transfer.csproj - *zipper - *hashBuildExe - *nexusUpload From 105650bf81da8f8271cf3558ca41b12423c36229 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 11:34:17 +0100 Subject: [PATCH 03/15] update yaml --- .gitlab-ci.yml | 5 ++--- LiMan.UI/LiMan.UI.csproj | 2 +- LiMan.UI/Resources/ChangeLog.html | 2 +- LiMan.UI/Resources/VersNum.txt | 2 +- LiMan.UI/Resources/manifest.xml | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b00ae32..81bd1d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ variables: NEXUS_PATH: 'LiMan' APP_NAME: 'LiMan.UI' - ZIP_PATH: 'bin\publish' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix @@ -23,7 +22,7 @@ variables: } Set-Alias 7zip $7zipPath $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" - $Source = "$env:APP_NAME\$env:ZIP_PATH\net6.0\*" + $Source = "$env:APP_NAME\bin\publish\net6.0\*" 7zip a -tzip $Target $Source -xr!DATA echo "called ZIP $Source --> $Target" @@ -201,7 +200,7 @@ Transfer:deploy: script: - dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Transfer/LiMan.Transfer.csproj - *zipper - - *hashBuildExe + - *hashBuild - *nexusUpload diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index cdeca2b..d07bbc5 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.1.2202.0709 + 1.1.2202.0711 LiMan.UI LiMan.UI diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index 16bed4a..891b910 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

Versione: 1.1.2202.0709

+

Versione: 1.1.2202.0711


Note di rilascio:
    diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index 8c83aa2..14c5c83 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0709 +1.1.2202.0711 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index 601d909..4bb03e4 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0709 + 1.1.2202.0711 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false From 3a538fb16289bfbf2e86dbd5fd882d92d5f69aca Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:10:55 +0100 Subject: [PATCH 04/15] Aggiunta folder risorse x transfer --- .../Resources/ChangeLog-original.html | 27 ++++++++++++++++++ LiMan.Transfer/Resources/ChangeLog.html | 27 ++++++++++++++++++ LiMan.Transfer/Resources/VersNum.txt | 1 + LiMan.Transfer/Resources/logoSteamware.png | Bin 0 -> 3402 bytes .../Resources/manifest-original.xml | 7 +++++ LiMan.Transfer/Resources/manifest.xml | 7 +++++ 6 files changed, 69 insertions(+) create mode 100644 LiMan.Transfer/Resources/ChangeLog-original.html create mode 100644 LiMan.Transfer/Resources/ChangeLog.html create mode 100644 LiMan.Transfer/Resources/VersNum.txt create mode 100644 LiMan.Transfer/Resources/logoSteamware.png create mode 100644 LiMan.Transfer/Resources/manifest-original.xml create mode 100644 LiMan.Transfer/Resources/manifest.xml diff --git a/LiMan.Transfer/Resources/ChangeLog-original.html b/LiMan.Transfer/Resources/ChangeLog-original.html new file mode 100644 index 0000000..0a14842 --- /dev/null +++ b/LiMan.Transfer/Resources/ChangeLog-original.html @@ -0,0 +1,27 @@ + + License Manager +

    Versione: {{CURRENT-REL}}

    +
    + Note di rilascio: +
      +
    • + Ultime modifiche: +
        {{LAST-CHANGES}}
      +
    • +
    • + v.1.* → +
        +
      • Prima release dotnet5
      • +
      • Integrazione EFCore
      • +
      +
    • +
    +
    +
    + +
    + +
    + \ No newline at end of file diff --git a/LiMan.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html new file mode 100644 index 0000000..55b7115 --- /dev/null +++ b/LiMan.Transfer/Resources/ChangeLog.html @@ -0,0 +1,27 @@ + + License Manager +

    Versione: 1.1.2202.0712

    +
    + Note di rilascio: +
      +
    • + Ultime modifiche: +
        {{LAST-CHANGES}}
      +
    • +
    • + v.1.* → +
        +
      • Prima release dotnet5
      • +
      • Integrazione EFCore
      • +
      +
    • +
    +
    +
    + +
    + +
    + diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt new file mode 100644 index 0000000..a5b89ea --- /dev/null +++ b/LiMan.Transfer/Resources/VersNum.txt @@ -0,0 +1 @@ +1.1.2202.0712 diff --git a/LiMan.Transfer/Resources/logoSteamware.png b/LiMan.Transfer/Resources/logoSteamware.png new file mode 100644 index 0000000000000000000000000000000000000000..0958b50a1ee7f6a934e26cf55e2335d4cea6aa82 GIT binary patch literal 3402 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 literal 0 HcmV?d00001 diff --git a/LiMan.Transfer/Resources/manifest-original.xml b/LiMan.Transfer/Resources/manifest-original.xml new file mode 100644 index 0000000..f95e076 --- /dev/null +++ b/LiMan.Transfer/Resources/manifest-original.xml @@ -0,0 +1,7 @@ + + + 1.0.0.0 + https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip + https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html + false + diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml new file mode 100644 index 0000000..d84e378 --- /dev/null +++ b/LiMan.Transfer/Resources/manifest.xml @@ -0,0 +1,7 @@ + + + 1.1.2202.0712 + https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip + https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html + false + From bba1c2f62007e95c99b2b7cafb8a7b340962c769 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:11:11 +0100 Subject: [PATCH 05/15] Update post-build x versione Transfer --- Core/Core.csproj | 4 +++ Core/SupportRequest.cs | 52 +++++++++++++++++++++++++++- LiMan.Transfer/LiMan.Transfer.csproj | 4 ++- LiMan.Transfer/post-build.ps1 | 32 +++++++++++++++++ LiMan.UI/LiMan.UI.csproj | 2 +- LiMan.UI/Resources/ChangeLog.html | 2 +- LiMan.UI/Resources/VersNum.txt | 2 +- LiMan.UI/Resources/manifest.xml | 2 +- 8 files changed, 94 insertions(+), 6 deletions(-) create mode 100644 LiMan.Transfer/post-build.ps1 diff --git a/Core/Core.csproj b/Core/Core.csproj index f208d30..47c5a70 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -4,4 +4,8 @@ net5.0 + + + + diff --git a/Core/SupportRequest.cs b/Core/SupportRequest.cs index 5cdf111..1f622d1 100644 --- a/Core/SupportRequest.cs +++ b/Core/SupportRequest.cs @@ -1,5 +1,7 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -28,6 +30,54 @@ namespace Core public string MasterKey { get; set; } = ""; public string ReqBody { get; set; } = ""; + /// + /// Istanzia un nuovo ogetto richeista supporto + /// + /// Codice Applicazione (es EBW-UP) + /// Codice Impegno (es codice chiave HW) + /// Codice Cliente/Installazione + /// Email x contatto + /// Nome del richiedente/clietne + /// Tel richeidente/cliente + /// Chiave master di comunicazione da LiMan + /// Testo delal richiesta + /// Idx univoco di sublic (es x gestione utenti) + /// tipo ticket da gestire (default fileUpload) + public SupportRequest(string codApp, string codImp, string codInst, string contactEmail, string contactName, string contactPhone, string masterKey, string ReqBody, int idxSubLic = 0, TipologiaTicket tipo = TipologiaTicket.FileUpload) + { + this.CodApp = CodApp; + this.CodImp = CodImp; + this.CodInst = CodInst; + this.ContactEmail = contactEmail; + this.ContactName = contactName; + this.ContactPhone = contactPhone; + this.MasterKey = masterKey; + this.ReqBody = ReqBody; + this.idxSubLic = idxSubLic; + this.Tipo = tipo; + } + + /// + /// Effettua salvataggio su file di un oggetto richiesta file upload + /// + /// Oggetto richiesta (già istanziato) + /// Path dove salvare il file + public static bool SaveRequest(SupportRequest currReq, string filePath) + { + bool fatto = false; + try + { + string rawData = JsonConvert.SerializeObject(currReq, Formatting.Indented); + File.WriteAllText(filePath, rawData); + fatto = true; + } + catch (Exception ex) + { + Console.Write(ex.ToString()); + } + return fatto; + } + #endregion Public Properties } } \ No newline at end of file diff --git a/LiMan.Transfer/LiMan.Transfer.csproj b/LiMan.Transfer/LiMan.Transfer.csproj index ed4b282..669fdf7 100644 --- a/LiMan.Transfer/LiMan.Transfer.csproj +++ b/LiMan.Transfer/LiMan.Transfer.csproj @@ -26,5 +26,7 @@ Always - + + + diff --git a/LiMan.Transfer/post-build.ps1 b/LiMan.Transfer/post-build.ps1 new file mode 100644 index 0000000..b510ccd --- /dev/null +++ b/LiMan.Transfer/post-build.ps1 @@ -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 = "(.|\n)*?"; +$currRelNum = $MajMin + $currentDate +"." + $currentTime +$replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; +$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.Transfer" +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 diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index d07bbc5..74bfa4b 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.1.2202.0711 + 1.1.2202.0712 LiMan.UI LiMan.UI diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index 891b910..55b7115 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

    Versione: 1.1.2202.0711

    +

    Versione: 1.1.2202.0712


    Note di rilascio:
      diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index 14c5c83..a5b89ea 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0711 +1.1.2202.0712 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index 4bb03e4..d84e378 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0711 + 1.1.2202.0712 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false From 403598b5aa69143d70edde082174e9e3e0322f57 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:12:45 +0100 Subject: [PATCH 06/15] echo chiamata curl x nexus --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81bd1d6..4f0522a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,6 +76,7 @@ variables: $FileName = Split-Path $File -leaf mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName + 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 From 2faada138c44f9051213693e1c15a8b10791b396 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:14:12 +0100 Subject: [PATCH 07/15] Fix init richiesta supporto --- Core/SupportRequest.cs | 6 ++++++ LiMan.Transfer/Resources/manifest.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/SupportRequest.cs b/Core/SupportRequest.cs index 1f622d1..4a4391b 100644 --- a/Core/SupportRequest.cs +++ b/Core/SupportRequest.cs @@ -30,6 +30,12 @@ namespace Core public string MasterKey { get; set; } = ""; public string ReqBody { get; set; } = ""; + /// + /// Init classe in modalità "empty" + /// + public SupportRequest() + { } + /// /// Istanzia un nuovo ogetto richeista supporto /// diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml index d84e378..7464a26 100644 --- a/LiMan.Transfer/Resources/manifest.xml +++ b/LiMan.Transfer/Resources/manifest.xml @@ -1,7 +1,7 @@ 1.1.2202.0712 - https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip + https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false From 87974a8ccab8ceff7f40001291157e66d8048fde Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:23:20 +0100 Subject: [PATCH 08/15] Fix yaml e conf gitlab --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f0522a..fd307b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -197,7 +197,7 @@ Transfer:deploy: - win variables: APP_NAME: LiMan.Transfer - needs: ["Transfer:build"] + needs: ["Transfer:test"] script: - dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Transfer/LiMan.Transfer.csproj - *zipper From 502b0c9e3b07727ce55559255a742a64b077d864 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:29:12 +0100 Subject: [PATCH 09/15] Typo --- Core/SupportRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/SupportRequest.cs b/Core/SupportRequest.cs index 4a4391b..3c2ca63 100644 --- a/Core/SupportRequest.cs +++ b/Core/SupportRequest.cs @@ -48,7 +48,7 @@ namespace Core /// Chiave master di comunicazione da LiMan /// Testo delal richiesta /// Idx univoco di sublic (es x gestione utenti) - /// tipo ticket da gestire (default fileUpload) + /// Tipo ticket da gestire (default fileUpload) public SupportRequest(string codApp, string codImp, string codInst, string contactEmail, string contactName, string contactPhone, string masterKey, string ReqBody, int idxSubLic = 0, TipologiaTicket tipo = TipologiaTicket.FileUpload) { this.CodApp = CodApp; From f87b7de844f4760dd53aa7bc91a190a419eecaf8 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:29:34 +0100 Subject: [PATCH 10/15] altro typo --- Core/SupportRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/SupportRequest.cs b/Core/SupportRequest.cs index 3c2ca63..746fc57 100644 --- a/Core/SupportRequest.cs +++ b/Core/SupportRequest.cs @@ -44,7 +44,7 @@ namespace Core /// Codice Cliente/Installazione /// Email x contatto /// Nome del richiedente/clietne - /// Tel richeidente/cliente + /// Tel richiedente/cliente /// Chiave master di comunicazione da LiMan /// Testo delal richiesta /// Idx univoco di sublic (es x gestione utenti) From abfdf59ba078af5a223e4249ca47cc01a2152476 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 7 Feb 2022 12:31:34 +0100 Subject: [PATCH 11/15] fix yaml --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd307b2..5872520 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -143,8 +143,6 @@ Transfer:test: stage: test tags: - win - only: - - develop needs: ["Transfer:build"] script: - dotnet test LiMan.Transfer/LiMan.Transfer.csproj From f373c26dc4edf27d721cab0048b1393fb011b1e9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 8 Feb 2022 18:41:33 +0100 Subject: [PATCH 12/15] Update x cancellazione LIC : DELETE --> POST --- LiMan.Api/Controllers/AttivazioniController.cs | 6 +++--- LiMan.Transfer/Resources/ChangeLog.html | 2 +- LiMan.Transfer/Resources/VersNum.txt | 2 +- LiMan.Transfer/Resources/manifest.xml | 2 +- LiMan.UI/LiMan.UI.csproj | 2 +- LiMan.UI/Resources/ChangeLog.html | 2 +- LiMan.UI/Resources/VersNum.txt | 2 +- LiMan.UI/Resources/manifest.xml | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/LiMan.Api/Controllers/AttivazioniController.cs b/LiMan.Api/Controllers/AttivazioniController.cs index a349357..8793d60 100644 --- a/LiMan.Api/Controllers/AttivazioniController.cs +++ b/LiMan.Api/Controllers/AttivazioniController.cs @@ -54,8 +54,8 @@ namespace LiMan.APi.Controllers /// /// Eliminazione di un set di attivazioni (SE SCADUTE) /// - // DELETE api/attivazioni - [HttpDelete()] + // POST api/attivazioni/removeKey + [HttpPost("removeKey")] public async Task Delete([FromBody] UserLicenseRequest CurrRequest) { bool done = await dataService.AttivazioniDelete(CurrRequest.MasterKey, CurrRequest.ParamDict); @@ -63,7 +63,7 @@ namespace LiMan.APi.Controllers foreach (var item in CurrRequest.ParamDict) { // registro 1 riga x ogni record... - await dataService.recordCall(CurrRequest.MasterKey, $"DELETE:api/attivazioni:{item.Key}|{item.Value}"); + await dataService.recordCall(CurrRequest.MasterKey, $"POST:api/attivazioni/removeKey:{item.Key}|{item.Value}"); } return done; } diff --git a/LiMan.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html index 55b7115..b0dfe84 100644 --- a/LiMan.Transfer/Resources/ChangeLog.html +++ b/LiMan.Transfer/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

      Versione: 1.1.2202.0712

      +

      Versione: 1.1.2202.0818


      Note di rilascio:
        diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt index a5b89ea..bb28cfa 100644 --- a/LiMan.Transfer/Resources/VersNum.txt +++ b/LiMan.Transfer/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0712 +1.1.2202.0818 diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml index 7464a26..ccd5681 100644 --- a/LiMan.Transfer/Resources/manifest.xml +++ b/LiMan.Transfer/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0712 + 1.1.2202.0818 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index 74bfa4b..4aef333 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.1.2202.0712 + 1.1.2202.0818 LiMan.UI LiMan.UI diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index 55b7115..b0dfe84 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

        Versione: 1.1.2202.0712

        +

        Versione: 1.1.2202.0818


        Note di rilascio:
          diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index a5b89ea..bb28cfa 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0712 +1.1.2202.0818 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index d84e378..8adc882 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0712 + 1.1.2202.0818 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false From 34297c3a133b338702d27ea43e83a90469a3ed8b Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Feb 2022 07:52:09 +0100 Subject: [PATCH 13/15] Aggiunto test call x insomnia --- InsomniaRest/TestCall.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 InsomniaRest/TestCall.json diff --git a/InsomniaRest/TestCall.json b/InsomniaRest/TestCall.json new file mode 100644 index 0000000..01e27d2 --- /dev/null +++ b/InsomniaRest/TestCall.json @@ -0,0 +1 @@ +{"_type":"export","__export_format":4,"__export_date":"2022-02-09T06:46:02.973Z","__export_source":"insomnia.desktop.app:v2021.7.2","resources":[{"_id":"req_94c94c42242a4b86bb683ddb6e725c1b","parentId":"fld_c1433425ebce4a75b3ba11ed9f08f8b7","modified":1636368193729,"created":1634829469020,"url":"{{ _.BASE_URL }}/api/installazioni/steamware","name":"Installazioni SteamWare","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1627351578955,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_c1433425ebce4a75b3ba11ed9f08f8b7","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1636368188402,"created":1636368176337,"name":"Installazioni","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1636368176337,"_type":"request_group"},{"_id":"wrk_3a09551ac721482a8d6d6c3f49779247","parentId":null,"modified":1634829468996,"created":1634829468996,"name":"LicMan.Api","description":"","scope":"collection","_type":"workspace"},{"_id":"req_2899c4fabc9f48c6a30bce59954c3cfa","parentId":"fld_c1433425ebce4a75b3ba11ed9f08f8b7","modified":1636368196015,"created":1634829560846,"url":"{{ _.BASE_URL }}/api/installazioni/ets","name":"Installazioni ETS","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1627351578905,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b14c304cb28c4e5f9f007cb25a622ae1","parentId":"fld_482ee06fd04a455f9bdfd63e6d42beae","modified":1636368237149,"created":1634829469026,"url":"{{ _.BASE_URL }}/api/applicazione/steamware?CodApp=GPW","name":"Applicazione SteamWare/GPW","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1626751501333,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_482ee06fd04a455f9bdfd63e6d42beae","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1636368234020,"created":1636368225320,"name":"Applicazioni","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1636368171824.5,"_type":"request_group"},{"_id":"req_4d5c0d20ba14481786b8371405435e21","parentId":"fld_482ee06fd04a455f9bdfd63e6d42beae","modified":1636368246723,"created":1634829655164,"url":"{{ _.BASE_URL }}/api/applicazione/steamware?CodApp=MAPO","name":"Applicazione SteamWare/MAPO","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1626751501283,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_c9a692486b514617aaf8d2c1f892be6f","parentId":"fld_3d57099a4b81439b8c5e92b150bfa539","modified":1643896207335,"created":1634829684473,"url":"{{ _.BASE_URL }}/api/licenza/steamware?CodApp=GPW&Chiave=wAjUzZ4ZS10tEWul58J9lbPLhgdmC1W8BCru3vFJrcOoIFDQKh7aKpLs/Cuo1MaZ","name":"Licenza SteamWare/GPW","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1626301443116.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_3d57099a4b81439b8c5e92b150bfa539","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1636368167312,"created":1636368167312,"name":"Licenze","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1636368167312,"_type":"request_group"},{"_id":"req_17c90dc4dbce45638ba74ac8c3e49403","parentId":"fld_f402c65d1a884ee9bcc50d26f72634f3","modified":1640104623780,"created":1636371347886,"url":"{{ _.BASE_URL }}/api/attivazioni","name":"TryAdd","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"masterKey\": \"wAjUzZ4ZS10tEWul58J9lbPLhgdmC1W8BCru3vFJrcMGFsaExT+LBZLs/Cuo1MaZ\",\n \"paramDict\": {\n \"67cd028c209e240708c91b633db592b9\": \"9Y7rfqRTKB4xVVxk\",\n \"50458f523270eb9d2979cf3e3057abe2\": \"Et7kL0ed8WY=\",\n \"53ef5b634acf2de971572a90f2e351e9\": \"AZf4YaYHYZDcuUsh\"\n }\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_ed76bfea595e4917be2ce6797185529e"}],"authentication":{},"metaSortKey":-1636368676549,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_f402c65d1a884ee9bcc50d26f72634f3","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1636368159634,"created":1636368159634,"name":"Attivazioni","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1636368159634,"_type":"request_group"},{"_id":"req_7d066009687247ef89f198fafcf30cb5","parentId":"fld_f402c65d1a884ee9bcc50d26f72634f3","modified":1636371488666,"created":1636368676499,"url":"{{ _.BASE_URL }}/api/attivazioni","name":"Delete SubLic","description":"","method":"DELETE","body":{"mimeType":"application/json","text":"{\n \"masterKey\": \"wAjUzZ4ZS10tEWul58J9lbPLhgdmC1W8BCru3vFJrcMGFsaExT+LBZLs/Cuo1MaZ\",\n \"paramDict\": {\n \"67cd028c209e240708c91b633db592b9\": \"9Y7rfqRTKB4xVVxk\",\n \"50458f523270eb9d2979cf3e3057abe2\": \"Et7kL0ed8WY=\",\n \"53ef5b634acf2de971572a90f2e351e9\": \"AZf4YaYHYZDcuUsh\"\n }\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_af7596fa3a174c6f9e4fec738fa7fb07"}],"authentication":{},"metaSortKey":-1636368676499,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bc76628fb2214b0f87ac41f876c0b7ae","parentId":"fld_23d6ab2fed7c4c4e9845ac5a04dbf811","modified":1644388903321,"created":1643962591421,"url":"{{ _.BASE_URL }}/api/filesave/list/12","name":"list","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"codApp\": \"MAPO-IOB-WIN-NEXT\",\n \"codImp\": \"\",\n \"codInst\": \"SteamWare\",\n \"contactEmail\": \"samuele@steamware.net\",\n \"contactName\": \"Samuele\",\n \"contactPhone\": \"035-460560\",\n \"idxSubLic\": 0,\n \"masterKey\": \"a3BRQz/1B34uvvcDoE/D38ssH/c/KSsjpn39wZsxOVsck9rGnBkF3xfUnj3edYIl\",\n \"reqBody\": \"Insomnia (file upload)\",\n\t\"tipo\": 2\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_ed76bfea595e4917be2ce6797185529e"},{"id":"pair_1725d037122840abb3c3fccbafbc4275","name":"","value":"","description":""}],"authentication":{},"metaSortKey":-1636368676561.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_23d6ab2fed7c4c4e9845ac5a04dbf811","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1643962542199,"created":1640021680129,"name":"Files","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1626151423686,"_type":"request_group"},{"_id":"req_681a6a5336664d6e9120026f50667183","parentId":"fld_23d6ab2fed7c4c4e9845ac5a04dbf811","modified":1644388785640,"created":1644388125523,"url":"{{ _.BASE_URL }}/api/filesave/T000000012/4lohp04u.b4i/LogFiles.zip","name":"download","description":"","method":"GET","body":{},"parameters":[],"headers":[{"id":"pair_1725d037122840abb3c3fccbafbc4275","name":"","value":"","description":""}],"authentication":{},"metaSortKey":-1636368676555.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_0d09cffd954d47f385279e990386b0d8","parentId":"fld_23d6ab2fed7c4c4e9845ac5a04dbf811","modified":1643986763390,"created":1640168946681,"url":"{{ _.BASE_URL }}/api/filesave/single","name":"FileSaveSingle","description":"","method":"POST","body":{"mimeType":"multipart/form-data","params":[{"id":"pair_eb8cb2a89c3a4a90af9ec163cc00b654","name":"TicketId","value":"10","description":"","type":"text","multiline":false},{"id":"pair_ee247b7b1abe4a2eb835a43a8fbd871a","name":"file","value":"","description":"","type":"file","fileName":"C:\\Users\\samuele.steamw\\Downloads\\SCAMBIO DATI MES _ v2021.pdf"}]},"parameters":[],"headers":[{"name":"Content-Type","value":"multipart/form-data","id":"pair_ed76bfea595e4917be2ce6797185529e"},{"id":"pair_1725d037122840abb3c3fccbafbc4275","name":"","value":"","description":""}],"authentication":{},"metaSortKey":-1636368676511.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2ab30a505449413a9b412d25fea43c32","parentId":"fld_23d6ab2fed7c4c4e9845ac5a04dbf811","modified":1643986766826,"created":1640021703467,"url":"{{ _.BASE_URL }}/api/filesave","name":"FileSaveMulti","description":"","method":"POST","body":{"mimeType":"multipart/form-data","params":[{"id":"pair_eb8cb2a89c3a4a90af9ec163cc00b654","name":"TicketId","value":"11","description":"","type":"text","multiline":false},{"id":"pair_ee247b7b1abe4a2eb835a43a8fbd871a","name":"files","value":"","description":"","type":"file","fileName":"C:\\Users\\samuele.steamw\\Downloads\\SCAMBIO DATI MES _ v2021.pdf"},{"id":"pair_bac89d30d9a448c18713efbc243697e8","name":"files","value":"","description":"","type":"file","fileName":"C:\\Users\\samuele.steamw\\Downloads\\Ewon_teleservice_T2MFree+_PRO_IT.pdf"}]},"parameters":[],"headers":[{"name":"Content-Type","value":"multipart/form-data","id":"pair_ed76bfea595e4917be2ce6797185529e"},{"id":"pair_1725d037122840abb3c3fccbafbc4275","name":"","value":"","description":""}],"authentication":{},"metaSortKey":-1636368676461.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_5c84e0cacc794daf8ee86af985a40f83","parentId":"fld_c43de7cc200f4af7821a220d46323898","modified":1643962587103,"created":1640082304061,"url":"{{ _.BASE_URL }}/api/ticket/sendReq","name":"sendReq","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"codApp\": \"MAPO-IOB-WIN-NEXT\",\n \"codImp\": \"\",\n \"codInst\": \"SteamWare\",\n \"contactEmail\": \"samuele@steamware.net\",\n \"contactName\": \"Samuele\",\n \"contactPhone\": \"035-460560\",\n \"idxSubLic\": 0,\n \"masterKey\": \"a3BRQz/1B34uvvcDoE/D38ssH/c/KSsjpn39wZsxOVsck9rGnBkF3xfUnj3edYIl\",\n \"reqBody\": \"Insomnia (file upload)\",\n\t\"tipo\": 2\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_ed76bfea595e4917be2ce6797185529e"},{"id":"pair_1725d037122840abb3c3fccbafbc4275","name":"","value":"","description":""}],"authentication":{},"metaSortKey":-1626151423736,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_c43de7cc200f4af7821a220d46323898","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1637220072429,"created":1637220066948,"name":"Ticket","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1626151423661,"_type":"request_group"},{"_id":"req_b0f61658a8f14ab7bd24c21d9c2e0f8f","parentId":"fld_c43de7cc200f4af7821a220d46323898","modified":1637220362640,"created":1637220082741,"url":"{{ _.BASE_URL }}/api/ticket/SteamWare?CodApp=GPW&Chiave=wAjUzZ4ZS10tEWul58J9lbPLhgdmC1W8BCru3vFJrcMGFsaExT%2BLBZLs%2FCuo1MaZ","name":"Ticket SteamWare/GPW","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1626151423686,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e8868f080ba1430eb8d4cf9541ab89c1","parentId":"fld_c43de7cc200f4af7821a220d46323898","modified":1643899705502,"created":1643899685335,"url":"{{ _.BASE_URL }}/api/ticket/SteamWare?CodApp=MAPO-IOB-WIN-NEXT&Chiave=a3BRQz/1B34uvvcDoE/D38ssH/c/KSsjpn39wZsxOVsck9rGnBkF3xfUnj3edYIl","name":"Ticket SteamWare/MAPO-IOB-WIN","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1625551346076.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_2657f17ecf8c4490a11d21e7f4f1a77a","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1643986739871,"created":1634829468999,"name":"Base Environment","data":{},"dataPropertyOrder":{},"color":null,"isPrivate":false,"metaSortKey":1634552379782,"_type":"environment"},{"_id":"jar_f8077d7b5f8342d597a63cc01ce049e1","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1634829469014,"created":1634829469014,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"spc_263d564c1fcd4e1f9e48fee3edc41fbb","parentId":"wrk_3a09551ac721482a8d6d6c3f49779247","modified":1634829469048,"created":1634829469017,"fileName":"LicMan.Api","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_8eaa28856e844ec8939391448724bccb","parentId":"env_2657f17ecf8c4490a11d21e7f4f1a77a","modified":1643977488194,"created":1634829469002,"name":"DEV","data":{"BASE_URL":"https://localhost:44351"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552420009,"_type":"environment"},{"_id":"env_75f794443c404d1abbf9193e3a9b46b9","parentId":"env_2657f17ecf8c4490a11d21e7f4f1a77a","modified":1637220300521,"created":1634829469007,"name":"IIS01","data":{"BASE_URL":"https://iis01.egalware.com/ELM.API"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552444561,"_type":"environment"},{"_id":"env_081ef8a80a154c6e81a160dc9df50590","parentId":"env_2657f17ecf8c4490a11d21e7f4f1a77a","modified":1643965878926,"created":1634829469009,"name":"IIS02","data":{"BASE_URL":"https://iis02.egalware.com/ELM.API"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552456998,"_type":"environment"},{"_id":"env_bd838edc3ce34c71a60425bd8312db37","parentId":"env_2657f17ecf8c4490a11d21e7f4f1a77a","modified":1643986741311,"created":1643965894623,"name":"liman.egalware.com","data":{"BASE_URL":"https://liman.egalware.com/ELM.API"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1641093809517.25,"_type":"environment"}]} \ No newline at end of file From efe2bb635e7eb4d901decba7ab99b537f8ab18c7 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Feb 2022 07:52:20 +0100 Subject: [PATCH 14/15] Aggiunto metodo controller GET x file download --- LiMan.Api/Controllers/FilesaveController.cs | 55 +++++++++++++++++++-- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/LiMan.Api/Controllers/FilesaveController.cs b/LiMan.Api/Controllers/FilesaveController.cs index bcc0a32..a086c96 100644 --- a/LiMan.Api/Controllers/FilesaveController.cs +++ b/LiMan.Api/Controllers/FilesaveController.cs @@ -4,8 +4,8 @@ using LiMan.DB.DBModels; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.StaticFiles; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; using NLog; using System; using System.Collections.Generic; @@ -43,7 +43,6 @@ namespace LiMan.APi.Controllers /// /// /// - /// public FilesaveController(IConfiguration configuration, ApiDataService DataService, IWebHostEnvironment env) { dataService = DataService; @@ -63,15 +62,61 @@ namespace LiMan.APi.Controllers #endregion Protected Properties - #region Public Methods + #region Protected Methods /// - /// Richiesta di registrazione ticket supporto + /// Calcolo correetto mimetype da nome file + /// + /// + /// + 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 + /// + /// Recupera un singolo file dato ticket code + nome file (safe) + /// + /// Ticket code formato T00000000 + /// Nome file (safe) + /// Nome file da scaricare + /// + [HttpGet("{id}/{secureName}/{fileName}")] + public async Task DownloadFile(string id, string secureName, string fileName) + { + string relDir = _configuration["FileShare"]; + string ticketDir = Path.Combine(relDir, id); + var filePath = Path.Combine(ticketDir, secureName); + // verifico esistenza.. + if (System.IO.File.Exists(filePath)) + { + var bytes = await System.IO.File.ReadAllBytesAsync(filePath); + return File(bytes, GetMimeType(fileName), fileName); + } + else + { + return File(new byte[0], "text/plain", "Empty.txt"); + } + } + + /// + /// Elenco files assaociati a ticket supporto /// /// /// /// - // POST api/files/list/1 + // POST api/filesave/list/1 [HttpPost("list/{id}")] public async Task> list(int id, [FromBody] SupportRequest CurrRequest) { From 998737b3992c7d50481a249ebb492e685f60e29c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Feb 2022 07:52:24 +0100 Subject: [PATCH 15/15] refresh codice --- LiMan.Api/LiMan.APi.csproj | 1 + LiMan.Api/LiMan.APi.xml | 20 ++++++++++++++++++-- LiMan.Transfer/Resources/ChangeLog.html | 2 +- LiMan.Transfer/Resources/VersNum.txt | 2 +- LiMan.Transfer/Resources/manifest.xml | 2 +- LiMan.UI/LiMan.UI.csproj | 2 +- LiMan.UI/Resources/ChangeLog.html | 2 +- LiMan.UI/Resources/VersNum.txt | 2 +- LiMan.UI/Resources/manifest.xml | 2 +- 9 files changed, 26 insertions(+), 9 deletions(-) diff --git a/LiMan.Api/LiMan.APi.csproj b/LiMan.Api/LiMan.APi.csproj index ce21f0b..88ff53f 100644 --- a/LiMan.Api/LiMan.APi.csproj +++ b/LiMan.Api/LiMan.APi.csproj @@ -20,6 +20,7 @@ + diff --git a/LiMan.Api/LiMan.APi.xml b/LiMan.Api/LiMan.APi.xml index e5c862c..5ef5031 100644 --- a/LiMan.Api/LiMan.APi.xml +++ b/LiMan.Api/LiMan.APi.xml @@ -110,16 +110,32 @@ - Dataservice x accesso DB + + + Calcolo correetto mimetype da nome file + + + + + + GET api/filesave/id/filename + + Recupera un singolo file dato ticket code + nome file (safe) + + Ticket code formato T00000000 + Nome file (safe) + Nome file da scaricare + + - Richiesta di registrazione ticket supporto + Elenco files assaociati a ticket supporto diff --git a/LiMan.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html index b0dfe84..1cc67b7 100644 --- a/LiMan.Transfer/Resources/ChangeLog.html +++ b/LiMan.Transfer/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

          Versione: 1.1.2202.0818

          +

          Versione: 1.1.2202.0907


          Note di rilascio:
            diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt index bb28cfa..08203ff 100644 --- a/LiMan.Transfer/Resources/VersNum.txt +++ b/LiMan.Transfer/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0818 +1.1.2202.0907 diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml index ccd5681..93a9fc0 100644 --- a/LiMan.Transfer/Resources/manifest.xml +++ b/LiMan.Transfer/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0818 + 1.1.2202.0907 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index 4aef333..a06f002 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.1.2202.0818 + 1.1.2202.0907 LiMan.UI LiMan.UI diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index b0dfe84..1cc67b7 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

            Versione: 1.1.2202.0818

            +

            Versione: 1.1.2202.0907


            Note di rilascio:
              diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index bb28cfa..08203ff 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0818 +1.1.2202.0907 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index 8adc882..7b99f80 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0818 + 1.1.2202.0907 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false