Skip to content

Commit fdcc00d

Browse files
committed
HotfFix Invalid max_check_attempts, check_interval, retry_interval, or notification_interval value for services
& other misc fixes
1 parent 789935d commit fdcc00d

7 files changed

Lines changed: 20 additions & 16 deletions

File tree

debian/changelog

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
icinga-editor (0.200-12) UNRELEASED; urgency=medium
1+
icinga-editor (0.200-15) UNRELEASED; urgency=medium
22

33
[ dvorak ]
44
* Initial release. (Closes: #XXXXXX)
@@ -24,5 +24,8 @@ icinga-editor (0.200-12) UNRELEASED; urgency=medium
2424
* Fix User(s content) delete
2525
* Namespace use fix for engine classes
2626
* Namespace use fix for engine classes II
27+
* Deleting users fix
28+
* Deleting users fix
29+
* Deleting users fix
2730

28-
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 19 Jul 2016 15:32:49 +0200
31+
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 19 Jul 2016 17:46:48 +0200

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Priority: optional
77
Homepage: http://vitexsoftware.cz/monitoring.php
88

99
Package: icinga-editor
10-
Depends: ${misc:Depends},libjs-twitter-bootstrap, ease-framework, dbconfig-common , php-mail, php5-curl, icinga, mtr-tiny, php-image-graphviz, libjs-d3js, php5-cli, php5-intl, composer, libjs-twitter-bootstrap-switch
10+
Depends: ${misc:Depends},libjs-twitter-bootstrap, ease-framework, dbconfig-common , php-mail, php5-curl, icinga, mtr-tiny, php-image-graphviz, libjs-d3js, php5-cli, php5-intl, composer, libjs-twitter-bootstrap-switch, nsca
1111
Recommends: mysql-server,icinga-web, icinga-web-config-icinga, graphicsmagick-imagemagick-compat, pnp4icinga
1212
Architecture: all
1313
Section: web

debian/revison

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
15

src/apply.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
fclose($testing);
166166

167167
if (!intval($errorCount) && !is_null($WarningCount)) {
168-
if (Vitexus/icinga_configurator::reloadIcinga()) {
168+
if (Engine\Configurator::reloadIcinga()) {
169169
$oPage->container->addItem(_('Všechny vaše konfigurační soubory byly přegenerovány'));
170170
$oPage->container->addItem(new \Ease\TWB\LinkButton('main.php',
171171
_('Hotovo').' '.\Ease\TWB\Part::GlyphIcon('ok-sign'), 'success'));

src/classes/NSCPConfigBatGenerator.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Icinga\Editor;
34

45
/**
@@ -381,7 +382,7 @@ static function stripServiceName($serviceName)
381382
{
382383
return str_replace(' ', '_',
383384
preg_replace('/[^(\s:_\.a-zA-Z0-9)]*/', '',
384-
EaseSand::rip($serviceName)));
385+
\Ease\Sand::rip($serviceName)));
385386
}
386387

