Refactoring - resolve code inspection problems.
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
<div class="editor-row">
|
||||
<div class="section">
|
||||
<h5>Zabbix trigger <tip>Example: Lack of free swap space</tip></h5>
|
||||
<div class="editor-option">
|
||||
<input type="text" class="span10" ng-model="currentAnnotation.query" placeholder="Lack of free swap space"></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h5>Zabbix trigger
|
||||
<tip>Example: Lack of free swap space</tip>
|
||||
</h5>
|
||||
<div class="editor-option">
|
||||
<input type="text" class="span10"
|
||||
ng-model="currentAnnotation.query"
|
||||
placeholder="Lack of free swap space">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-row">
|
||||
<div class="section">
|
||||
<h5>Options</h5>
|
||||
<input type="checkbox" class="cr1" id="currentAnnotation.showOkEvents" ng-model="currentAnnotation.showOkEvents" ng-checked="currentAnnotation.showOkEvents">
|
||||
<label for="currentAnnotation.showOkEvents" class="cr1">Show OK events <tip>Show events, generated when trigger release to OK state</tip></label>
|
||||
<input type="checkbox" class="cr1" id="currentAnnotation.showOkEvents"
|
||||
ng-model="currentAnnotation.showOkEvents"
|
||||
ng-checked="currentAnnotation.showOkEvents">
|
||||
<label for="currentAnnotation.showOkEvents" class="cr1">Show OK events
|
||||
<tip>Show events, generated when trigger release to OK state</tip>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,13 +10,17 @@
|
||||
User
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-large" ng-model='current.jsonData.username' placeholder=""></input>
|
||||
<input type="text" class="tight-form-input input-large"
|
||||
ng-model='current.jsonData.username'
|
||||
placeholder="">
|
||||
</li>
|
||||
<li class="tight-form-item">
|
||||
Password
|
||||
</li>
|
||||
<li>
|
||||
<input type="password" class="tight-form-input input-large" ng-model='current.jsonData.password' placeholder=""></input>
|
||||
<input type="password" class="tight-form-input input-large"
|
||||
ng-model='current.jsonData.password'
|
||||
placeholder="">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
@@ -28,14 +32,18 @@
|
||||
</li>
|
||||
<li class="tight-form-item">
|
||||
Enable
|
||||
<input class="cr1" id="current.jsonData.trends" type="checkbox" ng-model="current.jsonData.trends" ng-checked="current.jsonData.trends">
|
||||
<input class="cr1" id="current.jsonData.trends" type="checkbox"
|
||||
ng-model="current.jsonData.trends"
|
||||
ng-checked="current.jsonData.trends">
|
||||
<label for="current.jsonData.trends" class="cr1"></label>
|
||||
</li>
|
||||
<li class="tight-form-item" ng-if="current.jsonData.trends">
|
||||
Use trends from
|
||||
</li>
|
||||
<li ng-if="current.jsonData.trends">
|
||||
<input type="text" class="tight-form-input input-small" ng-model='current.basicAuthUser' placeholder="7d"></input>
|
||||
<input type="text" class="tight-form-input input-small"
|
||||
ng-model='current.basicAuthUser'
|
||||
placeholder="7d">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
@@ -46,7 +54,9 @@
|
||||
Metrics limit
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-small" ng-model='current.jsonData.limitMetrics' placeholder="100"></input>
|
||||
<input type="text" class="tight-form-input input-small"
|
||||
ng-model='current.jsonData.limitMetrics'
|
||||
placeholder="100">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<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 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">
|
||||
<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">
|
||||
@@ -34,10 +34,10 @@
|
||||
{{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 class="tight-form-item"
|
||||
ng-click="target.hide = !target.hide; get_data();"
|
||||
role="menuitem">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -55,13 +55,15 @@
|
||||
<!-- Select Host Group -->
|
||||
<li class="tight-form-item input-small" style="width: 5em">Group</li>
|
||||
<li>
|
||||
<select class="tight-form-input input-large"
|
||||
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" >
|
||||
<label>
|
||||
<select class="tight-form-input input-large"
|
||||
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>
|
||||
</select>
|
||||
</label>
|
||||
<a bs-tooltip="target.errors.metric"
|
||||
style="color: rgb(229, 189, 28)"
|
||||
ng-show="target.errors.metric">
|
||||
@@ -71,23 +73,26 @@
|
||||
<!-- Select Host -->
|
||||
<li class="tight-form-item input-small" style="width: 3em">Host</li>
|
||||
<li>
|
||||
<label>
|
||||
<select class="tight-form-input input-large"
|
||||
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>
|
||||
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>
|
||||
</label>
|
||||
<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>
|
||||
<!-- Host filter -->
|
||||
<li class="tight-form-item">
|
||||
Filter
|
||||
<i class="fa fa-question-circle" bs-tooltip="'Filtering hosts by regex. Select All in items and specify regex for host names.'"></i>
|
||||
<i class="fa fa-question-circle"
|
||||
bs-tooltip="'Filtering hosts by regex. Select All in items and specify regex for host names.'"></i>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text"
|
||||
@@ -100,9 +105,7 @@
|
||||
</ul>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list" role="menu">
|
||||
<li class="tight-form-item" style="min-width: 15px; text-align: center"> </li>
|
||||
<li class="tight-form-item">
|
||||
@@ -113,39 +116,44 @@
|
||||
<!-- Select Application -->
|
||||
<li class="tight-form-item input-small" style="width: 5em">Application</li>
|
||||
<li>
|
||||
<label>
|
||||
<select class="tight-form-input input-large"
|
||||
ng-change="selectApplication()"
|
||||
ng-select="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>
|
||||
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>
|
||||
</label>
|
||||
<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 class="tight-form-item input-small" style="width: 3em">Item</li>
|
||||
<li>
|
||||
<label>
|
||||
<select class="tight-form-input input-large"
|
||||
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>
|
||||
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>
|
||||
</label>
|
||||
<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 class="tight-form-item">
|
||||
Filter
|
||||
<i class="fa fa-question-circle" bs-tooltip="'Filtering items by regex. Select All in items and specify regex for item names.'"></i>
|
||||
<i class="fa fa-question-circle"
|
||||
bs-tooltip="'Filtering items by regex. Select All in items and specify regex for item names.'"></i>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text"
|
||||
@@ -158,7 +166,8 @@
|
||||
<!-- Scale -->
|
||||
<li class="tight-form-item">
|
||||
Scale
|
||||
<i class="fa fa-question-circle" bs-tooltip="'Set a custom multiplier for series values, for example -1 to invert series'"></i>
|
||||
<i class="fa fa-question-circle"
|
||||
bs-tooltip="'Set a custom multiplier for series values, for example -1 to invert series'"></i>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text"
|
||||
@@ -186,13 +195,13 @@
|
||||
</li>
|
||||
<li>
|
||||
<input type="text"
|
||||
class="input-mini tight-form-input"
|
||||
ng-model="panel.maxDataPoints"
|
||||
bs-tooltip="'Override max data points, automatically set to graph width in pixels.'"
|
||||
data-placement="right"
|
||||
ng-model-onblur ng-change="get_data()"
|
||||
spellcheck='false'
|
||||
placeholder="auto">
|
||||
class="input-mini tight-form-input"
|
||||
ng-model="panel.maxDataPoints"
|
||||
bs-tooltip="'Override max data points, automatically set to graph width in pixels.'"
|
||||
data-placement="right"
|
||||
ng-model-onblur ng-change="get_data()"
|
||||
spellcheck='false'
|
||||
placeholder="auto">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
@@ -218,7 +227,9 @@
|
||||
<div class="grafana-info-box span6" ng-if="editorHelpIndex === 1">
|
||||
<h5>Max data points</h5>
|
||||
<ul>
|
||||
<li>Grafana-Zabbix plugin uses maxDataPoints parameter to consolidate the real number of values down to this number</li>
|
||||
<li>Grafana-Zabbix plugin uses maxDataPoints parameter to consolidate the real number of values down to this
|
||||
number
|
||||
</li>
|
||||
<li>If there are more real values, then by default they will be consolidated using averages</li>
|
||||
<li>This could hide real peaks and max values in your series</li>
|
||||
<li>Point consolidation will effect series legend values (min,max,total,current)</li>
|
||||
|
||||
Reference in New Issue
Block a user