diff --git a/Vagrantfile b/Vagrantfile index 1e5e3a073..9090b23aa 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,6 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +# Icinga Web 2 | (c) 2013-2015 Icinga Development Team | http://www.gnu.org/licenses/gpl-2.0.txt + VAGRANTFILE_API_VERSION = "2" VAGRANT_REQUIRED_VERSION = "1.5.0" diff --git a/application/clicommands/AutocompleteCommand.php b/application/clicommands/AutocompleteCommand.php index 5a5a0e0c0..045ee8cdc 100644 --- a/application/clicommands/AutocompleteCommand.php +++ b/application/clicommands/AutocompleteCommand.php @@ -1,6 +1,5 @@ render($order, $data, $format)); } -} \ No newline at end of file +} diff --git a/library/Icinga/Chart/GridChart.php b/library/Icinga/Chart/GridChart.php index 190e09bf9..b95fa1fc4 100644 --- a/library/Icinga/Chart/GridChart.php +++ b/library/Icinga/Chart/GridChart.php @@ -1,6 +1,5 @@ element->toSvg($ctx); return $this->rotate($ctx, $el, $this->degrees); } -} \ No newline at end of file +} diff --git a/library/Icinga/Chart/SVGRenderer.php b/library/Icinga/Chart/SVGRenderer.php index da6015ceb..7de8463bb 100644 --- a/library/Icinga/Chart/SVGRenderer.php +++ b/library/Icinga/Chart/SVGRenderer.php @@ -1,6 +1,5 @@ filters as & $filter) { $filter = clone $filter; } - } + } } diff --git a/library/Icinga/Data/Filter/FilterEqual.php b/library/Icinga/Data/Filter/FilterEqual.php index 66e4c06ad..1e567dbf1 100644 --- a/library/Icinga/Data/Filter/FilterEqual.php +++ b/library/Icinga/Data/Filter/FilterEqual.php @@ -1,6 +1,5 @@ matches($res)) continue; $result[] = $res; } - + if ($query->hasOrder()) { usort($result, array($query, 'compare')); } diff --git a/library/Icinga/Protocol/Livestatus/Query.php b/library/Icinga/Protocol/Livestatus/Query.php index a421c7e71..94380dfa6 100644 --- a/library/Icinga/Protocol/Livestatus/Query.php +++ b/library/Icinga/Protocol/Livestatus/Query.php @@ -1,6 +1,5 @@ raw SplArray // $res -> object - // $cv -> + // $cv -> // $result -> object to be returned $result = (object) array(); $res = $this->withHeaders($row); @@ -142,7 +141,7 @@ class Query extends SimpleQuery } } - + return $result; } @@ -313,7 +312,7 @@ class Query extends SimpleQuery } elseif (is_array($col)) { foreach ($col as $k) { $columns[$k] = true; - } + } } else { $columns[$col] = true; } diff --git a/library/Icinga/Protocol/Livestatus/ResponseRow.php b/library/Icinga/Protocol/Livestatus/ResponseRow.php index d4b0fd7cb..9cb67ccf3 100644 --- a/library/Icinga/Protocol/Livestatus/ResponseRow.php +++ b/library/Icinga/Protocol/Livestatus/ResponseRow.php @@ -1,4 +1,5 @@ view; } -} \ No newline at end of file +} diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php index 9fa687042..a8913d3e7 100644 --- a/library/Icinga/Web/JavaScript.php +++ b/library/Icinga/Web/JavaScript.php @@ -1,6 +1,5 @@ reIndexAll(); - return $this; + return $this; } public function remove($param) diff --git a/library/Icinga/Web/View.php b/library/Icinga/Web/View.php index 2122662ac..fe232af86 100644 --- a/library/Icinga/Web/View.php +++ b/library/Icinga/Web/View.php @@ -1,6 +1,5 @@ addHelperFunction('icon', function ($img, $title = null, array $propertie $properties['alt'] = $title; $properties['title'] = $title; } - + if ($class !== null) { if (isset($props['class'])) { $properties['class'] .= ' ' . $class; diff --git a/library/Icinga/Web/ViewStream.php b/library/Icinga/Web/ViewStream.php index e5dacd879..6abf49ac3 100644 --- a/library/Icinga/Web/ViewStream.php +++ b/library/Icinga/Web/ViewStream.php @@ -1,6 +1,5 @@ filter === null) { - $this->filter = Filter::fromQueryString((string) $this->url()->getParams()); + $this->filter = Filter::fromQueryString((string) $this->url()->getParams()); } return $this->filter; } @@ -404,7 +403,7 @@ class FilterEditor extends AbstractWidget protected function renderFilterExpression(FilterExpression $filter) { if ($this->addTo && $this->addTo === $filter->getId()) { - return + return preg_replace( '/ class="autosubmit"/', ' class="autofocus"', @@ -544,7 +543,7 @@ class FilterEditor extends AbstractWidget $cols[$active] = str_replace('_', ' ', ucfirst(ltrim($active, '_'))); } - return $this->select($this->elementId('column', $filter), $cols, $active); + return $this->select($this->elementId('column', $filter), $cols, $active); } protected function applyChanges($changes) diff --git a/library/Icinga/Web/Widget/FilterWidget.php b/library/Icinga/Web/Widget/FilterWidget.php index cf47ef581..bd79c25e0 100644 --- a/library/Icinga/Web/Widget/FilterWidget.php +++ b/library/Icinga/Web/Widget/FilterWidget.php @@ -1,6 +1,5 @@ renderFilter($this->filter); - + $editorUrl = clone $url; $editorUrl->setParam('modifyFilter', true); if ($this->filter->isEmpty()) { diff --git a/library/Icinga/Web/Widget/Limiter.php b/library/Icinga/Web/Widget/Limiter.php index 5afa7e4b8..acc66c885 100644 --- a/library/Icinga/Web/Widget/Limiter.php +++ b/library/Icinga/Web/Widget/Limiter.php @@ -1,6 +1,5 @@ 'host_name', - + 'services_total' => 'state != 9999', 'services_problem' => 'state > 0', 'services_problem_handled' => 'state > 0 & (scheduled_downtime_depth > 0 | acknowledged = 1 | host_state > 0)', @@ -50,7 +49,7 @@ if (! array_key_exists($col, $this->available_columns)) { throw new ProgrammingError('No such column: %s', $col); } $filter = $this->filterStringToFilter($this->available_columns[$col]); - + //Filter::fromQueryString(str_replace(' ', '', $this->available_columns[$col])); $parts[] = $this->renderFilter( $filter, 'Stats', 0, false); } diff --git a/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php b/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php index d165f1252..0a1baad7d 100644 --- a/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php +++ b/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php @@ -1,4 +1,5 @@
' . $this->error->getMessage() . '
'; } } -} \ No newline at end of file +} diff --git a/modules/monitoring/library/Monitoring/Timeline/TimeEntry.php b/modules/monitoring/library/Monitoring/Timeline/TimeEntry.php index bd83a42cd..112bd1e8b 100644 --- a/modules/monitoring/library/Monitoring/Timeline/TimeEntry.php +++ b/modules/monitoring/library/Monitoring/Timeline/TimeEntry.php @@ -1,6 +1,5 @@ assertEquals('backendName', $defaultBackend->getName(), 'Default backend has name set'); } -} \ No newline at end of file +} diff --git a/modules/setup/application/clicommands/ConfigCommand.php b/modules/setup/application/clicommands/ConfigCommand.php index e63e770b8..f9a73aba4 100644 --- a/modules/setup/application/clicommands/ConfigCommand.php +++ b/modules/setup/application/clicommands/ConfigCommand.php @@ -1,6 +1,5 @@ .tabs, .dontprint { display: none !important; diff --git a/public/index.php b/public/index.php index 48a500666..0062bf94f 100644 --- a/public/index.php +++ b/public/index.php @@ -1,5 +1,4 @@ 0 ? 1 : 0; - + // fetch current value from radiobuttons var value = $target.find('input:checked').first().val(); - + $target.append( ' (changed) ' - ); + ); if (triState) { // TODO: find a better way to activate indeterminate checkboxes after load. $target.append( '' ); } diff --git a/public/js/icinga/utils.js b/public/js/icinga/utils.js index ba4d7a040..8539d29ca 100644 --- a/public/js/icinga/utils.js +++ b/public/js/icinga/utils.js @@ -1,5 +1,4 @@ -// {{{ICINGA_LICENSE_HEADER}}} -// {{{ICINGA_LICENSE_HEADER}}} +/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | http://www.gnu.org/licenses/gpl-2.0.txt */ /** * Icinga utility functions diff --git a/test/php/application/forms/Config/Authentication/DbBackendFormTest.php b/test/php/application/forms/Config/Authentication/DbBackendFormTest.php index 6af628b06..8067b6259 100644 --- a/test/php/application/forms/Config/Authentication/DbBackendFormTest.php +++ b/test/php/application/forms/Config/Authentication/DbBackendFormTest.php @@ -1,6 +1,5 @@ query('//x:path[@data-icinga-graph-type="pieslice"]'); $this->assertEquals(3, $path->length, 'Assert the correct number of datapoints being drawn as SVG bars'); } -} \ No newline at end of file +} diff --git a/test/php/library/Icinga/Data/ConfigObjectTest.php b/test/php/library/Icinga/Data/ConfigObjectTest.php index c4b825e58..40b095267 100644 --- a/test/php/library/Icinga/Data/ConfigObjectTest.php +++ b/test/php/library/Icinga/Data/ConfigObjectTest.php @@ -1,6 +1,5 @@