387388
/**
@@ -395,8 +396,8 @@ public function cfgEnding()
395396
switch ($this->platform) {
396397
case 'windows':
397398
$this->nscBatArray[] = "\n".'echo ^<h1^>'._('Konfigurace hosta').' '.$this->host->getName().'^</h1^> >> %ICIEDIT_HTML%';
398-
$this->nscBatArray[] = "\n".'echo ^<br^>^<a data-role="editor" href="'.Vitexus/icinga_configurator::getBaseURL().'host.php?host_id='.$this->host->getId().'"^>'._('Konfigurace hosta').'^</a^> >> %ICIEDIT_HTML%';
399-
$this->nscBatArray[] = "\n".'echo ^<br^>^<a data-role="bat" href="'.Vitexus/icinga_configurator::getBaseURL().'nscpcfggen.php?host_id='.$this->host->getId().'"^>'._('Znovu stahnout').' '.$this->host->getName().'_nscp.bat'.'^</a^> >> %ICIEDIT_HTML%';
399+
$this->nscBatArray[] = "\n".'echo ^<br^>^<a data-role="editor" href="'.Engine\Configurator::getBaseURL().'host.php?host_id='.$this->host->getId().'"^>'._('Konfigurace hosta').'^</a^> >> %ICIEDIT_HTML%';
400+
$this->nscBatArray[] = "\n".'echo ^<br^>^<a data-role="bat" href="'.Engine\Configurator::getBaseURL().'nscpcfggen.php?host_id='.$this->host->getId().'"^>'._('Znovu stahnout').' '.$this->host->getName().'_nscp.bat'.'^</a^> >> %ICIEDIT_HTML%';
400401
$this->nscBatArray[] = "\n".'echo ^<br^>^<a data-role="confirm" href="'.$this->getCfgConfirmUrl().'"^>'._('Potvrzení konfigurace').'^</a^> >> %ICIEDIT_HTML%';
401402
$this->nscBatArray[] = "\n".'echo ^</body^> >> %ICIEDIT_HTML%';
402403
$this->nscBatArray[] = "\n".'echo ^</html^> >> %ICIEDIT_HTML%
@@ -462,7 +463,7 @@ public function getCfg($send = TRUE)
462463

463464
function getCfgConfirmUrl()
464465
{
465-
return Vitexus/icinga_configurator::getBaseURL().'cfgconfirm.php?hash='.$this->host->getConfigHash().'&host_id='.$this->host->getId();
466+
return Engine\Configurator::getBaseURL().'cfgconfirm.php?hash='.$this->host->getConfigHash().'&host_id='.$this->host->getId();
466467
}
467468

468469
/**
@@ -482,13 +483,13 @@ public function deployScripts()
482483
foreach ($this->scriptsToDeploy as $script_name => $script_id) {
483484
switch ($this->platform) {
484485
case 'windows':
485-
$this->nscBatArray[] = "\n".'echo ^<a data-role="script" href="'.Vitexus/icinga_configurator::getBaseURL().'scriptget.php?script_id='.$script_id.'"^>'.$script_name.'^</a^>^<br^> >> %ICIEDIT_HTML%
486+
$this->nscBatArray[] = "\n".'echo ^<a data-role="script" href="'.Engine\Configurator::getBaseURL().'scriptget.php?script_id='.$script_id.'"^>'.$script_name.'^</a^>^<br^> >> %ICIEDIT_HTML%
486487
';
487488
break;
488489
case 'linux':
489490
$this->nscBatArray[] = "\n".'
490491
# '.$script_name.'
491-
curl "'.Vitexus/icinga_configurator::getBaseURL().'scriptget.php?script_id='.$script_id.'"
492+
curl "'.Engine\Configurator::getBaseURL().'scriptget.php?script_id='.$script_id.'"
492493
';
493494
break;
494495
default:

src/classes/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public function delete($id = null)
373373
$email = new \Ease\Mailer($this->getDataValue('email'),
374374
_('Oznámení o zrušení účtu'));
375375
$email->setMailHeaders(['From' => EMAIL_FROM]);
376-
$email->addItem(new \Ease\Html\Div("Právě jste byl/a smazán/a z Aplikace VSMonitoring s těmito přihlašovacími údaji:\n"));
376+
$email->addItem(new \Ease\Html\Div(_("Právě jste byl/a smazán/a z Aplikace VSMonitoring s těmito přihlašovacími údaji:")."\n"));
377377
$email->addItem(new \Ease\Html\Div(' Login: '.$this->GetUserLogin()."\n"));
378378

379379
$email->send();

src/classes/engine/Service.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,16 +460,16 @@ public function controlAllData($allData)
460460
}
461461

462462
if ($allData[$adKey]['max_check_attempts'] == 0) {
463-
unset($allData[$adKey]['max_check_attempts']);
463+
$allData[$adKey]['max_check_attempts'] = null;
464464
}
465465
if ($allData[$adKey]['check_interval'] == 0) {
466-
unset($allData[$adKey]['check_interval']);
466+
$allData[$adKey]['check_interval'] = null;
467467
}
468468
if ($allData[$adKey]['retry_interval'] == 0) {
469-
$allData[$adKey]['retry_interval'] == 60;
469+
$allData[$adKey]['retry_interval'] = null;
470470
}
471471
if ($allData[$adKey]['notification_interval'] == 0) {
472-
unset($allData[$adKey]['notification_interval']);
472+
$allData[$adKey]['notification_interval'] = null;
473473
}
474474
}
475475
}

0 commit comments

Comments
 (0)