From d002cab28f1a8fed096ebf13b99e79c335b59d9a Mon Sep 17 00:00:00 2001 From: f1 Date: Sun, 5 Jun 2016 00:57:04 +0200 Subject: [PATCH 01/35] add reads/min and etc to unitFormats --- public/app/core/utils/kbn.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index f54979b0e97..47a5c734c83 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -649,6 +649,9 @@ function($, _) { {text: 'reads/sec (rps)', value: 'rps' }, {text: 'writes/sec (wps)', value: 'wps' }, {text: 'I/O ops/sec (iops)', value: 'iops'}, + {text: 'ops/min (opm)', value: 'opm' }, + {text: 'reads/min (rpm)', value: 'rpm' }, + {text: 'writes/min (wpm)', value: 'wpm' }, ] }, { From 13d1fec2cbd8580aa5a55425e9896d9288f92a19 Mon Sep 17 00:00:00 2001 From: hailthemelody Date: Mon, 20 Jun 2016 20:54:01 -0400 Subject: [PATCH 02/35] fix z-index order in Series Overrides --- public/app/plugins/panel/graph/series_overrides_ctrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/series_overrides_ctrl.js b/public/app/plugins/panel/graph/series_overrides_ctrl.js index 940da1a9e4b..0a338ff86e8 100644 --- a/public/app/plugins/panel/graph/series_overrides_ctrl.js +++ b/public/app/plugins/panel/graph/series_overrides_ctrl.js @@ -105,7 +105,7 @@ define([ $scope.addOverrideOption('Stack', 'stack', [true, false, 'A', 'B', 'C', 'D']); $scope.addOverrideOption('Color', 'color', ['change']); $scope.addOverrideOption('Y-axis', 'yaxis', [1, 2]); - $scope.addOverrideOption('Z-index', 'zindex', [-1,-2,-3,0,1,2,3]); + $scope.addOverrideOption('Z-index', 'zindex', [-3,-2,-1,0,1,2,3]); $scope.addOverrideOption('Transform', 'transform', ['negative-Y']); $scope.addOverrideOption('Legend', 'legend', [true, false]); $scope.updateCurrentOverrides(); From cc433c1fbdd7c118e768875ac1f0bc17aa9db5b7 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 21 Jun 2016 15:48:18 +0300 Subject: [PATCH 03/35] Issue #4740 - able to use $SeriesName variable in prefix of postfix. --- public/app/plugins/panel/singlestat/module.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 59da49ca3d5..078f682be20 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -199,6 +199,13 @@ class SingleStatCtrl extends MetricsPanelCtrl { data.valueFormated = formatFunc(data.value, decimalInfo.decimals, decimalInfo.scaledDecimals); data.valueRounded = kbn.roundValue(data.value, decimalInfo.decimals); } + + // Add $SeriesName variable for using in prefix or postfix + data.scopedVars = { + SeriesName: { + value: this.series[0].label + } + }; } // check value to text mappings if its enabled @@ -296,7 +303,7 @@ class SingleStatCtrl extends MetricsPanelCtrl { } function getSpan(className, fontSize, value) { - value = templateSrv.replace(value); + value = templateSrv.replace(value, data.scopedVars); return '' + value + ''; } From 09f7222e79df874ead4918ab6ceffccc0a8298a4 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Thu, 23 Jun 2016 11:24:21 +0900 Subject: [PATCH 04/35] add cloudwatch metrics --- pkg/api/cloudwatch/metrics.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/api/cloudwatch/metrics.go b/pkg/api/cloudwatch/metrics.go index 54e60b781cb..3770f13ea24 100644 --- a/pkg/api/cloudwatch/metrics.go +++ b/pkg/api/cloudwatch/metrics.go @@ -32,8 +32,8 @@ func init() { "AWS/Billing": {"EstimatedCharges"}, "AWS/CloudFront": {"Requests", "BytesDownloaded", "BytesUploaded", "TotalErrorRate", "4xxErrorRate", "5xxErrorRate"}, "AWS/CloudSearch": {"SuccessfulRequests", "SearchableDocuments", "IndexUtilization", "Partitions"}, - "AWS/DynamoDB": {"ConditionalCheckFailedRequests", "ConsumedReadCapacityUnits", "ConsumedWriteCapacityUnits", "OnlineIndexConsumedWriteCapacity", "OnlineIndexPercentageProgress", "OnlineIndexThrottleEvents", "ProvisionedReadCapacityUnits", "ProvisionedWriteCapacityUnits", "ReadThrottleEvents", "ReturnedItemCount", "SuccessfulRequestLatency", "SystemErrors", "ThrottledRequests", "UserErrors", "WriteThrottleEvents"}, - "AWS/ECS": {"CPUUtilization", "MemoryUtilization"}, + "AWS/DynamoDB": {"ConditionalCheckFailedRequests", "ConsumedReadCapacityUnits", "ConsumedWriteCapacityUnits", "OnlineIndexConsumedWriteCapacity", "OnlineIndexPercentageProgress", "OnlineIndexThrottleEvents", "ProvisionedReadCapacityUnits", "ProvisionedWriteCapacityUnits", "ReadThrottleEvents", "ReturnedBytes", "ReturnedItemCount", "ReturnedRecordsCount", "SuccessfulRequestLatency", "SystemErrors", "ThrottledRequests", "UserErrors", "WriteThrottleEvents"}, + "AWS/ECS": {"CPUReservation", "MemoryReservation", "CPUUtilization", "MemoryUtilization"}, "AWS/ElastiCache": { "CPUUtilization", "FreeableMemory", "NetworkBytesIn", "NetworkBytesOut", "SwapUsage", "BytesUsedForCacheItems", "BytesReadIntoMemcached", "BytesWrittenOutFromMemcached", "CasBadval", "CasHits", "CasMisses", "CmdFlush", "CmdGet", "CmdSet", "CurrConnections", "CurrItems", "DecrHits", "DecrMisses", "DeleteHits", "DeleteMisses", "Evictions", "GetHits", "GetMisses", "IncrHits", "IncrMisses", "Reclaimed", @@ -42,8 +42,8 @@ func init() { "BytesUsedForCache", "CacheHits", "CacheMisses", "CurrConnections", "Evictions", "HyperLogLogBasedCmds", "NewConnections", "Reclaimed", "ReplicationBytes", "ReplicationLag", "SaveInProgress", "CurrItems", "GetTypeCmds", "HashBasedCmds", "KeyBasedCmds", "ListBasedCmds", "SetBasedCmds", "SetTypeCmds", "SortedSetBasedCmds", "StringBasedCmds", }, - "AWS/EBS": {"VolumeReadBytes", "VolumeWriteBytes", "VolumeReadOps", "VolumeWriteOps", "VolumeTotalReadTime", "VolumeTotalWriteTime", "VolumeIdleTime", "VolumeQueueLength", "VolumeThroughputPercentage", "VolumeConsumedReadWriteOps"}, - "AWS/EC2": {"CPUCreditUsage", "CPUCreditBalance", "CPUUtilization", "DiskReadOps", "DiskWriteOps", "DiskReadBytes", "DiskWriteBytes", "NetworkIn", "NetworkOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System"}, + "AWS/EBS": {"VolumeReadBytes", "VolumeWriteBytes", "VolumeReadOps", "VolumeWriteOps", "VolumeTotalReadTime", "VolumeTotalWriteTime", "VolumeIdleTime", "VolumeQueueLength", "VolumeThroughputPercentage", "VolumeConsumedReadWriteOps", "BurstBalance"}, + "AWS/EC2": {"CPUCreditUsage", "CPUCreditBalance", "CPUUtilization", "DiskReadOps", "DiskWriteOps", "DiskReadBytes", "DiskWriteBytes", "NetworkIn", "NetworkOut", "NetworkPacketsIn", "NetworkPacketsOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System"}, "AWS/ELB": {"HealthyHostCount", "UnHealthyHostCount", "RequestCount", "Latency", "HTTPCode_ELB_4XX", "HTTPCode_ELB_5XX", "HTTPCode_Backend_2XX", "HTTPCode_Backend_3XX", "HTTPCode_Backend_4XX", "HTTPCode_Backend_5XX", "BackendConnectionErrors", "SurgeQueueLength", "SpilloverCount"}, "AWS/ElasticBeanstalk": { "EnvironmentHealth", @@ -88,7 +88,7 @@ func init() { "AWS/Billing": {"ServiceName", "LinkedAccount", "Currency"}, "AWS/CloudFront": {"DistributionId", "Region"}, "AWS/CloudSearch": {}, - "AWS/DynamoDB": {"TableName", "GlobalSecondaryIndexName", "Operation"}, + "AWS/DynamoDB": {"TableName", "GlobalSecondaryIndexName", "Operation", "StreamLabel"}, "AWS/ECS": {"ClusterName", "ServiceName"}, "AWS/ElastiCache": {"CacheClusterId", "CacheNodeId"}, "AWS/EBS": {"VolumeId"}, @@ -99,12 +99,12 @@ func init() { "AWS/ES": {"ClientId", "DomainName"}, "AWS/Events": {"RuleName"}, "AWS/Kinesis": {"StreamName", "ShardID"}, - "AWS/Lambda": {"FunctionName"}, + "AWS/Lambda": {"FunctionName", "Resource", "Version", "Alias"}, "AWS/Logs": {"LogGroupName", "DestinationType", "FilterName"}, "AWS/ML": {"MLModelId", "RequestMode"}, "AWS/OpsWorks": {"StackId", "LayerId", "InstanceId"}, "AWS/Redshift": {"NodeID", "ClusterIdentifier"}, - "AWS/RDS": {"DBInstanceIdentifier", "DatabaseClass", "EngineName"}, + "AWS/RDS": {"DBInstanceIdentifier", "DBClusterIdentifier", "DatabaseClass", "EngineName"}, "AWS/Route53": {"HealthCheckId"}, "AWS/SNS": {"Application", "Platform", "TopicName"}, "AWS/SQS": {"QueueName"}, From f3c1a894defdc07a967406190fc54c9ff33e0ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Jun 2016 09:12:17 +0200 Subject: [PATCH 05/35] changed version to 3.1-beta1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9094cdf9172..b9adc3d24b4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "3.1.0", + "version": "3.1.0-beta1", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" From 1d35b90484bd589ff35cd08f3aae9ce7e93b95f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Jun 2016 10:35:47 +0200 Subject: [PATCH 06/35] docs(): updated download links --- docs/VERSION | 2 +- docs/sources/installation/debian.md | 9 ++++++++- docs/sources/installation/rpm.md | 22 ++++++++++++++++++++-- docs/sources/versions.html_fragment | 1 + packaging/publish/publish.sh | 16 ++++++++-------- 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/docs/VERSION b/docs/VERSION index 4a36342fcab..fd2a01863fd 100644 --- a/docs/VERSION +++ b/docs/VERSION @@ -1 +1 @@ -3.0.0 +3.1.0 diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index 6084b9b317d..f87ba3f045a 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -10,7 +10,8 @@ page_keywords: grafana, installation, debian, ubuntu, guide Description | Download ------------ | ------------- -Stable .deb for Debian-based Linux | [grafana_3.0.4-1464167696.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.4-1464167696_amd64.deb) +Stable .deb for Debian-based Linux | [3.0.4](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.4-1464167696_amd64.deb) +Beta .deb for Debian-based Linux | [3.1.0-beta1](https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.0-1466666977beta1_amd64.deb) ## Install Stable @@ -18,6 +19,12 @@ Stable .deb for Debian-based Linux | [grafana_3.0.4-1464167696.deb](https://graf $ sudo apt-get install -y adduser libfontconfig $ sudo dpkg -i grafana_3.0.4-1464167696_amd64.deb +## Install 3.1 beta + + $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.0-1466666977beta1_amd64.deb + $ sudo apt-get install -y adduser libfontconfig + $ sudo dpkg -i grafana_3.1.0-1466666977beta1_amd64.deb + ## APT Repository Add the following line to your `/etc/apt/sources.list` file. diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index 854ba91fcf7..0e423eb0af4 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -10,9 +10,10 @@ page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide Description | Download ------------ | ------------- -Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-3.0.4-1464167696.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.4-1464167696.x86_64.rpm) +Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [3.0.4 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.4-1464167696.x86_64.rpm) +Beta .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [3.1.0-beta1 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm) -## Install Stable Release from package file +## Install Latest Stable You can install Grafana using Yum directly. @@ -29,6 +30,23 @@ Or install manually using `rpm`. $ sudo rpm -i --nodeps grafana-3.0.4-1464167696.x86_64.rpm +## Install 3.1 Beta + +You can install Grafana using Yum directly. + + $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm + +Or install manually using `rpm`. + +#### On CentOS / Fedora / Redhat: + + $ sudo yum install initscripts fontconfig + $ sudo rpm -Uvh https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm + +#### On OpenSuse: + + $ sudo rpm -i --nodeps https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm + ## Install via YUM Repository Add the following to a new file at `/etc/yum.repos.d/grafana.repo` diff --git a/docs/sources/versions.html_fragment b/docs/sources/versions.html_fragment index 0d62ee1e461..df6dbd4db7f 100644 --- a/docs/sources/versions.html_fragment +++ b/docs/sources/versions.html_fragment @@ -1,3 +1,4 @@ +
  • Version v3.1
  • Version v3.0
  • Version v2.6
  • Version v2.5
  • diff --git a/packaging/publish/publish.sh b/packaging/publish/publish.sh index 892bfc178cc..2ab50095695 100755 --- a/packaging/publish/publish.sh +++ b/packaging/publish/publish.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -deb_ver=3.0.4-1464167696 -rpm_ver=3.0.4-1464167696 +deb_ver=3.1.0-1466666977beta1 +rpm_ver=3.1.0-1466666977beta1 -wget https://grafanarel.s3.amazonaws.com/builds/grafana_${deb_ver}_amd64.deb +# wget https://grafanarel.s3.amazonaws.com/builds/grafana_${deb_ver}_amd64.deb -package_cloud push grafana/stable/debian/jessie grafana_${deb_ver}_amd64.deb -package_cloud push grafana/stable/debian/wheezy grafana_${deb_ver}_amd64.deb +# package_cloud push grafana/stable/debian/jessie grafana_${deb_ver}_amd64.deb +# package_cloud push grafana/stable/debian/wheezy grafana_${deb_ver}_amd64.deb package_cloud push grafana/testing/debian/jessie grafana_${deb_ver}_amd64.deb package_cloud push grafana/testing/debian/wheezy grafana_${deb_ver}_amd64.deb -wget https://grafanarel.s3.amazonaws.com/builds/grafana-${rpm_ver}.x86_64.rpm +# wget https://grafanarel.s3.amazonaws.com/builds/grafana-${rpm_ver}.x86_64.rpm package_cloud push grafana/testing/el/6 grafana-${rpm_ver}.x86_64.rpm package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm -package_cloud push grafana/stable/el/7 grafana-${rpm_ver}.x86_64.rpm -package_cloud push grafana/stable/el/6 grafana-${rpm_ver}.x86_64.rpm +# package_cloud push grafana/stable/el/7 grafana-${rpm_ver}.x86_64.rpm +# package_cloud push grafana/stable/el/6 grafana-${rpm_ver}.x86_64.rpm From 838284c09f9c4be81170eeeee537d5f2c785f2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Jun 2016 10:38:11 +0200 Subject: [PATCH 07/35] docs(): updated changelog --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f911729cc1..37252912442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 3.1.0 (unreleased) +# 3.1.0 (2016-06-23) ### Enhancements * **Dashboard Export/Import**: Dashboard export now templetize data sources and constant variables, users pick these on import, closes [#5084](https://github.com/grafana/grafana/issues/5084) @@ -11,7 +11,6 @@ * **InfluxDB**: Add spread function, closes [#5211](https://github.com/grafana/grafana/issues/5211) * **Scripts**: Use restart instead of start for deb package script, closes [#5282](https://github.com/grafana/grafana/pull/5282) * **Logging**: Moved to structured logging lib, and moved to component specific level filters via config file, closes [#4590](https://github.com/grafana/grafana/issues/4590) -* **Search**: Add search limit query parameter, closes [#5292](https://github.com/grafana/grafana/pull/5292) * **OpenTSDB**: Support nested template variables in tag_values function, closes [4398](https://github.com/grafana/grafana/issues/4398) * **Datasource**: Pending data source requests are cancelled before new ones are issues (Graphite & Prometheus), closes [5321](https://github.com/grafana/grafana/issues/5321) From c3e1955792fc85bea98925b54fd22840be354586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Jun 2016 13:21:30 +0200 Subject: [PATCH 08/35] docs(): updated export docs --- docs/sources/reference/export_import.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/sources/reference/export_import.md b/docs/sources/reference/export_import.md index 57a80a0b88a..40360ba8db7 100644 --- a/docs/sources/reference/export_import.md +++ b/docs/sources/reference/export_import.md @@ -14,6 +14,14 @@ The export feature is accessed from the share menu. +### Making a dashboard portable + +If you want to export a dashboard for others to use then it could be a good idea to +add template variables for things like a metric prefix (use contant variable) and server name. + +A template varible of the type `Constant` will automatically be hidden in +the dashboard, and will also be added as an required input when the dashboard is imported. + ## Importing a dashboard To import a dasbhoard open dashboard search and then hit the import button. From 2063fee4febf624ae0c920312d9fcf75bc3cfb0f Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 23 Jun 2016 08:41:25 +0200 Subject: [PATCH 09/35] docs(changelog): add note about cli fix #5410 --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37252912442..789920e70fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,11 @@ ### Breaking changes * **Logging** : Changed default logging output format (now structured into message, and key value pairs, with logger key acting as component). You can also no change in config to json log ouput. -* **Graphite** : The Graph panel no longer have a Graphite PNG option. closes #[5367](https://github.com/grafana/grafana/issues/5367) +* **Graphite** : The Graph panel no longer have a Graphite PNG option. closes [#5367](https://github.com/grafana/grafana/issues/5367) ### Bug fixes -* **PNG rendering**: Fixed phantomjs rendering and y-axis label rotation. fixes #[5220](https://github.com/grafana/grafana/issues/5220) +* **PNG rendering**: Fixed phantomjs rendering and y-axis label rotation. fixes [#5220](https://github.com/grafana/grafana/issues/5220) +* **CLI**: The cli tool now supports reading plugin.json from dist/plugin.json. fixes [#5410](https://github.com/grafana/grafana/issues/5410) # 3.0.4 Patch release (2016-05-25) * **Panel**: Fixed blank dashboard issue when switching to other dashboard while in fullscreen edit mode, fixes [#5163](https://github.com/grafana/grafana/pull/5163) From 9435e70b372921438d7f54d2583dce6da12cbcef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Jun 2016 17:31:22 +0200 Subject: [PATCH 10/35] docs(): spelling fix --- docs/sources/reference/export_import.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/export_import.md b/docs/sources/reference/export_import.md index 40360ba8db7..0e830db959f 100644 --- a/docs/sources/reference/export_import.md +++ b/docs/sources/reference/export_import.md @@ -24,7 +24,7 @@ the dashboard, and will also be added as an required input when the dashboard is ## Importing a dashboard -To import a dasbhoard open dashboard search and then hit the import button. +To import a dashboard open dashboard search and then hit the import button. From efad4bcb56816efedd4f403857af75494011d39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Jun 2016 17:45:29 +0200 Subject: [PATCH 11/35] docs(): updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 789920e70fd..6c9a2cc4b11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 3.1.0 (2016-06-23) +# 3.1.0-beta1 (2016-06-23) ### Enhancements * **Dashboard Export/Import**: Dashboard export now templetize data sources and constant variables, users pick these on import, closes [#5084](https://github.com/grafana/grafana/issues/5084) From e593cc3e9f34a32b8ffb4641225c9bc4d60b8a1f Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 23 Jun 2016 19:35:50 +0300 Subject: [PATCH 12/35] Issue #4740 - change variable $SeriesName to $seriesName. --- public/app/plugins/panel/singlestat/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 078f682be20..a1998a778a3 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -200,9 +200,9 @@ class SingleStatCtrl extends MetricsPanelCtrl { data.valueRounded = kbn.roundValue(data.value, decimalInfo.decimals); } - // Add $SeriesName variable for using in prefix or postfix + // Add $seriesName variable for using in prefix or postfix data.scopedVars = { - SeriesName: { + seriesName: { value: this.series[0].label } }; From 040586604b84c7c1d88acc1a56ab881849173731 Mon Sep 17 00:00:00 2001 From: Kevin Fitzpatrick Date: Thu, 7 Apr 2016 11:25:05 -0700 Subject: [PATCH 13/35] Allow configuration to disable the username and password login interface. Used for when admins only want users to login via OAuth. --- pkg/api/login.go | 1 + pkg/setting/setting.go | 16 +++++++++------- public/app/core/controllers/login_ctrl.js | 1 + public/app/partials/login.html | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pkg/api/login.go b/pkg/api/login.go index 463fa8282a5..93a6d114704 100644 --- a/pkg/api/login.go +++ b/pkg/api/login.go @@ -29,6 +29,7 @@ func LoginView(c *middleware.Context) { viewData.Settings["githubAuthEnabled"] = setting.OAuthService.GitHub viewData.Settings["disableUserSignUp"] = !setting.AllowUserSignUp viewData.Settings["loginHint"] = setting.LoginHint + viewData.Settings["oauthOnly"] = setting.DisableUserPassLogin if !tryLoginUsingRememberCookie(c) { c.HTML(200, VIEW_INDEX, viewData) diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index 6c425505289..5a6b63a1de8 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -82,13 +82,14 @@ var ( ExternalEnabled bool // User settings - AllowUserSignUp bool - AllowUserOrgCreate bool - AutoAssignOrg bool - AutoAssignOrgRole string - VerifyEmailEnabled bool - LoginHint string - DefaultTheme string + AllowUserSignUp bool + AllowUserOrgCreate bool + AutoAssignOrg bool + AutoAssignOrgRole string + VerifyEmailEnabled bool + LoginHint string + DefaultTheme string + DisableUserPassLogin bool // Http auth AdminUser string @@ -485,6 +486,7 @@ func NewConfigContext(args *CommandLineArgs) error { VerifyEmailEnabled = users.Key("verify_email_enabled").MustBool(false) LoginHint = users.Key("login_hint").String() DefaultTheme = users.Key("default_theme").String() + DisableUserPassLogin = users.Key("disable_user_pass_login").MustBool(false) // anonymous access AnonymousEnabled = Cfg.Section("auth.anonymous").Key("enabled").MustBool(false) diff --git a/public/app/core/controllers/login_ctrl.js b/public/app/core/controllers/login_ctrl.js index 45a47558ed7..2be5f6b1740 100644 --- a/public/app/core/controllers/login_ctrl.js +++ b/public/app/core/controllers/login_ctrl.js @@ -18,6 +18,7 @@ function (angular, coreModule, config) { $scope.googleAuthEnabled = config.googleAuthEnabled; $scope.githubAuthEnabled = config.githubAuthEnabled; $scope.oauthEnabled = config.githubAuthEnabled || config.googleAuthEnabled; + $scope.oauthOnly = config.oauthOnly; $scope.disableUserSignUp = config.disableUserSignUp; $scope.loginHint = config.loginHint; diff --git a/public/app/partials/login.html b/public/app/partials/login.html index 8143ff35125..660206ede59 100644 --- a/public/app/partials/login.html +++ b/public/app/partials/login.html @@ -17,7 +17,7 @@ -