<%@ Page Title="" Language="C#" MasterPageFile="~/helpdesk/helpdesk.master" AutoEventWireup="true" CodeBehind="Svr_List.aspx.cs" Inherits="helpdesk.helpdesk.Svr_List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

        <style>
        #thediv a {
         text-decoration:none; color:#808080;    font-size:12px;
        }

         #thediv a:hover {
         text-decoration:none;  color:#808080;   font-size:12px;
        }
    </style>

     

       <table width="100%" >
             <tr valign="top">
                 <td width="200px" > 


<div class="sidebar" id="sidebar">	

    <div id="thediv">
           <asp:TreeView runat="server" ID="tv_dept" ExpandDepth="1" ShowLines="true" OnSelectedNodeChanged="tv_dept_SelectedNodeChanged" >
               <Nodes>
                   <asp:TreeNode Text="=服务器列表=" Value="">
                      
                   </asp:TreeNode>
               </Nodes>
               <SelectedNodeStyle Font-Bold="true" />
           </asp:TreeView>      
     </div>     
    </div>

                      



                 </td>

                 <td>
 

 
 <div class="alert alert-danger" style=  margin:10px;">

         <asp:Label runat="server" ID="ip_intro" ClientIDMode="Static"> 
      
           </asp:Label>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
       <a href="#"   onclick="layer.open({ type: 1, area: ['500px', '300px'], content: $('#update_intro') }); return false;">修改配额大小</a>

         &nbsp; &nbsp; &nbsp; &nbsp;
            <a href="#"   onclick="layer.open({ type: 1, area: ['500px', '300px'], content: $('#update_email') }); return false;">修改邮件通知</a>


     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
       <a href="javascript:void(0);" onclick="Pop('Svr_Add.aspx',750,400,'')" class="btn  btn-primary"> 添加服务器</a>
     <asp:PlaceHolder runat="server" ID="pl_edit" Visible="false">
       <a href="javascript:void(0);" onclick="Pop('Svr_Add.aspx?id=<%=id %>',750,400,'')" class="btn  btn-danger"> 更新或删除服务器</a>
     </asp:PlaceHolder>
     <a href="../admin/svrmonitor.rar" class="btn btn-success">下载客户端</a>

 </div>
  
 <asp:PlaceHolder runat="server" ID="ph_detail" Visible="false">
    
<div style="margin:10px">


   <h3>服务器信息</h3>

 <asp:FormView runat="server" ID="fv_detail">
     <ItemTemplate>
         <table class="table table-bordered">
             <tr>
                 <th width="100">IP</th>
                 <td width="300">
                     <%#Eval("ip") %>
                 </td>

                     <th width="100">友好名称</th>
                  <td width="300">
                        <%#Eval("friendname") %>
                 </td>

                  <th width="100">机器名称</th>
                  <td width="300">
                        <%#Eval("svrname") %>
                 </td>

             </tr>



               <tr>
                 <th width="100">机器名</th>
                 <td width="300">
                     <%#Eval("svrname") %>
                 </td>

                     <th width="120">操作系统名称</th>
                  <td width="300">
                        <%#Eval("os") %>
                 </td>

                  <th width="100">启动时间</th>
                  <td width="300">
                        <%#Eval("lastbootuptime") %>
                 </td>

             </tr>



                 <tr>
                 <th >BIOS序列号</th>
                 <td >
                     <%#Eval("bios_serialnumber") %>
                 </td>

                     <th >BIOS制造商</th>
                  <td >
                        <%#Eval("bios_manufacturer") %>
                 </td>

                  <th >主板序列号</th>
                  <td >
                        <%#Eval("bd_serialnumber") %>
                 </td>

             </tr>









                <tr>
                 <th >主板制造商</th>
                 <td>
                     <%#Eval("bd_manufacturer") %>
                 </td>

                     <th >处理器信息</th>
                  <td >
                        <%#Eval("processor") %>
                 </td>

                  <th >处理器个数</th>
                  <td >
                        <%#Eval("processorcount") %>
                 </td>

             </tr>


              <tr>
                 <th >系统内核</th>
                 <td>
                     <%#Eval("osversion") %>
                 </td>

                     <th >服务器类型</th>
                  <td >
                        <%#Eval("svrtype") %>
                 </td>

                  <th style="color:blue" >扫描时间</th>
                  <td style="color:blue">
                        <%#GetDate(Eval("adddate")) %>
                 </td>

             </tr>


              <tr>
                   
                <th>简介</th> <td colspan="5">   <%#Eval("note") %> </td>

                  </td>

              </tr>

         </table>

     </ItemTemplate>

 </asp:FormView>
       

                    <h3>磁盘信息</h3>
<asp:GridView runat="server" CssClass="table" GridLines="None" ID="gv_list" AutoGenerateColumns="false">
    <Columns>

        <asp:TemplateField>
            <HeaderStyle Width="90px" />
            <ItemTemplate>
                <%#Eval("isalert").ToString()=="1"?"<img src=images/red.jpg title=磁盘空间不足>空间不足" :""%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="磁盘名称" DataField="diskname" />
          <asp:BoundField HeaderText="共计空间(G)" DataField="total" />
          <asp:BoundField HeaderText="已用空间(G)" DataField="used" />
          <asp:BoundField HeaderText="剩余空间(G)" DataField="free" />
        
    </Columns>

    

</asp:GridView>


   


    </div>
   
       </asp:PlaceHolder>
                 </td>
             </tr>

         </table>
    

  
    








    
    <div id="update_intro" style="display:none; text-align:center; margin:10px">
        <br /><br />
      设置报警磁盘最低空间大小：  <asp:TextBox runat="server" ID="txt_size" ClientIDMode="Static"  style="width:200px; display:inline-block" placeholder="请填写整数数字" CssClass="form-control"></asp:TextBox> G
       <br /> <br />
       <input type="button" onclick="save_intro();" value="保存"   class="btn btn-primary" />
         <br /> <br />
        数字修改后，将在下一个循环周期系统进行修改。
    </div>



  


            
    <div id="update_email" style="display:none; text-align:center; margin:10px">
        <br /><br />
      当磁盘空间不足，发送邮件给：<br /><br />
          <asp:TextBox runat="server" ID="txt_email" ClientIDMode="Static"  style="width:400px; display:inline-block" placeholder="多个邮件以分号分隔" CssClass="form-control"></asp:TextBox> 
       <br /> <br />
       <input type="button" onclick="save_mail();" value="保存"   class="btn btn-primary" />
      
    </div>
    

    <script>


       

        function save_mail() {


            $.post("ajax/update_intro.aspx?t=mail", { txt: escape($("#txt_email").val()) });
            alert("操作成功");
            layer.closeAll();
        }

        function save_intro()
        {         

            $.post("ajax/update_intro.aspx?t=disk", { txt: escape($("#txt_size").val()) });
            alert("操作成功");
            layer.closeAll();
        }
</script>


     
     
   <input type="hidden" name="hf_ids" id="hf_ids" />

         


       
    
    
     
</asp:Content>
