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
9cb11703
Commit
9cb11703
authored
Feb 15, 2015
by
Jason Wilder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CLI: Move duplicated config flag to global flag
parent
dda760b9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
41 deletions
+7
-41
main.go
+7
-1
pkg/cmd/accounts.go
+0
-21
pkg/cmd/datasource.go
+0
-7
pkg/cmd/import.go
+0
-5
pkg/cmd/web.go
+0
-7
No files found.
main.go
View file @
9cb11703
...
...
@@ -34,7 +34,13 @@ func main() {
app
.
Commands
=
[]
cli
.
Command
{
cmd
.
Web
,
cmd
.
ImportJson
,
cmd
.
ListAccounts
,
cmd
.
CreateAccount
,
cmd
.
DeleteAccount
,
cmd
.
ListDataSources
}
app
.
Flags
=
append
(
app
.
Flags
,
[]
cli
.
Flag
{}
...
)
app
.
Flags
=
append
(
app
.
Flags
,
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
}
...
)
app
.
Run
(
os
.
Args
)
log
.
Close
()
...
...
pkg/cmd/accounts.go
View file @
9cb11703
...
...
@@ -17,13 +17,6 @@ var ListAccounts = cli.Command{
Usage
:
"list accounts"
,
Description
:
"Lists the accounts in the system"
,
Action
:
listAccounts
,
Flags
:
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
},
}
var
CreateAccount
=
cli
.
Command
{
...
...
@@ -31,13 +24,6 @@ var CreateAccount = cli.Command{
Usage
:
"create a new account"
,
Description
:
"Creates a new account"
,
Action
:
createAccount
,
Flags
:
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
},
}
var
DeleteAccount
=
cli
.
Command
{
...
...
@@ -45,13 +31,6 @@ var DeleteAccount = cli.Command{
Usage
:
"delete an existing account"
,
Description
:
"Deletes an existing account"
,
Action
:
deleteAccount
,
Flags
:
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
},
}
func
listAccounts
(
c
*
cli
.
Context
)
{
...
...
pkg/cmd/datasource.go
View file @
9cb11703
...
...
@@ -17,13 +17,6 @@ var ListDataSources = cli.Command{
Usage
:
"list datasources"
,
Description
:
"Lists the datasources in the system"
,
Action
:
listDatasources
,
Flags
:
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
},
}
func
listDatasources
(
c
*
cli
.
Context
)
{
...
...
pkg/cmd/import.go
View file @
9cb11703
...
...
@@ -28,11 +28,6 @@ var ImportJson = cli.Command{
Name
:
"account"
,
Usage
:
"Account name to save dashboards under"
,
},
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
},
}
...
...
pkg/cmd/web.go
View file @
9cb11703
...
...
@@ -27,13 +27,6 @@ var Web = cli.Command{
Usage
:
"grafana web"
,
Description
:
"Starts Grafana backend & web server"
,
Action
:
runWeb
,
Flags
:
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"config"
,
Value
:
"grafana.ini"
,
Usage
:
"path to config file"
,
},
},
}
func
newMacaron
()
*
macaron
.
Macaron
{
...
...
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