GIT: perform LF normalization
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
@model Disco.Models.Repository.DeviceBatch
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
|
||||
}
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<div class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Name:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Purchase Date:
|
||||
</th>
|
||||
<td>@Html.EditorFor(model => model.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.PurchaseDate)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Create" />
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
$('#PurchaseDate').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
})
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@model Disco.Models.Repository.DeviceBatch
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
|
||||
}
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<div class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Name:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Purchase Date:
|
||||
</th>
|
||||
<td>@Html.EditorFor(model => model.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.PurchaseDate)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Create" />
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
$('#PurchaseDate').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
})
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -1,148 +1,148 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Create.cshtml")]
|
||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceBatch>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" +
|
||||
"ame:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Purchase Date:\r\n </th>\r\n <t" +
|
||||
"d>");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.PurchaseDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.PurchaseDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Create\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
$('#PurchaseDate').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
})
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Create.cshtml")]
|
||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceBatch>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" +
|
||||
"ame:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Purchase Date:\r\n </th>\r\n <t" +
|
||||
"d>");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.PurchaseDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.PurchaseDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Create\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
$('#PurchaseDate').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
})
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
@model Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
|
||||
}
|
||||
<table class="tableData">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Default Model
|
||||
</th>
|
||||
<th>
|
||||
Purchase Date
|
||||
</th>
|
||||
<th>
|
||||
Warranty Expires
|
||||
</th>
|
||||
<th>
|
||||
Insurance Expires
|
||||
</th>
|
||||
<th>
|
||||
Device Count
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.DeviceBatches)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@item.DefaultDeviceModel
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.PurchaseDate)
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown")
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown")
|
||||
@(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier))
|
||||
</td>
|
||||
<td>
|
||||
@if (item.PurchaseUnitQuantity.HasValue)
|
||||
{
|
||||
<span>@item.DeviceCount.ToString("n0")/@(item.PurchaseUnitQuantity.Value.ToString("n0"))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.DeviceCount.ToString("n0")
|
||||
}
|
||||
@if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
|
||||
(@(item.DeviceDecommissionedCount))</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="actionBar">
|
||||
@if (Model.DeviceBatches.Count > 0)
|
||||
{
|
||||
@Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline())
|
||||
}
|
||||
@Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create())
|
||||
</div>
|
||||
@model Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
|
||||
}
|
||||
<table class="tableData">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Default Model
|
||||
</th>
|
||||
<th>
|
||||
Purchase Date
|
||||
</th>
|
||||
<th>
|
||||
Warranty Expires
|
||||
</th>
|
||||
<th>
|
||||
Insurance Expires
|
||||
</th>
|
||||
<th>
|
||||
Device Count
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.DeviceBatches)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@item.DefaultDeviceModel
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.PurchaseDate)
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown")
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown")
|
||||
@(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier))
|
||||
</td>
|
||||
<td>
|
||||
@if (item.PurchaseUnitQuantity.HasValue)
|
||||
{
|
||||
<span>@item.DeviceCount.ToString("n0")/@(item.PurchaseUnitQuantity.Value.ToString("n0"))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.DeviceCount.ToString("n0")
|
||||
}
|
||||
@if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
|
||||
(@(item.DeviceDecommissionedCount))</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="actionBar">
|
||||
@if (Model.DeviceBatches.Count > 0)
|
||||
{
|
||||
@Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline())
|
||||
}
|
||||
@Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create())
|
||||
</div>
|
||||
|
||||
@@ -1,319 +1,319 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Default Model
|
||||
</th>
|
||||
<th>
|
||||
Purchase Date
|
||||
</th>
|
||||
<th>
|
||||
Warranty Expires
|
||||
</th>
|
||||
<th>
|
||||
Insurance Expires
|
||||
</th>
|
||||
<th>
|
||||
Device Count
|
||||
</th>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
foreach (var item in Model.DeviceBatches)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DefaultDeviceModel);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.PurchaseDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.PurchaseUnitQuantity.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DeviceCount.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.PurchaseUnitQuantity.Value.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DeviceCount.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1775), Tuple.Create("\"", 1831)
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1783), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1816), Tuple.Create("Decommissioned", 1817), true)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n (");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DeviceDecommissionedCount);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</span>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (Model.DeviceBatches.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Default Model
|
||||
</th>
|
||||
<th>
|
||||
Purchase Date
|
||||
</th>
|
||||
<th>
|
||||
Warranty Expires
|
||||
</th>
|
||||
<th>
|
||||
Insurance Expires
|
||||
</th>
|
||||
<th>
|
||||
Device Count
|
||||
</th>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
foreach (var item in Model.DeviceBatches)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DefaultDeviceModel);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.PurchaseDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.PurchaseUnitQuantity.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DeviceCount.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.PurchaseUnitQuantity.Value.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DeviceCount.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1775), Tuple.Create("\"", 1831)
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1783), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1816), Tuple.Create("Decommissioned", 1817), true)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n (");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(item.DeviceDecommissionedCount);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</span>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (Model.DeviceBatches.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,122 +1,122 @@
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
|
||||
Html.BundleDeferred("~/Style/Timeline");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
|
||||
}
|
||||
<div id="deviceBatchesTimeline" style="height: 550px;">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var dataUrl = '@(Url.Action(MVC.API.DeviceBatch.Timeline()))';
|
||||
var tl;
|
||||
|
||||
$(function () {
|
||||
|
||||
var eventSource = new Timeline.DefaultEventSource();
|
||||
|
||||
var currentDate = new Date();
|
||||
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay(), 10, 0, 0);
|
||||
var tomorrowDate = new Date();
|
||||
tomorrowDate.setDate(currentDate.getDate() + 1);
|
||||
var sixMonthsDate = new Date();
|
||||
sixMonthsDate.setDate(currentDate.getDate());
|
||||
sixMonthsDate.setMonth(currentDate.getMonth() + 6);
|
||||
|
||||
var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, 1, 10, 0, 0);
|
||||
var hotZoneEnd1 = new Date(currentDate.getFullYear(), 11, 31, 10, 0, 0);
|
||||
var hotZoneStart2 = new Date(currentDate.getFullYear() + 1, 0, 1, 10, 0, 0);
|
||||
var hotZoneEnd2 = new Date(currentDate.getFullYear() + 1, 11, 31, 10, 0, 0);
|
||||
//hotZoneEnd.setDate(hotZoneEnd.getDate() - 1);
|
||||
|
||||
//hotZoneStart = hotZoneStart.toLocaleDateString();
|
||||
//hotZoneEnd = hotZoneEnd.toLocaleDateString();
|
||||
|
||||
|
||||
var bandInfos = [
|
||||
Timeline.createHotZoneBandInfo({
|
||||
zones: [
|
||||
{
|
||||
start: hotZoneStart1,
|
||||
end: hotZoneEnd1,
|
||||
magnify: 4,
|
||||
unit: Timeline.DateTime.MONTH
|
||||
},
|
||||
{
|
||||
start: hotZoneStart2,
|
||||
end: hotZoneEnd2,
|
||||
magnify: 4,
|
||||
unit: Timeline.DateTime.MONTH
|
||||
}
|
||||
],
|
||||
eventSource: eventSource,
|
||||
width: "85%",
|
||||
intervalUnit: Timeline.DateTime.YEAR,
|
||||
intervalPixels: 150,
|
||||
timeZone: 10,
|
||||
date: sixMonthsDate
|
||||
}),
|
||||
Timeline.createBandInfo({
|
||||
eventSource: eventSource,
|
||||
width: "15%",
|
||||
intervalUnit: Timeline.DateTime.YEAR,
|
||||
intervalPixels: 150,
|
||||
overview: true,
|
||||
timeZone: 10,
|
||||
date: sixMonthsDate
|
||||
})
|
||||
];
|
||||
bandInfos[1].syncWith = 0;
|
||||
bandInfos[1].highlight = true;
|
||||
|
||||
for (var i = 0; i < bandInfos.length; i++) {
|
||||
bandInfos[i].decorators = [
|
||||
new Timeline.SpanHighlightDecorator({
|
||||
startDate: currentDate,
|
||||
endDate: tomorrowDate,
|
||||
color: "#CC2222",
|
||||
opacity: 50
|
||||
}),
|
||||
new Timeline.SpanHighlightDecorator({
|
||||
startDate: hotZoneStart1,
|
||||
endDate: hotZoneEnd1,
|
||||
color: "#CEA5A5",
|
||||
opacity: 50
|
||||
}),
|
||||
new Timeline.SpanHighlightDecorator({
|
||||
startDate: hotZoneStart2,
|
||||
endDate: hotZoneEnd2,
|
||||
color: "#CCB7B7",
|
||||
opacity: 50
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
tl = Timeline.create($('#deviceBatchesTimeline')[0], bandInfos);
|
||||
|
||||
var tlResizeLayoutHandle = null;
|
||||
$(window).resize(function () {
|
||||
if (tlResizeLayoutHandle)
|
||||
window.clearTimeout(tlResizeLayoutHandle);
|
||||
tlResizeLayoutHandle = window.setTimeout(function () {
|
||||
tlResizeLayoutHandle = null;
|
||||
tl.layout();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
// Load Events
|
||||
$.ajax({
|
||||
url: dataUrl,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
eventSource.loadJSON(data, dataUrl);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load Timeline Data: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
</script>
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
|
||||
Html.BundleDeferred("~/Style/Timeline");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
|
||||
}
|
||||
<div id="deviceBatchesTimeline" style="height: 550px;">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var dataUrl = '@(Url.Action(MVC.API.DeviceBatch.Timeline()))';
|
||||
var tl;
|
||||
|
||||
$(function () {
|
||||
|
||||
var eventSource = new Timeline.DefaultEventSource();
|
||||
|
||||
var currentDate = new Date();
|
||||
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay(), 10, 0, 0);
|
||||
var tomorrowDate = new Date();
|
||||
tomorrowDate.setDate(currentDate.getDate() + 1);
|
||||
var sixMonthsDate = new Date();
|
||||
sixMonthsDate.setDate(currentDate.getDate());
|
||||
sixMonthsDate.setMonth(currentDate.getMonth() + 6);
|
||||
|
||||
var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, 1, 10, 0, 0);
|
||||
var hotZoneEnd1 = new Date(currentDate.getFullYear(), 11, 31, 10, 0, 0);
|
||||
var hotZoneStart2 = new Date(currentDate.getFullYear() + 1, 0, 1, 10, 0, 0);
|
||||
var hotZoneEnd2 = new Date(currentDate.getFullYear() + 1, 11, 31, 10, 0, 0);
|
||||
//hotZoneEnd.setDate(hotZoneEnd.getDate() - 1);
|
||||
|
||||
//hotZoneStart = hotZoneStart.toLocaleDateString();
|
||||
//hotZoneEnd = hotZoneEnd.toLocaleDateString();
|
||||
|
||||
|
||||
var bandInfos = [
|
||||
Timeline.createHotZoneBandInfo({
|
||||
zones: [
|
||||
{
|
||||
start: hotZoneStart1,
|
||||
end: hotZoneEnd1,
|
||||
magnify: 4,
|
||||
unit: Timeline.DateTime.MONTH
|
||||
},
|
||||
{
|
||||
start: hotZoneStart2,
|
||||
end: hotZoneEnd2,
|
||||
magnify: 4,
|
||||
unit: Timeline.DateTime.MONTH
|
||||
}
|
||||
],
|
||||
eventSource: eventSource,
|
||||
width: "85%",
|
||||
intervalUnit: Timeline.DateTime.YEAR,
|
||||
intervalPixels: 150,
|
||||
timeZone: 10,
|
||||
date: sixMonthsDate
|
||||
}),
|
||||
Timeline.createBandInfo({
|
||||
eventSource: eventSource,
|
||||
width: "15%",
|
||||
intervalUnit: Timeline.DateTime.YEAR,
|
||||
intervalPixels: 150,
|
||||
overview: true,
|
||||
timeZone: 10,
|
||||
date: sixMonthsDate
|
||||
})
|
||||
];
|
||||
bandInfos[1].syncWith = 0;
|
||||
bandInfos[1].highlight = true;
|
||||
|
||||
for (var i = 0; i < bandInfos.length; i++) {
|
||||
bandInfos[i].decorators = [
|
||||
new Timeline.SpanHighlightDecorator({
|
||||
startDate: currentDate,
|
||||
endDate: tomorrowDate,
|
||||
color: "#CC2222",
|
||||
opacity: 50
|
||||
}),
|
||||
new Timeline.SpanHighlightDecorator({
|
||||
startDate: hotZoneStart1,
|
||||
endDate: hotZoneEnd1,
|
||||
color: "#CEA5A5",
|
||||
opacity: 50
|
||||
}),
|
||||
new Timeline.SpanHighlightDecorator({
|
||||
startDate: hotZoneStart2,
|
||||
endDate: hotZoneEnd2,
|
||||
color: "#CCB7B7",
|
||||
opacity: 50
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
tl = Timeline.create($('#deviceBatchesTimeline')[0], bandInfos);
|
||||
|
||||
var tlResizeLayoutHandle = null;
|
||||
$(window).resize(function () {
|
||||
if (tlResizeLayoutHandle)
|
||||
window.clearTimeout(tlResizeLayoutHandle);
|
||||
tlResizeLayoutHandle = window.setTimeout(function () {
|
||||
tlResizeLayoutHandle = null;
|
||||
tl.layout();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
// Load Events
|
||||
$.ajax({
|
||||
url: dataUrl,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
eventSource.loadJSON(data, dataUrl);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load Timeline Data: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,131 +1,131 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Timeline.cshtml")]
|
||||
public class Timeline : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public Timeline()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
|
||||
Html.BundleDeferred("~/Style/Timeline");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"deviceBatchesTimeline\"");
|
||||
|
||||
WriteLiteral(" style=\"height: 550px;\"");
|
||||
|
||||
WriteLiteral(">\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n (function () {\r\n var dataUrl = \'");
|
||||
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
|
||||
Write(Url.Action(MVC.API.DeviceBatch.Timeline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var tl;\r\n\r\n $(function () {\r\n\r\n var eventSource = n" +
|
||||
"ew Timeline.DefaultEventSource();\r\n\r\n var currentDate = new Date();\r\n" +
|
||||
" currentDate = new Date(currentDate.getFullYear(), currentDate.getMon" +
|
||||
"th(), currentDate.getDay(), 10, 0, 0);\r\n var tomorrowDate = new Date(" +
|
||||
");\r\n tomorrowDate.setDate(currentDate.getDate() + 1);\r\n va" +
|
||||
"r sixMonthsDate = new Date();\r\n sixMonthsDate.setDate(currentDate.get" +
|
||||
"Date());\r\n sixMonthsDate.setMonth(currentDate.getMonth() + 6);\r\n " +
|
||||
" \r\n var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, " +
|
||||
"1, 10, 0, 0);\r\n var hotZoneEnd1 = new Date(currentDate.getFullYear()," +
|
||||
" 11, 31, 10, 0, 0);\r\n var hotZoneStart2 = new Date(currentDate.getFul" +
|
||||
"lYear() + 1, 0, 1, 10, 0, 0);\r\n var hotZoneEnd2 = new Date(currentDat" +
|
||||
"e.getFullYear() + 1, 11, 31, 10, 0, 0);\r\n //hotZoneEnd.setDate(hotZon" +
|
||||
"eEnd.getDate() - 1);\r\n\r\n //hotZoneStart = hotZoneStart.toLocaleDateSt" +
|
||||
"ring();\r\n //hotZoneEnd = hotZoneEnd.toLocaleDateString();\r\n\r\n\r\n " +
|
||||
" var bandInfos = [\r\n Timeline.createHotZoneBandInfo({\r\n " +
|
||||
" zones: [\r\n {\r\n start: h" +
|
||||
"otZoneStart1,\r\n end: hotZoneEnd1,\r\n " +
|
||||
" magnify: 4,\r\n unit: Timeline.DateTime.MONTH\r\n " +
|
||||
" },\r\n {\r\n start: hotZoneStart" +
|
||||
"2,\r\n end: hotZoneEnd2,\r\n magnify: " +
|
||||
"4,\r\n unit: Timeline.DateTime.MONTH\r\n }" +
|
||||
"\r\n ],\r\n eventSource: eventSource,\r\n " +
|
||||
" width: \"85%\",\r\n intervalUnit: Timeline.DateTime." +
|
||||
"YEAR,\r\n intervalPixels: 150,\r\n timeZone: 1" +
|
||||
"0,\r\n date: sixMonthsDate\r\n }),\r\n " +
|
||||
" Timeline.createBandInfo({\r\n eventSource: eventSource,\r\n " +
|
||||
" width: \"15%\",\r\n intervalUnit: Timeline.DateTi" +
|
||||
"me.YEAR,\r\n intervalPixels: 150,\r\n overview" +
|
||||
": true,\r\n timeZone: 10,\r\n date: sixMonthsD" +
|
||||
"ate\r\n })\r\n ];\r\n bandInfos[1].syncWith = 0;\r" +
|
||||
"\n bandInfos[1].highlight = true;\r\n\r\n for (var i = 0; i < b" +
|
||||
"andInfos.length; i++) {\r\n bandInfos[i].decorators = [\r\n " +
|
||||
" new Timeline.SpanHighlightDecorator({\r\n startDa" +
|
||||
"te: currentDate,\r\n endDate: tomorrowDate,\r\n " +
|
||||
" color: \"#CC2222\",\r\n opacity: 50\r\n " +
|
||||
" }),\r\n new Timeline.SpanHighlightDecorator({\r\n " +
|
||||
" startDate: hotZoneStart1,\r\n endDate: hotZon" +
|
||||
"eEnd1,\r\n color: \"#CEA5A5\",\r\n opaci" +
|
||||
"ty: 50\r\n }),\r\n new Timeline.SpanHighlightD" +
|
||||
"ecorator({\r\n startDate: hotZoneStart2,\r\n " +
|
||||
" endDate: hotZoneEnd2,\r\n color: \"#CCB7B7\",\r\n " +
|
||||
" opacity: 50\r\n })\r\n ];\r\n " +
|
||||
" }\r\n\r\n tl = Timeline.create($(\'#deviceBatchesTimeline\')[0], band" +
|
||||
"Infos);\r\n\r\n var tlResizeLayoutHandle = null;\r\n $(window).r" +
|
||||
"esize(function () {\r\n if (tlResizeLayoutHandle)\r\n " +
|
||||
" window.clearTimeout(tlResizeLayoutHandle);\r\n tlResizeLayoutHa" +
|
||||
"ndle = window.setTimeout(function () {\r\n tlResizeLayoutHandle" +
|
||||
" = null;\r\n tl.layout();\r\n }, 500);\r\n " +
|
||||
" });\r\n\r\n // Load Events\r\n $.ajax({\r\n url: " +
|
||||
"dataUrl,\r\n dataType: \'json\',\r\n type: \'POST\',\r\n " +
|
||||
" success: function (data) {\r\n eventSource.loadJSON" +
|
||||
"(data, dataUrl);\r\n },\r\n error: function (jqXHR, te" +
|
||||
"xtStatus, errorThrown) {\r\n alert(\'Unable to load Timeline Dat" +
|
||||
"a: \' + errorThrown);\r\n }\r\n });\r\n });\r\n\r\n })(" +
|
||||
");\r\n\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Timeline.cshtml")]
|
||||
public class Timeline : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public Timeline()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
|
||||
Html.BundleDeferred("~/Style/Timeline");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"deviceBatchesTimeline\"");
|
||||
|
||||
WriteLiteral(" style=\"height: 550px;\"");
|
||||
|
||||
WriteLiteral(">\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n (function () {\r\n var dataUrl = \'");
|
||||
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
|
||||
Write(Url.Action(MVC.API.DeviceBatch.Timeline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var tl;\r\n\r\n $(function () {\r\n\r\n var eventSource = n" +
|
||||
"ew Timeline.DefaultEventSource();\r\n\r\n var currentDate = new Date();\r\n" +
|
||||
" currentDate = new Date(currentDate.getFullYear(), currentDate.getMon" +
|
||||
"th(), currentDate.getDay(), 10, 0, 0);\r\n var tomorrowDate = new Date(" +
|
||||
");\r\n tomorrowDate.setDate(currentDate.getDate() + 1);\r\n va" +
|
||||
"r sixMonthsDate = new Date();\r\n sixMonthsDate.setDate(currentDate.get" +
|
||||
"Date());\r\n sixMonthsDate.setMonth(currentDate.getMonth() + 6);\r\n " +
|
||||
" \r\n var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, " +
|
||||
"1, 10, 0, 0);\r\n var hotZoneEnd1 = new Date(currentDate.getFullYear()," +
|
||||
" 11, 31, 10, 0, 0);\r\n var hotZoneStart2 = new Date(currentDate.getFul" +
|
||||
"lYear() + 1, 0, 1, 10, 0, 0);\r\n var hotZoneEnd2 = new Date(currentDat" +
|
||||
"e.getFullYear() + 1, 11, 31, 10, 0, 0);\r\n //hotZoneEnd.setDate(hotZon" +
|
||||
"eEnd.getDate() - 1);\r\n\r\n //hotZoneStart = hotZoneStart.toLocaleDateSt" +
|
||||
"ring();\r\n //hotZoneEnd = hotZoneEnd.toLocaleDateString();\r\n\r\n\r\n " +
|
||||
" var bandInfos = [\r\n Timeline.createHotZoneBandInfo({\r\n " +
|
||||
" zones: [\r\n {\r\n start: h" +
|
||||
"otZoneStart1,\r\n end: hotZoneEnd1,\r\n " +
|
||||
" magnify: 4,\r\n unit: Timeline.DateTime.MONTH\r\n " +
|
||||
" },\r\n {\r\n start: hotZoneStart" +
|
||||
"2,\r\n end: hotZoneEnd2,\r\n magnify: " +
|
||||
"4,\r\n unit: Timeline.DateTime.MONTH\r\n }" +
|
||||
"\r\n ],\r\n eventSource: eventSource,\r\n " +
|
||||
" width: \"85%\",\r\n intervalUnit: Timeline.DateTime." +
|
||||
"YEAR,\r\n intervalPixels: 150,\r\n timeZone: 1" +
|
||||
"0,\r\n date: sixMonthsDate\r\n }),\r\n " +
|
||||
" Timeline.createBandInfo({\r\n eventSource: eventSource,\r\n " +
|
||||
" width: \"15%\",\r\n intervalUnit: Timeline.DateTi" +
|
||||
"me.YEAR,\r\n intervalPixels: 150,\r\n overview" +
|
||||
": true,\r\n timeZone: 10,\r\n date: sixMonthsD" +
|
||||
"ate\r\n })\r\n ];\r\n bandInfos[1].syncWith = 0;\r" +
|
||||
"\n bandInfos[1].highlight = true;\r\n\r\n for (var i = 0; i < b" +
|
||||
"andInfos.length; i++) {\r\n bandInfos[i].decorators = [\r\n " +
|
||||
" new Timeline.SpanHighlightDecorator({\r\n startDa" +
|
||||
"te: currentDate,\r\n endDate: tomorrowDate,\r\n " +
|
||||
" color: \"#CC2222\",\r\n opacity: 50\r\n " +
|
||||
" }),\r\n new Timeline.SpanHighlightDecorator({\r\n " +
|
||||
" startDate: hotZoneStart1,\r\n endDate: hotZon" +
|
||||
"eEnd1,\r\n color: \"#CEA5A5\",\r\n opaci" +
|
||||
"ty: 50\r\n }),\r\n new Timeline.SpanHighlightD" +
|
||||
"ecorator({\r\n startDate: hotZoneStart2,\r\n " +
|
||||
" endDate: hotZoneEnd2,\r\n color: \"#CCB7B7\",\r\n " +
|
||||
" opacity: 50\r\n })\r\n ];\r\n " +
|
||||
" }\r\n\r\n tl = Timeline.create($(\'#deviceBatchesTimeline\')[0], band" +
|
||||
"Infos);\r\n\r\n var tlResizeLayoutHandle = null;\r\n $(window).r" +
|
||||
"esize(function () {\r\n if (tlResizeLayoutHandle)\r\n " +
|
||||
" window.clearTimeout(tlResizeLayoutHandle);\r\n tlResizeLayoutHa" +
|
||||
"ndle = window.setTimeout(function () {\r\n tlResizeLayoutHandle" +
|
||||
" = null;\r\n tl.layout();\r\n }, 500);\r\n " +
|
||||
" });\r\n\r\n // Load Events\r\n $.ajax({\r\n url: " +
|
||||
"dataUrl,\r\n dataType: \'json\',\r\n type: \'POST\',\r\n " +
|
||||
" success: function (data) {\r\n eventSource.loadJSON" +
|
||||
"(data, dataUrl);\r\n },\r\n error: function (jqXHR, te" +
|
||||
"xtStatus, errorThrown) {\r\n alert(\'Unable to load Timeline Dat" +
|
||||
"a: \' + errorThrown);\r\n }\r\n });\r\n });\r\n\r\n })(" +
|
||||
");\r\n\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
Reference in New Issue
Block a user