mirror of
https://github.com/grafana/grafana.git
synced 2025-12-22 20:54:34 +08:00
Compare commits
6 Commits
sriram/pos
...
v4.5.x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0952847a02 | ||
|
|
ec2b0fe6bf | ||
|
|
7490963cc1 | ||
|
|
a220c84ec0 | ||
|
|
155b426376 | ||
|
|
6aef001647 |
@@ -7,6 +7,7 @@ aliases = ["installation/installation/", "v2.1/installation/install/"]
|
|||||||
[menu.docs]
|
[menu.docs]
|
||||||
name = "Installation"
|
name = "Installation"
|
||||||
identifier = "installation"
|
identifier = "installation"
|
||||||
|
weight = 1
|
||||||
+++
|
+++
|
||||||
|
|
||||||
## Installing Grafana
|
## Installing Grafana
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"company": "Grafana Labs"
|
"company": "Grafana Labs"
|
||||||
},
|
},
|
||||||
"name": "grafana",
|
"name": "grafana",
|
||||||
"version": "4.5.1",
|
"version": "4.5.2",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "http://github.com/grafana/grafana.git"
|
"url": "http://github.com/grafana/grafana.git"
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ func init() {
|
|||||||
"AWS/NATGateway": {"NatGatewayId"},
|
"AWS/NATGateway": {"NatGatewayId"},
|
||||||
"AWS/OpsWorks": {"StackId", "LayerId", "InstanceId"},
|
"AWS/OpsWorks": {"StackId", "LayerId", "InstanceId"},
|
||||||
"AWS/Redshift": {"NodeID", "ClusterIdentifier"},
|
"AWS/Redshift": {"NodeID", "ClusterIdentifier"},
|
||||||
"AWS/RDS": {"DBInstanceIdentifier", "DBClusterIdentifier", "DatabaseClass", "EngineName", "Role"},
|
"AWS/RDS": {"DBInstanceIdentifier", "DBClusterIdentifier", "DbClusterIdentifier", "DatabaseClass", "EngineName", "Role"},
|
||||||
"AWS/Route53": {"HealthCheckId", "Region"},
|
"AWS/Route53": {"HealthCheckId", "Region"},
|
||||||
"AWS/S3": {"BucketName", "StorageType", "FilterId"},
|
"AWS/S3": {"BucketName", "StorageType", "FilterId"},
|
||||||
"AWS/SES": {},
|
"AWS/SES": {},
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
|
|
||||||
type Router interface {
|
type Router interface {
|
||||||
Handle(method, pattern string, handlers []macaron.Handler) *macaron.Route
|
Handle(method, pattern string, handlers []macaron.Handler) *macaron.Route
|
||||||
|
Get(pattern string, handlers ...macaron.Handler) *macaron.Route
|
||||||
}
|
}
|
||||||
|
|
||||||
type RouteRegister interface {
|
type RouteRegister interface {
|
||||||
@@ -62,8 +63,15 @@ func (rr *routeRegister) Group(pattern string, fn func(rr RouteRegister), handle
|
|||||||
|
|
||||||
func (rr *routeRegister) Register(router Router) *macaron.Router {
|
func (rr *routeRegister) Register(router Router) *macaron.Router {
|
||||||
for _, r := range rr.routes {
|
for _, r := range rr.routes {
|
||||||
|
// GET requests have to be added to macaron routing using Get()
|
||||||
|
// Otherwise HEAD requests will not be allowed.
|
||||||
|
// https://github.com/go-macaron/macaron/blob/a325110f8b392bce3e5cdeb8c44bf98078ada3be/router.go#L198
|
||||||
|
if r.method == http.MethodGet {
|
||||||
|
router.Get(r.pattern, r.handlers...)
|
||||||
|
} else {
|
||||||
router.Handle(r.method, r.pattern, r.handlers)
|
router.Handle(r.method, r.pattern, r.handlers)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, g := range rr.groups {
|
for _, g := range rr.groups {
|
||||||
g.Register(router)
|
g.Register(router)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -21,6 +22,16 @@ func (fr *fakeRouter) Handle(method, pattern string, handlers []macaron.Handler)
|
|||||||
return &macaron.Route{}
|
return &macaron.Route{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (fr *fakeRouter) Get(pattern string, handlers ...macaron.Handler) *macaron.Route {
|
||||||
|
fr.route = append(fr.route, route{
|
||||||
|
pattern: pattern,
|
||||||
|
method: http.MethodGet,
|
||||||
|
handlers: handlers,
|
||||||
|
})
|
||||||
|
|
||||||
|
return &macaron.Route{}
|
||||||
|
}
|
||||||
|
|
||||||
func emptyHandlers(n int) []macaron.Handler {
|
func emptyHandlers(n int) []macaron.Handler {
|
||||||
res := []macaron.Handler{}
|
res := []macaron.Handler{}
|
||||||
for i := 1; n >= i; i++ {
|
for i := 1; n >= i; i++ {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const template = `
|
|||||||
<span class="p-l-1">Unsaved changes</span>
|
<span class="p-l-1">Unsaved changes</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<a class="modal-header-close" ng-click="dismiss();">
|
<a class="modal-header-close" ng-click="ctrl.dismiss();">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ export class VariableSrv {
|
|||||||
var previousOptions = variable.options.slice();
|
var previousOptions = variable.options.slice();
|
||||||
|
|
||||||
return variable.updateOptions()
|
return variable.updateOptions()
|
||||||
.then(this.variableUpdated.bind(this, variable))
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (angular.toJson(previousOptions) !== angular.toJson(variable.options)) {
|
if (angular.toJson(previousOptions) !== angular.toJson(variable.options)) {
|
||||||
this.$rootScope.$emit('template-variable-value-updated');
|
this.$rootScope.$emit('template-variable-value-updated');
|
||||||
|
|||||||
Reference in New Issue
Block a user