File tree Expand file tree Collapse file tree 5 files changed +53
-33
lines changed
public/app/plugins/datasource/influxdb/partials Expand file tree Collapse file tree 5 files changed +53
-33
lines changed Original file line number Diff line number Diff line change 10
10
# 3.1.2 (unreleased)
11
11
* ** Templating** : Fixed issue when combining row & panel repeats, fixes [ #5790 ] ( https://github.com/grafana/grafana/issues/5790 )
12
12
* ** Drag&Drop** : Fixed issue with drag and drop in latest Chrome(51+), fixes [ #5767 ] ( https://github.com/grafana/grafana/issues/5767 )
13
- * ** Internal Metrics** : Fixed issue with dots in instance_name when sending internal metrics to Graphitge, fixes [ #5739 ] ( https://github.com/grafana/grafana/issues/5739 )
13
+ * ** Internal Metrics** : Fixed issue with dots in instance_name when sending internal metrics to Graphite, fixes [ #5739 ] ( https://github.com/grafana/grafana/issues/5739 )
14
+ * ** Grafana-CLI** : Add default plugin path for MAC OS, fixes [ #5806 ] ( https://github.com/grafana/grafana/issues/5806 )
14
15
15
16
# 3.1.1 (2016-08-01)
16
17
* ** IFrame embedding** : Fixed issue of using full iframe height, fixes [ #5605 ] ( https://github.com/grafana/grafana/issues/5606 )
Original file line number Diff line number Diff line change @@ -3,5 +3,6 @@ postgrestest:
3
3
environment:
4
4
POSTGRES_USER: grafana
5
5
POSTGRES_PASSWORD: password
6
+ POSTGRES_DATABASE: grafana
6
7
ports:
7
8
- "5432:5432"
Original file line number Diff line number Diff line change @@ -8,39 +8,11 @@ import (
8
8
"github.com/codegangsta/cli"
9
9
"github.com/grafana/grafana/pkg/cmd/grafana-cli/commands"
10
10
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
11
+ "github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
11
12
)
12
13
13
14
var version = "master"
14
15
15
- func getGrafanaPluginDir () string {
16
- currentOS := runtime .GOOS
17
- defaultNix := "/var/lib/grafana/plugins"
18
-
19
- if currentOS == "windows" {
20
- return "../data/plugins"
21
- }
22
-
23
- pwd , err := os .Getwd ()
24
-
25
- if err != nil {
26
- logger .Error ("Could not get current path. using default" )
27
- return defaultNix
28
- }
29
-
30
- if isDevenvironment (pwd ) {
31
- return "../data/plugins"
32
- }
33
-
34
- return defaultNix
35
- }
36
-
37
- func isDevenvironment (pwd string ) bool {
38
- // if ../conf/defaults.ini exists, grafana is not installed as package
39
- // that its in development environment.
40
- _ , err := os .Stat ("../conf/defaults.ini" )
41
- return err == nil
42
- }
43
-
44
16
func main () {
45
17
setupLogging ()
46
18
@@ -54,7 +26,7 @@ func main() {
54
26
cli.StringFlag {
55
27
Name : "pluginsDir" ,
56
28
Usage : "path to the grafana plugin directory" ,
57
- Value : getGrafanaPluginDir ( ),
29
+ Value : utils . GetGrafanaPluginDir ( runtime . GOOS ),
58
30
EnvVar : "GF_PLUGIN_DIR" ,
59
31
},
60
32
cli.StringFlag {
Original file line number Diff line number Diff line change
1
+ package utils
2
+
3
+ import (
4
+ "os"
5
+
6
+ "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
7
+ )
8
+
9
+ func GetGrafanaPluginDir (currentOS string ) string {
10
+ //currentOS := runtime.GOOS
11
+
12
+ if currentOS == "windows" {
13
+ return returnOsDefault (currentOS )
14
+ }
15
+
16
+ pwd , err := os .Getwd ()
17
+
18
+ if err != nil {
19
+ logger .Error ("Could not get current path. using default" )
20
+ return returnOsDefault (currentOS )
21
+ }
22
+
23
+ if isDevenvironment (pwd ) {
24
+ return "../data/plugins"
25
+ }
26
+
27
+ return returnOsDefault (currentOS )
28
+ }
29
+
30
+ func isDevenvironment (pwd string ) bool {
31
+ // if ../conf/defaults.ini exists, grafana is not installed as package
32
+ // that its in development environment.
33
+ _ , err := os .Stat ("../conf/defaults.ini" )
34
+ return err == nil
35
+ }
36
+
37
+ func returnOsDefault (currentOs string ) string {
38
+ switch currentOs {
39
+ case "windows" :
40
+ return "../data/plugins"
41
+ case "darwin" :
42
+ return "/usr/local/var/lib/grafana/plugins"
43
+ default : //"linux"
44
+ return "/var/lib/grafana/plugins"
45
+ }
46
+ }
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ <h3 class="page-heading">InfluxDB Details</h3>
14
14
< div class ="gf-form-inline ">
15
15
< div class ="gf-form max-width-15 ">
16
16
< span class ="gf-form-label width-7 "> User</ span >
17
- < input type ="text " class ="gf-form-input " ng-model ='ctrl.current.user ' placeholder ="" required > </ input >
17
+ < input type ="text " class ="gf-form-input " ng-model ='ctrl.current.user ' placeholder =""> </ input >
18
18
</ div >
19
19
< div class ="gf-form max-width-15 ">
20
20
< span class ="gf-form-label width-7 "> Password</ span >
21
- < input type ="password " class ="gf-form-input " ng-model ='ctrl.current.password ' placeholder ="" required > </ input >
21
+ < input type ="password " class ="gf-form-input " ng-model ='ctrl.current.password ' placeholder =""> </ input >
22
22
</ div >
23
23
</ div >
24
24
</ div >
You can’t perform that action at this time.
0 commit comments