diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:29:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:29:56 +0000 |
commit | 01e5e7250560da81eaf37c5804f5cb4577095d01 (patch) | |
tree | a65fbd55f24f51d2397da13cf3e90ba3f98a29d4 /library | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-statusmap-upstream.tar.xz icingaweb2-module-statusmap-upstream.zip |
Adding upstream version 20160720.upstream/20160720upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library')
-rw-r--r-- | library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php | 30 | ||||
-rw-r--r-- | library/Monitoring/DataView/Hostdependency.php | 14 |
2 files changed, 44 insertions, 0 deletions
diff --git a/library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php b/library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php new file mode 100644 index 0000000..1946cbb --- /dev/null +++ b/library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php @@ -0,0 +1,30 @@ +<?php + +namespace Icinga\Module\Monitoring\Backend\Ido\Query; + +class HostdependencyQuery extends IdoQuery { + + protected $columnMap = array( + 'hostdependencies' => array( + 'host_name' => 'ho1.name1 COLLATE latin1_general_ci', + 'dependent_host_name' => 'ho2.name1 COLLATE latin1_general_ci', + ), + ); + + protected function joinBaseTables() { + $this->select->from( + array('hd' => $this->prefix . 'hostdependencies'), + array() + )->join( + array('ho1' => $this->prefix . 'objects'), + 'ho1.object_id = hd.host_object_id', + array() + )->join( + array('ho2' => $this->prefix . 'objects'), + 'ho2.object_id = hd.dependent_host_object_id', + array() + ); + $this->joinedVirtualTables['hostdependencies'] = true; + } + +} diff --git a/library/Monitoring/DataView/Hostdependency.php b/library/Monitoring/DataView/Hostdependency.php new file mode 100644 index 0000000..3860a66 --- /dev/null +++ b/library/Monitoring/DataView/Hostdependency.php @@ -0,0 +1,14 @@ +<?php + +namespace Icinga\Module\Monitoring\DataView; + +class Hostdependency extends DataView { + + public function getColumns() { + return array( + 'host_name', + 'dependent_host_name', + ); + } + +} |