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
67ec9edc
Unverified
Commit
67ec9edc
authored
Feb 28, 2020
by
Carl Bergquist
Committed by
GitHub
Feb 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: avoid alias for models in plugins (#22483)
parent
f2f2722b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
47 deletions
+47
-47
pkg/api/dtos/invite.go
+5
-5
pkg/plugins/dashboard_importer.go
+5
-5
pkg/plugins/dashboard_importer_test.go
+2
-2
pkg/plugins/dashboards.go
+5
-5
pkg/plugins/dashboards_test.go
+6
-6
pkg/plugins/dashboards_updater.go
+9
-9
pkg/plugins/models.go
+10
-10
pkg/plugins/queries.go
+5
-5
No files found.
pkg/api/dtos/invite.go
View file @
67ec9edc
package
dtos
package
dtos
import
m
"github.com/grafana/grafana/pkg/models"
import
"github.com/grafana/grafana/pkg/models"
type
AddInviteForm
struct
{
type
AddInviteForm
struct
{
LoginOrEmail
string
`json:"loginOrEmail" binding:"Required"`
LoginOrEmail
string
`json:"loginOrEmail" binding:"Required"`
Name
string
`json:"name"`
Name
string
`json:"name"`
Role
m
.
RoleType
`json:"role" binding:"Required"`
Role
m
odels
.
RoleType
`json:"role" binding:"Required"`
SendEmail
bool
`json:"sendEmail"`
SendEmail
bool
`json:"sendEmail"`
}
}
type
InviteInfo
struct
{
type
InviteInfo
struct
{
...
...
pkg/plugins/dashboard_importer.go
View file @
67ec9edc
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/components/simplejson"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/dashboards"
)
)
...
@@ -19,7 +19,7 @@ type ImportDashboardCommand struct {
...
@@ -19,7 +19,7 @@ type ImportDashboardCommand struct {
FolderId
int64
FolderId
int64
OrgId
int64
OrgId
int64
User
*
m
.
SignedInUser
User
*
m
odels
.
SignedInUser
PluginId
string
PluginId
string
Result
*
PluginDashboardInfoDTO
Result
*
PluginDashboardInfoDTO
}
}
...
@@ -44,7 +44,7 @@ func init() {
...
@@ -44,7 +44,7 @@ func init() {
}
}
func
ImportDashboard
(
cmd
*
ImportDashboardCommand
)
error
{
func
ImportDashboard
(
cmd
*
ImportDashboardCommand
)
error
{
var
dashboard
*
m
.
Dashboard
var
dashboard
*
m
odels
.
Dashboard
var
err
error
var
err
error
if
cmd
.
PluginId
!=
""
{
if
cmd
.
PluginId
!=
""
{
...
@@ -52,7 +52,7 @@ func ImportDashboard(cmd *ImportDashboardCommand) error {
...
@@ -52,7 +52,7 @@ func ImportDashboard(cmd *ImportDashboardCommand) error {
return
err
return
err
}
}
}
else
{
}
else
{
dashboard
=
m
.
NewDashboardFromJson
(
cmd
.
Dashboard
)
dashboard
=
m
odels
.
NewDashboardFromJson
(
cmd
.
Dashboard
)
}
}
evaluator
:=
&
DashTemplateEvaluator
{
evaluator
:=
&
DashTemplateEvaluator
{
...
@@ -65,7 +65,7 @@ func ImportDashboard(cmd *ImportDashboardCommand) error {
...
@@ -65,7 +65,7 @@ func ImportDashboard(cmd *ImportDashboardCommand) error {
return
err
return
err
}
}
saveCmd
:=
m
.
SaveDashboardCommand
{
saveCmd
:=
m
odels
.
SaveDashboardCommand
{
Dashboard
:
generatedDash
,
Dashboard
:
generatedDash
,
OrgId
:
cmd
.
OrgId
,
OrgId
:
cmd
.
OrgId
,
UserId
:
cmd
.
User
.
UserId
,
UserId
:
cmd
.
User
.
UserId
,
...
...
pkg/plugins/dashboard_importer_test.go
View file @
67ec9edc
...
@@ -5,7 +5,7 @@ import (
...
@@ -5,7 +5,7 @@ import (
"testing"
"testing"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/components/simplejson"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/setting"
.
"github.com/smartystreets/goconvey/convey"
.
"github.com/smartystreets/goconvey/convey"
...
@@ -22,7 +22,7 @@ func TestDashboardImport(t *testing.T) {
...
@@ -22,7 +22,7 @@ func TestDashboardImport(t *testing.T) {
PluginId
:
"test-app"
,
PluginId
:
"test-app"
,
Path
:
"dashboards/connections.json"
,
Path
:
"dashboards/connections.json"
,
OrgId
:
1
,
OrgId
:
1
,
User
:
&
m
.
SignedInUser
{
UserId
:
1
,
OrgRole
:
m
.
ROLE_ADMIN
},
User
:
&
m
odels
.
SignedInUser
{
UserId
:
1
,
OrgRole
:
models
.
ROLE_ADMIN
},
Inputs
:
[]
ImportDashboardInput
{
Inputs
:
[]
ImportDashboardInput
{
{
Name
:
"*"
,
Type
:
"datasource"
,
Value
:
"graphite"
},
{
Name
:
"*"
,
Type
:
"datasource"
,
Value
:
"graphite"
},
},
},
...
...
pkg/plugins/dashboards.go
View file @
67ec9edc
...
@@ -6,7 +6,7 @@ import (
...
@@ -6,7 +6,7 @@ import (
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/components/simplejson"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
)
)
type
PluginDashboardInfoDTO
struct
{
type
PluginDashboardInfoDTO
struct
{
...
@@ -35,7 +35,7 @@ func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDT
...
@@ -35,7 +35,7 @@ func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDT
result
:=
make
([]
*
PluginDashboardInfoDTO
,
0
)
result
:=
make
([]
*
PluginDashboardInfoDTO
,
0
)
// load current dashboards
// load current dashboards
query
:=
m
.
GetDashboardsByPluginIdQuery
{
OrgId
:
orgId
,
PluginId
:
pluginId
}
query
:=
m
odels
.
GetDashboardsByPluginIdQuery
{
OrgId
:
orgId
,
PluginId
:
pluginId
}
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -48,7 +48,7 @@ func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDT
...
@@ -48,7 +48,7 @@ func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDT
}
}
res
:=
&
PluginDashboardInfoDTO
{}
res
:=
&
PluginDashboardInfoDTO
{}
var
dashboard
*
m
.
Dashboard
var
dashboard
*
m
odels
.
Dashboard
var
err
error
var
err
error
if
dashboard
,
err
=
loadPluginDashboard
(
plugin
.
Id
,
include
.
Path
);
err
!=
nil
{
if
dashboard
,
err
=
loadPluginDashboard
(
plugin
.
Id
,
include
.
Path
);
err
!=
nil
{
...
@@ -89,7 +89,7 @@ func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDT
...
@@ -89,7 +89,7 @@ func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDT
return
result
,
nil
return
result
,
nil
}
}
func
loadPluginDashboard
(
pluginId
,
path
string
)
(
*
m
.
Dashboard
,
error
)
{
func
loadPluginDashboard
(
pluginId
,
path
string
)
(
*
m
odels
.
Dashboard
,
error
)
{
plugin
,
exists
:=
Plugins
[
pluginId
]
plugin
,
exists
:=
Plugins
[
pluginId
]
if
!
exists
{
if
!
exists
{
...
@@ -109,5 +109,5 @@ func loadPluginDashboard(pluginId, path string) (*m.Dashboard, error) {
...
@@ -109,5 +109,5 @@ func loadPluginDashboard(pluginId, path string) (*m.Dashboard, error) {
return
nil
,
err
return
nil
,
err
}
}
return
m
.
NewDashboardFromJson
(
data
),
nil
return
m
odels
.
NewDashboardFromJson
(
data
),
nil
}
}
pkg/plugins/dashboards_test.go
View file @
67ec9edc
...
@@ -5,7 +5,7 @@ import (
...
@@ -5,7 +5,7 @@ import (
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/components/simplejson"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/setting"
.
"github.com/smartystreets/goconvey/convey"
.
"github.com/smartystreets/goconvey/convey"
"gopkg.in/ini.v1"
"gopkg.in/ini.v1"
...
@@ -22,23 +22,23 @@ func TestPluginDashboards(t *testing.T) {
...
@@ -22,23 +22,23 @@ func TestPluginDashboards(t *testing.T) {
err
=
pm
.
Init
()
err
=
pm
.
Init
()
So
(
err
,
ShouldBeNil
)
So
(
err
,
ShouldBeNil
)
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetDashboardQuery
)
error
{
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
odels
.
GetDashboardQuery
)
error
{
if
query
.
Slug
==
"nginx-connections"
{
if
query
.
Slug
==
"nginx-connections"
{
dash
:=
m
.
NewDashboard
(
"Nginx Connections"
)
dash
:=
m
odels
.
NewDashboard
(
"Nginx Connections"
)
dash
.
Data
.
Set
(
"revision"
,
"1.1"
)
dash
.
Data
.
Set
(
"revision"
,
"1.1"
)
query
.
Result
=
dash
query
.
Result
=
dash
return
nil
return
nil
}
}
return
m
.
ErrDashboardNotFound
return
m
odels
.
ErrDashboardNotFound
})
})
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetDashboardsByPluginIdQuery
)
error
{
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
odels
.
GetDashboardsByPluginIdQuery
)
error
{
var
data
=
simplejson
.
New
()
var
data
=
simplejson
.
New
()
data
.
Set
(
"title"
,
"Nginx Connections"
)
data
.
Set
(
"title"
,
"Nginx Connections"
)
data
.
Set
(
"revision"
,
22
)
data
.
Set
(
"revision"
,
22
)
query
.
Result
=
[]
*
m
.
Dashboard
{
query
.
Result
=
[]
*
m
odels
.
Dashboard
{
{
Slug
:
"nginx-connections"
,
Data
:
data
},
{
Slug
:
"nginx-connections"
,
Data
:
data
},
}
}
return
nil
return
nil
...
...
pkg/plugins/dashboards_updater.go
View file @
67ec9edc
...
@@ -2,7 +2,7 @@ package plugins
...
@@ -2,7 +2,7 @@ package plugins
import
(
import
(
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/bus"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
)
)
func
init
()
{
func
init
()
{
...
@@ -12,7 +12,7 @@ func init() {
...
@@ -12,7 +12,7 @@ func init() {
func
(
pm
*
PluginManager
)
updateAppDashboards
()
{
func
(
pm
*
PluginManager
)
updateAppDashboards
()
{
pm
.
log
.
Debug
(
"Looking for App Dashboard Updates"
)
pm
.
log
.
Debug
(
"Looking for App Dashboard Updates"
)
query
:=
m
.
GetPluginSettingsQuery
{
OrgId
:
0
}
query
:=
m
odels
.
GetPluginSettingsQuery
{
OrgId
:
0
}
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
plog
.
Error
(
"Failed to get all plugin settings"
,
"error"
,
err
)
plog
.
Error
(
"Failed to get all plugin settings"
,
"error"
,
err
)
...
@@ -44,7 +44,7 @@ func autoUpdateAppDashboard(pluginDashInfo *PluginDashboardInfoDTO, orgId int64)
...
@@ -44,7 +44,7 @@ func autoUpdateAppDashboard(pluginDashInfo *PluginDashboardInfoDTO, orgId int64)
PluginId
:
pluginDashInfo
.
PluginId
,
PluginId
:
pluginDashInfo
.
PluginId
,
Overwrite
:
true
,
Overwrite
:
true
,
Dashboard
:
dash
.
Data
,
Dashboard
:
dash
.
Data
,
User
:
&
m
.
SignedInUser
{
UserId
:
0
,
OrgRole
:
m
.
ROLE_ADMIN
},
User
:
&
m
odels
.
SignedInUser
{
UserId
:
0
,
OrgRole
:
models
.
ROLE_ADMIN
},
Path
:
pluginDashInfo
.
Path
,
Path
:
pluginDashInfo
.
Path
,
}
}
...
@@ -68,7 +68,7 @@ func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
...
@@ -68,7 +68,7 @@ func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
if
dash
.
Removed
{
if
dash
.
Removed
{
plog
.
Info
(
"Deleting plugin dashboard"
,
"pluginId"
,
pluginDef
.
Id
,
"dashboard"
,
dash
.
Slug
)
plog
.
Info
(
"Deleting plugin dashboard"
,
"pluginId"
,
pluginDef
.
Id
,
"dashboard"
,
dash
.
Slug
)
deleteCmd
:=
m
.
DeleteDashboardCommand
{
OrgId
:
orgId
,
Id
:
dash
.
DashboardId
}
deleteCmd
:=
m
odels
.
DeleteDashboardCommand
{
OrgId
:
orgId
,
Id
:
dash
.
DashboardId
}
if
err
:=
bus
.
Dispatch
(
&
deleteCmd
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
deleteCmd
);
err
!=
nil
{
plog
.
Error
(
"Failed to auto update app dashboard"
,
"pluginId"
,
pluginDef
.
Id
,
"error"
,
err
)
plog
.
Error
(
"Failed to auto update app dashboard"
,
"pluginId"
,
pluginDef
.
Id
,
"error"
,
err
)
return
return
...
@@ -87,14 +87,14 @@ func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
...
@@ -87,14 +87,14 @@ func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
}
}
// update version in plugin_setting table to mark that we have processed the update
// update version in plugin_setting table to mark that we have processed the update
query
:=
m
.
GetPluginSettingByIdQuery
{
PluginId
:
pluginDef
.
Id
,
OrgId
:
orgId
}
query
:=
m
odels
.
GetPluginSettingByIdQuery
{
PluginId
:
pluginDef
.
Id
,
OrgId
:
orgId
}
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
plog
.
Error
(
"Failed to read plugin setting by id"
,
"error"
,
err
)
plog
.
Error
(
"Failed to read plugin setting by id"
,
"error"
,
err
)
return
return
}
}
appSetting
:=
query
.
Result
appSetting
:=
query
.
Result
cmd
:=
m
.
UpdatePluginSettingVersionCmd
{
cmd
:=
m
odels
.
UpdatePluginSettingVersionCmd
{
OrgId
:
appSetting
.
OrgId
,
OrgId
:
appSetting
.
OrgId
,
PluginId
:
appSetting
.
PluginId
,
PluginId
:
appSetting
.
PluginId
,
PluginVersion
:
pluginDef
.
Info
.
Version
,
PluginVersion
:
pluginDef
.
Info
.
Version
,
...
@@ -105,19 +105,19 @@ func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
...
@@ -105,19 +105,19 @@ func syncPluginDashboards(pluginDef *PluginBase, orgId int64) {
}
}
}
}
func
handlePluginStateChanged
(
event
*
m
.
PluginStateChangedEvent
)
error
{
func
handlePluginStateChanged
(
event
*
m
odels
.
PluginStateChangedEvent
)
error
{
plog
.
Info
(
"Plugin state changed"
,
"pluginId"
,
event
.
PluginId
,
"enabled"
,
event
.
Enabled
)
plog
.
Info
(
"Plugin state changed"
,
"pluginId"
,
event
.
PluginId
,
"enabled"
,
event
.
Enabled
)
if
event
.
Enabled
{
if
event
.
Enabled
{
syncPluginDashboards
(
Plugins
[
event
.
PluginId
],
event
.
OrgId
)
syncPluginDashboards
(
Plugins
[
event
.
PluginId
],
event
.
OrgId
)
}
else
{
}
else
{
query
:=
m
.
GetDashboardsByPluginIdQuery
{
PluginId
:
event
.
PluginId
,
OrgId
:
event
.
OrgId
}
query
:=
m
odels
.
GetDashboardsByPluginIdQuery
{
PluginId
:
event
.
PluginId
,
OrgId
:
event
.
OrgId
}
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
return
err
return
err
}
}
for
_
,
dash
:=
range
query
.
Result
{
for
_
,
dash
:=
range
query
.
Result
{
deleteCmd
:=
m
.
DeleteDashboardCommand
{
OrgId
:
dash
.
OrgId
,
Id
:
dash
.
Id
}
deleteCmd
:=
m
odels
.
DeleteDashboardCommand
{
OrgId
:
dash
.
OrgId
,
Id
:
dash
.
Id
}
plog
.
Info
(
"Deleting plugin dashboard"
,
"pluginId"
,
event
.
PluginId
,
"dashboard"
,
dash
.
Slug
)
plog
.
Info
(
"Deleting plugin dashboard"
,
"pluginId"
,
event
.
PluginId
,
"dashboard"
,
dash
.
Slug
)
...
...
pkg/plugins/models.go
View file @
67ec9edc
...
@@ -5,7 +5,7 @@ import (
...
@@ -5,7 +5,7 @@ import (
"fmt"
"fmt"
"strings"
"strings"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/plugins/backendplugin"
"github.com/grafana/grafana/pkg/plugins/backendplugin"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/setting"
)
)
...
@@ -78,7 +78,7 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
...
@@ -78,7 +78,7 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
for
_
,
include
:=
range
pb
.
Includes
{
for
_
,
include
:=
range
pb
.
Includes
{
if
include
.
Role
==
""
{
if
include
.
Role
==
""
{
include
.
Role
=
m
.
ROLE_VIEWER
include
.
Role
=
m
odels
.
ROLE_VIEWER
}
}
}
}
...
@@ -93,14 +93,14 @@ type PluginDependencies struct {
...
@@ -93,14 +93,14 @@ type PluginDependencies struct {
}
}
type
PluginInclude
struct
{
type
PluginInclude
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"`
Path
string
`json:"path"`
Path
string
`json:"path"`
Type
string
`json:"type"`
Type
string
`json:"type"`
Component
string
`json:"component"`
Component
string
`json:"component"`
Role
m
.
RoleType
`json:"role"`
Role
m
odels
.
RoleType
`json:"role"`
AddToNav
bool
`json:"addToNav"`
AddToNav
bool
`json:"addToNav"`
DefaultNav
bool
`json:"defaultNav"`
DefaultNav
bool
`json:"defaultNav"`
Slug
string
`json:"slug"`
Slug
string
`json:"slug"`
Id
string
`json:"-"`
Id
string
`json:"-"`
}
}
...
...
pkg/plugins/queries.go
View file @
67ec9edc
...
@@ -2,17 +2,17 @@ package plugins
...
@@ -2,17 +2,17 @@ package plugins
import
(
import
(
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/bus"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
)
)
func
GetPluginSettings
(
orgId
int64
)
(
map
[
string
]
*
m
.
PluginSettingInfoDTO
,
error
)
{
func
GetPluginSettings
(
orgId
int64
)
(
map
[
string
]
*
m
odels
.
PluginSettingInfoDTO
,
error
)
{
query
:=
m
.
GetPluginSettingsQuery
{
OrgId
:
orgId
}
query
:=
m
odels
.
GetPluginSettingsQuery
{
OrgId
:
orgId
}
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
pluginMap
:=
make
(
map
[
string
]
*
m
.
PluginSettingInfoDTO
)
pluginMap
:=
make
(
map
[
string
]
*
m
odels
.
PluginSettingInfoDTO
)
for
_
,
plug
:=
range
query
.
Result
{
for
_
,
plug
:=
range
query
.
Result
{
pluginMap
[
plug
.
PluginId
]
=
plug
pluginMap
[
plug
.
PluginId
]
=
plug
}
}
...
@@ -24,7 +24,7 @@ func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
...
@@ -24,7 +24,7 @@ func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
}
}
// default to enabled true
// default to enabled true
opt
:=
&
m
.
PluginSettingInfoDTO
{
opt
:=
&
m
odels
.
PluginSettingInfoDTO
{
PluginId
:
pluginDef
.
Id
,
PluginId
:
pluginDef
.
Id
,
OrgId
:
orgId
,
OrgId
:
orgId
,
Enabled
:
true
,
Enabled
:
true
,
...
...
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