diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php
index b381c2640..2182fb793 100644
--- a/application/controllers/DashboardController.php
+++ b/application/controllers/DashboardController.php
@@ -1,4 +1,31 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
use Icinga\Web\ActionController;
use Icinga\Web\Url;
@@ -94,9 +121,9 @@ class DashboardController extends ActionController
{
$dashboard = $this->getDashboard();
- if ($this->_getParam('dashboard')) {
- $dashboardName = $this->_getParam('dashboard');
- $dashboard->activate($dashboardName);
+ if ($this->_getParam('pane')) {
+ $pane = $this->_getParam('pane');
+ $dashboard->activate($pane);
}
$this->view->tabs = $dashboard->getTabs();
$this->view->tabs->add(
@@ -110,3 +137,5 @@ class DashboardController extends ActionController
$this->view->dashboard = $dashboard;
}
}
+
+// @codingStandardsIgnoreEnd
\ No newline at end of file
diff --git a/application/views/scripts/dashboard/addurl.phtml b/application/views/scripts/dashboard/addurl.phtml
index 4fba998f2..c8653ae32 100644
--- a/application/views/scripts/dashboard/addurl.phtml
+++ b/application/views/scripts/dashboard/addurl.phtml
@@ -1,2 +1,3 @@
Add dashboard URL
-= $this->form->render($this) ?>
\ No newline at end of file
+
+= $this->form->render($this); ?>
\ No newline at end of file
diff --git a/application/views/scripts/dashboard/index.phtml b/application/views/scripts/dashboard/index.phtml
index 26e7d1248..6b1e5c9bb 100644
--- a/application/views/scripts/dashboard/index.phtml
+++ b/application/views/scripts/dashboard/index.phtml
@@ -1,3 +1,3 @@
-= $this->tabs->render($this) ?>
+= $this->tabs->render($this); ?>
-= $this->dashboard->render($this) ?>
\ No newline at end of file
+= $this->dashboard->render($this); ?>
\ No newline at end of file
diff --git a/application/views/scripts/dashboard/show-configuration.phtml b/application/views/scripts/dashboard/show-configuration.phtml
index 4cec816bf..d7421e5d1 100644
--- a/application/views/scripts/dashboard/show-configuration.phtml
+++ b/application/views/scripts/dashboard/show-configuration.phtml
@@ -3,7 +3,7 @@
Saving dashboard failed
- Your dashboard couldn't be stored (error: "= $this->exceptionMessage ?>"). This could have one or more
+ Your dashboard couldn't be stored (error: "= $this->exceptionMessage; ?>"). This could have one or more
of the following reasons:
-= $this->escape($this->iniConfigurationString) ?>
+= $this->escape($this->iniConfigurationString); ?>
\ No newline at end of file
diff --git a/library/Icinga/Util/Dimension.php b/library/Icinga/Util/Dimension.php
index d51e86c14..2ffafdb7c 100644
--- a/library/Icinga/Util/Dimension.php
+++ b/library/Icinga/Util/Dimension.php
@@ -127,4 +127,4 @@ class Dimension
}
return new Dimension(intval($matches[1][0]), $matches[2][0]);
}
-}
\ No newline at end of file
+}
diff --git a/library/Icinga/Web/Widget/Dashboard.php b/library/Icinga/Web/Widget/Dashboard.php
index de5c815e7..73f7801d2 100644
--- a/library/Icinga/Web/Widget/Dashboard.php
+++ b/library/Icinga/Web/Widget/Dashboard.php
@@ -1,4 +1,30 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Web\Widget;
@@ -112,7 +138,7 @@ class Dashboard implements Widget
// make sure empty dashboards don't cause errors
$iniString = trim($this->toIni());
if (!$iniString) {
- $iniString = " ";
+ $iniString = ' ';
}
if (!@file_put_contents($file, $iniString)) {
$error = error_get_last();
@@ -146,13 +172,17 @@ class Dashboard implements Widget
/**
* Creates a new empty pane with the given title
*
- * @param $title
+ * @param string $title
+ *
+ * @return Dashboard $this
*/
public function createPane($title)
{
$pane = new Pane($title);
$pane->setTitle($title);
$this->addPane($pane);
+
+ return $this;
}
/**
diff --git a/library/Icinga/Web/Widget/Dashboard/Component.php b/library/Icinga/Web/Widget/Dashboard/Component.php
index 6caae5057..329d8ad11 100644
--- a/library/Icinga/Web/Widget/Dashboard/Component.php
+++ b/library/Icinga/Web/Widget/Dashboard/Component.php
@@ -1,5 +1,30 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Web\Widget\Dashboard;
use Icinga\Util\Dimension;
@@ -149,15 +174,15 @@ EOD;
*/
public function toIni()
{
- $ini = 'url = "'.$this->url->getRelativeUrl().'"'.PHP_EOL;
+ $ini = 'url = "' . $this->url->getRelativeUrl() . '"' . PHP_EOL;
foreach ($this->url->getParams() as $key => $val) {
- $ini .= $key.' = "'.$val.'"'.PHP_EOL;
+ $ini .= $key.' = "' . $val . '"' . PHP_EOL;
}
if ($this->height !== null) {
- $ini .= 'height = "'.((string) $this->height).'"'.PHP_EOL;
+ $ini .= 'height = "' . ((string) $this->height) . '"' . PHP_EOL;
}
if ($this->width !== null) {
- $ini .= 'width = "'.((string) $this->width).'"'.PHP_EOL;
+ $ini .= 'width = "' . ((string) $this->width) . '"' . PHP_EOL;
}
return $ini;
}
@@ -194,10 +219,10 @@ EOD;
{
$style = '';
if ($this->height) {
- $style .= 'height:'.(string) $this->height.';';
+ $style .= 'height:' . (string) $this->height . ';';
}
if ($this->width) {
- $style .= 'width:'.(string) $this->width.';';
+ $style .= 'width:' . (string) $this->width . ';';
}
return $style;
}
diff --git a/library/Icinga/Web/Widget/Dashboard/Pane.php b/library/Icinga/Web/Widget/Dashboard/Pane.php
index f0cc834dc..1f139c19d 100644
--- a/library/Icinga/Web/Widget/Dashboard/Pane.php
+++ b/library/Icinga/Web/Widget/Dashboard/Pane.php
@@ -1,8 +1,34 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Web\Widget\Dashboard;
use Icinga\Exception\ConfigurationError;
+use Icinga\Exception\ProgrammingError;
use Icinga\Web\Widget\Widget;
use Zend_Config;
use Zend_View_Abstract;
@@ -70,6 +96,7 @@ class Pane implements Widget
* Overwrite the title of this pane
*
* @param string $title The new title to use for this pane
+ *
* @return Pane $this
*/
public function setTitle($title)
@@ -159,7 +186,7 @@ class Pane implements Widget
} elseif (is_string($component) && $url !== null) {
$this->components[$component] = new Component($component, $url, $this);
} else {
- throw new ConfigurationError('Invalid component added: '.$component);
+ throw new ConfigurationError('Invalid component added: ' . $component);
}
return $this;
}
@@ -174,14 +201,14 @@ class Pane implements Widget
if (empty($this->components)) {
return '';
}
- $ini = '['.$this->getName().']'.PHP_EOL.
- 'title = "'.$this->getTitle().'"'.PHP_EOL;
+ $ini = '[' . $this->getName() . ']' . PHP_EOL.
+ 'title = "' . $this->getTitle() . '"' . PHP_EOL;
foreach ($this->components as $title => $component) {
// component header
- $ini .= '['.$this->getName().'.'.$title.']'.PHP_EOL;
+ $ini .= '[' . $this->getName() . '.' . $title . ']' . PHP_EOL;
// component content
- $ini .= $component->toIni().PHP_EOL;
+ $ini .= $component->toIni() . PHP_EOL;
}
return $ini;
}
diff --git a/library/Icinga/Web/Widget/Tab.php b/library/Icinga/Web/Widget/Tab.php
index a4eb44ddb..7393ea2ff 100644
--- a/library/Icinga/Web/Widget/Tab.php
+++ b/library/Icinga/Web/Widget/Tab.php
@@ -1,4 +1,30 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Web\Widget;
@@ -150,7 +176,7 @@ class Tab implements Widget
public function __construct(array $properties = array())
{
foreach ($properties as $name => $value) {
- $setter = 'set'.ucfirst($name);
+ $setter = 'set' . ucfirst($name);
if (method_exists($this, $setter)) {
$this->$setter($value);
}
@@ -193,7 +219,7 @@ class Tab implements Widget
)
) . ' ' . $caption;
} elseif ($this->iconCls !== null) {
- $caption = ' ' . $caption;
+ $caption = ' ' . $caption;
}
if ($this->url !== null) {
$tab = $view->qlink(
@@ -206,6 +232,6 @@ class Tab implements Widget
$tab = $caption;
}
- return ''.$tab.''.PHP_EOL;
+ return '' . $tab . '' . PHP_EOL;
}
}
diff --git a/library/Icinga/Web/Widget/Tabs.php b/library/Icinga/Web/Widget/Tabs.php
index cfbaa05fa..9ddc6cd13 100644
--- a/library/Icinga/Web/Widget/Tabs.php
+++ b/library/Icinga/Web/Widget/Tabs.php
@@ -1,4 +1,30 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Web\Widget;
diff --git a/library/Icinga/Web/Widget/Widget.php b/library/Icinga/Web/Widget/Widget.php
index 2a790966f..ab8157669 100644
--- a/library/Icinga/Web/Widget/Widget.php
+++ b/library/Icinga/Web/Widget/Widget.php
@@ -1,4 +1,30 @@
+ * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
+ * @author Icinga Development Team
+ */
+// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Web\Widget;