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 {
|
type ZabbixAPIParams struct {
|
||||||
Output *zabbixParamOutput `json:"output,omitempty"`
|
Output *zabbixParamOutput `json:"output,omitempty"`
|
||||||
SortField string `json:"sortfield,omitempty"`
|
SortField string `json:"sortfield,omitempty"`
|
||||||
SortOrder string `json:"sortorder,omitempty"`
|
SortOrder string `json:"sortorder,omitempty"`
|
||||||
Filter map[string][]int `json:"filter,omitempty"`
|
Filter map[string]interface{} `json:"filter,omitempty"`
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
User string `json:"user,omitempty"`
|
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"}},
|
Output: &zabbixParamOutput{Fields: []string{"itemid", "name", "key_", "value_type", "hostid", "status", "state"}},
|
||||||
SortField: "name",
|
SortField: "name",
|
||||||
WebItems: true,
|
WebItems: true,
|
||||||
Filter: map[string][]int{},
|
Filter: map[string]interface{}{},
|
||||||
SelectHosts: []string{"hostid", "name"},
|
SelectHosts: []string{"hostid", "name"},
|
||||||
HostIDs: hostids,
|
HostIDs: hostids,
|
||||||
AppIDs: appids,
|
AppIDs: appids,
|
||||||
|
|||||||
Reference in New Issue
Block a user