fix testing con recupero json
This commit is contained in:
@@ -157,6 +157,10 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DataVisualization" />
|
||||
<Reference Include="System.Web.DataVisualization.Design" />
|
||||
@@ -165,9 +169,33 @@
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
@@ -548,6 +576,10 @@
|
||||
<DependentUpon>AutoCompletamento.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WS\MPData.asmx.cs">
|
||||
<DependentUpon>MPData.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AnalisiProduzione.aspx" />
|
||||
@@ -650,6 +682,7 @@
|
||||
<Content Include="Content\RobotoCondensed.woff">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="WS\MPData.asmx" />
|
||||
<None Include="Properties\PublishProfiles\OVH-Demo.pubxml" />
|
||||
<None Include="Properties\PublishProfiles\IIS01.pubxml" />
|
||||
<None Include="Properties\PublishProfiles\OVH-Demo-old.pubxml" />
|
||||
@@ -783,6 +816,7 @@
|
||||
<Content Include="scripts\popper-utils.js.map" />
|
||||
<Content Include="vis\vis.map" />
|
||||
<Content Include="vis\vis.js.map" />
|
||||
<Content Include="TestMVC.cshtml" />
|
||||
<None Include="Web.IIS01.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<script src="~/vis/vis.js"></script>
|
||||
<link href="~/vis/vis.min.css" rel="stylesheet" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "GetEventsList",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: ChartVis,
|
||||
error: OnError
|
||||
|
||||
});
|
||||
|
||||
|
||||
function ChartVis(response) {
|
||||
// DOM element where the Timeline will be attached
|
||||
var container = document.getElementById('visualization');
|
||||
|
||||
// Create a DataSet (allows two way data-binding)
|
||||
var items = new vis.DataSet(response);
|
||||
|
||||
// Configuration for the Timeline
|
||||
var options = {};
|
||||
|
||||
// Create a Timeline
|
||||
var timeline = new vis.Timeline(container, items, options);
|
||||
}
|
||||
function OnError(response) {
|
||||
alert("Error !");
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<div id="visualization"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+26
-5
@@ -115,10 +115,18 @@
|
||||
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
|
||||
|
||||
|
||||
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /><add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /></controls>
|
||||
|
||||
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
</controls>
|
||||
</pages>
|
||||
<webServices>
|
||||
<protocols>
|
||||
<add name="HttpGet" />
|
||||
</protocols>
|
||||
</webServices>
|
||||
<httpHandlers>
|
||||
<add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory" validate="false" />
|
||||
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
|
||||
</httpHandlers>
|
||||
<customErrors mode="Off" />
|
||||
@@ -129,11 +137,12 @@
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
|
||||
</httpModules>
|
||||
<sessionState mode="Custom" customProvider="MySessionStateStore">
|
||||
<sessionState mode="Custom" customProvider="MySessionStateStore">
|
||||
<providers>
|
||||
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="127.0.0.1" accessKey="" ssl="false" applicationName="MP_SITE" />
|
||||
</providers>
|
||||
</sessionState></system.web>
|
||||
</sessionState>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<!--aggiunto mimetype x scaricamento fonts aggiuntive-->
|
||||
@@ -146,7 +155,7 @@
|
||||
<handlers>
|
||||
<remove name="ChartImageHandler" />
|
||||
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" /><remove name="OPTIONSVerbHandler" /><remove name="TRACEVerbHandler" /><add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /></handlers>
|
||||
<modules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
|
||||
@@ -177,6 +186,18 @@
|
||||
<assemblyIdentity name="StackExchange.Redis.StrongName" publicKeyToken="c219ff1ca8c2ce46" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.6.0" newVersion="1.2.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<elmah>
|
||||
|
||||
+47
-29
@@ -9,37 +9,55 @@
|
||||
<script type="text/javascript">
|
||||
// vedere: http://visjs.org/docs/timeline/
|
||||
|
||||
// DOM element where the Timeline will be attached
|
||||
var container = document.getElementById('visualization');
|
||||
//$(document).ready(function () {
|
||||
// $.ajax({
|
||||
// type: "GET",
|
||||
// url: "/WS/MPData.asmx/randomData",
|
||||
// contentType: "application/json; charset=utf-8",
|
||||
// dataType: "json",
|
||||
// success: ChartVis,
|
||||
// error: OnError
|
||||
// });
|
||||
|
||||
// function ChartVis(response) {
|
||||
// DOM element where the Timeline will be attached
|
||||
var container = document.getElementById('visualization');
|
||||
// Create a DataSet (allows two way data-binding)
|
||||
//var items = new vis.DataSet(response);
|
||||
var items = new vis.DataSet([
|
||||
{ id: 1, content: 'item 1', start: '2018-04-20 00:00:00', end: '2018-04-24 23:59:59', group: '1', className: 'sv' }
|
||||
, { id: 2, content: 'item 2', start: '2018-04-14 00:00:00', end: '2018-04-15 23:59:59', group: '1', className: 'sg' }
|
||||
, { id: 3, content: 'item 3', start: '2018-04-18 00:00:00', end: '2018-04-19 23:59:59', group: '1', className: 'sr' }
|
||||
, { id: 4, content: 'item 4', start: '2018-04-16 00:00:00', end: '2018-04-17 23:59:59', group: '1', className: 'sv' }
|
||||
, { id: 5, content: 'item 5', start: '2018-04-25 00:00:00', end: '2018-04-26 23:59:59', group: '1', className: 'sg' }
|
||||
, { id: 6, content: 'item 6', start: '2018-04-27 00:00:00', end: '2018-04-30 23:59:59', group: '1', className: 'sr' }
|
||||
]);
|
||||
// gruppi
|
||||
var groups = [
|
||||
{
|
||||
id: 1
|
||||
, content: 'Macc 1'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
content: 'Macc 2'
|
||||
// Optional: a field 'className', 'style', 'order', [properties]
|
||||
}
|
||||
// more groups...
|
||||
];
|
||||
// Configuration for the Timeline
|
||||
var options = {
|
||||
stack: false
|
||||
};
|
||||
// Create a Timeline
|
||||
var timeline = new vis.Timeline(container, items, groups, options);
|
||||
// }
|
||||
// function OnError(response) {
|
||||
// alert("Error !");
|
||||
// }
|
||||
//})
|
||||
|
||||
// Create a DataSet (allows two way data-binding)
|
||||
var items = new vis.DataSet([
|
||||
{ id:1, content:'item 1', start:'2018-04-20 00:00:00', end:'2018-04-24 23:59:59', group:'1', className:'sv' }
|
||||
,{ id:2, content:'item 2', start:'2018-04-14 00:00:00', end:'2018-04-15 23:59:59', group:'1', className:'sg' }
|
||||
,{ id:3, content:'item 3', start:'2018-04-18 00:00:00', end:'2018-04-19 23:59:59', group:'1', className:'sr' }
|
||||
,{ id:4, content:'item 4', start:'2018-04-16 00:00:00', end:'2018-04-17 23:59:59', group:'1', className:'sv' }
|
||||
,{ id:5, content:'item 5', start:'2018-04-25 00:00:00', end:'2018-04-26 23:59:59', group:'1', className:'sg' }
|
||||
,{ id:6, content:'item 6', start:'2018-04-27 00:00:00', end:'2018-04-30 23:59:59', group:'1', className:'sr' }
|
||||
]);
|
||||
var groups = [
|
||||
{
|
||||
id: 1
|
||||
,content: 'Macc 1'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
content: 'Macc 2'
|
||||
// Optional: a field 'className', 'style', 'order', [properties]
|
||||
}
|
||||
// more groups...
|
||||
];
|
||||
// Configuration for the Timeline
|
||||
var options = {
|
||||
stack: false
|
||||
};
|
||||
|
||||
// Create a Timeline
|
||||
var timeline = new vis.Timeline(container, items, groups, options);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user