{$layout}
{$template "menu"}

<b-empty v-if="results.length == 0">暂时还没有监控结果。</b-empty>

<table class="ui table celled selectable" v-if="results.length > 0">
    <thead>
    <tr>
        <th class="three wide">监控节点</th>
        <th class="two wide">检测时间</th>
        <th class="four wide">对象</th>
        <th class="one wide">级别</th>
        <th class="two wide">耗时</th>
        <th>错误信息</th>
    </tr>
    </thead>
    <tr v-for="result in results">
        <td>
            {{result.node.name}}<link-icon :href="'/clusters/monitors/reporters/reporter?reporterId=' + result.node.id"></link-icon>
            <div v-if="result.node.location.length > 0 || result.node.isp.length > 0">
                <span class="grey small">{{result.node.location}}<span v-if="result.node.location.length > 0"> </span> {{result.node.isp}}</span>
            </div>
        </td>
        <td>{{result.updatedTime}}</td>
        <td>{{result.targetDesc}}</td>
        <td>
            <span :class="result.color">{{result.levelName}}</span>
        </td>
        <td>
            <span v-if="result.isOk" :class="result.color">{{result.costMs}}ms</span>
            <span v-else class="disabled">-</span>
        </td>
        <td>
            <span v-if="!result.isOk" class="red">{{result.error}}</span>
            <span v-else class="disabled">-</span>
        </td>
    </tr>
</table>