Skip to content

Commit

Permalink
Add @name to all function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
trotttrotttrott committed May 3, 2020
1 parent b34b896 commit 133ea7f
Show file tree
Hide file tree
Showing 25 changed files with 80 additions and 1 deletion.
3 changes: 3 additions & 0 deletions grafonnet/alert_condition.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Currently the only condition type that exists is a Query condition
* that allows to specify a query letter, time range and an aggregation function.
*
* @name alertCondition.new
*
* @param evaluatorParams Value of threshold
* @param evaluatorType Type of threshold
* @param operatorType Operator between conditions
Expand All @@ -12,6 +14,7 @@
* @param queryTimeEnd End of time range
* @param reducerParams Params of an aggregation function
* @param reducerType Name of an aggregation function
*
* @return A json that represents a condition of alert
*/
new(
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/alertlist.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name alertlist.new
*/
new(
title='',
span=null,
Expand Down
5 changes: 5 additions & 0 deletions grafonnet/annotation.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
name: 'Annotations & Alerts',
type: 'dashboard',
},

/**
* @name annotation.datasource
*/

datasource(
name,
datasource,
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/cloudwatch.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* Return a CloudWatch Target
*
* @name cloudwatch.target
*
* @param region
* @param namespace
* @param metric
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/dashboard.libsonnet
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
local timepickerlib = import 'timepicker.libsonnet';

{
/**
* @name dashboard.new
*/
new(
title,
editable=false,
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/dashlist.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Returns a new dashlist panel that can be added in a row.
* It requires the dashlist panel plugin in grafana, which is built-in.
*
* @name dashlist.new
*
* @param title The title of the dashlist panel.
* @param description Description of the panel
* @param query Query to search by
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/elasticsearch.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name elasticsearch.target
*/
target(
query,
timeField,
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/gauge.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name gauge.new
*/
new(
title,
datasource=null,
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/graph_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Returns a new graph panel that can be added in a row.
* It requires the graph panel plugin in grafana, which is built-in.
*
* @name graphPanel.new
*
* @param title The title of the graph panel.
* @param span Width of the panel
* @param datasource Datasource
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/graphite.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* Return an Graphite Target
*
* @name graphite.target
*
* @param target Graphite Query. Nested queries are possible by adding the query reference (refId).
* @param targetFull Expanding the @target. Used in nested queries.
* @param hide Disable query on graph.
Expand Down
4 changes: 3 additions & 1 deletion grafonnet/heatmap_panel.libsonnet
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
/*
/**
* Returns a heatmap panel.
* Requires the heatmap panel plugin in Grafana, which is built-in.
*
* @name heatmapPanel.new
*
* @param title The title of the heatmap panel
* @param datasource Datasource
* @param min_span Min span
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/influxdb.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* Return an InfluxDB Target
*
* @name influxdb.target
*
* @param query Raw InfluxQL statement
* @param alias Alias By pattern
* @param datasource Datasource
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/link.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name link.dashboards
*/
dashboards(
title,
tags,
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/log_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Returns a new log panel that can be added in a row.
* It requires the log panel plugin in grafana, which is built-in.
*
* @name logPanel.new
*
* @param title The title of the log panel.
* @param span Width of the panel
* @param datasource Datasource
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/loki.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name loki.target
*/
target(
expr,
hide=null,
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/pie_chart_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Returns a new pie chart panel that can be added in a row.
* It requires the pie chart panel plugin in grafana, which needs to be explicitly installed.
*
* @name pieChartPanel.new
*
* @param title The title of the pie chart panel.
* @param description Description of the panel
* @param span Width of the panel
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/pluginlist.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Returns a new pluginlist panel that can be added in a row.
* It requires the pluginlist panel plugin in grafana, which is built-in.
*
* @name pluginlist.new
*
* @param title The title of the pluginlist panel.
* @param description Description of the panel
* @param limit Set maximum items in a list
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/prometheus.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name prometheus.target
*/
target(
expr,
format='time_series',
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/row.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name row.new
*/
new(
title='Dashboard Row',
height=null,
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/singlestat.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name singlestat.new
*/
new(
title,
format='none',
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/sql.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name sql.target
*/
target(
rawSql,
datasource=null,
Expand Down
2 changes: 2 additions & 0 deletions grafonnet/table_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Returns a new table panel that can be added in a row.
* It requires the table panel plugin in grafana, which is built-in.
*
* @name table.new
*
* @param title The title of the graph panel.
* @param span Width of the panel
* @param height Height of the panel
Expand Down
15 changes: 15 additions & 0 deletions grafonnet/template.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name template.new
*/
new(
name,
datasource,
Expand Down Expand Up @@ -34,6 +37,9 @@
type: 'query',
useTags: false,
},
/**
* @name template.interval
*/
interval(
name,
query,
Expand Down Expand Up @@ -66,6 +72,9 @@
else
current,
},
/**
* @name template.datasource
*/
datasource(
name,
query,
Expand Down Expand Up @@ -97,6 +106,9 @@
else
refresh,
filterAuto(str):: str != 'auto',
/**
* @name template.custom
*/
custom(
name,
query,
Expand Down Expand Up @@ -131,6 +143,9 @@
query: query,
type: 'custom',
},
/**
* @name template.text
*/
text(
name,
label=''
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/text.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name text.new
*/
new(
title='',
span=null,
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/timepicker.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
/**
* @name timepicker.new
*/
new(
refresh_intervals=[
'5s',
Expand Down

0 comments on commit 133ea7f

Please sign in to comment.