public function showAction()
 {
     $tabs = $this->getTabs();
     if ($deploymentId = $this->params->get('deployment_id')) {
         $tabs->add('deployment', array('label' => $this->translate('Deployment'), 'url' => 'director/deployment/show', 'urlParams' => array('id' => $deploymentId)));
     }
     $tabs->add('config', array('label' => $this->translate('Config'), 'url' => $this->getRequest()->getUrl()))->activate('config');
     $this->view->config = IcingaConfig::load(Util::hex2binary($this->params->get('checksum')), $this->db());
 }
Exemplo n.º 2
0
 public function activitylogAction()
 {
     if ($id = $this->params->get('id')) {
         $this->view->entry = $this->db()->fetchActivityLogEntryById($id);
     } elseif ($checksum = $this->params->get('checksum')) {
         $this->view->entry = $this->db()->fetchActivityLogEntry(Util::hex2binary($checksum));
     }
     $this->view->neighbors = $this->db()->getActivitylogNeighbors($id, $this->params->get('type'), $this->params->get('name'));
     $entry = $this->view->entry;
     $this->activityTabs($entry);
     $this->showInfo($entry);
     $func = 'show' . ucfirst($this->params->get('show', $this->defaultTab));
     $this->{$func}($entry);
 }
 public static function logRemoval(DbObject $object, Db $db)
 {
     $data = array('object_name' => $object->object_name, 'action_name' => 'delete', 'author' => self::username(), 'object_type' => $object->getTableName(), 'old_properties' => json_encode($object->getOriginalProperties()), 'change_time' => date('Y-m-d H:i:s'), 'parent_checksum' => $db->getLastActivityChecksum());
     $data['checksum'] = sha1(json_encode($data), true);
     $data['parent_checksum'] = Util::hex2binary($data['parent_checksum']);
     return self::create($data)->store($db);
 }