代码:

<div id="editdialos" class="easyui-dialog" title="虚机配置修改" 
        data-options="closed:true,iconCls: 'icon-save',
    toolbar: [{
                    text:'基本配置',
                    iconCls: 'icon-edit',
                    handler:function(){
                        $('.a').css('display', '');
                        $('.b').css('display', 'none');
                    }
                },'-',{
                    text:'监控项配置',
                    iconCls: 'icon-edit',
                    handler:function(){
                        $('.a').css('display', 'none');
                        $('.b').css('display', '');
                    }
                }],
    buttons: [{
        text: '保存',
        iconCls:'icon-ok',
        handler: function(){
        $.messager.confirm('系统提示', '您确定要修改吗?', function(r){
          if (r) {
            $('#editForm').form('submit', {
                url: 'config/updateServerInfoWH.action',
                onSubmit: function(){
                    var isValid = $(this).form('validate');
                    if (!isValid){
                        $.messager.progress('close');    
                    }
                    return isValid;    
                },
                success: function(data){
                    $.messager.progress('close');
                    $.messager.alert('系统提示', data, 'info');
                    var ip = $('#mod_ip').val();
                    if(data.indexOf('成功') >= 0){
                        var machineName = $('#mod_name').val();
                        var role = $('#mod_role').combobox('getText');
                        var group = $('#selGroupMod').combobox('getText');
                        var manager = $('#managerMod').combobox('getText');
                        var email = $('#mod_isEmail').combobox('getText');
                        var isBusiness = $('#mod_isBusiness').combobox('getText');
                        var mStatus = $('#mod_mStatus').combobox('getText');
                        var region = $('#mod_region').combobox('getText');
                        var extranetIP = $('#mod_extranetIP').val();
                        var serverIP = $('#mod_serverIP').val();
                        var remark = $('#mod_remark').val();
                        var log = $('#logUtil').val();
                        var rizhiData ='虚机配置,修改,' + log + ',IP:' + ip +';机器名:' + machineName + ';角色:' + role 
                                        + ';所属组:' + group + ';管理人:' +  manager + ';邮件:' + email + ';创建业务:' + isBusiness
                                        + ';机器状态:' + mStatus + ';外网IP:' + extranetIP + ';地区:' + region
                                        +  ';宿主机IP:' + serverIP + ';备注:' + remark;
                        rizhi(rizhiData);
                    }
                    $('#editdialos').dialog('close');
                    loaddata('-1',ip,'-1','-1','-1');
                }
            });
            }
            });
            }
    },
    {
        text: '取消',
        iconCls:'icon-cancel',
        handler: function(){
            $('#editdialos').dialog('close');
        }
    }
]" 
        style="width:550px;height:530px;padding:10px;">
        <div>
        <form id="editForm"  method="post">
            <table class="servertable1">
                <tr>
                    <td class="b" style="display:none;padding-top:20px;"><input style="width:30px" name="whUnmonitorIp.CPU" id="CPU" type="checkbox" checked="checked" value="CPU" width="30px">CPU</input></td>
                    <td class="b" style="display:none"></td>
                </tr>
                <tr>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.DISK" id="DISK" type="checkbox" checked="checked" value="DISK" width="30px">DISK</input></td>
                    <td class="b" style="display:none"></td>
                </tr>
                <tr>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.NET" id="NET" type="checkbox" checked="checked" value="NET" width="30px">NET</input></td>
                    <td class="b" style="display:none"></td>
                </tr>
                <tr>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.PROCES" id="PROCES" type="checkbox" checked="checked" value="PROCES" width="30px">PROCES</input></td>
                    <td class="b" style="display:none"></td>
                </tr>
                <tr>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.RAM" id="RAM" type="checkbox" checked="checked" value="RAM" width="30px">RAM</input></td>
                    <td class="b" style="display:none"></td>
                </tr>
<!--                 <tr> -->
<!--                     <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.VHNUM" id="VHNUM" type="checkbox" checked="checked" value="VHNUM" width="30px">VHNUM</input></td> -->
<!--                     <td class="b" style="display:none"></td> -->
<!--                 </tr> -->
                <tr>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.ZOOMBIE" id="ZOOMBIE" type="checkbox" checked="checked" value="ZOOMBIE" width="30px">ZOOMBIE</input></td>
                    <td class="b" style="display:none"></td>
                </tr>
                <tr>
                    <td class="b" style="display:none;padding-left:38px;">SERVER :</td>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.SERVER_APACHE" id="SERVER_APACHE" type="checkbox" checked="checked" value="SERVER_APACHE" width="30px"></input>APACHE</td>
                </tr>
                <tr>
                    <td class="b" style="display:none"></td>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.SERVER_FTP" id="SERVER_FTP" type="checkbox" checked="checked" value="SERVER_FTP" width="30px"></input>FTP</td>
                </tr>
                <tr>
                    <td class="b" style="display:none"></td>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.SERVER_IMGACCELERATE" id="SERVER_IMGACCELERATE" type="checkbox" checked="checked" value="SERVER_IMGACCELERATE" width="30px"></input>IMGACCELERATE</td>
                </tr>
                <tr>
                    <td class="b" style="display:none"></td>
                    <td class="b" style="display:none"><input style="width:30px" name="whUnmonitorIp.SERVER_INTERFACE" id="SERVER_INTERFACE" type="checkbox" checked="checked" value="SERVER_INTERFACE" width="30px"></input>INTERFACE</td>
                </tr>
                <tr>
                    <td style="display:none"></td>
                    <td style="display:none"><input style="width:30px" name="whUnmonitorIp.hidden" type="checkbox" checked="checked" value="1" width="30px"></input></td>
                </tr>
