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
56d8fe4a
Commit
56d8fe4a
authored
Feb 16, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes to CLI commands PR
parent
b6428b08
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
14 deletions
+20
-14
main.go
+7
-2
pkg/cmd/accounts.go
+7
-5
pkg/cmd/dashboard.go
+1
-1
pkg/cmd/datasource.go
+5
-4
pkg/services/sqlstore/account.go
+0
-1
pkg/setting/setting.go
+0
-1
No files found.
main.go
View file @
56d8fe4a
...
...
@@ -32,9 +32,14 @@ func main() {
app
.
Usage
=
"grafana web"
app
.
Version
=
version
app
.
Commands
=
[]
cli
.
Command
{
cmd
.
ListAccounts
,
cmd
.
CreateAccount
,
cmd
.
DeleteAccount
,
cmd
.
ListAccounts
,
cmd
.
CreateAccount
,
cmd
.
DeleteAccount
,
cmd
.
ImportDashboard
,
cmd
.
ListDataSources
,
cmd
.
CreateDataSource
,
cmd
.
DescribeDataSource
,
cmd
.
DeleteDataSource
,
cmd
.
ListDataSources
,
cmd
.
CreateDataSource
,
cmd
.
DescribeDataSource
,
cmd
.
DeleteDataSource
,
cmd
.
Web
}
app
.
Flags
=
append
(
app
.
Flags
,
[]
cli
.
Flag
{
cli
.
StringFlag
{
...
...
pkg/cmd/accounts.go
View file @
56d8fe4a
...
...
@@ -2,31 +2,33 @@ package cmd
import
(
"fmt"
"os"
"text/tabwriter"
"github.com/codegangsta/cli"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"os"
"text/tabwriter"
)
var
ListAccounts
=
cli
.
Command
{
Name
:
"account"
,
Name
:
"account
s
"
,
Usage
:
"list accounts"
,
Description
:
"Lists the accounts in the system"
,
Action
:
listAccounts
,
}
var
CreateAccount
=
cli
.
Command
{
Name
:
"account:create"
,
Name
:
"account
s
:create"
,
Usage
:
"create a new account"
,
Description
:
"Creates a new account"
,
Action
:
createAccount
,
}
var
DeleteAccount
=
cli
.
Command
{
Name
:
"account:delete"
,
Name
:
"account
s
:delete"
,
Usage
:
"delete an existing account"
,
Description
:
"Deletes an existing account"
,
Action
:
deleteAccount
,
...
...
pkg/cmd/dashboard.go
View file @
56d8fe4a
...
...
@@ -13,7 +13,7 @@ import (
)
var
ImportDashboard
=
cli
.
Command
{
Name
:
"dashboard:import"
,
Name
:
"dashboard
s
:import"
,
Usage
:
"imports dashboards in JSON from a directory"
,
Description
:
"Starts Grafana import process"
,
Action
:
runImport
,
...
...
pkg/cmd/datasource.go
View file @
56d8fe4a
...
...
@@ -2,23 +2,24 @@ package cmd
import
(
"fmt"
"os"
"text/tabwriter"
"github.com/codegangsta/cli"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
m
"github.com/grafana/grafana/pkg/models"
"os"
"text/tabwriter"
)
var
(
ListDataSources
=
cli
.
Command
{
Name
:
"datasource"
,
Name
:
"datasource
s
"
,
Usage
:
"list datasources"
,
Description
:
"Lists the datasources in the system"
,
Action
:
listDatasources
,
}
CreateDataSource
=
cli
.
Command
{
Name
:
"datasource:create"
,
Name
:
"datasource
s
:create"
,
Usage
:
"creates a new datasource"
,
Description
:
"Creates a new datasource"
,
Action
:
createDataSource
,
...
...
pkg/services/sqlstore/account.go
View file @
56d8fe4a
...
...
@@ -119,7 +119,6 @@ func DeleteAccount(cmd *m.DeleteAccountCommand) error {
"DELETE FROM api_key WHERE account_id = ?"
,
"DELETE FROM data_source WHERE account_id = ?"
,
"DELETE FROM account_user WHERE account_id = ?"
,
"DELETE FROM user WHERE account_id = ?"
,
"DELETE FROM account WHERE id = ?"
,
}
...
...
pkg/setting/setting.go
View file @
56d8fe4a
...
...
@@ -171,7 +171,6 @@ func NewConfigContext(config string) {
configFiles
=
append
(
configFiles
,
config
)
}
//log.Info("Loading config files: %v", configFiles)
var
err
error
for
i
,
file
:=
range
configFiles
{
...
...
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