Vari update x testing client/server
This commit is contained in:
Binary file not shown.
@@ -69,6 +69,10 @@
|
||||
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<connectionStrings>
|
||||
@@ -81,4 +85,72 @@
|
||||
</provider>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
<source name="SignalR.SqlMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.ServiceBusMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.RedisMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.ScaleoutMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.WebSocketTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.ServerSentEventsTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.ForeverFrameTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.LongPollingTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.TransportHeartBeat">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.ReflectedHubDescriptorProvider">
|
||||
<listeners>
|
||||
<add name="SignalR-Init" />
|
||||
</listeners>
|
||||
</source>
|
||||
</sources>
|
||||
<!-- Sets the trace verbosity level -->
|
||||
<switches>
|
||||
<add name="SignalRSwitch" value="Verbose" />
|
||||
</switches>
|
||||
<!-- Specifies the trace writer for output -->
|
||||
<sharedListeners>
|
||||
<!-- Listener for transport events -->
|
||||
<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" />
|
||||
<!-- Listener for scaleout provider events -->
|
||||
<add name="SignalR-Bus" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/bus.log" />
|
||||
<!-- Listener for hub discovery events -->
|
||||
<add name="SignalR-Init" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/init.log" />
|
||||
</sharedListeners>
|
||||
<trace autoflush="true" />
|
||||
</system.diagnostics>
|
||||
</configuration>
|
||||
@@ -107,11 +107,11 @@ namespace Thermo.Active.App_Start
|
||||
{
|
||||
map.UseCors(CorsOptions.AllowAll);
|
||||
|
||||
map.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()
|
||||
{
|
||||
Provider = new SignalROAuthBearerProvider(),
|
||||
AuthenticationType = AUTHENTICATION_TYPE
|
||||
});
|
||||
//map.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()
|
||||
//{
|
||||
// Provider = new SignalROAuthBearerProvider(),
|
||||
// AuthenticationType = AUTHENTICATION_TYPE
|
||||
//});
|
||||
var hubConfiguration = new HubConfiguration
|
||||
{
|
||||
Resolver = GlobalHost.DependencyResolver,
|
||||
|
||||
@@ -119,6 +119,8 @@
|
||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Swashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Swashbuckle.Core.5.6.0\lib\net40\Swashbuckle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -163,6 +165,10 @@
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity">
|
||||
<HintPath>..\Libs\System.Windows.Interactivity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
@@ -204,6 +210,7 @@
|
||||
<Reference Include="WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.WebData.2.0.20505.0\lib\net40\WebMatrix.WebData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\SignalRContractResolver.cs" />
|
||||
@@ -16427,6 +16434,7 @@
|
||||
<TypeScriptCompile Include="wwwroot\src\_base\utils.ts" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="logs\" />
|
||||
<Folder Include="wwwroot\src\router\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<script src="Scripts/jquery.mousewheel.js"></script>
|
||||
<script src="Scripts/jquery.signalR-2.2.2.min.js"></script>
|
||||
<script src="Scripts/raphael-2.1.4.min.js"></script>
|
||||
<script src="http://seriate.steamware.net:9000/signalr/hubs"></script>
|
||||
<script src="http://10.74.82.72:9000/signalr/hubs"></script>
|
||||
|
||||
<link href="assets/styles/style.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
@@ -88,7 +88,12 @@ router.beforeEach((to, from, next) => {
|
||||
|
||||
// Initialize default language
|
||||
import { LocalizationService } from "src/services/localizationService";
|
||||
try
|
||||
{
|
||||
new LocalizationService().init();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
|
||||
let v = new Vue({
|
||||
|
||||
@@ -70,27 +70,29 @@ export class Hub {
|
||||
try { $.connection.ncHub.logging = true; } catch{ }
|
||||
|
||||
// Registro le callback;
|
||||
this._hub.client.alarms = this.manageAlarmsCallbacks;
|
||||
// this._hub.client.alarms = this.manageAlarmsCallbacks;
|
||||
this._hub.client.powerOn = this.managePowerCallbacks;
|
||||
this._hub.client.ncNetworkStatus = Hub.manageNcStatus;
|
||||
this._hub.client.processesData = Hub.manageProcesses;
|
||||
this._hub.client.functionalityData = Hub.functionalityData;
|
||||
this._hub.client.expiredMaintenances = Hub.expiredMaintenances;
|
||||
// this._hub.client.ncNetworkStatus = Hub.manageNcStatus;
|
||||
// this._hub.client.processesData = Hub.manageProcesses;
|
||||
// this._hub.client.functionalityData = Hub.functionalityData;
|
||||
// this._hub.client.expiredMaintenances = Hub.expiredMaintenances;
|
||||
|
||||
this._hub.client.ncSoftKeys = Hub.ncSoftKeyChanged;
|
||||
this._hub.client.userSoftKeys = Hub.userSoftKeyChanged;
|
||||
this._hub.client.headsData = Hub.headsDataChanged;
|
||||
this._hub.client.processesData = Hub.processDataChanged;
|
||||
this._hub.client.axesNames = Hub.axesNamesDataChanged;
|
||||
this._hub.client.axesPositions = Hub.axesPositionsDataChanged;
|
||||
this._hub.client.magazinesStatus = Hub.magazineStatusChanged;
|
||||
this._hub.client.activeProgramData = Hub.activeProgramData;
|
||||
this._hub.client.magazineIsActive = Hub.magazineIsActive;
|
||||
this._hub.client.m155Data = Hub.m155Data;
|
||||
this._hub.client.partProgramQueue = Hub.partProgramQueue;
|
||||
// this._hub.client.ncSoftKeys = Hub.ncSoftKeyChanged;
|
||||
// this._hub.client.userSoftKeys = Hub.userSoftKeyChanged;
|
||||
// this._hub.client.headsData = Hub.headsDataChanged;
|
||||
// this._hub.client.processesData = Hub.processDataChanged;
|
||||
// this._hub.client.axesNames = Hub.axesNamesDataChanged;
|
||||
// this._hub.client.axesPositions = Hub.axesPositionsDataChanged;
|
||||
// this._hub.client.magazinesStatus = Hub.magazineStatusChanged;
|
||||
// this._hub.client.activeProgramData = Hub.activeProgramData;
|
||||
// this._hub.client.magazineIsActive = Hub.magazineIsActive;
|
||||
// this._hub.client.m155Data = Hub.m155Data;
|
||||
// this._hub.client.partProgramQueue = Hub.partProgramQueue;
|
||||
|
||||
this._hub.client.scadaData = Hub.scadaDataChanged;
|
||||
this._hub.client.cmsConnectGatewayRebbot = Hub.cmsConnectGatewayRebbot;
|
||||
// this._hub.client.scadaData = Hub.scadaDataChanged;
|
||||
// this._hub.client.cmsConnectGatewayRebbot = Hub.cmsConnectGatewayRebbot;
|
||||
|
||||
// sottoscrivere qui i metodi NUOVI dal server (Recipe, gauges)
|
||||
|
||||
this._hub.client.logout = this.logout;
|
||||
|
||||
@@ -108,15 +110,15 @@ export class Hub {
|
||||
$.connection.hub.start({ transport: ['serverSentEvents'] });
|
||||
}, 5000); // Restart connection after 5 seconds.
|
||||
});
|
||||
$.connection.hub.stateChanged(async (state) => {
|
||||
if (state.newState == $.signalR.connectionState.connected) {
|
||||
try {
|
||||
await scadaService.ListScada();
|
||||
}
|
||||
catch (err) { }
|
||||
Hub.manageServerStatus("connected");
|
||||
}
|
||||
})
|
||||
// $.connection.hub.stateChanged(async (state) => {
|
||||
// if (state.newState == $.signalR.connectionState.connected) {
|
||||
// try {
|
||||
// await scadaService.ListScada();
|
||||
// }
|
||||
// catch (err) { }
|
||||
// Hub.manageServerStatus("connected");
|
||||
// }
|
||||
// })
|
||||
|
||||
$.connection.hub.start({ transport: ['serverSentEvents'] });
|
||||
|
||||
@@ -428,6 +430,8 @@ export class Hub {
|
||||
});
|
||||
}
|
||||
|
||||
// mettere qui metodo x pubblicare su server
|
||||
|
||||
public RefreshAlarm(id: string) {
|
||||
this._hub.server.refreshAlarm(id)
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user