Merge branch 'master' into alerting_influxdb
40
build.go
@ -5,6 +5,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
|
"crypto/sha1"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -85,17 +86,21 @@ func main() {
|
|||||||
case "package":
|
case "package":
|
||||||
grunt(gruntBuildArg("release")...)
|
grunt(gruntBuildArg("release")...)
|
||||||
createLinuxPackages()
|
createLinuxPackages()
|
||||||
|
sha1FilesInDist()
|
||||||
|
|
||||||
case "pkg-rpm":
|
case "pkg-rpm":
|
||||||
grunt(gruntBuildArg("release")...)
|
grunt(gruntBuildArg("release")...)
|
||||||
createRpmPackages()
|
createRpmPackages()
|
||||||
|
sha1FilesInDist()
|
||||||
|
|
||||||
case "pkg-deb":
|
case "pkg-deb":
|
||||||
grunt(gruntBuildArg("release")...)
|
grunt(gruntBuildArg("release")...)
|
||||||
createDebPackages()
|
createDebPackages()
|
||||||
|
sha1FilesInDist()
|
||||||
|
|
||||||
case "latest":
|
case "latest":
|
||||||
makeLatestDistCopies()
|
makeLatestDistCopies()
|
||||||
|
sha1FilesInDist()
|
||||||
|
|
||||||
case "clean":
|
case "clean":
|
||||||
clean()
|
clean()
|
||||||
@ -501,3 +506,38 @@ func md5File(file string) error {
|
|||||||
|
|
||||||
return out.Close()
|
return out.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func sha1FilesInDist() {
|
||||||
|
filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error {
|
||||||
|
if strings.Contains(path, ".sha1") == false {
|
||||||
|
sha1File(path)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func sha1File(file string) error {
|
||||||
|
fd, err := os.Open(file)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer fd.Close()
|
||||||
|
|
||||||
|
h := sha1.New()
|
||||||
|
_, err = io.Copy(h, fd)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
out, err := os.Create(file + ".sha1")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = fmt.Fprintf(out, "%x\n", h.Sum(nil))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return out.Close()
|
||||||
|
}
|
||||||
|
@ -267,6 +267,7 @@ auto_sign_up = true
|
|||||||
[auth.ldap]
|
[auth.ldap]
|
||||||
enabled = false
|
enabled = false
|
||||||
config_file = /etc/grafana/ldap.toml
|
config_file = /etc/grafana/ldap.toml
|
||||||
|
allow_sign_up = true
|
||||||
|
|
||||||
#################################### SMTP / Emailing #####################
|
#################################### SMTP / Emailing #####################
|
||||||
[smtp]
|
[smtp]
|
||||||
@ -292,6 +293,9 @@ mode = console, file
|
|||||||
# Either "debug", "info", "warn", "error", "critical", default is "info"
|
# Either "debug", "info", "warn", "error", "critical", default is "info"
|
||||||
level = info
|
level = info
|
||||||
|
|
||||||
|
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
|
||||||
|
filters =
|
||||||
|
|
||||||
# For "console" mode only
|
# For "console" mode only
|
||||||
[log.console]
|
[log.console]
|
||||||
level =
|
level =
|
||||||
@ -421,7 +425,7 @@ url = https://grafana.net
|
|||||||
#################################### External Image Storage ##############
|
#################################### External Image Storage ##############
|
||||||
[external_image_storage]
|
[external_image_storage]
|
||||||
# You can choose between (s3, webdav)
|
# You can choose between (s3, webdav)
|
||||||
provider = s3
|
provider =
|
||||||
|
|
||||||
[external_image_storage.s3]
|
[external_image_storage.s3]
|
||||||
bucket_url =
|
bucket_url =
|
||||||
|
@ -252,6 +252,7 @@
|
|||||||
[auth.ldap]
|
[auth.ldap]
|
||||||
;enabled = false
|
;enabled = false
|
||||||
;config_file = /etc/grafana/ldap.toml
|
;config_file = /etc/grafana/ldap.toml
|
||||||
|
;allow_sign_up = true
|
||||||
|
|
||||||
#################################### SMTP / Emailing ##########################
|
#################################### SMTP / Emailing ##########################
|
||||||
[smtp]
|
[smtp]
|
||||||
@ -276,6 +277,10 @@
|
|||||||
# Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
|
# Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
|
||||||
;level = info
|
;level = info
|
||||||
|
|
||||||
|
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
|
||||||
|
;filters =
|
||||||
|
|
||||||
|
|
||||||
# For "console" mode only
|
# For "console" mode only
|
||||||
[log.console]
|
[log.console]
|
||||||
;level =
|
;level =
|
||||||
@ -375,8 +380,8 @@
|
|||||||
#################################### External image storage ##########################
|
#################################### External image storage ##########################
|
||||||
[external_image_storage]
|
[external_image_storage]
|
||||||
# Used for uploading images to public servers so they can be included in slack/email messages.
|
# Used for uploading images to public servers so they can be included in slack/email messages.
|
||||||
# you can choose between (s3, webdav or internal)
|
# you can choose between (s3, webdav)
|
||||||
;provider = s3
|
;provider =
|
||||||
|
|
||||||
[external_image_storage.s3]
|
[external_image_storage.s3]
|
||||||
;bucket_url =
|
;bucket_url =
|
||||||
|
@ -30,6 +30,9 @@ using environment variables using the syntax:
|
|||||||
Where the section name is the text within the brackets. Everything
|
Where the section name is the text within the brackets. Everything
|
||||||
should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
|
should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
|
||||||
|
|
||||||
|
# default section
|
||||||
|
instance_name = ${HOSTNAME}
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
admin_user = admin
|
admin_user = admin
|
||||||
|
|
||||||
@ -39,6 +42,7 @@ should be upper case, `.` should be replaced by `_`. For example, given these co
|
|||||||
|
|
||||||
Then you can override them using:
|
Then you can override them using:
|
||||||
|
|
||||||
|
export GF_DEFAULT_INSTANCE_NAME=my-instance
|
||||||
export GF_SECURITY_ADMIN_USER=true
|
export GF_SECURITY_ADMIN_USER=true
|
||||||
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
|
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
|
||||||
|
|
||||||
@ -528,7 +532,7 @@ Use space to separate multiple modes, e.g. "console file"
|
|||||||
### level
|
### level
|
||||||
Either "debug", "info", "warn", "error", "critical", default is "info"
|
Either "debug", "info", "warn", "error", "critical", default is "info"
|
||||||
|
|
||||||
### filter
|
### filters
|
||||||
optional settings to set different levels for specific loggers.
|
optional settings to set different levels for specific loggers.
|
||||||
Ex `filters = sqlstore:debug`
|
Ex `filters = sqlstore:debug`
|
||||||
|
|
||||||
|
@ -10,6 +10,13 @@ type ImageUploader interface {
|
|||||||
Upload(path string) (string, error)
|
Upload(path string) (string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type NopImageUploader struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (NopImageUploader) Upload(path string) (string, error) {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
|
||||||
func NewImageUploader() (ImageUploader, error) {
|
func NewImageUploader() (ImageUploader, error) {
|
||||||
|
|
||||||
switch setting.ImageUploadProvider {
|
switch setting.ImageUploadProvider {
|
||||||
@ -53,5 +60,5 @@ func NewImageUploader() (ImageUploader, error) {
|
|||||||
return NewWebdavImageUploader(url, username, password)
|
return NewWebdavImageUploader(url, username, password)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, fmt.Errorf("could not find specified provider")
|
return NopImageUploader{}, nil
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
"github.com/grafana/grafana/pkg/bus"
|
"github.com/grafana/grafana/pkg/bus"
|
||||||
"github.com/grafana/grafana/pkg/log"
|
"github.com/grafana/grafana/pkg/log"
|
||||||
m "github.com/grafana/grafana/pkg/models"
|
m "github.com/grafana/grafana/pkg/models"
|
||||||
|
"github.com/grafana/grafana/pkg/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ldapAuther struct {
|
type ldapAuther struct {
|
||||||
@ -132,8 +133,10 @@ func (a *ldapAuther) getGrafanaUserFor(ldapUser *ldapUserInfo) (*m.User, error)
|
|||||||
// get user from grafana db
|
// get user from grafana db
|
||||||
userQuery := m.GetUserByLoginQuery{LoginOrEmail: ldapUser.Username}
|
userQuery := m.GetUserByLoginQuery{LoginOrEmail: ldapUser.Username}
|
||||||
if err := bus.Dispatch(&userQuery); err != nil {
|
if err := bus.Dispatch(&userQuery); err != nil {
|
||||||
if err == m.ErrUserNotFound {
|
if err == m.ErrUserNotFound && setting.LdapAllowSignup {
|
||||||
return a.createGrafanaUser(ldapUser)
|
return a.createGrafanaUser(ldapUser)
|
||||||
|
} else if err == m.ErrUserNotFound {
|
||||||
|
return nil, ErrInvalidCredentials
|
||||||
} else {
|
} else {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,7 @@ var (
|
|||||||
// LDAP
|
// LDAP
|
||||||
LdapEnabled bool
|
LdapEnabled bool
|
||||||
LdapConfigFile string
|
LdapConfigFile string
|
||||||
|
LdapAllowSignup bool = true
|
||||||
|
|
||||||
// SMTP email settings
|
// SMTP email settings
|
||||||
Smtp SmtpSettings
|
Smtp SmtpSettings
|
||||||
@ -551,6 +552,7 @@ func NewConfigContext(args *CommandLineArgs) error {
|
|||||||
ldapSec := Cfg.Section("auth.ldap")
|
ldapSec := Cfg.Section("auth.ldap")
|
||||||
LdapEnabled = ldapSec.Key("enabled").MustBool(false)
|
LdapEnabled = ldapSec.Key("enabled").MustBool(false)
|
||||||
LdapConfigFile = ldapSec.Key("config_file").String()
|
LdapConfigFile = ldapSec.Key("config_file").String()
|
||||||
|
LdapAllowSignup = ldapSec.Key("allow_sign_up").MustBool(true)
|
||||||
|
|
||||||
alerting := Cfg.Section("alerting")
|
alerting := Cfg.Section("alerting")
|
||||||
AlertingEnabled = alerting.Key("enabled").MustBool(false)
|
AlertingEnabled = alerting.Key("enabled").MustBool(false)
|
||||||
|
9
pkg/tsdb/testdata/scenarios.go
vendored
@ -90,10 +90,13 @@ func init() {
|
|||||||
queryRes := tsdb.NewQueryResult()
|
queryRes := tsdb.NewQueryResult()
|
||||||
|
|
||||||
stringInput := query.Model.Get("stringInput").MustString()
|
stringInput := query.Model.Get("stringInput").MustString()
|
||||||
values := []float64{}
|
values := []null.Float{}
|
||||||
for _, strVal := range strings.Split(stringInput, ",") {
|
for _, strVal := range strings.Split(stringInput, ",") {
|
||||||
|
if strVal == "null" {
|
||||||
|
values = append(values, null.FloatFromPtr(nil))
|
||||||
|
}
|
||||||
if val, err := strconv.ParseFloat(strVal, 64); err == nil {
|
if val, err := strconv.ParseFloat(strVal, 64); err == nil {
|
||||||
values = append(values, val)
|
values = append(values, null.FloatFrom(val))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +110,7 @@ func init() {
|
|||||||
step := (endTime - startTime) / int64(len(values)-1)
|
step := (endTime - startTime) / int64(len(values)-1)
|
||||||
|
|
||||||
for _, val := range values {
|
for _, val := range values {
|
||||||
series.Points = append(series.Points, tsdb.NewTimePoint(null.FloatFrom(val), float64(startTime)))
|
series.Points = append(series.Points, tsdb.TimePoint{val, null.FloatFrom(float64(startTime))})
|
||||||
startTime += step
|
startTime += step
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,25 +186,27 @@ function (_, $, coreModule) {
|
|||||||
|
|
||||||
$scope.getOptionsInternal = function() {
|
$scope.getOptionsInternal = function() {
|
||||||
if ($scope.options) {
|
if ($scope.options) {
|
||||||
var optionSegments = _.map($scope.options, function(option) {
|
cachedOptions = _.map($scope.options, function(option) {
|
||||||
return uiSegmentSrv.newSegment({value: option.text});
|
return uiSegmentSrv.newSegment({value: option.text});
|
||||||
});
|
});
|
||||||
return $q.when(optionSegments);
|
return $q.when(cachedOptions);
|
||||||
} else {
|
} else {
|
||||||
return $scope.getOptions().then(function(options) {
|
return $scope.getOptions().then(function(options) {
|
||||||
cachedOptions = options;
|
cachedOptions =_.map(options, function(option) {
|
||||||
return _.map(options, function(option) {
|
if (option.html) {
|
||||||
|
return option;
|
||||||
|
}
|
||||||
return uiSegmentSrv.newSegment({value: option.text});
|
return uiSegmentSrv.newSegment({value: option.text});
|
||||||
});
|
});
|
||||||
|
return cachedOptions;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.onSegmentChange = function() {
|
$scope.onSegmentChange = function() {
|
||||||
var options = $scope.options || cachedOptions;
|
|
||||||
|
|
||||||
if (options) {
|
if (cachedOptions) {
|
||||||
var option = _.find(options, {text: $scope.segment.value});
|
var option = _.find(cachedOptions, {value: $scope.segment.value});
|
||||||
if (option && option.value !== $scope.property) {
|
if (option && option.value !== $scope.property) {
|
||||||
$scope.property = option.value;
|
$scope.property = option.value;
|
||||||
} else if (attrs.custom !== 'false') {
|
} else if (attrs.custom !== 'false') {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"revision": 4,
|
"revision": 5,
|
||||||
"title": "TestData - Graph Panel Last 1h",
|
"title": "TestData - Graph Panel Last 1h",
|
||||||
"tags": [
|
"tags": [
|
||||||
"grafana-test"
|
"grafana-test"
|
||||||
@ -320,124 +320,376 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "",
|
|
||||||
"error": false,
|
|
||||||
"span": 4,
|
|
||||||
"editable": true,
|
|
||||||
"type": "text",
|
|
||||||
"isNew": true,
|
|
||||||
"id": 6,
|
|
||||||
"mode": "markdown",
|
|
||||||
"content": "Just verify that the tooltip time has millisecond resolution ",
|
"content": "Just verify that the tooltip time has millisecond resolution ",
|
||||||
"links": []
|
"editable": true,
|
||||||
|
"error": false,
|
||||||
|
"id": 6,
|
||||||
|
"isNew": true,
|
||||||
|
"links": [],
|
||||||
|
"mode": "markdown",
|
||||||
|
"span": 4,
|
||||||
|
"title": "",
|
||||||
|
"type": "text"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "New row"
|
"title": "New row"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "New row",
|
|
||||||
"height": 336,
|
|
||||||
"editable": true,
|
|
||||||
"collapse": false,
|
"collapse": false,
|
||||||
|
"editable": true,
|
||||||
|
"height": 336,
|
||||||
"panels": [
|
"panels": [
|
||||||
{
|
{
|
||||||
"title": "2 yaxis and axis lables",
|
"aliasColors": {},
|
||||||
"error": false,
|
"bars": false,
|
||||||
"span": 7.99561403508772,
|
|
||||||
"editable": true,
|
|
||||||
"type": "graph",
|
|
||||||
"isNew": true,
|
|
||||||
"id": 5,
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"target": "",
|
|
||||||
"refId": "A",
|
|
||||||
"scenarioId": "csv_metric_values",
|
|
||||||
"stringInput": "1,20,90,30,5,0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "",
|
|
||||||
"refId": "B",
|
|
||||||
"scenarioId": "csv_metric_values",
|
|
||||||
"stringInput": "2000,3000,4000,1000,3000,10000"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"datasource": "Grafana TestData",
|
"datasource": "Grafana TestData",
|
||||||
"renderer": "flot",
|
"editable": true,
|
||||||
"yaxes": [
|
"error": false,
|
||||||
{
|
"fill": 1,
|
||||||
"label": "Perecent",
|
"id": 5,
|
||||||
|
"isNew": true,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"logBase": 1,
|
"total": false,
|
||||||
"min": null,
|
"values": false
|
||||||
"max": null,
|
|
||||||
"format": "percent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Pressure",
|
|
||||||
"show": true,
|
|
||||||
"logBase": 1,
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"format": "short"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"xaxis": {
|
|
||||||
"show": true,
|
|
||||||
"mode": "time",
|
|
||||||
"name": null,
|
|
||||||
"values": []
|
|
||||||
},
|
},
|
||||||
"lines": true,
|
"lines": true,
|
||||||
"fill": 1,
|
|
||||||
"linewidth": 2,
|
"linewidth": 2,
|
||||||
"points": false,
|
"links": [],
|
||||||
"pointradius": 5,
|
|
||||||
"bars": false,
|
|
||||||
"stack": false,
|
|
||||||
"percentage": false,
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"values": false,
|
|
||||||
"min": false,
|
|
||||||
"max": false,
|
|
||||||
"current": false,
|
|
||||||
"total": false,
|
|
||||||
"avg": false
|
|
||||||
},
|
|
||||||
"nullPointMode": "connected",
|
"nullPointMode": "connected",
|
||||||
"steppedLine": false,
|
"percentage": false,
|
||||||
"tooltip": {
|
"pointradius": 5,
|
||||||
"value_type": "cumulative",
|
"points": false,
|
||||||
"shared": true,
|
"renderer": "flot",
|
||||||
"sort": 0,
|
|
||||||
"msResolution": false
|
|
||||||
},
|
|
||||||
"timeFrom": null,
|
|
||||||
"timeShift": null,
|
|
||||||
"aliasColors": {},
|
|
||||||
"seriesOverrides": [
|
"seriesOverrides": [
|
||||||
{
|
{
|
||||||
"alias": "B-series",
|
"alias": "B-series",
|
||||||
"yaxis": 2
|
"yaxis": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"thresholds": [],
|
"span": 7.99561403508772,
|
||||||
"links": []
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_metric_values",
|
||||||
|
"stringInput": "1,20,90,30,5,0",
|
||||||
|
"target": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "",
|
"refId": "B",
|
||||||
"error": false,
|
"scenarioId": "csv_metric_values",
|
||||||
"span": 4.00438596491228,
|
"stringInput": "2000,3000,4000,1000,3000,10000",
|
||||||
"editable": true,
|
"target": ""
|
||||||
"type": "text",
|
}
|
||||||
"isNew": true,
|
],
|
||||||
"id": 7,
|
"thresholds": [],
|
||||||
"mode": "markdown",
|
"timeFrom": null,
|
||||||
"content": "Verify that axis labels look ok",
|
"timeShift": null,
|
||||||
"links": []
|
"title": "2 yaxis and axis lables",
|
||||||
|
"tooltip": {
|
||||||
|
"msResolution": false,
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "cumulative"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "percent",
|
||||||
|
"label": "Perecent",
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": "Pressure",
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"content": "Verify that axis labels look ok",
|
||||||
|
"editable": true,
|
||||||
|
"error": false,
|
||||||
|
"id": 7,
|
||||||
|
"isNew": true,
|
||||||
|
"links": [],
|
||||||
|
"mode": "markdown",
|
||||||
|
"span": 4.00438596491228,
|
||||||
|
"title": "",
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "New row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collapse": false,
|
||||||
|
"editable": true,
|
||||||
|
"height": "250px",
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"datasource": "Grafana TestData",
|
||||||
|
"editable": true,
|
||||||
|
"error": false,
|
||||||
|
"fill": 1,
|
||||||
|
"id": 8,
|
||||||
|
"isNew": true,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 2,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "connected",
|
||||||
|
"percentage": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"span": 4,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "B",
|
||||||
|
"scenarioId": "csv_metric_values",
|
||||||
|
"stringInput": "1,20,null,null,null,null,null,null,100,10,10,20,30,40,10",
|
||||||
|
"target": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "null value connected",
|
||||||
|
"tooltip": {
|
||||||
|
"msResolution": false,
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "cumulative"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"datasource": "Grafana TestData",
|
||||||
|
"editable": true,
|
||||||
|
"error": false,
|
||||||
|
"fill": 1,
|
||||||
|
"id": 10,
|
||||||
|
"isNew": true,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 2,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null as zero",
|
||||||
|
"percentage": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"span": 3,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "B",
|
||||||
|
"scenarioId": "csv_metric_values",
|
||||||
|
"stringInput": "1,20,null,null,null,null,null,null,100,10,10,20,30,40,10",
|
||||||
|
"target": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "null value null as zero",
|
||||||
|
"tooltip": {
|
||||||
|
"msResolution": false,
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "cumulative"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"datasource": "Grafana TestData",
|
||||||
|
"editable": true,
|
||||||
|
"error": false,
|
||||||
|
"fill": 1,
|
||||||
|
"id": 9,
|
||||||
|
"isNew": true,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 2,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"percentage": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [
|
||||||
|
{
|
||||||
|
"alias": "B-series",
|
||||||
|
"zindex": -3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"span": 5,
|
||||||
|
"stack": true,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"hide": false,
|
||||||
|
"refId": "B",
|
||||||
|
"scenarioId": "csv_metric_values",
|
||||||
|
"stringInput": "1,20,null,null,null,null,null,null,100,10,10,20,30,40,10",
|
||||||
|
"target": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": "",
|
||||||
|
"hide": false,
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_metric_values",
|
||||||
|
"stringInput": "1,20,90,30,5,10,20,30,40,40,40,100,10,20,20",
|
||||||
|
"target": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": "",
|
||||||
|
"hide": false,
|
||||||
|
"refId": "C",
|
||||||
|
"scenarioId": "csv_metric_values",
|
||||||
|
"stringInput": "1,20,90,30,5,10,20,30,40,40,40,100,10,20,20",
|
||||||
|
"target": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "Stacking value ontop of nulls",
|
||||||
|
"tooltip": {
|
||||||
|
"msResolution": false,
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "cumulative"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "New row"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": {
|
"time": {
|
||||||
@ -477,7 +729,7 @@
|
|||||||
},
|
},
|
||||||
"refresh": false,
|
"refresh": false,
|
||||||
"schemaVersion": 13,
|
"schemaVersion": 13,
|
||||||
"version": 3,
|
"version": 13,
|
||||||
"links": [],
|
"links": [],
|
||||||
"gnetId": null
|
"gnetId": null
|
||||||
}
|
}
|
||||||
|
2
public/app/plugins/app/testdata/plugin.json
vendored
@ -9,7 +9,7 @@
|
|||||||
"name": "Grafana Project",
|
"name": "Grafana Project",
|
||||||
"url": "http://grafana.org"
|
"url": "http://grafana.org"
|
||||||
},
|
},
|
||||||
"version": "1.0.13",
|
"version": "1.0.14",
|
||||||
"updated": "2016-09-26"
|
"updated": "2016-09-26"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 4.3 KiB |
@ -419,7 +419,7 @@ function (angular, _, dateMath) {
|
|||||||
return target.metric === metricData.metric;
|
return target.metric === metricData.metric;
|
||||||
} else {
|
} else {
|
||||||
return target.metric === metricData.metric &&
|
return target.metric === metricData.metric &&
|
||||||
_.all(target.tags, function(tagV, tagK) {
|
_.every(target.tags, function(tagV, tagK) {
|
||||||
interpolatedTagValue = templateSrv.replace(tagV, options.scopedVars, 'pipe');
|
interpolatedTagValue = templateSrv.replace(tagV, options.scopedVars, 'pipe');
|
||||||
return metricData.tags[tagK] === interpolatedTagValue || interpolatedTagValue === "*";
|
return metricData.tags[tagK] === interpolatedTagValue || interpolatedTagValue === "*";
|
||||||
});
|
});
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.4 KiB |
@ -71,13 +71,9 @@
|
|||||||
|
|
||||||
<div class="section gf-form-group">
|
<div class="section gf-form-group">
|
||||||
<h5 class="section-heading">Stacking & Null value</h5>
|
<h5 class="section-heading">Stacking & Null value</h5>
|
||||||
<gf-form-switch class="gf-form"
|
<gf-form-switch class="gf-form" label="Stack" label-class="width-7" checked="ctrl.panel.stack" on-change="ctrl.render()">
|
||||||
label="Stack" label-class="width-7"
|
|
||||||
checked="ctrl.panel.stack" on-change="ctrl.render()">
|
|
||||||
</gf-form-switch>
|
</gf-form-switch>
|
||||||
<gf-form-switch class="gf-form" ng-show="ctrl.panel.stack"
|
<gf-form-switch class="gf-form" ng-show="ctrl.panel.stack" label="Percent" label-class="width-7" checked="ctrl.panel.percentage" on-change="ctrl.render()">
|
||||||
label="Percent" label-class="width-7"
|
|
||||||
checked="ctrl.panel.percentage" on-change="ctrl.render()">
|
|
||||||
</gf-form-switch>
|
</gf-form-switch>
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<label class="gf-form-label width-7">Null value</label>
|
<label class="gf-form-label width-7">Null value</label>
|
||||||
|
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 960 B After Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 903 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 390 B |
BIN
vendor/github.com/go-xorm/xorm/docs/images/cache_design.png
generated
vendored
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 118 KiB |
BIN
vendor/gopkg.in/macaron.v1/macaronlogo.png
generated
vendored
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 69 KiB |