fix Filter param (can accept array or single value)
This commit is contained in:
@@ -61,10 +61,10 @@ func (p *zabbixParamOutput) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
type ZabbixAPIParams struct {
|
||||
Output *zabbixParamOutput `json:"output,omitempty"`
|
||||
SortField string `json:"sortfield,omitempty"`
|
||||
SortOrder string `json:"sortorder,omitempty"`
|
||||
Filter map[string][]int `json:"filter,omitempty"`
|
||||
Output *zabbixParamOutput `json:"output,omitempty"`
|
||||
SortField string `json:"sortfield,omitempty"`
|
||||
SortOrder string `json:"sortorder,omitempty"`
|
||||
Filter map[string]interface{} `json:"filter,omitempty"`
|
||||
|
||||
// Login
|
||||
User string `json:"user,omitempty"`
|
||||
|
||||
@@ -293,7 +293,7 @@ func (ds *ZabbixDatasource) getAllItems(ctx context.Context, dsInfo *datasource.
|
||||
Output: &zabbixParamOutput{Fields: []string{"itemid", "name", "key_", "value_type", "hostid", "status", "state"}},
|
||||
SortField: "name",
|
||||
WebItems: true,
|
||||
Filter: map[string][]int{},
|
||||
Filter: map[string]interface{}{},
|
||||
SelectHosts: []string{"hostid", "name"},
|
||||
HostIDs: hostids,
|
||||
AppIDs: appids,
|
||||
|
||||
Reference in New Issue
Block a user