<%--                <tr>
                    <td class="b" style="display:none;padding-left:38px;">开始时间 : </td>
                    <td class="b" style="display:none"><input class="easyui-datetimebox" style="width: 170px;" name='starttime' id="starttime"/></td>
                </tr>
                <tr>
                    <td class="b" style="display:none;padding-left:38px;">结束时间 : </td>
                    <td class="b" style="display:none"><input class="easyui-datetimebox" style="width: 170px;" name='endtime' id="endtime"/></td>
                </tr>--%>
                <tr>
                    <td class="a">IP:</td>
                    <td class="a"><input style="width:240px" class="easyui-textbox" id="mod_ip" type="text" name="serverInfoWH.ip" readonly='true' data-options="required:true"></input></td>
                </tr>
                <tr>
                    <td class="a">机器名称:</td>
                    <td class="a"><input style="width:240px" class="easyui-textbox" id="mod_name" type="text" name="serverInfoWH.machineName" data-options=""></input></td>
                </tr>
                <tr>
                    <td class="a">角色:</td>
                    <td class="a"><select style="width:240px" id="mod_role" name="serverInfoWH.role" class="easyui-combobox"  editable="false" data-options="">
                                <option value="-1">请选择</option>
                                <option value="701">香港虚机主机-Linux虚机</option>
                                <option value="702">香港虚机主机-WIN虚机</option>
                                <option value="703">香港虚机主机-Mysql虚机</option>
                                <option value="704">香港虚机主机-SqlServer虚机</option>
                                <option value="705">郑州虚机主机-Linux虚机</option>
                                <option value="706">郑州虚机主机-WIN虚机</option>
                                <option value="707">郑州虚机主机-Mysql虚机</option>
                                <option value="708">郑州虚机主机-SqlServer虚机</option>
                                <option value="713">美国虚拟主机-WIN虚机</option>
                                <option value="714">美国虚拟主机-Linux虚机</option>
                                <option value="715">美国虚拟主机-MySQL虚机</option>
                                <option value="716">美国虚拟主机-MSSQL虚机</option>
                        </select></td>
                </tr>
                <tr>
                    <td class="a">所属组:</td>
                    <td class="a"><select style="width:240px" id="selGroupMod" name="serverInfoWH.groupID" class="easyui-combobox"  editable="false" data-options="
                                    url:'config/getGroupList.action',
                                    valueField:'id',
                                    textField:'gname',
                                    panelHeight:'auto',
                                    validType:'testgroup'
                            ">
                            </select></td>
                </tr>
                
                <tr>
                    <td class="a">管理人:</td>
                    <td class="a"><select style="width:240px" id="managerMod" name="serverInfoWH.manager" class="easyui-combobox"  editable="false" data-options="
                                    valueField:'value',
                                    textField:'text',
                                    panelHeight:'auto'
                            ">
                                
                            </select></td>
                </tr>
                <tr>
                    <td class="a">邮件:</td>
                    <td class="a"><select style="width:240px" id='mod_isEmail' class="easyui-combobox" editable="false"  name="serverInfoWH.isEmail" >
                            <option value="1">发送</option>
                            <option value="0">不发送</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="a">创建业务:</td>
                    <td class="a"><select style="width:240px" id='mod_isBusiness' name="serverInfoWH.isBusiness" class="easyui-combobox" editable="false"  >
                            <option value="1">可以</option>
                            <option value="0">不可以</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="a">机器状态:</td>
                    <td class="a"><select style="width:240px" id='mod_mStatus' name="serverInfoWH.mStatus" class="easyui-combobox" editable="false"  >
                            <option value="1">正常</option>
                            <option value="0">下架</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="a">地区:</td>
                    <td class="a"><select style="width:240px" id='mod_region' name="serverInfoWH.region" class="easyui-combobox" editable="false"  >
                            <option value="4001">郑州</option>
                            <option value="4002">香港</option>
                            <option value="4003">北京</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="a">外网IP:</td>
                    <td class="a"><input style="width:240px" class="easyui-textbox" id="mod_extranetIP" type="text" name="serverInfoWH.extranetIP" data-options=""></input></td>
                </tr>
                <tr>
                    <td class="a">宿主IP:</td>
                    <td class="a"><input style="width:240px" id='mod_serverIP' class="easyui-textbox"   type="text" name="serverInfoWH.serverIP" data-options=""></input></td>
                </tr>
                <tr>
                    <td class="a">备注:</td>
                    <td class="a"><textarea id='mod_remark' class="easyui-textbox" name="serverInfoWH.remark" style="height:50px;width:240px"></textarea></td>
                </tr>
            </table>
        </form>
        </div>
    </div>

 

   

 

posted on 2019-04-28 17:05  月零Ray  阅读(311)  评论(0编辑  收藏  举报