{% extends "portal/layout.html" %}
{% block content %}

    <div>

        <div class="panel panel-default">
            <div class="panel-heading">
                {{ op }}集群监控项
            </div>

            <div class="panel-body">

                <div role="form">
                    <div class="form-group">
                        <label for="numerator">分子：</label>
                        <textarea rows="4" id="numerator" class="form-control">{{ cluster.numerator }}</textarea>
                    </div>
                    <div class="form-group">
                        <label for="denominator">分母：</label>
                        <textarea rows="4" id="denominator" class="form-control">{{ cluster.denominator }}</textarea>
                    </div>
                    <div style="border-left: 10px solid green; padding-left: 5px;margin-bottom: 10px;">
                        <span>计算得出的监控值要重新push回Falcon，需填写以下信息：</span>
                    </div>
                    <div class="form-group">
                        <label for="endpoint">endpoint:</label>
                        <input type="text" class="form-control" id="endpoint" value="{{ cluster.endpoint }}">
                    </div>
                    <div class="form-group">
                        <label for="metric">metric:</label>
                        <input type="text" class="form-control" id="metric" value="{{ cluster.metric }}">
                    </div>
                    <div class="form-group">
                        <label for="tags">tags:</label>
                        <input type="text" class="form-control" id="tags" value="{{ cluster.tags }}">
                    </div>
                    <div class="form-group">
                        <label for="step">汇报周期（秒为单位）:</label>
                        <input type="text" class="form-control" id="step" value="{{ cluster.step }}">
                    </div>
                    <button class="btn btn-primary" onclick="update_cluster_monitor_metric('{{ cluster_id }}', '{{ cluster.grp_id }}');">
                        <span class="glyphicon glyphicon-floppy-disk"></span>
                        {{ op }}
                    </button>
                    <a href="/portal/group/{{ cluster.grp_id }}/cluster" class="btn btn-default">
                        <span class="glyphicon glyphicon-arrow-left"></span>
                        列表页
                    </a>
                </div>



            </div>
        </div>

    </div>

{% endblock %}
