ImportSourceCoreApi: allow host objects

This commit is contained in:
Thomas Gelf 2015-12-15 18:59:34 +01:00
parent 09df0b7a1e
commit 81be63c74d
1 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,10 @@ class ImportSourceCoreApi extends ImportSourceHook
public function listColumns()
{
$res = $this->fetchData();
if (empty($data)) {
return array('object_name');
}
return array_keys((array) $res[0]);
}
@ -46,8 +50,9 @@ class ImportSourceCoreApi extends ImportSourceHook
'required' => true,
'multiOptions' => $form->optionalEnum(array(
'CheckCommand' => 'Commands',
'Endpoint' => 'Endpoints',
'Zone' => 'Zones',
'Endpoint' => 'Endpoints',
'Host' => 'Host',
'Zone' => 'Zones',
))
));
}