Aggiunta pagina UpdMan + script sql x update...
This commit is contained in:
@@ -1,7 +1,38 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="UpdMan.aspx.cs" Inherits="CMS_SC.UpdMan" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
<div class="container">
|
||||
<div class="row card" style="margin: 2px 4px;">
|
||||
<div class="card-header">
|
||||
<div class="row" style="margin: 2px 4px;">
|
||||
<h3 class="card-title text-uppercase">SteamWare's CMS-SC</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<p><b>Gestione Update pacchetti - Ultime release applicazioni.</b></p>
|
||||
</div>
|
||||
<div class="col-4 col-md-3">
|
||||
<h2 class="text-center">ALL <i class="fa fa-download"></i></h2>
|
||||
<asp:LinkButton runat="server" ID="lbtDownloadAll" class="btn btn-success btn-lg btn-block" OnClientClick='<%: SteamWare.jsUtils.getCBE("DownloadConfirm")%>' OnClick="lbtDownload_Click" CommandArgument="ALL"><strong>LATEST VERS</strong></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4 col-md-3">
|
||||
<h2 class="text-center">CMS-SC <i class="fa fa-download"></i></h2>
|
||||
<asp:LinkButton runat="server" ID="lbtDownloadCMSSC" class="btn btn-info text-light btn-lg btn-block" OnClientClick='<%: SteamWare.jsUtils.getCBE("DownloadConfirm")%>' OnClick="lbtDownload_Click" CommandArgument="CMS_SC"><strong><%: Version("CMS_SC") %></strong></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<asp:Label runat="server" ID="lblOut"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
+73
-1
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -13,5 +15,75 @@ namespace CMS_SC
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Eseguo download pacchetti secondo richeista
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtDownload_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
string caller = lnk.CommandArgument;
|
||||
string resultsMsg = "";
|
||||
// in base al caller scarico il file installazione richiesto...
|
||||
if (caller == null)
|
||||
{
|
||||
caller = "ALL";
|
||||
}
|
||||
// ora verifico COSA devo scaricare...
|
||||
if (updateUrl(caller) != "")
|
||||
{
|
||||
// se è ALL scarico tutti...
|
||||
if (caller == "ALL")
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
int done = 0;
|
||||
// scarico TUTTI...
|
||||
done += UpdateMan.obj.downloadLatest(updateUrl("CMS_SC"), localDownloadPath("CMS_SC"), "CMS_SC");
|
||||
stopWatch.Stop();
|
||||
// calcolo elapsed time come TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
resultsMsg = string.Format("OK: {0} Package downloaded, {1:0.000} sec", done, ts.TotalSeconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
// scarico singolo target...
|
||||
UpdateMan.obj.downloadLatest(updateUrl(caller), localDownloadPath(caller), caller);
|
||||
resultsMsg = string.Format("OK: {0} DOWNLOADED | {1} --> {2}", caller, updateUrl(caller), localDownloadPath(caller));
|
||||
}
|
||||
}
|
||||
// aggiorno messaggio
|
||||
lblOut.Text = resultsMsg;
|
||||
}
|
||||
|
||||
public string Version(object package)
|
||||
{
|
||||
string answ = "a.b.c.d";
|
||||
UpdateInfoEventArgs updArgs = new UpdateInfoEventArgs();
|
||||
// Recupero info ADM...
|
||||
updArgs = UpdateMan.obj.getUpdateInfo(updateUrl(package.ToString()));
|
||||
if (updArgs.IsUpdateAvailable)
|
||||
{
|
||||
answ = updArgs.CurrentVersion.ToString();
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URLK stringa di UPDATE...
|
||||
/// </summary>
|
||||
protected string updateUrl(string package)
|
||||
{
|
||||
return string.Format("http://seriate.steamware.net:8083/SWS/{0}/{1}/manifest.xml", package, memLayer.ML.CRS("appVers"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Path locale dove scaricare gli installer
|
||||
/// </summary>
|
||||
protected string localDownloadPath(string package)
|
||||
{
|
||||
return string.Format(@"{0}{1}\{2}", memLayer.ML.CRS("downloadPath"), package, memLayer.ML.CRS("appVers"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+35
-10
@@ -1,17 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC
|
||||
{
|
||||
|
||||
|
||||
public partial class UpdMan
|
||||
{
|
||||
}
|
||||
namespace CMS_SC {
|
||||
|
||||
|
||||
public partial class UpdMan {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtDownloadAll.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtDownloadAll;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtDownloadCMSSC.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtDownloadCMSSC;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOut.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOut;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<add key="baseUrl" value="http://10.69.33.57/CMS-SC" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="defaultDomain" value="SQL-AUTOMAZIONE" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="reportsUrl" value="http://10.69.33.57/CMS_SC_Report" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<!--<add key="serviceUrl" value="./Services" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>-->
|
||||
<add key="serviceUrl" value="./Services" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="defaultDomain" value="SQL-AUTOMAZIONE" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="_fromEmail" value="cmssc@cms.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="_smtpCli" value="10.69.33.50" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<add key="serviceUrl" value="./Services" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -2,5 +2,6 @@
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<add key="serviceUrl" value="./Services" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -32,6 +32,9 @@
|
||||
<add key="CodGruppo" value="IT" />
|
||||
<add key="appName" value="CMS_SC" />
|
||||
<add key="baseUrl" value="http://iis02/CMS-SC" />
|
||||
<!--versione applicazione-->
|
||||
<add key="downloadPath" value="c:\Steamware\installers\" />
|
||||
<add key="appVers" value="CMS"/>
|
||||
<!--<add key="money" value="€" />
|
||||
<add key="weight" value="kg" />-->
|
||||
<!--area auth-->
|
||||
|
||||
@@ -93,6 +93,9 @@
|
||||
<a class="dropdown-item" id="liUserAdmin" href="UserAdmin"><%: traduci("UserAdmin") %></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" id="liUpdateVoc" href="UpdateVoc"><%: traduci("UpdateVoc") %></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" id="liUpdMan" href="UpdMan"><%: traduci("UpdMan") %></a>
|
||||
<a class="dropdown-item" id="liAbout" href="About"><%: traduci("About") %></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
<add key="CodGruppo" value="IT" />
|
||||
<add key="appName" value="CMS_SC" />
|
||||
<add key="baseUrl" value="http://iis02/CMS-SC" />
|
||||
<!--versione applicazione-->
|
||||
<add key="downloadPath" value="c:\Steamware\installers\CMS-SC\" />
|
||||
<add key="appVers" value="CMS"/>
|
||||
<!--<add key="money" value="€" />
|
||||
<add key="weight" value="kg" />-->
|
||||
<!--area auth-->
|
||||
@@ -59,7 +62,7 @@
|
||||
<add key="sqlLongCommandTimeout" value="600" />
|
||||
<!--area suggerimenti-->
|
||||
<add key="maxNumSuggest" value="30" />
|
||||
<add key="serviceUrl" value="/Services" />
|
||||
<add key="serviceUrl" value="./Services" />
|
||||
<!--area logger-->
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="doShrinkFolder" value="true" />
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
-- Update x nuovi permessi (pagine About e UpdMan)
|
||||
INSERT INTO [dbo].[Permessi]([COD_PERMESSO],[URL],[GRUPPO],[NUMERO],[NOME],[DESCRIZIONE])
|
||||
VALUES ('Settings_UpdMan','UpdMan',4,5,'UpdMan','UpdManIcon')
|
||||
INSERT INTO [dbo].[Permessi]([COD_PERMESSO],[URL],[GRUPPO],[NUMERO],[NOME],[DESCRIZIONE])
|
||||
VALUES ('Settings_About','About',4,6,'About','AboutIcon')
|
||||
|
||||
INSERT INTO [dbo].[Permessi2Funzione] ([COD_PERMESSO],[COD_FUNZIONE],[READWRITE])
|
||||
VALUES ('Settings_UpdMan','SuperAdmin','S')
|
||||
INSERT INTO [dbo].[Permessi2Funzione] ([COD_PERMESSO],[COD_FUNZIONE],[READWRITE])
|
||||
VALUES ('Settings_About','SuperAdmin','S')
|
||||
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4225']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4227']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'CMS-SC'
|
||||
|
||||
Reference in New Issue
Block a user