iniziata aggiunta modello e chiamata x recuperare elenco macchine offline da oltre "keepAliveMin" minuti
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace MP_MON.Controllers
|
||||
@@ -17,7 +18,7 @@ namespace MP_MON.Controllers
|
||||
ViewBag.cssSemBase = "sem";
|
||||
try
|
||||
{
|
||||
pageRefreshSec = System.Web.Configuration.WebConfigurationManager.AppSettings["pageRefreshSec"];
|
||||
pageRefreshSec = WebConfigurationManager.AppSettings["pageRefreshSec"];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -36,7 +37,7 @@ namespace MP_MON.Controllers
|
||||
ViewBag.cssSemBase = "semBlink";
|
||||
try
|
||||
{
|
||||
pageRefreshSec = System.Web.Configuration.WebConfigurationManager.AppSettings["pageRefreshSec"];
|
||||
pageRefreshSec = WebConfigurationManager.AppSettings["pageRefreshSec"];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -51,9 +52,22 @@ namespace MP_MON.Controllers
|
||||
return PartialView("_mmClock");
|
||||
}
|
||||
|
||||
//public ActionResult Chat()
|
||||
//{
|
||||
// return View();
|
||||
//}
|
||||
public ActionResult checkIOB()
|
||||
{
|
||||
string esito = "ND";
|
||||
// verifico TUTTE le macchine x il keepAlive e se almeno 1 è offline da oltre "keepAliveMin" minuti --> invio email!!!
|
||||
int keepAliveMin = 1;
|
||||
try
|
||||
{
|
||||
keepAliveMin = Convert.ToInt32(WebConfigurationManager.AppSettings["pageRefreshSec"]);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
esito = "OK";
|
||||
ViewBag.EsitoVerifica = esito;
|
||||
return PartialView("_checkIOB");
|
||||
//return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,6 +173,9 @@
|
||||
<Compile Include="Models\stp_MSE_getData_Result.cs">
|
||||
<DependentUpon>MapoModel.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\stp_MSE_getOffline_Result.cs">
|
||||
<DependentUpon>MapoModel.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -329,6 +332,8 @@
|
||||
<Content Include="Scripts\jquery-3.1.1.min.map" />
|
||||
<Content Include="Views\MSE\_StatusMap.cshtml" />
|
||||
<Content Include="Views\Shared\_mmClock.cshtml" />
|
||||
<Content Include="Views\Home\checkIOB.cshtml" />
|
||||
<Content Include="Views\Shared\_checkIOB.cshtml" />
|
||||
<None Include="Web.Donati.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -55,5 +55,23 @@ namespace MP_MON.Models
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<MappaStatoExpl>("stp_MSE_getData", mergeOption, maxAgeSecParameter);
|
||||
}
|
||||
|
||||
public virtual ObjectResult<MappaStatoExpl> stp_MSE_getOffline(Nullable<int> keepAliveMin)
|
||||
{
|
||||
var keepAliveMinParameter = keepAliveMin.HasValue ?
|
||||
new ObjectParameter("keepAliveMin", keepAliveMin) :
|
||||
new ObjectParameter("keepAliveMin", typeof(int));
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<MappaStatoExpl>("stp_MSE_getOffline", keepAliveMinParameter);
|
||||
}
|
||||
|
||||
public virtual ObjectResult<MappaStatoExpl> stp_MSE_getOffline(Nullable<int> keepAliveMin, MergeOption mergeOption)
|
||||
{
|
||||
var keepAliveMinParameter = keepAliveMin.HasValue ?
|
||||
new ObjectParameter("keepAliveMin", keepAliveMin) :
|
||||
new ObjectParameter("keepAliveMin", typeof(int));
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<MappaStatoExpl>("stp_MSE_getOffline", mergeOption, keepAliveMinParameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
// T4 code generation is enabled for model 'C:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2015\Projects\MoonPro\MoonPro\MP-MON\Models\MapoModel.edmx'.
|
||||
// T4 code generation is enabled for model 'C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\MAPO\MoonPro_dotnet\MP-MON\Models\MapoModel.edmx'.
|
||||
// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
|
||||
// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
|
||||
// is open in the designer.
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
<Function Name="stp_MSE_getData" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="maxAgeSec" Type="int" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_MSE_getOffline" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="keepAliveMin" Type="int" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_MSE_refresh" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="IdxMacchina" Type="nvarchar" Mode="In" />
|
||||
</Function>
|
||||
@@ -86,7 +89,10 @@
|
||||
<Parameter Name="IdxMacchina" Mode="In" Type="String" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_MSE_getData" EntitySet="MappaStatoExpl" ReturnType="Collection(MoonProModel.MappaStatoExpl)">
|
||||
<Parameter Name="maxAgeSec" Mode="In" Type="Int32" />
|
||||
<Parameter Name="maxAgeSec" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_MSE_getOffline" EntitySet="MappaStatoExpl" ReturnType="Collection(MoonProModel.MappaStatoExpl)">
|
||||
<Parameter Name="keepAliveMin" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
</EntityContainer>
|
||||
<ComplexType Name="stp_MSE_getData_Result">
|
||||
@@ -117,6 +123,38 @@
|
||||
<Property Type="Decimal" Name="TCLavRT" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCEffRT" Nullable="true" Precision="18" Scale="8" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="stp_MSE_getOffline_Result">
|
||||
<Property Type="Int32" Name="RowNum" Nullable="false" />
|
||||
<Property Type="DateTime" Name="lastUpdate" Nullable="true" Precision="23" />
|
||||
<Property Type="String" Name="IdxMacchina" Nullable="true" MaxLength="50" />
|
||||
<Property Type="String" Name="CodMacchina" Nullable="true" MaxLength="50" />
|
||||
<Property Type="String" Name="Nome" Nullable="true" MaxLength="50" />
|
||||
<Property Type="String" Name="url" Nullable="true" MaxLength="250" />
|
||||
<Property Type="Int32" Name="idxODL" Nullable="true" />
|
||||
<Property Type="String" Name="CodArticolo" Nullable="true" MaxLength="50" />
|
||||
<Property Type="Int32" Name="NumPezzi" Nullable="true" />
|
||||
<Property Type="Decimal" Name="TCAssegnato" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="DateTime" Name="DataInizioODL" Nullable="true" Precision="23" />
|
||||
<Property Type="String" Name="Semaforo" Nullable="true" MaxLength="50" />
|
||||
<Property Type="Int32" Name="idxStato" Nullable="true" />
|
||||
<Property Type="String" Name="DescrizioneStato" Nullable="true" MaxLength="50" />
|
||||
<Property Type="Double" Name="durata" Nullable="true" />
|
||||
<Property Type="Int32" Name="PezziProd" Nullable="true" />
|
||||
<Property Type="Int32" Name="PezziConf" Nullable="true" />
|
||||
<Property Type="Decimal" Name="TempoOn" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TempoAuto" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TempoRun" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCMedio" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCLav" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCEff" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCMedioRT" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCLavRT" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="Decimal" Name="TCEffRT" Nullable="true" Precision="18" Scale="8" />
|
||||
<Property Type="String" Name="IdxMacchina1" Nullable="false" MaxLength="50" />
|
||||
<Property Type="DateTime" Name="DataOraServer" Nullable="true" />
|
||||
<Property Type="DateTime" Name="DataOraMacchina" Nullable="true" Precision="23" />
|
||||
<Property Type="DateTime" Name="DataOraStart" Nullable="true" Precision="23" />
|
||||
</ComplexType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@@ -158,6 +196,8 @@
|
||||
<FunctionImportMapping FunctionImportName="stp_MSE_refresh" FunctionName="MoonProModel.Store.stp_MSE_refresh" />
|
||||
<FunctionImportMapping FunctionImportName="stp_MSE_getData" FunctionName="MoonProModel.Store.stp_MSE_getData">
|
||||
</FunctionImportMapping>
|
||||
<FunctionImportMapping FunctionImportName="stp_MSE_getOffline" FunctionName="MoonProModel.Store.stp_MSE_getOffline">
|
||||
</FunctionImportMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
+6
-1
@@ -16,8 +16,13 @@
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="Environment" value="Dev" />
|
||||
<add key="dataRefreshMs" value="1500" />
|
||||
<add key="pageRefreshSec" value="300" />
|
||||
<add key="pageRefreshSec" value="600" />
|
||||
<add key="doAnimate" value="0" />
|
||||
<!--gestione email ed avvisi-->
|
||||
<add key="_fromEmail" value="MoonPro@steamware.net" />
|
||||
<add key="_adminEmail" value="samuele@steamware.net" />
|
||||
<add key="_smtpCli" value="localhost" />
|
||||
<add key="keepAliveMin" value="10" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.6.2" />
|
||||
|
||||
Reference in New Issue
Block a user