Cache and queryProcessor refactor.

This commit is contained in:
Alexander Zobnin
2016-02-18 23:47:31 +03:00
parent 637cf4c63d
commit 50c0764d01
3 changed files with 69 additions and 20 deletions

View File

@@ -123,7 +123,8 @@ function (angular, _) {
p.getGroups = function() {
var params = {
output: ['name'],
sortfield: 'name'
sortfield: 'name',
selectHosts: []
};
return this.request('hostgroup.get', params);
@@ -168,6 +169,27 @@ function (angular, _) {
return this.request('item.get', params);
};
/**
* Get Hosts list with host's items.
* @return {[type]} [description]
*/
p.getHostsExtend = function() {
var params = {
output: ['name', 'host'],
sortfield: 'name',
selectGroups: [],
selectItems: [
'name', 'key_',
'value_type',
'hostid',
'status',
'state'
]
};
return this.request('host.get', params);
};
p.getLastValue = function(itemid) {
var params = {
output: ['lastvalue'],