134 lines
5.2 KiB
HTML
134 lines
5.2 KiB
HTML
<div class="editor-row">
|
|
|
|
<div ng-repeat="target in panel.targets"
|
|
class="tight-form-container"
|
|
ng-class="{'tight-form-disabled': target.hide}"
|
|
ng-controller="ZabbixAPIQueryCtrl"
|
|
ng-init="init()">
|
|
|
|
<div class="tight-form">
|
|
<ul class="tight-form-list pull-right">
|
|
<li class="tight-form-item">
|
|
<div class="dropdown">
|
|
<a class="pointer dropdown-toggle"
|
|
data-toggle="dropdown"
|
|
tabindex="1">
|
|
<i class="fa fa-bars"></i>
|
|
</a>
|
|
<ul class="dropdown-menu pull-right" role="menu">
|
|
<li role="menuitem"><a tabindex="1" ng-click="duplicate()">Duplicate</a></li>
|
|
<li role="menuitem"><a tabindex="1" ng-click="moveMetricQuery($index, $index-1)">Move up</a></li>
|
|
<li role="menuitem"><a tabindex="1" ng-click="moveMetricQuery($index, $index+1)">Move down</a></li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li class="tight-form-item last">
|
|
<a class="pointer" tabindex="1" ng-click="removeDataQuery(target)">
|
|
<i class="fa fa-remove"></i>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="tight-form-list">
|
|
<li class="tight-form-item" style="min-width: 15px; text-align: center">
|
|
{{targetLetters[$index]}}
|
|
</li>
|
|
<li>
|
|
<a class="tight-form-item"
|
|
ng-click="target.hide = !target.hide; get_data();"
|
|
role="menuitem">
|
|
<i class="fa fa-eye"></i>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="tight-form-list" role="menu">
|
|
<!-- Alias -->
|
|
<li>
|
|
<input type="text"
|
|
class="tight-form-input input-medium"
|
|
ng-model="target.alias"
|
|
spellcheck='false'
|
|
placeholder="alias"
|
|
ng-blur="targetBlur()">
|
|
</li>
|
|
<!-- Select Host Group -->
|
|
<li>
|
|
<select style="width: 12em"
|
|
class="tight-form-input input-small"
|
|
ng-change="selectHostGroup()"
|
|
ng-model="target.group"
|
|
bs-tooltip="target.group.name.length > 25 ? target.group.name : ''"
|
|
ng-options="group.visible_name ? group.visible_name : group.name for group in metric.groupList track by group.name" >
|
|
<option value="">-- Select host group --</option>
|
|
</select>
|
|
<a bs-tooltip="target.errors.metric"
|
|
style="color: rgb(229, 189, 28)"
|
|
ng-show="target.errors.metric">
|
|
<i class="fa fa-warning"></i>
|
|
</a>
|
|
</li>
|
|
<!-- Select Host -->
|
|
<li>
|
|
<select style="width: 15em"
|
|
class="tight-form-input input-medium"
|
|
ng-change="selectHost()"
|
|
ng-model="target.host"
|
|
bs-tooltip="target.host.name.length > 25 ? target.host.name : ''"
|
|
ng-options="host.visible_name ? host.visible_name : host.name for host in metric.hostList track by host.name" >
|
|
<option value="">-- Select host --</option>
|
|
</select>
|
|
<a bs-tooltip="target.errors.metric"
|
|
style="color: rgb(229, 189, 28)"
|
|
ng-show="target.errors.metric">
|
|
<i class="icon-warning-sign"></i>
|
|
</a>
|
|
</li>
|
|
<!-- Select Application -->
|
|
<li>
|
|
<select style="width: 15em"
|
|
class="tight-form-input input-medium"
|
|
ng-change="selectApplication()"
|
|
ng-model="target.application"
|
|
bs-tooltip="target.application.name.length > 15 ? target.application.name : ''"
|
|
ng-options="app.visible_name ? app.visible_name : app.name for app in metric.applicationList track by app.name" >
|
|
<option value="">-- Select application --</option>
|
|
</select>
|
|
<a bs-tooltip="target.errors.metric"
|
|
style="color: rgb(229, 189, 28)"
|
|
ng-show="target.errors.metric">
|
|
<i class="icon-warning-sign"></i>
|
|
</a>
|
|
</li>
|
|
<!-- Select Item -->
|
|
<li>
|
|
<select style="width: 20em"
|
|
class="tight-form-input input-medium"
|
|
ng-change="selectItem()"
|
|
ng-model="target.item"
|
|
bs-tooltip="target.item.name.length > 25 ? target.item.name : ''"
|
|
ng-options="item.name for item in metric.itemList track by item.name" >
|
|
<option value="">-- Select item --</option>
|
|
</select>
|
|
<a bs-tooltip="target.errors.metric"
|
|
style="color: rgb(229, 189, 28)"
|
|
ng-show="target.errors.metric">
|
|
<i class="icon-warning-sign"></i>
|
|
</a>
|
|
</li>
|
|
<!-- Item filter -->
|
|
<li>
|
|
<input type="text"
|
|
class="tight-form-input input-large"
|
|
ng-model="target.itemFilter"
|
|
spellcheck='false'
|
|
placeholder="Item filter (regex)"
|
|
ng-blur="targetBlur()">
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|