Removed unused methods from zabbixAPI.service.js
This commit is contained in:
@@ -113,7 +113,7 @@ export class ZabbixQueryController extends QueryCtrl {
|
||||
.then(groups => {
|
||||
var groupids = _.map(groups, 'groupid');
|
||||
return self.zabbix
|
||||
.getHostsByGroups(groupids)
|
||||
.getHosts(groupids)
|
||||
.then(hosts => {
|
||||
self.metric.hostList = hosts;
|
||||
return hosts;
|
||||
|
||||
@@ -136,15 +136,6 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) {
|
||||
return this.request('host.get', params);
|
||||
}
|
||||
|
||||
getHostsByGroups(groupids) {
|
||||
var params = {
|
||||
output: ['name', 'host'],
|
||||
groupids: groupids
|
||||
};
|
||||
|
||||
return this.request('host.get', params);
|
||||
}
|
||||
|
||||
getApps(hostids) {
|
||||
var params = {
|
||||
output: ['applicationid', 'name'],
|
||||
@@ -154,19 +145,6 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) {
|
||||
return this.request('application.get', params);
|
||||
}
|
||||
|
||||
getApplications() {
|
||||
var params = {
|
||||
output: ['applicationid', 'name'],
|
||||
|
||||
// Hack for supporting different apis (2.2 vs 2.4 vs 3.0)
|
||||
selectHost: ['hostid'],
|
||||
selectHosts: ['hostid'],
|
||||
selectItems: ['itemid']
|
||||
};
|
||||
|
||||
return this.request('application.get', params);
|
||||
}
|
||||
|
||||
getItems(hostids, appids) {
|
||||
var params = {
|
||||
output: [
|
||||
@@ -195,30 +173,6 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Hosts list with host's items.
|
||||
* @return {[type]} [description]
|
||||
*/
|
||||
getHostsExtend() {
|
||||
var params = {
|
||||
output: ['name', 'host'],
|
||||
sortfield: 'name',
|
||||
selectGroups: ['groupid'],
|
||||
selectApplications: ['applicationid'],
|
||||
selectItems: [
|
||||
'itemid',
|
||||
'name',
|
||||
'key_',
|
||||
'value_type',
|
||||
'hostid',
|
||||
'status',
|
||||
'state'
|
||||
]
|
||||
};
|
||||
|
||||
return this.request('host.get', params);
|
||||
}
|
||||
|
||||
getLastValue(itemid) {
|
||||
var params = {
|
||||
output: ['lastvalue'],
|
||||
|
||||
Reference in New Issue
Block a user