<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="com.lightinit.hsdataplatform.dictionary.DicRuningMonitoringType" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%
    String basePath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="../../../common/admin/head.jsp"></jsp:include>
</head>
<body>
<jsp:include page="../../../common/admin/body_pre.jsp"></jsp:include>
<div class="row hidden-print">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h2>运行监控</h2>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../../../common/admin/grid_pre.jsp"></jsp:include>
<form id="formSearch" action="<%=basePath%>/admin/runing_monitoring/add.htm" method="get" class="form-inline">
    <br>
    <br>
    <div class="form-group">
        <div  class="col-md-9 col-sm-9 form-group">
            <input type="text"  readonly name="apiMonitoringType" value="<%=DicRuningMonitoringType.API%>" class="col-md-9 col-sm-9 form-control"/>
        </div>

            <div class="col-md-5 col-sm-5">
                <label  >监控时间：</label>
                <div class="input-group date">
                    <input type="text"  name="apiMonitoringTimeStrFrom" value='${apiType.monitoringTimeStrFrom}' class="form-control" />
                    <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>

                </div>-
                <div class="input-group date">
                    <input type="text"  name="apiMonitoringTimeStrTo" value='${apiType.monitoringTimeStrTo}' class="form-control" />
                    <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
                </div>
                <span class="field-validation-valid help-block"></span>

            </div>


        <div class="col-md-5 col-sm-5 form-group">
            <label   >监控周期(0-59)：</label>
            <input type="text"  class="form-control"  name="apiMonitoringCycle"value="${apiType.monitoringCycle}"  class="col-md-3 col-sm-3 control-label" />
            <span class="field-validation-valid help-block"></span>
        </div>

        <div class="col-md-5 col-sm-5">
            <label  >提醒时间：</label>
            <div class="input-group date">
                <input type="text"  class="form-control"  name="apiAlertTimeStrFrom"value='${apiType.alertTimeStrFrom}' class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                <span class="glyphicon glyphicon-calendar"></span>
            </span>
            </div>-
            <div class="input-group date">
                <input type="text"  class="form-control"  name="apiAlertTimeStrTo"value='${apiType.alertTimeStrTo}' class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                <span class="glyphicon glyphicon-calendar"></span>
            </span>
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >提醒方式：</label>
            <select  name="apiAlertMethod" class="form-control">
                <option></option>
                <c:forEach items="${monitoringAlertMethod}" var="item" >
                    <option value="${item.key}" ${item.key == apiType.alertMethod ? "selected=\"selected\"" : ""}>${item.value}</option>
                </c:forEach>
            </select>
            <span class="field-validation-valid help-block"></span>
        </div>


    </div>
<%--微应用--%>
    <br>
    <br>
    <div class="form-group">
        <div  class="col-md-9 col-sm-9 form-group">
            <input type="text"  readonly name="microappMonitoringType" value="<%=DicRuningMonitoringType.MICROAPP%>" class="col-md-9 col-sm-9 form-control"/>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >监控时间：</label>
            <div class="input-group date">
                <input type="text"  class="form-control"  name="microappMonitoringTimeStrFrom"value='${microappType.monitoringTimeStrFrom}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>-
            <div class="input-group date">
                <input type="text"  class="form-control"  name="microappMonitoringTimeStrTo"value='${microappType.monitoringTimeStrTo}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >监控周期(0-59)：</label>
            <input type="text"  class="form-control"  name="microappMonitoringCycle"value="${microappType.monitoringCycle}"  class="col-md-3 col-sm-3 control-label" />
            <span class="field-validation-valid help-block"></span>
        </div>

        <div class="col-md-5 col-sm-5 form-group">
            <label   >提醒时间：</label>
            <div class="input-group date">
                <input type="text"  class="form-control"  name="microappAlertTimeStrFrom"value='${microappType.alertTimeStrFrom}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>-
            <div class="input-group date">
                <input type="text"  class="form-control"  name="microappAlertTimeStrTo"value='${microappType.alertTimeStrTo}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >提醒方式：</label>
            <select  name="microappAlertMethod" class="form-control">
                <option></option>
                <c:forEach items="${monitoringAlertMethod}" var="item" >
                    <option value="${item.key}" ${item.key == microappType.alertMethod ? "selected=\"selected\"" : ""}>${item.value}</option>
                </c:forEach>
            </select>
            <span class="field-validation-valid help-block"></span>
        </div>

    </div>
    <%--用户日志--%>
    <br>
    <br>
    <div class="form-group">
        <div  class="col-md-9 col-sm-9 form-group">
            <input type="text"  readonly name="userLogMonitoringType" value="<%=DicRuningMonitoringType.USERLOG%>" class="col-md-9 col-sm-9 form-control"/>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >监控时间：</label>
            <div class="input-group date">
                <input type="text"  class="form-control"  name="userLogMonitoringTimeStrFrom"value='${userLogType.monitoringTimeStrFrom}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>-
            <div class="input-group date">
                <input type="text"  class="form-control"  name="userLogMonitoringTimeStrTo"value='${userLogType.monitoringTimeStrTo}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >监控周期(0-59)：</label>
            <input type="text"  class="form-control"  name="userLogMonitoringCycle"value="${userLogType.monitoringCycle}"  class="col-md-3 col-sm-3 control-label" />
            <span class="field-validation-valid help-block"></span>
        </div>

        <div class="col-md-5 col-sm-5 form-group">
            <label   >提醒时间：</label>
            <div class="input-group date">
                <input type="text"  class="form-control"  name="userLogAlertTimeStrFrom"value='${userLogType.alertTimeStrFrom}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>-
            <div class="input-group date">
                <input type="text"  class="form-control"  name="userLogAlertTimeStrTo"value='${userLogType.alertTimeStrTo}'  class="col-md-3 col-sm-3 control-label" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="col-md-5 col-sm-5 form-group">
            <label   >提醒方式：</label>
            <select  name="userLogAlertMethod" class="form-control">
                <option></option>
                <c:forEach items="${monitoringAlertMethod}" var="item" >
                    <option value="${item.key}" ${item.key == userLogType.alertMethod ? "selected=\"selected\"" : ""}>${item.value}</option>
                </c:forEach>
            </select>
            <span class="field-validation-valid help-block"></span>
        </div>

    </div>
</form>

<jsp:include page="../../../common/admin/grid_middle.jsp"></jsp:include>
<button type="button" class="btn btn-sm btn-primary btn-position" ><i class="fa fa-close"></i>取消</button>
<button type="button"class="btn btn-sm btn-primary btn-position" id="btnSave"><i class="fa fa-check"></i>保存</button>
<br>

<jsp:include page="../../../common/admin/grid_post.jsp"></jsp:include>

<jsp:include page="../../../common/admin/body_post.jsp"></jsp:include>

</body>

<script type="text/javascript">
    $("#btnSave").click(function() {
        $('#formSearch').ajaxSubmitCloseRefresh();
    });

    $(".input-group.date").datetimepicker({
        format: "HH:mm",
        locale: "zh-cn"
    });
</script>
</html>


