Skip to content

Commit

Permalink
Merge pull request #18 from Vonage/feature/add_graphite_support
Browse files Browse the repository at this point in the history
Feature/add graphite support
  • Loading branch information
tomer-amir-vonage authored Feb 6, 2017
2 parents 70d5eff + d5af555 commit dc851c9
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 61 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ i.e. you recognize your servers by domain, and they are all name in the followin
Lets say that you want your user the be able to get instructions on what to do when a certain measurement is at Warning or Critical levels. Just put a link in this field and the name will become clickable, and send your user to any URL you desire (like an internal wiki).

## Supported Data Sources
Currently the plugin was tested with influxDB. Support for other data sources could be added by demand
Currently the plugin was tested with **influxDB** and **Graphite**. Support for other data sources could be added by demand

# Screenshots
### Panel States
Expand Down
4 changes: 2 additions & 2 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ i.e. you recognize your servers by domain, and they are all name in the followin
Lets say that you want your user the be able to get instructions on what to do when a certain measurement is at Warning or Critical levels. Just put a link in this field and the name will become clickable, and send your user to any URL you desire (like an internal wiki).

## Supported Data Sources
Currently the plugin was tested with influxDB. Support for other data sources could be added by demand
Currently the plugin was tested with **influxDB** and **Graphite**. Support for other data sources could be added by demand

# Screenshots
### Panel States
Expand All @@ -40,4 +40,4 @@ Currently the plugin was tested with influxDB. Support for other data sources co

# License

