<%@ Page Language="vb" MasterPageFile="~/FiniqAppMasterPage.Master" AutoEventWireup="false" CodeBehind="WorkflowDashboard.aspx.vb"
    Inherits="FinIQWebApp.WorkflowDashboard" Title="Workflow Dashboard" %>

<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>


<asp:Content ID="WorkflowDashboard" ContentPlaceHolderID="MainContent" runat="server">
    <link rel="stylesheet" href="../FinIQJS/jquery-ui.min.css" />
    <script src="../FinIQJS/external/jquery/jquery.min.js" type="text/javascript"></script>
    <script src="../FinIQJS/jquery-ui.min.js" type="text/javascript"></script>


    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server">
    </asp:ScriptManagerProxy>
    <link rel="stylesheet" href="../App_Themes/Style1.css" />
    <link rel="stylesheet" href="CSS/WorkflowDashboard.css" />

    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
        <ContentTemplate>
            <%--<div id="container">--%>

            <div id="widgets">
                <input type="image" src="images/unlock.png" alt="Unlock" title="Unlock" class="lockunlockbtn" onclick='flagon(); lockunlock();'>
                <input type="image" src="images/lock.png" alt="Lock" title="Lock" style="padding-right: 25px;" class="lockunlockbtn" onclick='flagoff(); lockunlock();'>
            </div>

            <div style=" margin-left: 28px;">

                <table>
                    <tr>
                        <td >
                            <table>
                                <tr>
                                    <td style="padding-right: 10px;">Entity</td>
                                    <td>
                                        <asp:DropDownList ID="ddlEntity" CssClass="ddl" AutoPostBack="true" runat="server" Width="276px">
                                        </asp:DropDownList></td>
                                    <td style="padding-left: 30px; padding-right: 10px;">Workflow</td>
                                    <td style="padding-right: 10px;">
                                        <asp:DropDownList ID="ddlWorkflow" CssClass="ddl" AutoPostBack="true" runat="server" Width="276px" Style="border-radius: 5px;">
                                        </asp:DropDownList></td>
                                    <td style="padding-left: 20px;">
                                         <input id="submitLoad" type="button" class="btn" style="width: 100px;" value="Load" onclick="getPolarAjax(); renderAll(); render3D();" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-top: 10px;">
                            <table>
                                <tr>
                                    <td style="padding-right: 10px;">From</td>
                                    <td style="padding-right: 10px;">
                                        <uc1:DateControl ID="txtFromDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                                    </td>
                                    <td style="padding-right: 10px;">To</td>
                                    <td style="padding-right: 10px;">
                                        <uc1:DateControl ID="txtToDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                                    </td>
                                </tr>
                            </table>
                        </td>


                    </tr>
                </table>

            </div>

            <div style="margin-left: 28px">

                 <%-- <asp:TextBox OnChange="GridValueChange" Enabled="false" ID="txtUsrGrp" CssClass="lbl" runat="server" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CBUM_User_Group").ToString)%>'>
                </asp:TextBox>--%>

                <asp:Panel ID="grpUsergroup" runat="server" CssClass="groupBoxGrids invisible">
                    <fieldset class="MainFieldSet">
                        <table>
                            <tr>
                                <td>
                                    <table class="InnerTable">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtSearch" AutoPostBack="true" Style="width: 75px" runat="server" placeholder="Search" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnLoadGrp" CssClass="btn btnGroupbox" runat="server" Text="Load" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnSaveGrp" CssClass="btn btnGroupbox" runat="server" Text="Save" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnCloseGrp" runat="server" Text="X" CssClass="btn btnClose" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="GridContainerTD">
                                        <asp:GridView ID="gvUser" runat="server" AllowSorting="True"
                                            AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                                            CssClass="Grid" Width="" ShowHeaderWhenEmpty="true" EmptyDataText="No Records Found">
                                            <HeaderStyle CssClass="GridHeader" />
                                            <Columns>
                                                <asp:TemplateField HeaderStyle-Wrap="true" HeaderText=" ">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chkbox_UserQGrp" runat="server"></asp:CheckBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="User ID">
                                                    <HeaderStyle></HeaderStyle>
                                                    <ItemStyle></ItemStyle>
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="lblusrId" CssClass="lbl" Enabled="false" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.workflow_name").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </asp:Panel>

            </div>
            <asp:Button ID="ButtonIDUserMapping" Style="display: none;" runat="server" Text="" />
            <asp:HiddenField ID="hdnRowIndex" runat="server" Value="" />
            <asp:HiddenField ID="hdnTimeValue" runat="server" Value="0" />

            <table style="margin-top: 20px;">

                <tr>
                    <td>
                        <div class="myitem one draggable" style="margin-top: 20px;">
                            <canvas id="myChart" width="100" height="100"></canvas>
                        </div>
                    </td>
                    <td>
                        <div class="myitem two draggable" style="margin-top: 20px;">
                            <canvas id="PolarChart" width="100" height="100"></canvas>
                        </div>
                    </td>
                     <td>
                        <div class="myitem one draggable" style="margin-top: 20px;">
                            <canvas id="stackedv" width="100" height="100"></canvas>
                        </div>
                    </td>
                </tr>
                <tr>
                   
                    <td>
                        <div class="myitem one draggable" style="margin-top: 20px;">
                            <div id="3dchart" style="width: 100px; height: 100px;"></div>
                        </div>
                    </td>
                     <td>
                        <div class="myitem two draggable" style="margin-top: 20px;">
                            <canvas id="stackedh" width="100" height="100"></canvas>
                        </div>
                    </td>
                </tr>
                <tr>
                   
                </tr>
            </table>

            <asp:HiddenField ID="hdnLoginID" runat="server"></asp:HiddenField>
            <asp:HiddenField ID="hdn_ddlEntity_ID" runat="server"></asp:HiddenField>

        </ContentTemplate>
    </asp:UpdatePanel>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js">
    </script>
    <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
    <script src="JS/WorkflowDashboard.js"></script>

    <script>
        function render3D() {
            Plotly.plot('3dchart', data, layout);
        }

        function destroy3D() {
            Plotly.purge('3dchart');
        }
    </script>
</asp:Content>
