Compare commits
2 Commits
4e6a75c93d
...
7bb1b38c06
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bb1b38c06 | ||
|
|
3711fdd990 |
2
Makefile
2
Makefile
@@ -3,7 +3,7 @@ all: install build test lint
|
||||
# Install dependencies
|
||||
install:
|
||||
# Frontend
|
||||
yarn install --pure-lockfile
|
||||
yarn install
|
||||
# Backend
|
||||
go install -v ./pkg/
|
||||
go install golang.org/x/lint/golint@latest
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "grafana-zabbix",
|
||||
"version": "6.1.0",
|
||||
"version": "6.1.1",
|
||||
"description": "Zabbix plugin for Grafana",
|
||||
"homepage": "http://grafana-zabbix.org",
|
||||
"bugs": {
|
||||
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
|
||||
var (
|
||||
ErrNonMetricQueryNotSupported = errors.New("non-metrics queries are not supported")
|
||||
test = errors.New("This is a test error")
|
||||
)
|
||||
|
||||
type ZabbixDatasource struct {
|
||||
@@ -147,6 +148,8 @@ func (ds *ZabbixDatasource) QueryData(ctx context.Context, req *backend.QueryDat
|
||||
frames, queryErr = zabbixDS.queryNumericItems(queryCtx, &query)
|
||||
case MODE_ITEMID:
|
||||
frames, queryErr = zabbixDS.queryItemIdData(queryCtx, &query)
|
||||
case MODE_PROBLEMS:
|
||||
queryErr = backend.DownstreamError(test) //send a test error
|
||||
default:
|
||||
queryErr = backend.DownstreamError(ErrNonMetricQueryNotSupported)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user