Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d40cc323
Commit
d40cc323
authored
Mar 21, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:grafana/grafana into checkboxv2
parents
530b6a50
90c6b043
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
17 deletions
+30
-17
docs/sources/plugins/installation.md
+6
-6
pkg/cmd/grafana-cli/commands/commands.go
+9
-1
pkg/cmd/grafana-cli/main.go
+8
-10
public/app/core/services/backend_srv.js
+7
-0
No files found.
docs/sources/plugins/installation.md
View file @
d40cc323
...
@@ -17,30 +17,30 @@ On Linux systems the grafana-cli will assume that the grafana plugin directory i
...
@@ -17,30 +17,30 @@ On Linux systems the grafana-cli will assume that the grafana plugin directory i
List available plugins
List available plugins
```
```
grafana-cli list-remote
grafana-cli
plugins
list-remote
```
```
Install a plugin type
Install a plugin type
```
```
grafana-cli install <plugin-id>
grafana-cli
plugins
install <plugin-id>
```
```
List installed plugins
List installed plugins
```
```
grafana-cli ls
grafana-cli
plugins
ls
```
```
Upgrade all installed plugins
Upgrade all installed plugins
```
```
grafana-cli upgrade-all
grafana-cli
plugins
upgrade-all
```
```
Upgrade one plugin
Upgrade one plugin
```
```
grafana-cli upgrade <plugin-id>
grafana-cli
plugins
upgrade <plugin-id>
```
```
Remove one plugin
Remove one plugin
```
```
grafana-cli remove <plugin-id>
grafana-cli
plugins
remove <plugin-id>
```
```
pkg/cmd/grafana-cli/commands/commands.go
View file @
d40cc323
...
@@ -22,7 +22,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C
...
@@ -22,7 +22,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C
}
}
}
}
var
Commands
=
[]
cli
.
Command
{
var
plugin
Commands
=
[]
cli
.
Command
{
{
{
Name
:
"install"
,
Name
:
"install"
,
Usage
:
"install <plugin name>"
,
Usage
:
"install <plugin name>"
,
...
@@ -49,3 +49,11 @@ var Commands = []cli.Command{
...
@@ -49,3 +49,11 @@ var Commands = []cli.Command{
Action
:
runCommand
(
removeCommand
),
Action
:
runCommand
(
removeCommand
),
},
},
}
}
var
Commands
=
[]
cli
.
Command
{
{
Name
:
"plugins"
,
Usage
:
"Manage plugins for grafana"
,
Subcommands
:
pluginCommands
,
},
}
pkg/cmd/grafana-cli/main.go
View file @
d40cc323
...
@@ -12,10 +12,6 @@ import (
...
@@ -12,10 +12,6 @@ import (
var
version
=
"master"
var
version
=
"master"
func
getGrafanaPluginPath
()
string
{
func
getGrafanaPluginPath
()
string
{
if
os
.
Getenv
(
"GF_PLUGIN_DIR"
)
!=
""
{
return
os
.
Getenv
(
"GF_PLUGIN_DIR"
)
}
os
:=
runtime
.
GOOS
os
:=
runtime
.
GOOS
if
os
==
"windows"
{
if
os
==
"windows"
{
return
"C:
\\
opt
\\
grafana
\\
plugins"
return
"C:
\\
opt
\\
grafana
\\
plugins"
...
@@ -34,14 +30,16 @@ func main() {
...
@@ -34,14 +30,16 @@ func main() {
app
.
Version
=
version
app
.
Version
=
version
app
.
Flags
=
[]
cli
.
Flag
{
app
.
Flags
=
[]
cli
.
Flag
{
cli
.
StringFlag
{
cli
.
StringFlag
{
Name
:
"path"
,
Name
:
"path"
,
Usage
:
"path to the grafana installation"
,
Usage
:
"path to the grafana installation"
,
Value
:
getGrafanaPluginPath
(),
Value
:
getGrafanaPluginPath
(),
EnvVar
:
"GF_PLUGIN_DIR"
,
},
},
cli
.
StringFlag
{
cli
.
StringFlag
{
Name
:
"repo"
,
Name
:
"repo"
,
Usage
:
"url to the plugin repository"
,
Usage
:
"url to the plugin repository"
,
Value
:
"https://grafana-net.raintank.io/api/plugins"
,
Value
:
"https://grafana-net.raintank.io/api/plugins"
,
EnvVar
:
"GF_PLUGIN_REPO"
,
},
},
cli
.
BoolFlag
{
cli
.
BoolFlag
{
Name
:
"debug, d"
,
Name
:
"debug, d"
,
...
...
public/app/core/services/backend_srv.js
View file @
d40cc323
...
@@ -105,6 +105,13 @@ function (angular, _, coreModule, config) {
...
@@ -105,6 +105,13 @@ function (angular, _, coreModule, config) {
});
});
}
}
//populate error obj on Internal Error
if
(
_
.
isString
(
err
.
data
)
&&
err
.
status
===
500
)
{
err
.
data
=
{
error
:
err
.
statusText
};
}
// for Prometheus
// for Prometheus
if
(
!
err
.
data
.
message
&&
_
.
isString
(
err
.
data
.
error
))
{
if
(
!
err
.
data
.
message
&&
_
.
isString
(
err
.
data
.
error
))
{
err
.
data
.
message
=
err
.
data
.
error
;
err
.
data
.
message
=
err
.
data
.
error
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment