Skip to content

Commit d76379d

Browse files
committed
Scripts file upload
Many fixes and improvements
1 parent fdcc00d commit d76379d

29 files changed

Lines changed: 491 additions & 148 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vitexsoftware/icinga-editor",
33
"description": "Editor of Icinga Configuration files",
4-
"version": "0.200",
4+
"version": "0.201",
55
"authors": [
66
{
77
"name": "vitex",

debian/changelog

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

33
[ dvorak ]
44
* Initial release. (Closes: #XXXXXX)
@@ -27,5 +27,53 @@ icinga-editor (0.200-15) UNRELEASED; urgency=medium
2727
* Deleting users fix
2828
* Deleting users fix
2929
* Deleting users fix
30+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
31+
or notification_interval value for services & other misc fixes
32+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
33+
or notification_interval value for services & other misc fixes
34+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
35+
or notification_interval value for services & other misc fixes
36+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
37+
or notification_interval value for services & other misc fixes
38+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
39+
or notification_interval value for services & other misc fixes
40+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
41+
or notification_interval value for services & other misc fixes
42+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
43+
or notification_interval value for services & other misc fixes
44+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
45+
or notification_interval value for services & other misc fixes
46+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
47+
or notification_interval value for services & other misc fixes
48+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
49+
or notification_interval value for services & other misc fixes
50+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
51+
or notification_interval value for services & other misc fixes
52+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
53+
or notification_interval value for services & other misc fixes
54+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
55+
or notification_interval value for services & other misc fixes
56+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
57+
or notification_interval value for services & other misc fixes
58+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
59+
or notification_interval value for services & other misc fixes
60+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
61+
or notification_interval value for services & other misc fixes
62+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
63+
or notification_interval value for services & other misc fixes
64+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
65+
or notification_interval value for services & other misc fixes
66+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
67+
or notification_interval value for services & other misc fixes
68+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
69+
or notification_interval value for services & other misc fixes
70+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
71+
or notification_interval value for services & other misc fixes
72+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
73+
or notification_interval value for services & other misc fixes
74+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
75+
or notification_interval value for services & other misc fixes
76+
* HotfFix Invalid max_check_attempts, check_interval, retry_interval,
77+
or notification_interval value for services & other misc fixes
3078

31-
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 19 Jul 2016 17:46:48 +0200
79+
-- vitex <vitex@developer.kancl.brevnov.czf> Wed, 20 Jul 2016 18:31:43 +0200

debian/conf/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "vitexsoftware/icinga-editor",
33
"description": "Editor of Icinga Configuration files (debian version)",
4+
"version": "0.200.30",
45
"authors": [
56
{
67
"name": "vitex",

debian/deb-package.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ REVISION=`cat debian/revison | perl -ne 'chomp; print join(".", splice(@{[split/
77
CHANGES=`git log -n 1 | tail -n+5`
88
dch -b -v $VERSION-$REVISION --package $PACKAGE $CHANGES
99

10+
sed -i '/"version":/c\ "version": "'$VERSION.$REVISION'",' debian/conf/composer.json
11+
1012
debuild -i -us -uc -b
1113

1214

debian/postinst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ if [ ! -f $IECFG ] ; then
110110
fi
111111

112112
cd /usr/share/icinga-editor
113-
composer --no-dev -o install
113+
114+
if [ -f composer.lock ] ; then
115+
rm composer.lock
116+
fi
117+
118+
composer --no-dev -o update
114119

115120
#DEBHELPER#
116121

debian/revison

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

src/classes/DataSource.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class DataSource extends \Ease\Brick
6262
/**
6363
* Vrací data pro Grid
6464
*
65-
* @param IEcfg $handledObejct objekt poskytující data
66-
* @param type $fallBackUrl
65+
* @param Engine\Configurator $handledObejct objekt poskytující data
66+
* @param string $fallBackUrl
6767
*/
6868
public function __construct($handledObejct, $fallBackUrl = null)
6969
{
@@ -88,25 +88,25 @@ public function __construct($handledObejct, $fallBackUrl = null)
8888
$this->ajaxify();
8989
}
9090

91-
function setOrder($order)
91+
public function setOrder($order)
9292
{
9393
$this->order = $order;
9494
}
9595

9696
/**
97-
* Nastaví URL pro znovuzobrazení stránky
97+
* Nastaví URL pro znovuzobrazení stránky.
9898
*
9999
* @param type $url
100100
*/
101-
function setBackUrl($url)
101+
public function setBackUrl($url)
102102
{
103103
$this->fallBackUrl = $url;
104104
}
105105

106106
/**
107107
* řešení
108108
*/
109-
function ajaxify()
109+
public function ajaxify()
110110
{
111111
$action = $this->webPage->getRequestValue('action');
112112

@@ -157,7 +157,7 @@ function ajaxify()
157157
}
158158

159159
/**
160-
* Vrací celkový počet výsledků dotazu bez stránkování
160+
* Vrací celkový počet výsledků dotazu bez stránkování.
161161
*
162162
* @param string $queryRaw
163163
* @return int
@@ -536,6 +536,6 @@ public function controlEditColumns()
536536
*/
537537
public function getWhere()
538538
{
539-
return '';
539+
return $this->getListingQueryWhere();
540540
}
541541
}

src/classes/UI/ContactTweaker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public function finalize()
114114
$this->addItem(new \Ease\TWB\Panel(_('Přidat kontaktní údaj'),
115115
'default', $form));
116116
} else {
117-
$this->addItem(new \Ease\Html\DivTag('plno',
117+
$this->addItem(new \Ease\Html\Div(
118118
_('K tomuto kontaktu již není možné přidávat další údaje.'),
119-
['class' => 'well warning', 'style' => 'margin: 10px']));
119+
['class' => 'well warning', 'style' => 'margin: 10px', 'id' => 'plno']));
120120
}
121121
}
122122
}

src/classes/UI/HostIcon.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ class HostIcon extends \Ease\Html\ImgTag
1616
/**
1717
* Zobrazí obrázek hosta
1818
*
19-
* @param IEHost $host
19+
* @param \Icinga\Editor\Engine\Host $host
2020
*/
2121
public function __construct($host)
2222
{
23-
$image = 'unknown.gif';
2423
$title = '';
2524
if (is_array($host)) {
2625
if (isset($host['icon_image'])) {
@@ -31,6 +30,11 @@ public function __construct($host)
3130
$image = $host->getDataValue('icon_image');
3231
$title = $host->getName();
3332
}
33+
34+
if (!strlen($image)) {
35+
$image = 'unknown.gif';
36+
}
37+
3438
parent::__construct('logos/'.$image, $title, null, null,
3539
['class' => 'host_icon']);
3640
}

src/classes/UI/MainMenu.php

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,31 @@ public function __construct()
2424
/**
2525
* Add "Apply Changes" Button into menu
2626
*
27-
* @param IEBootstrapMenu $nav
27+
* @param BootstrapMenu $nav
2828
*/
2929
private function changesButton($nav)
3030
{
31-
if (\Ease\Shared::user()->getSettingValue('unsaved') == true) {
31+
$user = \Ease\Shared::user();
32+
if ($user->getSettingValue('admin')) {
33+
if ($user->getSettingValue('unsaved') == true) {
34+
$nav->addMenuItem(
35+
new \Ease\TWB\LinkButton(
36+
'regenall.php', _('Přegenerovat všechny konfiguráky'),
37+
'warning'
38+
), 'right'
39+
);
40+
} else {
41+
$nav->addMenuItem(
42+
new \Ease\TWB\LinkButton(
43+
'regenall.php', _('Přegenerovat všechny konfiguráky'),
44+
'default'
45+
), 'right'
46+
);
47+
}
48+
}
49+
50+
51+
if ($user->getSettingValue('unsaved') == true) {
3252
$nav->addMenuItem(
3353
new \Ease\Html\ATag(
3454
'apply.php', _('Uplatnit změny'), ['class' => 'btn btn-success']
@@ -43,7 +63,7 @@ private function changesButton($nav)
4363
/**
4464
* Add Groups/Hosts into menu
4565
*
46-
* @param IEBootstrapMenu $nav
66+
* @param BootstrapMenu $nav
4767
*/
4868
private function groupsHostsMenu($nav)
4969
{
@@ -191,8 +211,8 @@ public function afterAdd()
191211
'extserviceinfo.php' => _('Rozšířené informace služeb'),
192212
'serviceescalation.php' => _('Eskalace služeb') */
193213
'' => '',
194-
'stemplate.php?action=new' => \Ease\TWB\Part::GlyphIcon('plus').' '._('Nová předloha sledované služby'),
195-
'stemplates.php' => \Ease\TWB\Part::GlyphIcon('list').' '._('Přehled předloh sled. sl.')
214+
'stemplate.php?action=new' => \Ease\TWB\Part::GlyphIcon('plus').' '._('Nová sada sledované služby'),
215+
'stemplates.php' => \Ease\TWB\Part::GlyphIcon('list').' '._('Přehled sad sledovanych služeb')
196216
]
197217
);
198218
} else {
@@ -266,7 +286,7 @@ public function afterAdd()
266286
'wpnag.php' => \Ease\TWB\Part::GlyphIcon('Info').' '._('Win Phone')];
267287

268288
if (file_exists('/etc/apache2/conf-enabled/icinga-web.conf')) {
269-
$results['/icinga-web/'] = \Ease\TWB\Part::GlyphIcon('Info').' '._('Web');
289+
$results['/icinga-web/'] = \Ease\TWB\Part::GlyphIcon('Info').' '._('Icinga Web');
270290
}
271291

272292
$nav->addDropDownMenu(_('Výsledky testů'), $results);

0 commit comments

Comments
 (0)