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
92121ea6
Commit
92121ea6
authored
Oct 05, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting): add nop uploader
ref #6183
parent
d726f49a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
conf/defaults.ini
+1
-1
conf/sample.ini
+2
-2
pkg/components/imguploader/imguploader.go
+8
-1
No files found.
conf/defaults.ini
View file @
92121ea6
...
...
@@ -421,7 +421,7 @@ url = https://grafana.net
#################################### External Image Storage ##############
[external_image_storage]
# You can choose between (s3, webdav)
provider
=
s3
provider
=
[external_image_storage.s3]
bucket_url
=
...
...
conf/sample.ini
View file @
92121ea6
...
...
@@ -375,8 +375,8 @@
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
# you can choose between (s3, webdav
or internal
)
;provider =
s3
# you can choose between (s3, webdav)
;provider =
[external_image_storage.s3]
;bucket_url =
...
...
pkg/components/imguploader/imguploader.go
View file @
92121ea6
...
...
@@ -10,6 +10,13 @@ type ImageUploader interface {
Upload
(
path
string
)
(
string
,
error
)
}
type
NopImageUploader
struct
{
}
func
(
NopImageUploader
)
Upload
(
path
string
)
(
string
,
error
)
{
return
""
,
nil
}
func
NewImageUploader
()
(
ImageUploader
,
error
)
{
switch
setting
.
ImageUploadProvider
{
...
...
@@ -53,5 +60,5 @@ func NewImageUploader() (ImageUploader, error) {
return
NewWebdavImageUploader
(
url
,
username
,
password
)
}
return
nil
,
fmt
.
Errorf
(
"could not find specified provider"
)
return
NopImageUploader
{},
nil
}
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