Skip to content

Commit b18547b

Browse files
committed
Added support for Windows notebooks to notify about own downtime (host_is_server switch)
Host class translated to engish
1 parent 6eae60d commit b18547b

33 files changed

+449
-2077
lines changed
File renamed without changes.

bin/toicmdfile.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
CFGFILE="/etc/icinga/icinga.cfg"
3+
4+
if grep -Fxq "check_external_commands=1" $CFGFILE
5+
then
6+
CMDFILE=`cat $CFGFILE | grep command_file= | awk -F= '{print $2}'`
7+
echo $CMDFILE: $1
8+
echo $1 > $CMDFILE
9+
else
10+
echo "external commands in $CFGFILE disabled !?!"
11+
fi
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
use Phinx\Migration\AbstractMigration;
4+
5+
class Host3dOut extends AbstractMigration
6+
{
7+
/**
8+
* Change Method.
9+
*
10+
* Write your reversible migrations using this method.
11+
*
12+
* More information on writing migrations is available here:
13+
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
14+
*
15+
* The following commands can be used in this method and Phinx will
16+
* automatically reverse them when rolling back:
17+
*
18+
* createTable
19+
* renameTable
20+
* addColumn
21+
* renameColumn
22+
* addIndex
23+
* addForeignKey
24+
*
25+
* Remember to call "create()" or "update()" and NOT "save()" when working
26+
* with the Table class.
27+
*/
28+
public function change()
29+
{
30+
$table = $this->table('host');
31+
$table->removeColumn('vrml_image')
32+
->removeColumn('3d_coords')
33+
->save();
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Phinx\Migration\AbstractMigration;
4+
5+
class HostIsServer extends AbstractMigration
6+
{
7+
/**
8+
* Change Method.
9+
*
10+
* Write your reversible migrations using this method.
11+
*
12+
* More information on writing migrations is available here:
13+
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
14+
*
15+
* The following commands can be used in this method and Phinx will
16+
* automatically reverse them when rolling back:
17+
*
18+
* createTable
19+
* renameTable
20+
* addColumn
21+
* renameColumn
22+
* addIndex
23+
* addForeignKey
24+
*
25+
* Remember to call "create()" or "update()" and NOT "save()" when working
26+
* with the Table class.
27+
*/
28+
public function change()
29+
{
30+
$table = $this->table('host');
31+
$table->addColumn('host_is_server', 'boolean', array('null' => true))
32+
->update();
33+
}
34+
}

debian/changelog

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
icinga-editor (1.1.2-13) UNRELEASED; urgency=medium
1+
icinga-editor (1.1.2-24) UNRELEASED; urgency=medium
22

33
[ dvorak ]
44
* Initial release. (Closes: #XXXXXX)
@@ -105,5 +105,18 @@ icinga-editor (1.1.2-13) UNRELEASED; urgency=medium
105105
* Better README
106106
* Fixed search path Fixed composer package version for debian
107107
Switching string to English
108+
* Fixed Scripts Edit/Upload Switching strings to English
109+
* Fixed Scripts Edit/Upload Switching strings to English
110+
* Fixed Scripts Edit/Upload Switching strings to English
111+
* Fixed Scripts Edit/Upload Switching strings to English
112+
* Fixed Scripts Edit/Upload Switching strings to English
113+
* Fixed Scripts Edit/Upload Switching strings to English
114+
* Fixed Scripts Edit/Upload Switching strings to English
115+
* Fixed Scripts Edit/Upload Switching strings to English
116+
* Fixed Scripts Edit/Upload Switching strings to English
117+
* Fixed Scripts Edit/Upload Switching strings to English
118+
* Fixed Scripts Edit/Upload Switching strings to English
119+
* Fixed Scripts Edit/Upload Switching strings to English
120+
* Fixed Scripts Edit/Upload Switching strings to English
108121

109-
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 02 Aug 2016 14:55:12 +0200
122+
-- vitex <vitex@developer.kancl.brevnov.czf> Fri, 12 Aug 2016 19:27:30 +0200

debian/conf/composer.json

+1-1
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 (debianized)",
4-
"version": "1.1.2.13",
4+
"version": "1.1.2.24",
55
"license": "GPL-2.0",
66
"authors": [
77
{

debian/conf/icinga-editor

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
User_Alias APACHE = www-data
2-
Cmnd_Alias ICINGA = /usr/sbin/icinga, /etc/init.d/icinga
2+
Cmnd_Alias ICINGA = /usr/sbin/icinga, /etc/init.d/icinga, /usr/bin/toicmdfile.sh
33
APACHE ALL = (ALL) NOPASSWD: ICINGA

debian/install

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
src/*.php usr/share/icinga-editor
22
src/*.ico usr/share/icinga-editor
3-
src/css/*.css usr/share/icinga-editor/css
3+
src/css/*.css usr/share/icinga-editor/css
44
src/css/images/* usr/share/icinga-editor/css/images
55
src/css/msdropdown/* usr/share/icinga-editor/css/msdropdown
66
src/js/*.js usr/share/icinga-editor/js
@@ -12,13 +12,14 @@ src/classes/*.php usr/share/icinga-editor/classes
1212
src/classes/UI/*.php usr/share/icinga-editor/classes/UI
1313
src/classes/engine/*.php usr/share/icinga-editor/classes/engine
1414
src/modules/*.php usr/share/icinga-editor/modules
15-
debian/sql/install/* usr/share/dbconfig-common/data/icinga-editor/install
15+
debian/sql/install/* usr/share/dbconfig-common/data/icinga-editor/install
1616
debian/conf/composer.json usr/share/icinga-editor/
1717
debian/conf/icinga-editor.conf etc/apache2/conf-available
1818
debian/conf/icinga-editor.service etc/avahi/services
19-
debian/conf/icinga-editor etc/sudoers.d
20-
debian/plugins/* usr/lib/nagios/plugins
21-
src/bin/iecfgimporter.php usr/bin
19+
debian/conf/icinga-editor etc/sudoers.d
20+
debian/plugins/* usr/lib/nagios/plugins
21+
bin/iecfgimporter.php usr/bin
22+
bin/toicmdfile.sh usr/bin
2223

2324
locale/cs_CZ/LC_MESSAGES/*.mo usr/share/locale/cs_CZ/LC_MESSAGES
2425
locale/en_US/LC_MESSAGES/*.mo usr/share/locale/cs_CZ/LC_MESSAGES

debian/revison

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0
1+
24

debian/sql/install/mysql

+8-9
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,10 @@ CREATE TABLE IF NOT EXISTS `host` (
164164
`action_url` varchar(128) COLLATE utf8_czech_ci DEFAULT NULL,
165165
`icon_image` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
166166
`icon_image_alt` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
167-
`vrml_image` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
168167
`statusmap_image` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
169168
`2d_coords` varchar(32) COLLATE utf8_czech_ci DEFAULT NULL,
170-
`3d_coords` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
171169
`name` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
170+
`host_is_server` TINYINT(1) NULL,
172171
`register` tinyint(1) DEFAULT NULL,
173172
`use` varchar(64) COLLATE utf8_czech_ci DEFAULT NULL,
174173
`public` tinyint(1) DEFAULT NULL,
@@ -225,13 +224,13 @@ DROP TABLE IF EXISTS `script`;
225224
CREATE TABLE IF NOT EXISTS `script` (
226225
`script_id` int(11) NOT NULL,
227226
`filename` varchar(255) NOT NULL,
228-
`body` text NOT NULL,
229-
`platform` varchar(64) NOT NULL,
230-
`user_id` int(11) NOT NULL COMMENT 'vlastník',
231-
`public` tinyint(1) NOT NULL COMMENT 'viditelnost',
232-
`DatCreate` datetime NOT NULL,
233-
`DatSave` datetime NOT NULL
234-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='skripty pro deploy';
227+
`body` text,
228+
`platform` varchar(64) DEFAULT NULL,
229+
`user_id` int(11) DEFAULT NULL COMMENT 'owner',
230+
`public` tinyint(1) DEFAULT NULL COMMENT 'visibility',
231+
`DatCreate` datetime DEFAULT NULL,
232+
`DatSave` datetime DEFAULT NULL
233+
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='scripts for deploy';
235234

236235
-- --------------------------------------------------------
237236

debian/sql/upgrade/1.1.2-24

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTER TABLE `script` CHANGE `user_id` `user_id` INT(11) NULL DEFAULT NULL COMMENT 'vlastník', CHANGE `public` `public` TINYINT(1) NULL DEFAULT NULL COMMENT 'viditelnost', CHANGE `DatCreate` `DatCreate` DATETIME NULL DEFAULT NULL, CHANGE `DatSave` `DatSave` DATETIME NULL DEFAULT NULL;
2+
ALTER TABLE `host` DROP COLUMN `vrml_image`;
3+
ALTER TABLE `host` DROP COLUMN `3d_coords`;
4+
ALTER TABLE `host` ADD `host_is_server` TINYINT(1) NULL;
5+
6+

doc/resources/collapsed.png

-238 Bytes
Binary file not shown.

doc/resources/combined.js

-1,315
This file was deleted.

doc/resources/footer.png

-7.76 KB
Binary file not shown.

doc/resources/inherit.png

-152 Bytes
Binary file not shown.

doc/resources/resize.png

-216 Bytes
Binary file not shown.

doc/resources/sort.png

-171 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)