Skip to content

Commit aef37c2

Browse files
committed
Fixed search path
Fixed composer package version for debian Switching string to English
1 parent 5f7eff4 commit aef37c2

12 files changed

Lines changed: 80 additions & 75 deletions

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "vitexsoftware/icinga-editor",
33
"description": "Editor of Icinga Configuration files",
4-
"version": "1.0",
4+
"license": "GPL-2.0",
5+
"version": "1.1.2",
56
"authors": [
67
{
78
"name": "vitex",

debian/changelog

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

33
[ dvorak ]
44
* Initial release. (Closes: #XXXXXX)
@@ -102,5 +102,6 @@ icinga-editor (1.0-11) UNRELEASED; urgency=medium
102102
* Fixed config files import during debian package install process
103103
* Fixed config files import during debian package install process
104104
* Fixed config files import during debian package install process
105+
* Better README
105106

106-
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 02 Aug 2016 00:41:20 +0200
107+
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 02 Aug 2016 11:20:14 +0200

debian/conf/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "vitexsoftware/icinga-editor",
33
"description": "Editor of Icinga Configuration files (debianized)",
4-
"version": "1.0.11",
4+
"version": "1.1.2",
5+
"license": "GPL-2.0",
56
"authors": [
67
{
78
"name": "vitex",
@@ -14,7 +15,7 @@
1415
},
1516
"require": {
1617
"php": ">= 5.5.9",
17-
"vitexsoftware/ease-framework": ">= 1.1.2"
18+
"ease-framework": "*"
1819
},
1920
"autoload": {
2021
"psr-4": {

debian/deb-package.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ else
2121
echo $VERSION > debian/lastversion
2222
fi
2323

24+
rm -rf debian/$PACKAGE
2425

2526
cd ..
2627
ls *.deb

debian/revison

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

src/classes/UI/BootstrapMenu.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct($name = null, $content = null,
2727
$user = \Ease\Shared::user();
2828
\Ease\TWB\Part::twBootstrapize();
2929
if (!$user->getUserID()) {
30-
$this->addMenuItem('<a href="createaccount.php">'.\Ease\TWB\Part::GlyphIcon('leaf').' '._('Registrace').'</a>',
30+
$this->addMenuItem('<a href="createaccount.php">'.\Ease\TWB\Part::GlyphIcon('leaf').' '._('Sign Up').'</a>',
3131
'right');
3232
$this->addMenuItem(
3333
'
@@ -36,29 +36,29 @@ public function __construct($name = null, $content = null,
3636
<a class="dropdown-toggle" href="login.php" data-toggle="dropdown"><i class="icon-circle-arrow-left"></i> '._('Přihlášení').'<strong class="caret"></strong></a>
3737
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px; left: -150px;">
3838
<form method="post" class="navbar-form navbar-left" action="login.php" accept-charset="UTF-8">
39-
<input class="form-control" style="margin-bottom: 15px;" type="text" placeholder="'._('login').'" id="username" name="login">
40-
<input class="form-control" style="margin-bottom: 15px;" type="password" placeholder="'._('Heslo').'" id="password" name="password">
39+
<input class="form-control" style="margin-bottom: 15px;" type="text" placeholder="'._('Username').'" id="username" name="login">
40+
<input class="form-control" style="margin-bottom: 15px;" type="password" placeholder="'._('Password').'" id="password" name="password">
4141
<!-- input style="float: left; margin-right: 10px;" type="checkbox" name="remember-me" id="remember-me" value="1">
42-
<label class="string optional" for="remember-me"> '._('zapamatuj si mne').'</label -->
43-
<input class="btn btn-primary btn-block" type="submit" id="sign-in" value="'._('přihlásit').'">
42+
<label class="string optional" for="remember-me"> '._('Remember me').'</label -->
43+
<input class="btn btn-primary btn-block" type="submit" id="sign-in" value="'._('Sign In').'">
4444
</form>
4545
</div>', 'right'
4646
);
4747
} else {
4848

4949
$userMenu = '<li class="dropdown" style="width: 120px; text-align: right; background-image: url( '.$user->getIcon().' ) ; background-repeat: no-repeat; background-position: left center; background-size: 40px 40px;"><a href="#" class="dropdown-toggle" data-toggle="dropdown">'.$user->getUserLogin().' <b class="caret"></b></a>
5050
<ul class="dropdown-menu" style="text-align: left; left: -60px;">
51-
<li><a href="settings.php">'.\Ease\TWB\Part::GlyphIcon('wrench').'<i class="icon-cog"></i> '._('Nastavení').'</a></li>
51+
<li><a href="settings.php">'.\Ease\TWB\Part::GlyphIcon('wrench').'<i class="icon-cog"></i> '._('Settings').'</a></li>
5252
';
5353

5454
if ($user->getSettingValue('admin')) {
55-
$userMenu .= '<li><a href="overview.php">'.\Ease\TWB\Part::GlyphIcon('list').' '._('Přehled konfigurací').'</a></li>';
55+
$userMenu .= '<li><a href="overview.php">'.\Ease\TWB\Part::GlyphIcon('list').' '._('Configuration overview').'</a></li>';
5656
}
5757

5858
$this->addMenuItem($userMenu.'
59-
<li><a href="http://v.s.cz/kontakt.php">'.\Ease\TWB\Part::GlyphIcon('envelope').' '._('Uživatelská podpora').'</a></li>
59+
<li><a href="http://v.s.cz/kontakt.php">'.\Ease\TWB\Part::GlyphIcon('envelope').' '._('Support').'</a></li>
6060
<li class="divider"></li>
61-
<li><a href="logout.php">'.\Ease\TWB\Part::GlyphIcon('off').' '._('Odhlášení').'</a></li>
61+
<li><a href="logout.php">'.\Ease\TWB\Part::GlyphIcon('off').' '._('Sign off').'</a></li>
6262
</ul>
6363
</li>
6464
', 'right');
@@ -73,7 +73,7 @@ public function draw()
7373
$statusMessages = $this->webPage->getStatusMessagesAsHtml();
7474
if ($statusMessages) {
7575
$this->addItem(new \Ease\Html\Div($statusMessages,
76-
['id' => 'StatusMessages', 'class' => 'well', 'title' => _('kliknutím skryjete zprávy'),
76+
['id' => 'StatusMessages', 'class' => 'well', 'title' => _('Click to hide messages'),
7777
'data-state' => 'down']));
7878
$this->addItem(new \Ease\Html\Div(null, ['id' => 'smdrag']));
7979
$this->webPage->cleanMessages();

src/classes/UI/ChildrenSelector.php

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,47 @@ class ChildrenSelector extends \Ease\Container
2222
public function __construct($Host)
2323
{
2424
$FieldName = 'parents';
25-
$InitialContent = new \Ease\TWB\Panel(_('Potomci'));
25+
$InitialContent = new \Ease\TWB\Panel(_('Children'));
2626
$InitialContent->setTagCss(['width' => '100%']);
2727

2828
if (is_null($Host->getMyKey())) {
29-
$InitialContent->addItem(_('Nejprve je potřeba uložit záznam'));
29+
$InitialContent->addItem(_('Please save record firs'));
3030
} else {
3131

32-
$Service = new Engine\IEService();
32+
$Service = new \Icinga\Editor\Engine\Service();
3333

34-
$ServicesAssigned = $Service->dblink->queryToArray('SELECT '.$Service->myKeyColumn.','.$Service->nameColumn.' FROM '.$Service->myTable.' WHERE '.$FieldName.' LIKE \'%"'.$Host->getName().'"%\'',
34+
$servicesAssigned = $Service->dblink->queryToArray('SELECT '.$Service->myKeyColumn.','.$Service->nameColumn.' FROM '.$Service->myTable.' WHERE '.$FieldName.' LIKE \'%"'.$Host->getName().'"%\'',
3535
$Service->myKeyColumn);
3636

37-
$AllServices = $Service->getListing();
38-
foreach ($AllServices as $ServiceID => $ServiceInfo) {
39-
if ($ServiceInfo['register'] != 1) {
40-
unset($AllServices[$ServiceID]);
37+
$allServices = $Service->getListing();
38+
foreach ($allServices as $ServiceID => $serviceInfo) {
39+
if ($serviceInfo['register'] != 1) {
40+
unset($allServices[$ServiceID]);
4141
}
4242
}
4343

44-
foreach ($ServicesAssigned as $ServiceID => $ServiceInfo) {
45-
unset($AllServices[$ServiceID]);
44+
foreach ($servicesAssigned as $ServiceID => $serviceInfo) {
45+
unset($allServices[$ServiceID]);
4646
}
4747

48-
if (count($AllServices)) {
48+
if (count($allServices)) {
4949

50-
foreach ($AllServices as $ServiceID => $ServiceInfo) {
51-
$Jellybean = new \Ease\Html\SpanTag($ServiceInfo[$Service->nameColumn],
50+
foreach ($allServices as $ServiceID => $serviceInfo) {
51+
$Jellybean = new \Ease\Html\SpanTag($serviceInfo[$Service->nameColumn],
5252
null, ['class' => 'jellybean gray']);
53-
$Jellybean->addItem(new \Ease\Html\ATag('?addservice='.$ServiceInfo[$Service->nameColumn].'&amp;service_id='.$ServiceID.'&amp;'.$Host->getmyKeyColumn().'='.$Host->getMyKey().'&amp;'.$Host->nameColumn.'='.$Host->getName(),
54-
$ServiceInfo[$Service->nameColumn]));
53+
$Jellybean->addItem(new \Ease\Html\ATag('?addservice='.$serviceInfo[$Service->nameColumn].'&amp;service_id='.$ServiceID.'&amp;'.$Host->getmyKeyColumn().'='.$Host->getMyKey().'&amp;'.$Host->nameColumn.'='.$Host->getName(),
54+
$serviceInfo[$Service->nameColumn]));
5555
$InitialContent->addItem($Jellybean);
5656
}
5757
}
5858

59-
if (count($ServicesAssigned)) {
59+
if (count($servicesAssigned)) {
6060
$InitialContent->addItem('</br>');
61-
foreach ($ServicesAssigned as $ServiceID => $ServiceInfo) {
62-
$Jellybean = new \Ease\Html\SpanTag($ServiceInfo[$Service->nameColumn],
61+
foreach ($servicesAssigned as $ServiceID => $serviceInfo) {
62+
$Jellybean = new \Ease\Html\SpanTag($serviceInfo[$Service->nameColumn],
6363
null, ['class' => 'jellybean']);
64-
$Jellybean->addItem($ServiceInfo[$Service->nameColumn]);
65-
$Jellybean->addItem(new \Ease\Html\ATag('?delservice='.$ServiceInfo[$Service->nameColumn].'&amp;service_id='.$ServiceID.'&amp;'.$Host->getmyKeyColumn().'='.$Host->getMyKey().'&amp;'.$Host->nameColumn.'='.$Host->getName(),
64+
$Jellybean->addItem($serviceInfo[$Service->nameColumn]);
65+
$Jellybean->addItem(new \Ease\Html\ATag('?delservice='.$serviceInfo[$Service->nameColumn].'&amp;service_id='.$ServiceID.'&amp;'.$Host->getmyKeyColumn().'='.$Host->getMyKey().'&amp;'.$Host->nameColumn.'='.$Host->getName(),
6666
\Ease\TWB\Part::GlyphIcon('remove')));
6767
$InitialContent->addItem($Jellybean);
6868
}
@@ -74,34 +74,34 @@ public function __construct($Host)
7474
/**
7575
* Uloží položky
7676
*
77-
* @param array $Request
77+
* @param array $request
7878
*/
79-
public static function saveMembers($Request)
79+
public static function saveMembers($request)
8080
{
81-
$Service = new Engine\IEService();
82-
if (isset($Request[$Service->myKeyColumn])) {
83-
if ($Service->loadFromSQL($Request[$Service->myKeyColumn])) {
84-
if (isset($Request['addservice']) || isset($Request['delservice'])) {
85-
if (isset($Request['addservice'])) {
86-
$Service->addHostName($Request['host_id'],
87-
$Request['host_name']);
88-
if ($Service->saveToSQL()) {
89-
$Service->addStatusMessage(sprintf(_('položka %s byla přidána'),
90-
$Request['addservice']), 'success');
81+
$service = new \Icinga\Editor\Engine\Service();
82+
if (isset($request[$service->myKeyColumn])) {
83+
if ($service->loadFromSQL($request[$service->myKeyColumn])) {
84+
if (isset($request['addservice']) || isset($request['delservice'])) {
85+
if (isset($request['addservice'])) {
86+
$service->addHostName($request['host_id'],
87+
$request['host_name']);
88+
if ($service->saveToSQL()) {
89+
$service->addStatusMessage(sprintf(_('The item %s was added'),
90+
$request['addservice']), 'success');
9191
} else {
92-
$Service->addStatusMessage(sprintf(_('položka %s nebyla přidána'),
93-
$Request['addservice']), 'warning');
92+
$service->addStatusMessage(sprintf(_('The item %s was not added'),
93+
$request['addservice']), 'warning');
9494
}
9595
}
96-
if (isset($Request['delservice'])) {
97-
$Service->delHostName($Request['host_id'],
98-
$Request['host_name']);
99-
if ($Service->saveToSQL()) {
100-
$Service->addStatusMessage(sprintf(_('položka %s byla odebrána'),
101-
$Request['delservice']), 'success');
96+
if (isset($request['delservice'])) {
97+
$service->delHostName($request['host_id'],
98+
$request['host_name']);
99+
if ($service->saveToSQL()) {
100+
$service->addStatusMessage(sprintf(_('The item %s has been removed'),
101+
$request['delservice']), 'success');
102102
} else {
103-
$Service->addStatusMessage(sprintf(_('položka %s nebyla odebrána'),
104-
$Request['delservice']), 'warning');
103+
$service->addStatusMessage(sprintf(_('The item %s not removed'),
104+
$request['delservice']), 'warning');
105105
}
106106
}
107107
}

src/classes/UI/IconSelector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class IconSelector extends \Ease\Container
2525
/**
2626
* Volba ikony pro host
2727
*
28-
* @param IEHost $host
28+
* @param \Icinga\Editor\Engine\Host $host
2929
*/
3030
public function __construct($host)
3131
{

src/includes/IEInit.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
get_include_path().PATH_SEPARATOR.
1313
'includes'.PATH_SEPARATOR.
1414
'../includes'.PATH_SEPARATOR.
15-
'/usr/share/icinga-editor/includes/'.PATH_SEPARATOR.
15+
'../../vendor'.PATH_SEPARATOR.
16+
'../vendor'.PATH_SEPARATOR.
1617
'/var/lib/icinga-editor'.PATH_SEPARATOR.
17-
'../vendor'
18+
'/usr/share/icinga-editor/includes/'
1819
);
1920

2021
require_once 'Configure.php';

src/index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
$oPage->heroUnit->addItem(new \Ease\Html\ImgTag('img/vsmonitoring.png'));
2626
$oPage->heroUnit->addItem(new \Ease\Html\ATag('http://icinga.org/',
2727
new \Ease\Html\ImgTag('img/icinga_logo4-300x109.png')));
28-
$oPage->heroUnit->addItem(_('Monitoring služeb'));
28+
$oPage->heroUnit->addItem(_('Editor'));
2929
$oPage->heroUnit->setTagCss(['text-align' => 'center']);
3030

31-
$oPage->columnI->addItem(_('Sledování hostů'));
32-
$oPage->columnII->addItem(_('Sledování služeb'));
33-
$oPage->columnIII->addItem(_('Notifikace mail/jabber/sms/twitter'));
31+
$oPage->columnI->addItem(_('Watch the hosts'));
32+
$oPage->columnII->addItem(_('Watch the services'));
33+
$oPage->columnIII->addItem(_('Notifications on mail/jabber/sms/twitter'));
3434

3535
$oPage->addItem(new UI\PageBottom());
3636

0 commit comments

Comments
 (0)