<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnvironmentCheck.aspx.cs" Inherits="GigaTech.CMS.Web.Common.SystemAdmin.Utility.EnvironmentCheck" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<script language="javascript">
    Ext.onReady(function () {
        Ext.QuickTips.init();

        Ext.override(Ext.data.proxy.Ajax, { timeout: 2 * 60 * 1000 });

        var w = Ext.create('Ext.window.Window', {
            title: "<%=GetGlobalResourceObject("CMSResource", "SystemCheck")%>",
            constrain: true,
            closable: false,
            shadow: true,
            shadowOffset: 50,
            maximized: true,
            autoScroll: true,
            bodyStyle: 'background:white',
            layout: 'fit',
            items: [
                Ext.create('Ext.grid.Panel', {
                    //margin: 10,
                    //height: 300,
                    border: false,
                    title: '<%=GetGlobalResourceObject("CMSResource", "PortStatus")%>',
                    store: Ext.create('Ext.data.Store', {
                        autoLoad: true,
                        fields: ['type', 'port', 'port_hex', 'status', 'process', 'result', 'note'],
                        proxy: {
                            type: 'ajax',
                            url: 'Handler.ashx?action=GetPortStatus',
                            reader: {
                                type: 'json',
                                root: 'items'
                            }
                        }
                    }),
                    columns: [
                         {
                             header: 'Type',
                             dataIndex: 'type',
                             width: 40
                         },
                        {
                            header: 'Port',
                            dataIndex: 'port',
                            width: 50
                        },
                          {
                              header: 'Port(Hex)',
                              dataIndex: 'port_hex',
                              width: 65
                          },
                        {
                            header: 'Process Name',
                            dataIndex: 'process',
                            flex: 1
                        },
                        {
                            header: 'Status',
                            dataIndex: 'result',
                            align: 'center',
                            width: 45,
                            renderer: function (value) {
                                return value == "1" ? "<img src='/Common/DMZ/Images/16x16/disabled.png' />" : "<img src='/Common/DMZ/Images/16x16/enabled.png' />";
                            }
                        },
                        {
                            header: 'Note',
                            dataIndex: 'note',
                            flex: 1
                        }
                    ]
                })
            ]
        }).show();



    });
</script>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
