#pragma checksum "C:\Users\WSPAULD\Source\Repos\FaultMapDev\FaultMapDev\Views\Home\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "beb8e6dddd44bc81a37611cfe74c0619afae262c"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Home_Index), @"mvc.1.0.view", @"/Views/Home/Index.cshtml")]
namespace AspNetCore
{
    #line hidden
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.AspNetCore.Mvc.Rendering;
    using Microsoft.AspNetCore.Mvc.ViewFeatures;
#nullable restore
#line 1 "C:\Users\WSPAULD\Source\Repos\FaultMapDev\FaultMapDev\Views\_ViewImports.cshtml"
using FaultMapDev;

#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\WSPAULD\Source\Repos\FaultMapDev\FaultMapDev\Views\_ViewImports.cshtml"
using Kendo.Mvc.UI;

#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\WSPAULD\Source\Repos\FaultMapDev\FaultMapDev\Views\Home\Index.cshtml"
using Kendo.Mvc;

#line default
#line hidden
#nullable disable
    [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"beb8e6dddd44bc81a37611cfe74c0619afae262c", @"/Views/Home/Index.cshtml")]
    [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4cbbd2d6a73af5ef67a28dd1edb9f161a41826af", @"/Views/_ViewImports.cshtml")]
    public class Views_Home_Index : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
    {
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#nullable restore
#line 1 "C:\Users\WSPAULD\Source\Repos\FaultMapDev\FaultMapDev\Views\Home\Index.cshtml"
  
    ViewData["Title"] = "Home Page";

#line default
#line hidden
#nullable disable
            WriteLiteral("\r\n");
            WriteLiteral(@"<style>
    .k-grid-header .k-header {
        height: 26px;
        padding: 0;
    }

    .k-grid tbody tr {
        line-height: 10px;
    }

    .k-grid tbody td {
        padding: 1px;
    }

    .k-gauge {
       /* height: 37px;*/
        padding: 0;
    }
</style>
<script type=""text/javascript"">

    function onDataBound(e) {
        var grid = this;
        grid.table.find(""tr"").each(function () {
            var dataItem = grid.dataItem(this);


            $(this).find('script').each(function () {
                eval($(this).html());
            });




            kendo.bind($(this), dataItem);
        });
    }

    function FormatLongNumber(value) {

        //alert(value.toSource());
       // console.log(value);
        
        if (value === 0) {
            return 0;
        }

        // hundreds
        if (value <= 999) {
            return value;
        }

        // thousands
        if (value >= 1000 && value <= 999999) {
        ");
            WriteLiteral(@"    return (value / 1000) + 'K';
        }

        // millions
        if (value >= 1000000 && value <= 999999999) {
            return (value / 1000000) + 'M';
        }

        // billions
        if (value >= 1000000000 && value <= 999999999999) {
            return (value / 1000000000) + 'B';
        }

        return value;
    }
</script>
<div class=""row"">
    <div class=""col-12"">
        ");
#nullable restore
#line 78 "C:\Users\WSPAULD\Source\Repos\FaultMapDev\FaultMapDev\Views\Home\Index.cshtml"
    Write(Html.Kendo().Grid<FaultWatchList>()
                            .Name("messagesGrid")
                                .Events(events => events.DataBound("onDataBound"))
                            .Columns(columns =>
                            {
                                columns.Bound(t => t.FaultCode).Title("Fault Code").Width("50px");
                                columns.Bound(t => t.FaultName).Title("Description").Width("75px");
                                columns.Bound(t => t.Type).Title("Type").Width("20px");
                                columns.Bound(t => t.FaultCount).Title("Total Occurences").Width("125px").ClientTemplate(Html.Kendo().LinearGauge()
                         .Name("faultcount_#=FaultCount#")
                       .Scale(scale => scale
                         .Ranges(ranges =>
                         {
                             ranges.Add().From(27500).To(35000).Color("red");
                         }
                             ).Labels(label =>
                             label.Visible(true).Color("white").Template("#=FormatLongNumber(value)#")).Line(line => line.Visible(true))
                       .Vertical(false)
                           .Min(0) // Set the min value of the LinearGauge.
                           .Max(35000) // Set the min value of the LinearGauge.
                           .MajorTicks(ticks => ticks.Color("white"))
                           .MinorTicks(mticks => mticks.Color("white"))
                       )
                       .Pointer(pointer => pointer
                           .Shape(GaugeLinearPointerShape.BarIndicator)
                           .Color("white")
                       )
                       
.ToClientTemplate().Value
            );
                                columns.Bound(t => t.FaultCount).Title("Actions").Width("60px").ClientTemplate(Html.Kendo().DropDownList()
          .Name("ddl_#=FaultCount#")
          .DataTextField("Text")
          .DataValueField("Value")

          .BindTo(new List<SelectListItem>() {
              new SelectListItem() {
                  Text = "Remove",
                  Value = "1"
              },
              new SelectListItem() {
                  Text = "Link",
                  Value = "2"
              }

          })
          .Value("1")
          .HtmlAttributes(new { style = "margin:3px;height:25px;font-size:9pt;width:95px" })
    .ToClientTemplate().Value
                );

                            })
                                 .Sortable()
                                 .Filterable()

                                 .Scrollable(s => s.Height(330))

                                 .DataSource(dataSource => dataSource
                                 .Ajax()
                                 .Read(read => read.Action("GetWatchList_Read", "Home"))
                                                                              )
                                                                                  .HtmlAttributes(new { style = "width:850px;height:469px;margin-top:3px;font-size:9pt" })
                                                                              );

#line default
#line hidden
#nullable disable
            WriteLiteral("\r\n");
            WriteLiteral("    </div>\r\n</div>");
        }
        #pragma warning restore 1998
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
    }
}
#pragma warning restore 1591