See the [LICENSE](LICENSE.txt) file for license rights and limitations (Apache License, Version 2.0)
See the [LICENSE](https://github.com/Vonage/Grafana_Status_panel/blob/master/LICENSE.txt) file for license rights and limitations (Apache License, Version 2.0)
47 changes: 32 additions & 15 deletions dist/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,68 @@
</div>

<div ng-show="ctrl.duplicates">
<h1>Duplicates</h1>
<strong>Error</strong>: There are multiple measurements with the same alias. Please give each measurement a unique name.
</div>

<div class="editor-row">
<div class="section gf-form-group">
<h5 class="section-heading">{{ measurement.alias }}</h5>
<div class="gf-form">
<span class="gf-form-label width-11">Panel Title</span>
<input type="text" ng-model="ctrl.panel.clusterName" class="gf-form-input max-width-11" ng-change="ctrl.onRender()">
<span class="gf-form-label width-12">Panel Title</span>
<input type="text" ng-model="ctrl.panel.clusterName" class="gf-form-input max-width-12" ng-change="ctrl.onRender()">
</div>
<div class="gf-form">
<span class="gf-form-label width-11">
<span class="gf-form-label width-12">
Remove Prefix
<info-popover mode="right-normal">
A prefix to remove from the name (helps when repeating panel over a template)
</info-popover>
</span>
<input type="text" ng-model="ctrl.panel.namePrefix" class="gf-form-input max-width-11" ng-change="ctrl.onRender()">
<input type="text" ng-model="ctrl.panel.namePrefix" class="gf-form-input max-width-12" ng-change="ctrl.onRender()">
</div>
</div>
</div>

<div ng-hide="ctrl.duplicates">
<div>
<div class="editor-row" ng-repeat="measurement in ctrl.measurements">
<div class="section gf-form-group">
<h5 class="section-heading">{{ measurement.alias }} Thresholds</h5>
<h5 class="section-heading" ng-if="measurement.alias">{{ measurement.alias }} Thresholds</h5>

<div ng-if="!measurement.alias">
<h5 class="section-heading">Thresholds for measurement: {{ measurement.refId }}</h5>
<div>Please enter an alias for this measurement bellow</div>
</div>

<div class="gf-form">
<span class="gf-form-label width-12">
Alias
</span>
<input type="text" name="alias" ng-model="measurement.alias" class="gf-form-input max-width-12" ng-change="ctrl.onRender()" required />
</div>

<div class="gf-form">
<span class="gf-form-label width-11">
<span class="gf-form-label width-12">
Warning
</span>
<input type="number" name="warn" ng-model="measurement.warn" class="gf-form-input max-width-11" ng-change="ctrl.onRender()" required />
<input type="number" name="warn" ng-model="measurement.warn" class="gf-form-input max-width-12" ng-change="ctrl.onRender()" required />
</div>

<div class="gf-form">
<span class="gf-form-label width-11">
<span class="gf-form-label width-12">
Critical
</span>
<input type="number" name="crit" ng-model="measurement.crit" class="gf-form-input max-width-11" ng-change="ctrl.onRender()" required />
<input type="number" name="crit" ng-model="measurement.crit" class="gf-form-input max-width-12" ng-change="ctrl.onRender()" required />
</div>

<div class="gf-form">
<span class="gf-form-label width-11">
<span class="gf-form-label width-12">
Aggregation
<info-popover mode="right-normal">
What to do if the query returns multiple data points.<br />
<strong>Note:</strong> 'None' will select the first value.
</info-popover>
</span>
<div class="gf-form-select-wrapper max-width-11">
<div class="gf-form-select-wrapper max-width-12">
<select class="gf-form-input"
ng-init="measurement.aggregation =
(measurement.aggregation ? measurement.aggregation : ctrl.aggregations[0])"
Expand All @@ -59,17 +74,19 @@ <h5 class="section-heading">{{ measurement.alias }} Thresholds</h5>
required></select>
</div>
</div>

<div class="gf-form">
<span class="gf-form-label width-11">
<span class="gf-form-label width-12">
Measurement URL
<info-popover mode="right-normal">
Make the name of the measurement clickable, and send the user to a link (with explanations what to do when this error occurs)
</info-popover>
</span>
<input type="text" name="crit" ng-model="measurement.url" class="gf-form-input" style="width: 300px" ng-change="ctrl.onRender()" />
</div>

<gf-form-switch class="gf-form"
label-class="width-11"
label-class="width-12"
tooltip="This field will always be displayed with it's value"
label="Show Value" checked="measurement.display"
on-change="ctrl.render()"></gf-form-switch>
Expand Down
12 changes: 8 additions & 4 deletions dist/module.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<div class="status-panel">
<div>
<div ng-show="ctrl.duplicates">
<strong>Error</strong>: There are multiple measurements with the same alias. Please give each measurement a unique name.
</div>

<div ng-hide="ctrl.duplicates">
<h1>
<a ng-href="{{ 'dashboard/' + ctrl.uri | interpolateTemplateVars:this }}" target="_blank" ng-show="ctrl.uri">
{{ ctrl.panel.displayName | interpolateTemplateVars:this }}
Expand All @@ -12,17 +16,17 @@ <h1>
<div ng-repeat="display in ctrl.display">
<a ng-show="display.url" ng-href="{{ display.url }}" target="_blank">{{ display.alias }}</a>
<span ng-hide="display.url">{{ display.alias }}</span>
<span ng-show="display.display"> - {{ display.display_value }}</span>
<span ng-show="display.display"> - {{ display.display_value | number }}</span>
</div>
<div ng-repeat="crit in ctrl.crit">
<a ng-show="crit.url" ng-href="{{ crit.url }}" target="_blank">{{ crit.alias }}</a>
<span ng-hide="crit.url">{{ crit.alias }}</span>
<span ng-show="crit.display"> - {{ crit.display_value }}</span>
<span ng-show="crit.display"> - {{ crit.display_value | number }}</span>
</div>
<div ng-repeat="warn in ctrl.warn">
<a ng-show="warn.url" ng-href="{{ warn.url }}" target="_blank">{{ warn.alias }}</a>
<span ng-hide="warn.url">{{ warn.alias }}</span>
<span ng-show="warn.display"> - {{ warn.display_value }}</span>
<span ng-show="warn.display"> - {{ warn.display_value | number }}</span>
</div>
</div>
</div>
18 changes: 9 additions & 9 deletions dist/status_ctrl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dc851c9

Please sign in to comment.