mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-18 10:20:25 -05:00
bpapp: rename to businessprocess
This commit is contained in:
parent
3f4da099de
commit
d1739e171f
18 changed files with 47 additions and 47 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp\Clicommands;
|
||||
namespace Icinga\Module\Businessprocess\Clicommands;
|
||||
|
||||
use Icinga\Cli\Command;
|
||||
use Icinga\Module\Bpapp\BusinessProcess;
|
||||
use Icinga\Module\Businessprocess\BusinessProcess;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Bpapp\Controller;
|
||||
use Icinga\Module\Bpapp\Forms\ProcessForm;
|
||||
use Icinga\Module\Bpapp\Forms\SimulationForm;
|
||||
use Icinga\Module\Businessprocess\Controller;
|
||||
use Icinga\Module\Businessprocess\Forms\ProcessForm;
|
||||
use Icinga\Module\Businessprocess\Forms\SimulationForm;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class Bpapp_NodeController extends Controller
|
||||
class Businessprocess_NodeController extends Controller
|
||||
{
|
||||
public function editAction()
|
||||
{
|
||||
|
|
@ -28,7 +28,7 @@ class Bpapp_NodeController extends Controller
|
|||
$nodename = $this->getParam('node');
|
||||
$node = $bp->getNode($nodename);
|
||||
$detail = Url::fromPath(
|
||||
'bpapp/node/simulate',
|
||||
'businessprocess/node/simulate',
|
||||
array('node' => $nodename)
|
||||
);
|
||||
$form = new SimulationForm();
|
||||
|
|
@ -38,7 +38,7 @@ class Bpapp_NodeController extends Controller
|
|||
->setSession($this->session())
|
||||
->setNode($node)
|
||||
// TODO: find a better way to handle redirects
|
||||
->setRedirectUrl('bpapp/process/simulate#!' . $detail->getAbsoluteUrl())
|
||||
->setRedirectUrl('businessprocess/process/simulate#!' . $detail->getAbsoluteUrl())
|
||||
->handleRequest();
|
||||
|
||||
$this->view->form = $form;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Bpapp\Controller;
|
||||
use Icinga\Module\Bpapp\Storage\LegacyStorage;
|
||||
use Icinga\Module\Businessprocess\Controller;
|
||||
use Icinga\Module\Businessprocess\Storage\LegacyStorage;
|
||||
|
||||
class Bpapp_ProcessController extends Controller
|
||||
class Businessprocess_ProcessController extends Controller
|
||||
{
|
||||
public function showAction()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp\Forms;
|
||||
namespace Icinga\Module\Businessprocess\Forms;
|
||||
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Module\Bpapp\BpNode;
|
||||
use Icinga\Module\Businessprocess\BpNode;
|
||||
|
||||
class ProcessForm extends Form
|
||||
{
|
||||
|
|
@ -26,7 +26,7 @@ class ProcessForm extends Form
|
|||
|
||||
protected function translate($string)
|
||||
{
|
||||
return mt('bpapp', $string);
|
||||
return mt('businessprocess', $string);
|
||||
}
|
||||
|
||||
public function setup()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp\Forms;
|
||||
namespace Icinga\Module\Businessprocess\Forms;
|
||||
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Web\Notification;
|
||||
use Icinga\Module\Bpapp\BpNode;
|
||||
use Icinga\Module\Businessprocess\BpNode;
|
||||
|
||||
class SimulationForm extends Form
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ class SimulationForm extends Form
|
|||
|
||||
protected function translate($string)
|
||||
{
|
||||
return mt('bpapp', $string);
|
||||
return mt('businessprocess', $string);
|
||||
}
|
||||
|
||||
public function setup()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Bpapp\HostNode;
|
||||
use Icinga\Module\Bpapp\ServiceNode;
|
||||
use Icinga\Module\Bpapp\BpNode;
|
||||
use Icinga\Module\Businessprocess\HostNode;
|
||||
use Icinga\Module\Businessprocess\ServiceNode;
|
||||
use Icinga\Module\Businessprocess\BpNode;
|
||||
|
||||
?><div class="content">
|
||||
<h1><?= $this->escape($node) ?></h1>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="controls">
|
||||
<span style="float:right; margin-right: 1em; margin-top: 0.5em;">
|
||||
<a href="<?= $this->href('bpapp/process/show', array(
|
||||
<a href="<?= $this->href('businessprocess/process/show', array(
|
||||
'bp' => $this->bpname
|
||||
)) ?>">Render</a>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ if ($count < 20) {
|
|||
<div class="toplevel <?= $howMany ?>" data-base-target="_next">
|
||||
<?php foreach ($this->bp->getChildren() as $name => $node): ?>
|
||||
<div class="<?= strtolower($node->getStateName()) ?><?= $node->isHandled() ? ' handled' : '' ?>">
|
||||
<a href="<?= $this->url('bpapp/process/show', array('processName' => $this->processName, 'process' => $name)) ?>"><?= $this->escape($name) ?></a>
|
||||
<a href="<?= $this->url('businessprocess/process/show', array('processName' => $this->processName, 'process' => $name)) ?>"><?= $this->escape($name) ?></a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$section = $this->menuSection($this->translate('Reporting'))
|
||||
->add($this->translate('Business Processes'))
|
||||
->setUrl('bpapp/process/show');
|
||||
->setUrl('businessprocess/process/show');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp;
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
use Exception;
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ class BpNode extends Node
|
|||
if (! $this->bp->isEditMode()) {
|
||||
return parent::renderLink($view);
|
||||
}
|
||||
return $view->qlink($this->name, 'bpapp/node/edit', array(
|
||||
return $view->qlink($this->name, 'businessprocess/node/edit', array(
|
||||
'node' => $this->name
|
||||
));
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp;
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
use Exception;
|
||||
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp;
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
use Icinga\Web\Controller\ModuleActionController;
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Module\Bpapp\Storage\LegacyStorage;
|
||||
use Icinga\Module\Bpapp\BusinessProcess;
|
||||
use Icinga\Module\Bpapp\Form\ProcessForm;
|
||||
use Icinga\Module\Bpapp\Form\SimulationForm;
|
||||
use Icinga\Module\Businessprocess\Storage\LegacyStorage;
|
||||
use Icinga\Module\Businessprocess\BusinessProcess;
|
||||
use Icinga\Module\Businessprocess\Form\ProcessForm;
|
||||
use Icinga\Module\Businessprocess\Form\SimulationForm;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Web\Widget;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ class Controller extends ModuleActionController
|
|||
$url = Url::fromRequest();
|
||||
$tabs = Widget::create('tabs')->add('show', array(
|
||||
'title' => $this->translate('Show'),
|
||||
'url' => 'bpapp/process/show',
|
||||
'url' => 'businessprocess/process/show',
|
||||
));
|
||||
if ($process = $this->params->get('process')) {
|
||||
foreach ($tabs->getTabs() as $tab) {
|
||||
|
|
@ -45,7 +45,7 @@ class Controller extends ModuleActionController
|
|||
|
||||
protected function session()
|
||||
{
|
||||
return $this->Window()->getSessionNamespace('bpapp');
|
||||
return $this->Window()->getSessionNamespace('businessprocess');
|
||||
}
|
||||
|
||||
protected function xxxloadBp()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp;
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
class HostNode extends Node
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@ class HostNode extends Node
|
|||
public function renderLink($view)
|
||||
{
|
||||
if ($this->bp->isSimulationMode()) {
|
||||
return $view->qlink($this->getHostname(), 'bpapp/host/simulate', array(
|
||||
return $view->qlink($this->getHostname(), 'businessprocess/host/simulate', array(
|
||||
'node' => $this->name
|
||||
));
|
||||
} else {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp;
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
use Exception;
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ abstract class Node
|
|||
$title = preg_replace('~(</a>)~', implode('', $this->getIcons($view)) . '$1', $this->renderLink($view));
|
||||
if ($this->hasInfoUrl()) {
|
||||
$title = ' <a href="' . $this->getInfoUrl() . '" title="'
|
||||
. mt('bpapp', 'More information') . ': ' . $this->getInfoUrl()
|
||||
. mt('businessprocess', 'More information') . ': ' . $this->getInfoUrl()
|
||||
. '" style="float: right">'
|
||||
. $view->icon('help')
|
||||
. '</a>' . $title;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp;
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
class ServiceNode extends Node
|
||||
{
|
||||
|
|
@ -19,7 +19,7 @@ class ServiceNode extends Node
|
|||
public function renderLink($view)
|
||||
{
|
||||
if ($this->bp->isSimulationMode()) {
|
||||
return $view->qlink($this->getAlias(), 'bpapp/node/simulate', array(
|
||||
return $view->qlink($this->getAlias(), 'businessprocess/node/simulate', array(
|
||||
'node' => $this->name
|
||||
));
|
||||
} else {
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp\Storage;
|
||||
namespace Icinga\Module\Businessprocess\Storage;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Data\ConfigObject;
|
||||
use Icinga\Module\Bpapp\BusinessProcess;
|
||||
use Icinga\Module\Bpapp\BpNode;
|
||||
use Icinga\Module\Bpapp\Storage\Storage;
|
||||
use Icinga\Module\Businessprocess\BusinessProcess;
|
||||
use Icinga\Module\Businessprocess\BpNode;
|
||||
use Icinga\Module\Businessprocess\Storage\Storage;
|
||||
use DirectoryIterator;
|
||||
use Icinga\Exception\SystemPermissionException;
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ class LegacyStorage extends Storage
|
|||
if ($this->configDir === null) {
|
||||
$dir = Icinga::app()
|
||||
->getModuleManager()
|
||||
->getModule('bpapp')
|
||||
->getModule('businessprocess')
|
||||
->getConfigDir();
|
||||
if (! is_dir($dir)) {
|
||||
if (! is_dir(dirname($dir))) {
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Bpapp\Storage;
|
||||
namespace Icinga\Module\Businessprocess\Storage;
|
||||
|
||||
use Icinga\Data\ConfigObject;
|
||||
use Icinga\Module\Bpapp\BusinessProcess;
|
||||
use Icinga\Module\Businessprocess\BusinessProcess;
|
||||
|
||||
abstract class Storage
|
||||
{
|
||||
|
|
@ -175,7 +175,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
Icinga.availableModules.bpapp = Bp;
|
||||
Icinga.availableModules.businessprocess = Bp;
|
||||
|
||||
}(Icinga));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue