mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Merge branch 'master' into feature/localization-form-6073
Conflicts: library/Icinga/Application/ApplicationBootstrap.php test/php/library/Icinga/User/Store/DbStoreTest.php
This commit is contained in:
commit
ac2ec83852
@ -601,27 +601,15 @@ exec { 'create-pgsql-icingaweb-db':
|
||||
require => Service['postgresql']
|
||||
}
|
||||
|
||||
exec { 'populate-icingaweb-mysql-db-accounts':
|
||||
exec { 'populate-icingaweb-mysql-db-tables':
|
||||
unless => 'mysql -uicingaweb -picingaweb icingaweb -e "SELECT * FROM account;" &> /dev/null',
|
||||
command => 'mysql -uicingaweb -picingaweb icingaweb < /vagrant/etc/schema/accounts.mysql.sql',
|
||||
command => 'mysql -uicingaweb -picingaweb icingaweb < /vagrant/etc/schema/mysql.sql',
|
||||
require => [ Exec['create-mysql-icingaweb-db'] ]
|
||||
}
|
||||
|
||||
exec { 'populate-icingweba-pgsql-db-accounts':
|
||||
exec { 'populate-icingweba-pgsql-db-tables':
|
||||
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM account;" &> /dev/null',
|
||||
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/accounts.pgsql.sql',
|
||||
require => [ Exec['create-pgsql-icingaweb-db'] ]
|
||||
}
|
||||
|
||||
exec { 'populate-icingaweb-mysql-db-preferences':
|
||||
unless => 'mysql -uicingaweb -picingaweb icingaweb -e "SELECT * FROM preference;" &> /dev/null',
|
||||
command => 'mysql -uicingaweb -picingaweb icingaweb < /vagrant/etc/schema/preferences.mysql.sql',
|
||||
require => [ Exec['create-mysql-icingaweb-db'] ]
|
||||
}
|
||||
|
||||
exec { 'populate-icingweba-pgsql-db-preferences':
|
||||
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM preference;" &> /dev/null',
|
||||
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/preferences.pgsql.sql',
|
||||
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/pgsql.sql',
|
||||
require => [ Exec['create-pgsql-icingaweb-db'] ]
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
namespace Icinga\Clicommands;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Cli\Command;
|
||||
use Icinga\Exception\IcingaException;
|
||||
|
||||
@ -30,7 +31,7 @@ class WebCommand extends Command
|
||||
// throw new IcingaException('Socket is required');
|
||||
}
|
||||
if ($basedir === null) {
|
||||
$basedir = dirname(ICINGAWEB_APPDIR) . '/public';
|
||||
$basedir = Icinga::app()->getBaseDir('public');
|
||||
if (! file_exists($basedir) || ! is_dir($basedir)) {
|
||||
throw new IcingaException('Basedir is required');
|
||||
}
|
||||
|
@ -33,6 +33,17 @@ class AuthenticationController extends ActionController
|
||||
*/
|
||||
public function loginAction()
|
||||
{
|
||||
if (@file_exists(Config::$configDir . '/setup.token')) {
|
||||
try {
|
||||
$config = Config::app()->toArray();
|
||||
if (empty($config)) {
|
||||
$this->redirectNow(Url::fromPath('setup'));
|
||||
}
|
||||
} catch (NotReadableError $e) {
|
||||
// Gets thrown in case of insufficient permission only
|
||||
}
|
||||
}
|
||||
|
||||
$auth = $this->Auth();
|
||||
$this->view->form = $form = new LoginForm();
|
||||
$this->view->title = $this->translate('Icingaweb Login');
|
||||
@ -93,30 +104,30 @@ class AuthenticationController extends ActionController
|
||||
}
|
||||
}
|
||||
if ($backendsTried === 0) {
|
||||
throw new ConfigurationError(
|
||||
$this->view->form->addError(
|
||||
$this->translate(
|
||||
'No authentication methods available. Did you create'
|
||||
. ' authentication.ini when installing Icinga Web 2?'
|
||||
. ' authentication.ini when setting up Icinga Web 2?'
|
||||
)
|
||||
);
|
||||
}
|
||||
if ($backendsTried === $backendsWithError) {
|
||||
throw new ConfigurationError(
|
||||
} else if ($backendsTried === $backendsWithError) {
|
||||
$this->view->form->addError(
|
||||
$this->translate(
|
||||
'All configured authentication methods failed.'
|
||||
. ' Please check the system log or Icinga Web 2 log for more information.'
|
||||
)
|
||||
);
|
||||
}
|
||||
if ($backendsWithError) {
|
||||
$this->view->form->getElement('username')->addError(
|
||||
} elseif ($backendsWithError) {
|
||||
$this->view->form->addError(
|
||||
$this->translate(
|
||||
'Please note that not all authentication methods were available.'
|
||||
. ' Check the system log or Icinga Web 2 log for more information.'
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->view->form->getElement('password')->addError($this->translate('Incorrect username or password'));
|
||||
if ($backendsTried > 0 && $backendsTried !== $backendsWithError) {
|
||||
$this->view->form->getElement('password')->addError($this->translate('Incorrect username or password'));
|
||||
}
|
||||
} elseif ($request->isGet()) {
|
||||
$user = new User('');
|
||||
foreach ($chain as $backend) {
|
||||
@ -134,6 +145,8 @@ class AuthenticationController extends ActionController
|
||||
} catch (Exception $e) {
|
||||
$this->view->errorInfo = $e->getMessage();
|
||||
}
|
||||
|
||||
$this->view->configMissing = is_dir(Config::$configDir) === false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@ use Icinga\Web\Notification;
|
||||
use Icinga\Application\Modules\Module;
|
||||
use Icinga\Web\Widget;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Config as IcingaConfig;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Form\Config\GeneralConfigForm;
|
||||
use Icinga\Form\Config\AuthenticationBackendReorderForm;
|
||||
use Icinga\Form\Config\AuthenticationBackendConfigForm;
|
||||
@ -46,7 +46,7 @@ class ConfigController extends ActionController
|
||||
public function indexAction()
|
||||
{
|
||||
$form = new GeneralConfigForm();
|
||||
$form->setIniConfig(IcingaConfig::app());
|
||||
$form->setIniConfig(Config::app());
|
||||
$form->handleRequest();
|
||||
|
||||
$this->view->form = $form;
|
||||
@ -99,7 +99,7 @@ class ConfigController extends ActionController
|
||||
Notification::success(sprintf($this->translate('Module "%s" enabled'), $module));
|
||||
$this->rerenderLayout()->reloadCss()->redirectNow('config/modules');
|
||||
} catch (Exception $e) {
|
||||
$this->view->exceptionMesssage = $e->getMessage();
|
||||
$this->view->exceptionMessage = $e->getMessage();
|
||||
$this->view->moduleName = $module;
|
||||
$this->view->action = 'enable';
|
||||
$this->render('module-configuration-error');
|
||||
@ -131,7 +131,7 @@ class ConfigController extends ActionController
|
||||
public function authenticationAction()
|
||||
{
|
||||
$form = new AuthenticationBackendReorderForm();
|
||||
$form->setIniConfig(IcingaConfig::app('authentication'));
|
||||
$form->setIniConfig(Config::app('authentication'));
|
||||
$form->handleRequest();
|
||||
|
||||
$this->view->form = $form;
|
||||
@ -145,7 +145,7 @@ class ConfigController extends ActionController
|
||||
public function createauthenticationbackendAction()
|
||||
{
|
||||
$form = new AuthenticationBackendConfigForm();
|
||||
$form->setIniConfig(IcingaConfig::app('authentication'));
|
||||
$form->setIniConfig(Config::app('authentication'));
|
||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||
$form->setRedirectUrl('config/authentication');
|
||||
$form->handleRequest();
|
||||
@ -161,7 +161,7 @@ class ConfigController extends ActionController
|
||||
public function editauthenticationbackendAction()
|
||||
{
|
||||
$form = new AuthenticationBackendConfigForm();
|
||||
$form->setIniConfig(IcingaConfig::app('authentication'));
|
||||
$form->setIniConfig(Config::app('authentication'));
|
||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||
$form->setRedirectUrl('config/authentication');
|
||||
$form->handleRequest();
|
||||
@ -179,7 +179,7 @@ class ConfigController extends ActionController
|
||||
$form = new ConfirmRemovalForm(array(
|
||||
'onSuccess' => function ($request) {
|
||||
$configForm = new AuthenticationBackendConfigForm();
|
||||
$configForm->setIniConfig(IcingaConfig::app('authentication'));
|
||||
$configForm->setIniConfig(Config::app('authentication'));
|
||||
$authBackend = $request->getQuery('auth_backend');
|
||||
|
||||
try {
|
||||
@ -212,7 +212,7 @@ class ConfigController extends ActionController
|
||||
*/
|
||||
public function resourceAction()
|
||||
{
|
||||
$this->view->resources = IcingaConfig::app('resources', true)->toArray();
|
||||
$this->view->resources = Config::app('resources', true)->toArray();
|
||||
$this->view->tabs->activate('resources');
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ class ConfigController extends ActionController
|
||||
public function createresourceAction()
|
||||
{
|
||||
$form = new ResourceConfigForm();
|
||||
$form->setIniConfig(IcingaConfig::app('resources'));
|
||||
$form->setIniConfig(Config::app('resources'));
|
||||
$form->setRedirectUrl('config/resource');
|
||||
$form->handleRequest();
|
||||
|
||||
@ -236,7 +236,7 @@ class ConfigController extends ActionController
|
||||
public function editresourceAction()
|
||||
{
|
||||
$form = new ResourceConfigForm();
|
||||
$form->setIniConfig(IcingaConfig::app('resources'));
|
||||
$form->setIniConfig(Config::app('resources'));
|
||||
$form->setRedirectUrl('config/resource');
|
||||
$form->handleRequest();
|
||||
|
||||
@ -252,7 +252,7 @@ class ConfigController extends ActionController
|
||||
$form = new ConfirmRemovalForm(array(
|
||||
'onSuccess' => function ($request) {
|
||||
$configForm = new ResourceConfigForm();
|
||||
$configForm->setIniConfig(IcingaConfig::app('resources'));
|
||||
$configForm->setIniConfig(Config::app('resources'));
|
||||
$resource = $request->getQuery('resource');
|
||||
|
||||
try {
|
||||
@ -274,7 +274,7 @@ class ConfigController extends ActionController
|
||||
|
||||
// Check if selected resource is currently used for authentication
|
||||
$resource = $this->getRequest()->getQuery('resource');
|
||||
$authConfig = IcingaConfig::app('authentication')->toArray();
|
||||
$authConfig = Config::app('authentication')->toArray();
|
||||
foreach ($authConfig as $backendName => $config) {
|
||||
if (array_key_exists('resource', $config) && $config['resource'] === $resource) {
|
||||
$form->addError(sprintf(
|
||||
|
@ -93,7 +93,7 @@ class DashboardController extends ActionController
|
||||
);
|
||||
|
||||
$configFile = Config::app('dashboard/dashboard')->getConfigFile();
|
||||
if ($this->writeConfiguration(new Zend_Config($dashboard->toArray()), $configFile)) {
|
||||
if ($this->writeConfiguration(new Config($dashboard->toArray()), $configFile)) {
|
||||
$this->redirectNow(Url::fromPath('dashboard', array('pane' => $form->getValue('pane'))));
|
||||
} else {
|
||||
$this->render('showConfiguration');
|
||||
@ -151,12 +151,12 @@ class DashboardController extends ActionController
|
||||
/**
|
||||
* Store the given configuration as INI file
|
||||
*
|
||||
* @param Zend_Config $config The configuration to store
|
||||
* @param string $target The path where to store the configuration
|
||||
* @param Config $config The configuration to store
|
||||
* @param string $target The path where to store the configuration
|
||||
*
|
||||
* @return bool Whether the configuartion has been successfully stored
|
||||
*/
|
||||
protected function writeConfiguration(Zend_Config $config, $target)
|
||||
protected function writeConfiguration(Config $config, $target)
|
||||
{
|
||||
$writer = new IniWriter(array('config' => $config, 'filename' => $target));
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Web\Hook;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Protocol\File\FileReader;
|
||||
use \Zend_Controller_Action_Exception as ActionError;
|
||||
|
||||
@ -48,7 +48,7 @@ class ListController extends Controller
|
||||
. ' - (?<message>.*)$/'; // message
|
||||
|
||||
$loggerWriter = Logger::getInstance()->getWriter();
|
||||
$resource = new FileReader(new Zend_Config(array(
|
||||
$resource = new FileReader(new Config(array(
|
||||
'filename' => $loggerWriter->getPath(),
|
||||
'fields' => $pattern
|
||||
)));
|
||||
|
21
application/fonts/fontanello-ifont/LICENSE.txt
Normal file
21
application/fonts/fontanello-ifont/LICENSE.txt
Normal file
@ -0,0 +1,21 @@
|
||||
Font license info
|
||||
|
||||
|
||||
## Font Awesome
|
||||
|
||||
Copyright (C) 2012 by Dave Gandy
|
||||
|
||||
Author: Dave Gandy
|
||||
License: SIL ()
|
||||
Homepage: http://fortawesome.github.com/Font-Awesome/
|
||||
|
||||
|
||||
## Iconic
|
||||
|
||||
Copyright (C) 2012 by P.J. Onori
|
||||
|
||||
Author: P.J. Onori
|
||||
License: SIL (http://scripts.sil.org/OFL)
|
||||
Homepage: http://somerandomdude.com/work/iconic/
|
||||
|
||||
|
75
application/fonts/fontanello-ifont/README.txt
Normal file
75
application/fonts/fontanello-ifont/README.txt
Normal file
@ -0,0 +1,75 @@
|
||||
This webfont is generated by http://fontello.com open source project.
|
||||
|
||||
|
||||
================================================================================
|
||||
Please, note, that you should obey original font licences, used to make this
|
||||
webfont pack. Details available in LICENSE.txt file.
|
||||
|
||||
- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
|
||||
site in "About" section.
|
||||
|
||||
- If your project is open-source, usually, it will be ok to make LICENSE.txt
|
||||
file publically available in your repository.
|
||||
|
||||
- Fonts, used in Fontello, don't require to make clickable links on your site.
|
||||
But any kind of additional authors crediting is welcome.
|
||||
================================================================================
|
||||
|
||||
|
||||
Comments on archive content
|
||||
---------------------------
|
||||
|
||||
- /font/* - fonts in different formats
|
||||
|
||||
- /css/* - different kinds of css, for all situations. Should be ok with
|
||||
twitter bootstrap. Also, you can skip <i> style and assign icon classes
|
||||
directly to text elements, if you don't mind about IE7.
|
||||
|
||||
- demo.html - demo file, to show your webfont content
|
||||
|
||||
- LICENSE.txt - license info about source fonts, used to build your one.
|
||||
|
||||
- config.json - keeps your settings. You can import it back to fontello anytime,
|
||||
to continue your work
|
||||
|
||||
|
||||
Why so many CSS files ?
|
||||
-----------------------
|
||||
|
||||
Because we like to fit all your needs :)
|
||||
|
||||
- basic file, <your_font_name>.css - is usually enougth, in contains @font-face
|
||||
and character codes definition
|
||||
|
||||
- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
|
||||
directly into html
|
||||
|
||||
- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
|
||||
rules, but still wish to benefit of css generation. That can be very
|
||||
convenient for automated assets build systems. When you need to update font -
|
||||
no needs to manually edit files, just override old version with archive
|
||||
content. See fontello source codes for example.
|
||||
|
||||
- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
|
||||
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
|
||||
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
|
||||
server headers. But if you ok with dirty hack - this file is for you. Note,
|
||||
that data url moved to separate @font-face to avoid problems with <IE9, when
|
||||
string is too long.
|
||||
|
||||
- animate.css - use it to get ideas about spinner rotation animation.
|
||||
|
||||
|
||||
Attention for server setup
|
||||
--------------------------
|
||||
|
||||
You MUST setup server to reply with proper `mime-types` for font files. In other
|
||||
case, some browsers will fail to show fonts.
|
||||
|
||||
Usually, `apache` already has necessary settings, but `nginx` and other
|
||||
webservers should be tuned. Here is list of mime types for our file extentions:
|
||||
|
||||
- `application/vnd.ms-fontobject` - eot
|
||||
- `application/x-font-woff` - woff
|
||||
- `application/x-font-ttf` - ttf
|
||||
- `image/svg+xml` - svg
|
568
application/fonts/fontanello-ifont/config.json
Normal file
568
application/fonts/fontanello-ifont/config.json
Normal file
@ -0,0 +1,568 @@
|
||||
{
|
||||
"name": "ifont",
|
||||
"css_prefix_text": "icon-",
|
||||
"css_use_suffix": false,
|
||||
"hinting": true,
|
||||
"units_per_em": 1000,
|
||||
"ascent": 850,
|
||||
"glyphs": [
|
||||
{
|
||||
"uid": "9dd9e835aebe1060ba7190ad2b2ed951",
|
||||
"css": "search",
|
||||
"code": 59484,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "8b80d36d4ef43889db10bc1f0dc9a862",
|
||||
"css": "user",
|
||||
"code": 59393,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "31972e4e9d080eaa796290349ae6c1fd",
|
||||
"css": "users",
|
||||
"code": 59394,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "b1887b423d2fd15c345e090320c91ca0",
|
||||
"css": "th",
|
||||
"code": 59392,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "ce3cf091d6ebd004dd0b52d24074e6e3",
|
||||
"css": "help",
|
||||
"code": 59483,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3d4ea8a78dc34efe891f3a0f3d961274",
|
||||
"css": "info",
|
||||
"code": 59482,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "d7271d490b71df4311e32cdacae8b331",
|
||||
"css": "home",
|
||||
"code": 59481,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "c1f1975c885aa9f3dad7810c53b82074",
|
||||
"css": "lock",
|
||||
"code": 59480,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "657ab647f6248a6b57a5b893beaf35a9",
|
||||
"css": "lock-open",
|
||||
"code": 59479,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "05376be04a27d5a46e855a233d6e8508",
|
||||
"css": "lock-open-alt",
|
||||
"code": 59478,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "c5fd349cbd3d23e4ade333789c29c729",
|
||||
"css": "eye",
|
||||
"code": 59475,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3db5347bd219f3bce6025780f5d9ef45",
|
||||
"css": "tag",
|
||||
"code": 59476,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "a3f89e106175a5c5c4e9738870b12e55",
|
||||
"css": "tags",
|
||||
"code": 59477,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9a76bc135eac17d2c8b8ad4a5774fc87",
|
||||
"css": "download",
|
||||
"code": 59400,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "eeec3208c90b7b48e804919d0d2d4a41",
|
||||
"css": "upload",
|
||||
"code": 59401,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "c6be5a58ee4e63a5ec399c2b0d15cf2c",
|
||||
"css": "reply",
|
||||
"code": 59473,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "1b5597a3bacaeca6600e88ae36d02e0a",
|
||||
"css": "reply-all",
|
||||
"code": 59474,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3d39c828009c04ddb6764c0b04cd2439",
|
||||
"css": "forward",
|
||||
"code": 59472,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "41087bc74d4b20b55059c60a33bf4008",
|
||||
"css": "edit",
|
||||
"code": 59471,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "7277ded7695b2a307a5f9d50097bb64c",
|
||||
"css": "print",
|
||||
"code": 59470,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "85528017f1e6053b2253785c31047f44",
|
||||
"css": "comment",
|
||||
"code": 59464,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "dcedf50ab1ede3283d7a6c70e2fe32f3",
|
||||
"css": "chat",
|
||||
"code": 59465,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9c1376672bb4f1ed616fdd78a23667e9",
|
||||
"css": "comment-empty",
|
||||
"code": 59463,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "31951fbb9820ed0690f675b3d495c8da",
|
||||
"css": "chat-empty",
|
||||
"code": 59466,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "cd21cbfb28ad4d903cede582157f65dc",
|
||||
"css": "bell",
|
||||
"code": 59467,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "671f29fa10dda08074a4c6a341bb4f39",
|
||||
"css": "bell-alt",
|
||||
"code": 59468,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "00391fac5d419345ffcccd95b6f76263",
|
||||
"css": "attention-alt",
|
||||
"code": 59469,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f48ae54adfb27d8ada53d0fd9e34ee10",
|
||||
"css": "trash",
|
||||
"code": 59462,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "5408be43f7c42bccee419c6be53fdef5",
|
||||
"css": "doc-text",
|
||||
"code": 59461,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9daa1fdf0838118518a7e22715e83abc",
|
||||
"css": "file-pdf",
|
||||
"code": 59458,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "310ffd629da85142bc8669f010556f2d",
|
||||
"css": "file-word",
|
||||
"code": 59459,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f761c3bbe16ba2d332914ecb28e7a042",
|
||||
"css": "file-excel",
|
||||
"code": 59460,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9f7e588c66cfd6891f6f507cf6f6596b",
|
||||
"css": "phone",
|
||||
"code": 59457,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "e99461abfef3923546da8d745372c995",
|
||||
"css": "cog",
|
||||
"code": 59456,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "98687378abd1faf8f6af97c254eb6cd6",
|
||||
"css": "cog-alt",
|
||||
"code": 59455,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "5bb103cd29de77e0e06a52638527b575",
|
||||
"css": "wrench",
|
||||
"code": 59453,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "21b42d3c3e6be44c3cc3d73042faa216",
|
||||
"css": "sliders",
|
||||
"code": 59454,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "531bc468eecbb8867d822f1c11f1e039",
|
||||
"css": "calendar",
|
||||
"code": 59452,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "ead4c82d04d7758db0f076584893a8c1",
|
||||
"css": "calendar-empty",
|
||||
"code": 59451,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3a00327e61b997b58518bd43ed83c3df",
|
||||
"css": "login",
|
||||
"code": 59449,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0d20938846444af8deb1920dc85a29fb",
|
||||
"css": "logout",
|
||||
"code": 59450,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "19c50c52858a81de58f9db488aba77bc",
|
||||
"css": "mic",
|
||||
"code": 59448,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "43c629249e2cca7e73cd4ef410c9551f",
|
||||
"css": "mute",
|
||||
"code": 59447,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "e44601720c64e6bb6a2d5cba6b0c588c",
|
||||
"css": "volume-off",
|
||||
"code": 59446,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "fee6e00f36e8ca8ef3e4a62caa213bf6",
|
||||
"css": "volume-down",
|
||||
"code": 59445,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "76857a03fbaa6857fe063b6c25aa98ed",
|
||||
"css": "volume-up",
|
||||
"code": 59444,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "598a5f2bcf3521d1615de8e1881ccd17",
|
||||
"css": "clock",
|
||||
"code": 59443,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "5278ef7773e948d56c4d442c8c8c98cf",
|
||||
"css": "lightbulb",
|
||||
"code": 59442,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "98d9c83c1ee7c2c25af784b518c522c5",
|
||||
"css": "block",
|
||||
"code": 59440,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "e594fc6e5870b4ab7e49f52571d52577",
|
||||
"css": "resize-full",
|
||||
"code": 59434,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "b013f6403e5ab0326614e68d1850fd6b",
|
||||
"css": "resize-full-alt",
|
||||
"code": 59433,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3c24ee33c9487bbf18796ca6dffa1905",
|
||||
"css": "resize-small",
|
||||
"code": 59435,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "d3b3f17bc3eb7cd809a07bbd4d178bee",
|
||||
"css": "resize-vertical",
|
||||
"code": 59438,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3c73d058e4589b65a8d959c0fc8f153d",
|
||||
"css": "resize-horizontal",
|
||||
"code": 59437,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "6605ee6441bf499ffa3c63d3c7409471",
|
||||
"css": "move",
|
||||
"code": 59436,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0b2b66e526028a6972d51a6f10281b4b",
|
||||
"css": "zoom-in",
|
||||
"code": 59439,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "d25d10efa900f529ad1d275657cfd30e",
|
||||
"css": "zoom-out",
|
||||
"code": 59441,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "2d6150442079cbda7df64522dc24f482",
|
||||
"css": "down-dir",
|
||||
"code": 59421,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "80cd1022bd9ea151d554bec1fa05f2de",
|
||||
"css": "up-dir",
|
||||
"code": 59422,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9dc654095085167524602c9acc0c5570",
|
||||
"css": "left-dir",
|
||||
"code": 59423,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "fb1c799ffe5bf8fb7f8bcb647c8fe9e6",
|
||||
"css": "right-dir",
|
||||
"code": 59424,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "ccddff8e8670dcd130e3cb55fdfc2fd0",
|
||||
"css": "down-open",
|
||||
"code": 59425,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "d870630ff8f81e6de3958ecaeac532f2",
|
||||
"css": "left-open",
|
||||
"code": 59428,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "399ef63b1e23ab1b761dfbb5591fa4da",
|
||||
"css": "right-open",
|
||||
"code": 59426,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "fe6697b391355dec12f3d86d6d490397",
|
||||
"css": "up-open",
|
||||
"code": 59427,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "1c4068ed75209e21af36017df8871802",
|
||||
"css": "down-big",
|
||||
"code": 59432,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "555ef8c86832e686fef85f7af2eb7cde",
|
||||
"css": "left-big",
|
||||
"code": 59431,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "ad6b3fbb5324abe71a9c0b6609cbb9f1",
|
||||
"css": "right-big",
|
||||
"code": 59430,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "95376bf082bfec6ce06ea1cda7bd7ead",
|
||||
"css": "up-big",
|
||||
"code": 59429,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "d407a4707f719b042ed2ad28d2619d7e",
|
||||
"css": "signal",
|
||||
"code": 59420,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "197375a3cea8cb90b02d06e4ddf1433d",
|
||||
"css": "globe",
|
||||
"code": 59417,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "2c413e78faf1d6631fd7b094d14c2253",
|
||||
"css": "cloud",
|
||||
"code": 59418,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3212f42c65d41ed91cb435d0490e29ed",
|
||||
"css": "flash",
|
||||
"code": 59419,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "8772331a9fec983cdb5d72902a6f9e0e",
|
||||
"css": "scissors",
|
||||
"code": 59416,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "b429436ec5a518c78479d44ef18dbd60",
|
||||
"css": "paste",
|
||||
"code": 59415,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "8b9e6a8dd8f67f7c003ed8e7e5ee0857",
|
||||
"css": "off",
|
||||
"code": 59413,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9755f76110ae4d12ac5f9466c9152031",
|
||||
"css": "book",
|
||||
"code": 59414,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3e674995cacc2b09692c096ea7eb6165",
|
||||
"css": "megaphone",
|
||||
"code": 59409,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "7432077e6a2d6aa19984ca821bb6bbda",
|
||||
"css": "bug",
|
||||
"code": 59410,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "9396b2d8849e0213a0f11c5fd7fcc522",
|
||||
"css": "tasks",
|
||||
"code": 59411,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "4109c474ff99cad28fd5a2c38af2ec6f",
|
||||
"css": "filter",
|
||||
"code": 59412,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3ed68ae14e9cde775121954242a412b2",
|
||||
"css": "sort-name-up",
|
||||
"code": 59407,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "6586267200a42008a9fc0a1bf7ac06c7",
|
||||
"css": "sort-name-down",
|
||||
"code": 59408,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0bda4bc779d4c32623dec2e43bd67ee8",
|
||||
"css": "gauge",
|
||||
"code": 59405,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "6fe95ffc3c807e62647d4f814a96e0d7",
|
||||
"css": "sitemap",
|
||||
"code": 59406,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "af95ef0ddda80a78828c62d386506433",
|
||||
"css": "cubes",
|
||||
"code": 59403,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "347c38a8b96a509270fdcabc951e7571",
|
||||
"css": "database",
|
||||
"code": 59404,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "e7cb72a17f3b21e3576f35c3f0a7639b",
|
||||
"css": "git",
|
||||
"code": 59402,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "b90d80c250a9bbdd6cd3fe00e6351710",
|
||||
"css": "ok",
|
||||
"code": 59395,
|
||||
"src": "iconic"
|
||||
},
|
||||
{
|
||||
"uid": "11e664deed5b2587456a4f9c01d720b6",
|
||||
"css": "cancel",
|
||||
"code": 59396,
|
||||
"src": "iconic"
|
||||
},
|
||||
{
|
||||
"uid": "dbd39eb5a1d67beb54cfcb535e840e0f",
|
||||
"css": "plus",
|
||||
"code": 59397,
|
||||
"src": "iconic"
|
||||
},
|
||||
{
|
||||
"uid": "9559f17a471856ef50ed266e726cfa25",
|
||||
"css": "minus",
|
||||
"code": 59398,
|
||||
"src": "iconic"
|
||||
},
|
||||
{
|
||||
"uid": "13ea1e82d38c7ed614d9ee85e9c42053",
|
||||
"css": "folder-empty",
|
||||
"code": 59399,
|
||||
"src": "iconic"
|
||||
}
|
||||
]
|
||||
}
|
85
application/fonts/fontanello-ifont/css/animation.css
Normal file
85
application/fonts/fontanello-ifont/css/animation.css
Normal file
@ -0,0 +1,85 @@
|
||||
/*
|
||||
Animation example, for spinners
|
||||
*/
|
||||
.animate-spin {
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
display: inline-block;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
94
application/fonts/fontanello-ifont/css/ifont-codes.css
Normal file
94
application/fonts/fontanello-ifont/css/ifont-codes.css
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
.icon-th:before { content: '\e800'; } /* '' */
|
||||
.icon-user:before { content: '\e801'; } /* '' */
|
||||
.icon-users:before { content: '\e802'; } /* '' */
|
||||
.icon-ok:before { content: '\e803'; } /* '' */
|
||||
.icon-cancel:before { content: '\e804'; } /* '' */
|
||||
.icon-plus:before { content: '\e805'; } /* '' */
|
||||
.icon-minus:before { content: '\e806'; } /* '' */
|
||||
.icon-folder-empty:before { content: '\e807'; } /* '' */
|
||||
.icon-download:before { content: '\e808'; } /* '' */
|
||||
.icon-upload:before { content: '\e809'; } /* '' */
|
||||
.icon-git:before { content: '\e80a'; } /* '' */
|
||||
.icon-cubes:before { content: '\e80b'; } /* '' */
|
||||
.icon-database:before { content: '\e80c'; } /* '' */
|
||||
.icon-gauge:before { content: '\e80d'; } /* '' */
|
||||
.icon-sitemap:before { content: '\e80e'; } /* '' */
|
||||
.icon-sort-name-up:before { content: '\e80f'; } /* '' */
|
||||
.icon-sort-name-down:before { content: '\e810'; } /* '' */
|
||||
.icon-megaphone:before { content: '\e811'; } /* '' */
|
||||
.icon-bug:before { content: '\e812'; } /* '' */
|
||||
.icon-tasks:before { content: '\e813'; } /* '' */
|
||||
.icon-filter:before { content: '\e814'; } /* '' */
|
||||
.icon-off:before { content: '\e815'; } /* '' */
|
||||
.icon-book:before { content: '\e816'; } /* '' */
|
||||
.icon-paste:before { content: '\e817'; } /* '' */
|
||||
.icon-scissors:before { content: '\e818'; } /* '' */
|
||||
.icon-globe:before { content: '\e819'; } /* '' */
|
||||
.icon-cloud:before { content: '\e81a'; } /* '' */
|
||||
.icon-flash:before { content: '\e81b'; } /* '' */
|
||||
.icon-signal:before { content: '\e81c'; } /* '' */
|
||||
.icon-down-dir:before { content: '\e81d'; } /* '' */
|
||||
.icon-up-dir:before { content: '\e81e'; } /* '' */
|
||||
.icon-left-dir:before { content: '\e81f'; } /* '' */
|
||||
.icon-right-dir:before { content: '\e820'; } /* '' */
|
||||
.icon-down-open:before { content: '\e821'; } /* '' */
|
||||
.icon-right-open:before { content: '\e822'; } /* '' */
|
||||
.icon-up-open:before { content: '\e823'; } /* '' */
|
||||
.icon-left-open:before { content: '\e824'; } /* '' */
|
||||
.icon-up-big:before { content: '\e825'; } /* '' */
|
||||
.icon-right-big:before { content: '\e826'; } /* '' */
|
||||
.icon-left-big:before { content: '\e827'; } /* '' */
|
||||
.icon-down-big:before { content: '\e828'; } /* '' */
|
||||
.icon-resize-full-alt:before { content: '\e829'; } /* '' */
|
||||
.icon-resize-full:before { content: '\e82a'; } /* '' */
|
||||
.icon-resize-small:before { content: '\e82b'; } /* '' */
|
||||
.icon-move:before { content: '\e82c'; } /* '' */
|
||||
.icon-resize-horizontal:before { content: '\e82d'; } /* '' */
|
||||
.icon-resize-vertical:before { content: '\e82e'; } /* '' */
|
||||
.icon-zoom-in:before { content: '\e82f'; } /* '' */
|
||||
.icon-block:before { content: '\e830'; } /* '' */
|
||||
.icon-zoom-out:before { content: '\e831'; } /* '' */
|
||||
.icon-lightbulb:before { content: '\e832'; } /* '' */
|
||||
.icon-clock:before { content: '\e833'; } /* '' */
|
||||
.icon-volume-up:before { content: '\e834'; } /* '' */
|
||||
.icon-volume-down:before { content: '\e835'; } /* '' */
|
||||
.icon-volume-off:before { content: '\e836'; } /* '' */
|
||||
.icon-mute:before { content: '\e837'; } /* '' */
|
||||
.icon-mic:before { content: '\e838'; } /* '' */
|
||||
.icon-login:before { content: '\e839'; } /* '' */
|
||||
.icon-logout:before { content: '\e83a'; } /* '' */
|
||||
.icon-calendar-empty:before { content: '\e83b'; } /* '' */
|
||||
.icon-calendar:before { content: '\e83c'; } /* '' */
|
||||
.icon-wrench:before { content: '\e83d'; } /* '' */
|
||||
.icon-sliders:before { content: '\e83e'; } /* '' */
|
||||
.icon-cog-alt:before { content: '\e83f'; } /* '' */
|
||||
.icon-cog:before { content: '\e840'; } /* '' */
|
||||
.icon-phone:before { content: '\e841'; } /* '' */
|
||||
.icon-file-pdf:before { content: '\e842'; } /* '' */
|
||||
.icon-file-word:before { content: '\e843'; } /* '' */
|
||||
.icon-file-excel:before { content: '\e844'; } /* '' */
|
||||
.icon-doc-text:before { content: '\e845'; } /* '' */
|
||||
.icon-trash:before { content: '\e846'; } /* '' */
|
||||
.icon-comment-empty:before { content: '\e847'; } /* '' */
|
||||
.icon-comment:before { content: '\e848'; } /* '' */
|
||||
.icon-chat:before { content: '\e849'; } /* '' */
|
||||
.icon-chat-empty:before { content: '\e84a'; } /* '' */
|
||||
.icon-bell:before { content: '\e84b'; } /* '' */
|
||||
.icon-bell-alt:before { content: '\e84c'; } /* '' */
|
||||
.icon-attention-alt:before { content: '\e84d'; } /* '' */
|
||||
.icon-print:before { content: '\e84e'; } /* '' */
|
||||
.icon-edit:before { content: '\e84f'; } /* '' */
|
||||
.icon-forward:before { content: '\e850'; } /* '' */
|
||||
.icon-reply:before { content: '\e851'; } /* '' */
|
||||
.icon-reply-all:before { content: '\e852'; } /* '' */
|
||||
.icon-eye:before { content: '\e853'; } /* '' */
|
||||
.icon-tag:before { content: '\e854'; } /* '' */
|
||||
.icon-tags:before { content: '\e855'; } /* '' */
|
||||
.icon-lock-open-alt:before { content: '\e856'; } /* '' */
|
||||
.icon-lock-open:before { content: '\e857'; } /* '' */
|
||||
.icon-lock:before { content: '\e858'; } /* '' */
|
||||
.icon-home:before { content: '\e859'; } /* '' */
|
||||
.icon-info:before { content: '\e85a'; } /* '' */
|
||||
.icon-help:before { content: '\e85b'; } /* '' */
|
||||
.icon-search:before { content: '\e85c'; } /* '' */
|
147
application/fonts/fontanello-ifont/css/ifont-embedded.css
Normal file
147
application/fonts/fontanello-ifont/css/ifont-embedded.css
Normal file
File diff suppressed because one or more lines are too long
94
application/fonts/fontanello-ifont/css/ifont-ie7-codes.css
Normal file
94
application/fonts/fontanello-ifont/css/ifont-ie7-codes.css
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
.icon-th { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ok { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-folder-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-upload { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-git { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cubes { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-database { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-gauge { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sitemap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-name-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-name-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-megaphone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-bug { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tasks { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-filter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-book { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-paste { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-scissors { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-globe { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-flash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-signal { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-down-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-left-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-left-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-left-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-full-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-full { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-move { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-horizontal { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-vertical { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-zoom-in { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-block { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-zoom-out { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lightbulb { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-clock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-volume-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-volume-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-volume-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mute { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-calendar-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-calendar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-wrench { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sliders { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-phone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-pdf { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-word { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-excel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-doc-text { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-comment-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-chat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-bell { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-bell-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-attention-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-print { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-edit { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-forward { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-reply { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-reply-all { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tags { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lock-open-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lock-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-home { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-info { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
105
application/fonts/fontanello-ifont/css/ifont-ie7.css
Normal file
105
application/fonts/fontanello-ifont/css/ifont-ie7.css
Normal file
@ -0,0 +1,105 @@
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
font-family: 'ifont';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
||||
/* fix buttons height */
|
||||
line-height: 1em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
}
|
||||
|
||||
.icon-th { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ok { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-folder-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-upload { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-git { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cubes { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-database { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-gauge { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sitemap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-name-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-name-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-megaphone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-bug { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tasks { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-filter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-book { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-paste { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-scissors { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-globe { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-flash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-signal { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-down-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-left-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-dir { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-left-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-left-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-full-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-full { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-move { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-horizontal { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-resize-vertical { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-zoom-in { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-block { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-zoom-out { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lightbulb { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-clock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-volume-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-volume-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-volume-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mute { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-calendar-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-calendar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-wrench { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sliders { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-phone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-pdf { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-word { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-excel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-doc-text { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-comment-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-chat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-bell { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-bell-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-attention-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-print { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-edit { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-forward { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-reply { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-reply-all { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tags { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lock-open-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lock-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-home { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-info { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
145
application/fonts/fontanello-ifont/css/ifont.css
Normal file
145
application/fonts/fontanello-ifont/css/ifont.css
Normal file
@ -0,0 +1,145 @@
|
||||
@font-face {
|
||||
font-family: 'ifont';
|
||||
src: url('../font/ifont.eot?94749325');
|
||||
src: url('../font/ifont.eot?94749325#iefix') format('embedded-opentype'),
|
||||
url('../font/ifont.woff?94749325') format('woff'),
|
||||
url('../font/ifont.ttf?94749325') format('truetype'),
|
||||
url('../font/ifont.svg?94749325#ifont') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
/*
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'ifont';
|
||||
src: url('../font/ifont.svg?94749325#ifont') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "ifont";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.icon-th:before { content: '\e800'; } /* '' */
|
||||
.icon-user:before { content: '\e801'; } /* '' */
|
||||
.icon-users:before { content: '\e802'; } /* '' */
|
||||
.icon-ok:before { content: '\e803'; } /* '' */
|
||||
.icon-cancel:before { content: '\e804'; } /* '' */
|
||||
.icon-plus:before { content: '\e805'; } /* '' */
|
||||
.icon-minus:before { content: '\e806'; } /* '' */
|
||||
.icon-folder-empty:before { content: '\e807'; } /* '' */
|
||||
.icon-download:before { content: '\e808'; } /* '' */
|
||||
.icon-upload:before { content: '\e809'; } /* '' */
|
||||
.icon-git:before { content: '\e80a'; } /* '' */
|
||||
.icon-cubes:before { content: '\e80b'; } /* '' */
|
||||
.icon-database:before { content: '\e80c'; } /* '' */
|
||||
.icon-gauge:before { content: '\e80d'; } /* '' */
|
||||
.icon-sitemap:before { content: '\e80e'; } /* '' */
|
||||
.icon-sort-name-up:before { content: '\e80f'; } /* '' */
|
||||
.icon-sort-name-down:before { content: '\e810'; } /* '' */
|
||||
.icon-megaphone:before { content: '\e811'; } /* '' */
|
||||
.icon-bug:before { content: '\e812'; } /* '' */
|
||||
.icon-tasks:before { content: '\e813'; } /* '' */
|
||||
.icon-filter:before { content: '\e814'; } /* '' */
|
||||
.icon-off:before { content: '\e815'; } /* '' */
|
||||
.icon-book:before { content: '\e816'; } /* '' */
|
||||
.icon-paste:before { content: '\e817'; } /* '' */
|
||||
.icon-scissors:before { content: '\e818'; } /* '' */
|
||||
.icon-globe:before { content: '\e819'; } /* '' */
|
||||
.icon-cloud:before { content: '\e81a'; } /* '' */
|
||||
.icon-flash:before { content: '\e81b'; } /* '' */
|
||||
.icon-signal:before { content: '\e81c'; } /* '' */
|
||||
.icon-down-dir:before { content: '\e81d'; } /* '' */
|
||||
.icon-up-dir:before { content: '\e81e'; } /* '' */
|
||||
.icon-left-dir:before { content: '\e81f'; } /* '' */
|
||||
.icon-right-dir:before { content: '\e820'; } /* '' */
|
||||
.icon-down-open:before { content: '\e821'; } /* '' */
|
||||
.icon-right-open:before { content: '\e822'; } /* '' */
|
||||
.icon-up-open:before { content: '\e823'; } /* '' */
|
||||
.icon-left-open:before { content: '\e824'; } /* '' */
|
||||
.icon-up-big:before { content: '\e825'; } /* '' */
|
||||
.icon-right-big:before { content: '\e826'; } /* '' */
|
||||
.icon-left-big:before { content: '\e827'; } /* '' */
|
||||
.icon-down-big:before { content: '\e828'; } /* '' */
|
||||
.icon-resize-full-alt:before { content: '\e829'; } /* '' */
|
||||
.icon-resize-full:before { content: '\e82a'; } /* '' */
|
||||
.icon-resize-small:before { content: '\e82b'; } /* '' */
|
||||
.icon-move:before { content: '\e82c'; } /* '' */
|
||||
.icon-resize-horizontal:before { content: '\e82d'; } /* '' */
|
||||
.icon-resize-vertical:before { content: '\e82e'; } /* '' */
|
||||
.icon-zoom-in:before { content: '\e82f'; } /* '' */
|
||||
.icon-block:before { content: '\e830'; } /* '' */
|
||||
.icon-zoom-out:before { content: '\e831'; } /* '' */
|
||||
.icon-lightbulb:before { content: '\e832'; } /* '' */
|
||||
.icon-clock:before { content: '\e833'; } /* '' */
|
||||
.icon-volume-up:before { content: '\e834'; } /* '' */
|
||||
.icon-volume-down:before { content: '\e835'; } /* '' */
|
||||
.icon-volume-off:before { content: '\e836'; } /* '' */
|
||||
.icon-mute:before { content: '\e837'; } /* '' */
|
||||
.icon-mic:before { content: '\e838'; } /* '' */
|
||||
.icon-login:before { content: '\e839'; } /* '' */
|
||||
.icon-logout:before { content: '\e83a'; } /* '' */
|
||||
.icon-calendar-empty:before { content: '\e83b'; } /* '' */
|
||||
.icon-calendar:before { content: '\e83c'; } /* '' */
|
||||
.icon-wrench:before { content: '\e83d'; } /* '' */
|
||||
.icon-sliders:before { content: '\e83e'; } /* '' */
|
||||
.icon-cog-alt:before { content: '\e83f'; } /* '' */
|
||||
.icon-cog:before { content: '\e840'; } /* '' */
|
||||
.icon-phone:before { content: '\e841'; } /* '' */
|
||||
.icon-file-pdf:before { content: '\e842'; } /* '' */
|
||||
.icon-file-word:before { content: '\e843'; } /* '' */
|
||||
.icon-file-excel:before { content: '\e844'; } /* '' */
|
||||
.icon-doc-text:before { content: '\e845'; } /* '' */
|
||||
.icon-trash:before { content: '\e846'; } /* '' */
|
||||
.icon-comment-empty:before { content: '\e847'; } /* '' */
|
||||
.icon-comment:before { content: '\e848'; } /* '' */
|
||||
.icon-chat:before { content: '\e849'; } /* '' */
|
||||
.icon-chat-empty:before { content: '\e84a'; } /* '' */
|
||||
.icon-bell:before { content: '\e84b'; } /* '' */
|
||||
.icon-bell-alt:before { content: '\e84c'; } /* '' */
|
||||
.icon-attention-alt:before { content: '\e84d'; } /* '' */
|
||||
.icon-print:before { content: '\e84e'; } /* '' */
|
||||
.icon-edit:before { content: '\e84f'; } /* '' */
|
||||
.icon-forward:before { content: '\e850'; } /* '' */
|
||||
.icon-reply:before { content: '\e851'; } /* '' */
|
||||
.icon-reply-all:before { content: '\e852'; } /* '' */
|
||||
.icon-eye:before { content: '\e853'; } /* '' */
|
||||
.icon-tag:before { content: '\e854'; } /* '' */
|
||||
.icon-tags:before { content: '\e855'; } /* '' */
|
||||
.icon-lock-open-alt:before { content: '\e856'; } /* '' */
|
||||
.icon-lock-open:before { content: '\e857'; } /* '' */
|
||||
.icon-lock:before { content: '\e858'; } /* '' */
|
||||
.icon-home:before { content: '\e859'; } /* '' */
|
||||
.icon-info:before { content: '\e85a'; } /* '' */
|
||||
.icon-help:before { content: '\e85b'; } /* '' */
|
||||
.icon-search:before { content: '\e85c'; } /* '' */
|
400
application/fonts/fontanello-ifont/demo.html
Normal file
400
application/fonts/fontanello-ifont/demo.html
Normal file
@ -0,0 +1,400 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
<meta charset="UTF-8"><style>/*
|
||||
* Bootstrap v2.2.1
|
||||
*
|
||||
* Copyright 2012 Twitter, Inc
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
||||
*/
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
html {
|
||||
font-size: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
a:focus {
|
||||
outline: thin dotted #333;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
a:hover,
|
||||
a:active {
|
||||
outline: 0;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
*overflow: visible;
|
||||
line-height: normal;
|
||||
}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
a {
|
||||
color: #08c;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #005580;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.row {
|
||||
margin-left: -20px;
|
||||
*zoom: 1;
|
||||
}
|
||||
.row:before,
|
||||
.row:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.row:after {
|
||||
clear: both;
|
||||
}
|
||||
[class*="span"] {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.container,
|
||||
.navbar-static-top .container,
|
||||
.navbar-fixed-top .container,
|
||||
.navbar-fixed-bottom .container {
|
||||
width: 940px;
|
||||
}
|
||||
.span12 {
|
||||
width: 940px;
|
||||
}
|
||||
.span11 {
|
||||
width: 860px;
|
||||
}
|
||||
.span10 {
|
||||
width: 780px;
|
||||
}
|
||||
.span9 {
|
||||
width: 700px;
|
||||
}
|
||||
.span8 {
|
||||
width: 620px;
|
||||
}
|
||||
.span7 {
|
||||
width: 540px;
|
||||
}
|
||||
.span6 {
|
||||
width: 460px;
|
||||
}
|
||||
.span5 {
|
||||
width: 380px;
|
||||
}
|
||||
.span4 {
|
||||
width: 300px;
|
||||
}
|
||||
.span3 {
|
||||
width: 220px;
|
||||
}
|
||||
.span2 {
|
||||
width: 140px;
|
||||
}
|
||||
.span1 {
|
||||
width: 60px;
|
||||
}
|
||||
[class*="span"].pull-right,
|
||||
.row-fluid [class*="span"].pull-right {
|
||||
float: right;
|
||||
}
|
||||
.container {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
*zoom: 1;
|
||||
}
|
||||
.container:before,
|
||||
.container:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.container:after {
|
||||
clear: both;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.lead {
|
||||
margin-bottom: 20px;
|
||||
font-size: 21px;
|
||||
font-weight: 200;
|
||||
line-height: 30px;
|
||||
}
|
||||
small {
|
||||
font-size: 85%;
|
||||
}
|
||||
h1 {
|
||||
margin: 10px 0;
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
color: inherit;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
h1 small {
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
color: #999;
|
||||
}
|
||||
h1 {
|
||||
line-height: 40px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 38.5px;
|
||||
}
|
||||
h1 small {
|
||||
font-size: 24.5px;
|
||||
}
|
||||
body {
|
||||
margin-top: 90px;
|
||||
}
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding-top: 10px;
|
||||
z-index: 10;
|
||||
}
|
||||
.footer {
|
||||
color: #ddd;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer a {
|
||||
color: #ccc;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.the-icons {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.switch {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
color: #666;
|
||||
}
|
||||
.switch input {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
.codesOn .i-name {
|
||||
display: none;
|
||||
}
|
||||
.codesOn .i-code {
|
||||
display: inline;
|
||||
}
|
||||
.i-code {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="css/ifont.css">
|
||||
<link rel="stylesheet" href="css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/ifont-ie7.css"><![endif]-->
|
||||
<script>
|
||||
function toggleCodes(on) {
|
||||
var obj = document.getElementById('icons');
|
||||
|
||||
if (on) {
|
||||
obj.className += ' codesOn';
|
||||
} else {
|
||||
obj.className = obj.className.replace(' codesOn', '');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container header">
|
||||
<h1>
|
||||
Icinga Web 2
|
||||
<small>font demo</small>
|
||||
</h1>
|
||||
<label class="switch">
|
||||
<input type="checkbox" onclick="toggleCodes(this.checked)">show codes
|
||||
</label>
|
||||
</div>
|
||||
<div id="icons" class="container">
|
||||
<div class="row">
|
||||
<div title="Code: 0xe800" class="the-icons span3"><i class="icon-th"></i> <span class="i-name">icon-th</span><span class="i-code">0xe800</span></div>
|
||||
<div title="Code: 0xe801" class="the-icons span3"><i class="icon-user"></i> <span class="i-name">icon-user</span><span class="i-code">0xe801</span></div>
|
||||
<div title="Code: 0xe802" class="the-icons span3"><i class="icon-users"></i> <span class="i-name">icon-users</span><span class="i-code">0xe802</span></div>
|
||||
<div title="Code: 0xe803" class="the-icons span3"><i class="icon-ok"></i> <span class="i-name">icon-ok</span><span class="i-code">0xe803</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe804" class="the-icons span3"><i class="icon-cancel"></i> <span class="i-name">icon-cancel</span><span class="i-code">0xe804</span></div>
|
||||
<div title="Code: 0xe805" class="the-icons span3"><i class="icon-plus"></i> <span class="i-name">icon-plus</span><span class="i-code">0xe805</span></div>
|
||||
<div title="Code: 0xe806" class="the-icons span3"><i class="icon-minus"></i> <span class="i-name">icon-minus</span><span class="i-code">0xe806</span></div>
|
||||
<div title="Code: 0xe807" class="the-icons span3"><i class="icon-folder-empty"></i> <span class="i-name">icon-folder-empty</span><span class="i-code">0xe807</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe808" class="the-icons span3"><i class="icon-download"></i> <span class="i-name">icon-download</span><span class="i-code">0xe808</span></div>
|
||||
<div title="Code: 0xe809" class="the-icons span3"><i class="icon-upload"></i> <span class="i-name">icon-upload</span><span class="i-code">0xe809</span></div>
|
||||
<div title="Code: 0xe80a" class="the-icons span3"><i class="icon-git"></i> <span class="i-name">icon-git</span><span class="i-code">0xe80a</span></div>
|
||||
<div title="Code: 0xe80b" class="the-icons span3"><i class="icon-cubes"></i> <span class="i-name">icon-cubes</span><span class="i-code">0xe80b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe80c" class="the-icons span3"><i class="icon-database"></i> <span class="i-name">icon-database</span><span class="i-code">0xe80c</span></div>
|
||||
<div title="Code: 0xe80d" class="the-icons span3"><i class="icon-gauge"></i> <span class="i-name">icon-gauge</span><span class="i-code">0xe80d</span></div>
|
||||
<div title="Code: 0xe80e" class="the-icons span3"><i class="icon-sitemap"></i> <span class="i-name">icon-sitemap</span><span class="i-code">0xe80e</span></div>
|
||||
<div title="Code: 0xe80f" class="the-icons span3"><i class="icon-sort-name-up"></i> <span class="i-name">icon-sort-name-up</span><span class="i-code">0xe80f</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe810" class="the-icons span3"><i class="icon-sort-name-down"></i> <span class="i-name">icon-sort-name-down</span><span class="i-code">0xe810</span></div>
|
||||
<div title="Code: 0xe811" class="the-icons span3"><i class="icon-megaphone"></i> <span class="i-name">icon-megaphone</span><span class="i-code">0xe811</span></div>
|
||||
<div title="Code: 0xe812" class="the-icons span3"><i class="icon-bug"></i> <span class="i-name">icon-bug</span><span class="i-code">0xe812</span></div>
|
||||
<div title="Code: 0xe813" class="the-icons span3"><i class="icon-tasks"></i> <span class="i-name">icon-tasks</span><span class="i-code">0xe813</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe814" class="the-icons span3"><i class="icon-filter"></i> <span class="i-name">icon-filter</span><span class="i-code">0xe814</span></div>
|
||||
<div title="Code: 0xe815" class="the-icons span3"><i class="icon-off"></i> <span class="i-name">icon-off</span><span class="i-code">0xe815</span></div>
|
||||
<div title="Code: 0xe816" class="the-icons span3"><i class="icon-book"></i> <span class="i-name">icon-book</span><span class="i-code">0xe816</span></div>
|
||||
<div title="Code: 0xe817" class="the-icons span3"><i class="icon-paste"></i> <span class="i-name">icon-paste</span><span class="i-code">0xe817</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe818" class="the-icons span3"><i class="icon-scissors"></i> <span class="i-name">icon-scissors</span><span class="i-code">0xe818</span></div>
|
||||
<div title="Code: 0xe819" class="the-icons span3"><i class="icon-globe"></i> <span class="i-name">icon-globe</span><span class="i-code">0xe819</span></div>
|
||||
<div title="Code: 0xe81a" class="the-icons span3"><i class="icon-cloud"></i> <span class="i-name">icon-cloud</span><span class="i-code">0xe81a</span></div>
|
||||
<div title="Code: 0xe81b" class="the-icons span3"><i class="icon-flash"></i> <span class="i-name">icon-flash</span><span class="i-code">0xe81b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe81c" class="the-icons span3"><i class="icon-signal"></i> <span class="i-name">icon-signal</span><span class="i-code">0xe81c</span></div>
|
||||
<div title="Code: 0xe81d" class="the-icons span3"><i class="icon-down-dir"></i> <span class="i-name">icon-down-dir</span><span class="i-code">0xe81d</span></div>
|
||||
<div title="Code: 0xe81e" class="the-icons span3"><i class="icon-up-dir"></i> <span class="i-name">icon-up-dir</span><span class="i-code">0xe81e</span></div>
|
||||
<div title="Code: 0xe81f" class="the-icons span3"><i class="icon-left-dir"></i> <span class="i-name">icon-left-dir</span><span class="i-code">0xe81f</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe820" class="the-icons span3"><i class="icon-right-dir"></i> <span class="i-name">icon-right-dir</span><span class="i-code">0xe820</span></div>
|
||||
<div title="Code: 0xe821" class="the-icons span3"><i class="icon-down-open"></i> <span class="i-name">icon-down-open</span><span class="i-code">0xe821</span></div>
|
||||
<div title="Code: 0xe822" class="the-icons span3"><i class="icon-right-open"></i> <span class="i-name">icon-right-open</span><span class="i-code">0xe822</span></div>
|
||||
<div title="Code: 0xe823" class="the-icons span3"><i class="icon-up-open"></i> <span class="i-name">icon-up-open</span><span class="i-code">0xe823</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe824" class="the-icons span3"><i class="icon-left-open"></i> <span class="i-name">icon-left-open</span><span class="i-code">0xe824</span></div>
|
||||
<div title="Code: 0xe825" class="the-icons span3"><i class="icon-up-big"></i> <span class="i-name">icon-up-big</span><span class="i-code">0xe825</span></div>
|
||||
<div title="Code: 0xe826" class="the-icons span3"><i class="icon-right-big"></i> <span class="i-name">icon-right-big</span><span class="i-code">0xe826</span></div>
|
||||
<div title="Code: 0xe827" class="the-icons span3"><i class="icon-left-big"></i> <span class="i-name">icon-left-big</span><span class="i-code">0xe827</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe828" class="the-icons span3"><i class="icon-down-big"></i> <span class="i-name">icon-down-big</span><span class="i-code">0xe828</span></div>
|
||||
<div title="Code: 0xe829" class="the-icons span3"><i class="icon-resize-full-alt"></i> <span class="i-name">icon-resize-full-alt</span><span class="i-code">0xe829</span></div>
|
||||
<div title="Code: 0xe82a" class="the-icons span3"><i class="icon-resize-full"></i> <span class="i-name">icon-resize-full</span><span class="i-code">0xe82a</span></div>
|
||||
<div title="Code: 0xe82b" class="the-icons span3"><i class="icon-resize-small"></i> <span class="i-name">icon-resize-small</span><span class="i-code">0xe82b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe82c" class="the-icons span3"><i class="icon-move"></i> <span class="i-name">icon-move</span><span class="i-code">0xe82c</span></div>
|
||||
<div title="Code: 0xe82d" class="the-icons span3"><i class="icon-resize-horizontal"></i> <span class="i-name">icon-resize-horizontal</span><span class="i-code">0xe82d</span></div>
|
||||
<div title="Code: 0xe82e" class="the-icons span3"><i class="icon-resize-vertical"></i> <span class="i-name">icon-resize-vertical</span><span class="i-code">0xe82e</span></div>
|
||||
<div title="Code: 0xe82f" class="the-icons span3"><i class="icon-zoom-in"></i> <span class="i-name">icon-zoom-in</span><span class="i-code">0xe82f</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe830" class="the-icons span3"><i class="icon-block"></i> <span class="i-name">icon-block</span><span class="i-code">0xe830</span></div>
|
||||
<div title="Code: 0xe831" class="the-icons span3"><i class="icon-zoom-out"></i> <span class="i-name">icon-zoom-out</span><span class="i-code">0xe831</span></div>
|
||||
<div title="Code: 0xe832" class="the-icons span3"><i class="icon-lightbulb"></i> <span class="i-name">icon-lightbulb</span><span class="i-code">0xe832</span></div>
|
||||
<div title="Code: 0xe833" class="the-icons span3"><i class="icon-clock"></i> <span class="i-name">icon-clock</span><span class="i-code">0xe833</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe834" class="the-icons span3"><i class="icon-volume-up"></i> <span class="i-name">icon-volume-up</span><span class="i-code">0xe834</span></div>
|
||||
<div title="Code: 0xe835" class="the-icons span3"><i class="icon-volume-down"></i> <span class="i-name">icon-volume-down</span><span class="i-code">0xe835</span></div>
|
||||
<div title="Code: 0xe836" class="the-icons span3"><i class="icon-volume-off"></i> <span class="i-name">icon-volume-off</span><span class="i-code">0xe836</span></div>
|
||||
<div title="Code: 0xe837" class="the-icons span3"><i class="icon-mute"></i> <span class="i-name">icon-mute</span><span class="i-code">0xe837</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe838" class="the-icons span3"><i class="icon-mic"></i> <span class="i-name">icon-mic</span><span class="i-code">0xe838</span></div>
|
||||
<div title="Code: 0xe839" class="the-icons span3"><i class="icon-login"></i> <span class="i-name">icon-login</span><span class="i-code">0xe839</span></div>
|
||||
<div title="Code: 0xe83a" class="the-icons span3"><i class="icon-logout"></i> <span class="i-name">icon-logout</span><span class="i-code">0xe83a</span></div>
|
||||
<div title="Code: 0xe83b" class="the-icons span3"><i class="icon-calendar-empty"></i> <span class="i-name">icon-calendar-empty</span><span class="i-code">0xe83b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe83c" class="the-icons span3"><i class="icon-calendar"></i> <span class="i-name">icon-calendar</span><span class="i-code">0xe83c</span></div>
|
||||
<div title="Code: 0xe83d" class="the-icons span3"><i class="icon-wrench"></i> <span class="i-name">icon-wrench</span><span class="i-code">0xe83d</span></div>
|
||||
<div title="Code: 0xe83e" class="the-icons span3"><i class="icon-sliders"></i> <span class="i-name">icon-sliders</span><span class="i-code">0xe83e</span></div>
|
||||
<div title="Code: 0xe83f" class="the-icons span3"><i class="icon-cog-alt"></i> <span class="i-name">icon-cog-alt</span><span class="i-code">0xe83f</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe840" class="the-icons span3"><i class="icon-cog"></i> <span class="i-name">icon-cog</span><span class="i-code">0xe840</span></div>
|
||||
<div title="Code: 0xe841" class="the-icons span3"><i class="icon-phone"></i> <span class="i-name">icon-phone</span><span class="i-code">0xe841</span></div>
|
||||
<div title="Code: 0xe842" class="the-icons span3"><i class="icon-file-pdf"></i> <span class="i-name">icon-file-pdf</span><span class="i-code">0xe842</span></div>
|
||||
<div title="Code: 0xe843" class="the-icons span3"><i class="icon-file-word"></i> <span class="i-name">icon-file-word</span><span class="i-code">0xe843</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe844" class="the-icons span3"><i class="icon-file-excel"></i> <span class="i-name">icon-file-excel</span><span class="i-code">0xe844</span></div>
|
||||
<div title="Code: 0xe845" class="the-icons span3"><i class="icon-doc-text"></i> <span class="i-name">icon-doc-text</span><span class="i-code">0xe845</span></div>
|
||||
<div title="Code: 0xe846" class="the-icons span3"><i class="icon-trash"></i> <span class="i-name">icon-trash</span><span class="i-code">0xe846</span></div>
|
||||
<div title="Code: 0xe847" class="the-icons span3"><i class="icon-comment-empty"></i> <span class="i-name">icon-comment-empty</span><span class="i-code">0xe847</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe848" class="the-icons span3"><i class="icon-comment"></i> <span class="i-name">icon-comment</span><span class="i-code">0xe848</span></div>
|
||||
<div title="Code: 0xe849" class="the-icons span3"><i class="icon-chat"></i> <span class="i-name">icon-chat</span><span class="i-code">0xe849</span></div>
|
||||
<div title="Code: 0xe84a" class="the-icons span3"><i class="icon-chat-empty"></i> <span class="i-name">icon-chat-empty</span><span class="i-code">0xe84a</span></div>
|
||||
<div title="Code: 0xe84b" class="the-icons span3"><i class="icon-bell"></i> <span class="i-name">icon-bell</span><span class="i-code">0xe84b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe84c" class="the-icons span3"><i class="icon-bell-alt"></i> <span class="i-name">icon-bell-alt</span><span class="i-code">0xe84c</span></div>
|
||||
<div title="Code: 0xe84d" class="the-icons span3"><i class="icon-attention-alt"></i> <span class="i-name">icon-attention-alt</span><span class="i-code">0xe84d</span></div>
|
||||
<div title="Code: 0xe84e" class="the-icons span3"><i class="icon-print"></i> <span class="i-name">icon-print</span><span class="i-code">0xe84e</span></div>
|
||||
<div title="Code: 0xe84f" class="the-icons span3"><i class="icon-edit"></i> <span class="i-name">icon-edit</span><span class="i-code">0xe84f</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe850" class="the-icons span3"><i class="icon-forward"></i> <span class="i-name">icon-forward</span><span class="i-code">0xe850</span></div>
|
||||
<div title="Code: 0xe851" class="the-icons span3"><i class="icon-reply"></i> <span class="i-name">icon-reply</span><span class="i-code">0xe851</span></div>
|
||||
<div title="Code: 0xe852" class="the-icons span3"><i class="icon-reply-all"></i> <span class="i-name">icon-reply-all</span><span class="i-code">0xe852</span></div>
|
||||
<div title="Code: 0xe853" class="the-icons span3"><i class="icon-eye"></i> <span class="i-name">icon-eye</span><span class="i-code">0xe853</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe854" class="the-icons span3"><i class="icon-tag"></i> <span class="i-name">icon-tag</span><span class="i-code">0xe854</span></div>
|
||||
<div title="Code: 0xe855" class="the-icons span3"><i class="icon-tags"></i> <span class="i-name">icon-tags</span><span class="i-code">0xe855</span></div>
|
||||
<div title="Code: 0xe856" class="the-icons span3"><i class="icon-lock-open-alt"></i> <span class="i-name">icon-lock-open-alt</span><span class="i-code">0xe856</span></div>
|
||||
<div title="Code: 0xe857" class="the-icons span3"><i class="icon-lock-open"></i> <span class="i-name">icon-lock-open</span><span class="i-code">0xe857</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe858" class="the-icons span3"><i class="icon-lock"></i> <span class="i-name">icon-lock</span><span class="i-code">0xe858</span></div>
|
||||
<div title="Code: 0xe859" class="the-icons span3"><i class="icon-home"></i> <span class="i-name">icon-home</span><span class="i-code">0xe859</span></div>
|
||||
<div title="Code: 0xe85a" class="the-icons span3"><i class="icon-info"></i> <span class="i-name">icon-info</span><span class="i-code">0xe85a</span></div>
|
||||
<div title="Code: 0xe85b" class="the-icons span3"><i class="icon-help"></i> <span class="i-name">icon-help</span><span class="i-code">0xe85b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe85c" class="the-icons span3"><i class="icon-search"></i> <span class="i-name">icon-search</span><span class="i-code">0xe85c</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
application/fonts/fontanello-ifont/font/ifont.eot
Normal file
BIN
application/fonts/fontanello-ifont/font/ifont.eot
Normal file
Binary file not shown.
104
application/fonts/fontanello-ifont/font/ifont.svg
Normal file
104
application/fonts/fontanello-ifont/font/ifont.svg
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="ifont" horiz-adv-x="1000" >
|
||||
<font-face font-family="ifont" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="th" unicode="" d="m0 46v108q0 22 16 38t38 15h178q22 0 38-15t16-38v-108q0-22-16-37t-38-16h-178q-23 0-38 16t-16 37z m0 286v107q0 23 16 38t38 16h178q22 0 38-16t16-38v-107q0-22-16-38t-38-15h-178q-23 0-38 15t-16 38z m0 286v107q0 22 16 38t38 16h178q22 0 38-16t16-38v-107q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38z m357-572v108q0 22 16 38t38 15h178q23 0 38-15t16-38v-108q0-22-16-37t-38-16h-178q-23 0-38 16t-16 37z m0 286v107q0 23 16 38t38 16h178q23 0 38-16t16-38v-107q0-22-16-38t-38-15h-178q-23 0-38 15t-16 38z m0 286v107q0 22 16 38t38 16h178q23 0 38-16t16-38v-107q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38z m357-572v108q0 22 16 38t38 15h178q23 0 38-15t16-38v-108q0-22-16-37t-38-16h-178q-22 0-38 16t-16 37z m0 286v107q0 23 16 38t38 16h178q23 0 38-16t16-38v-107q0-22-16-38t-38-15h-178q-22 0-38 15t-16 38z m0 286v107q0 22 16 38t38 16h178q23 0 38-16t16-38v-107q0-22-16-38t-38-16h-178q-22 0-38 16t-16 38z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="user" unicode="" d="m0 66q0 30 2 58t8 61 15 60 24 55 34 45 48 30 62 11q5 0 24-12t41-27 60-27 75-12 74 12 61 27 41 27 24 12q34 0 62-11t48-30 34-45 24-55 15-60 8-61 2-58q0-67-41-106t-108-39h-488q-67 0-108 39t-41 106z m179 498q0 89 62 152t152 63 151-63 63-152-63-151-151-63-152 63-62 151z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="users" unicode="" d="m0 367q0 197 69 197 4 0 25-11t54-24 66-12q38 0 75 13-3-21-3-37 0-78 45-143-90-3-148-72h-75q-45 0-77 23t-31 66z m71 340q0 59 42 101t101 42 101-42 42-101-42-101-101-42-101 42-42 101z m72-713q0 30 2 58t8 61 14 61 24 54 35 45 48 30 62 11q6 0 24-12t41-26 59-27 76-12 75 12 60 27 41 26 23 12q35 0 63-11t47-30 35-45 24-54 15-61 8-61 2-58q0-66-41-105t-108-39h-488q-68 0-108 39t-41 105z m178 499q0 89 63 151t152 63 151-63 63-151-63-152-151-63-152 63-63 152z m393 214q0 59 42 101t101 42 101-42 42-101-42-101-101-42-101 42-42 101z m27-357q45 65 45 143 0 16-3 37 37-13 74-13 33 0 67 12t54 24 24 11q69 0 69-197 0-43-31-66t-77-22h-75q-57 68-147 71z" horiz-adv-x="1071.4" />
|
||||
<glyph glyph-name="ok" unicode="" d="m352-10l-334 333 158 160 176-174 400 401 159-160z" horiz-adv-x="928" />
|
||||
<glyph glyph-name="cancel" unicode="" d="m799 116l-156-157-234 235-235-235-156 157 234 234-234 234 156 157 235-235 234 235 156-157-234-234z" horiz-adv-x="817" />
|
||||
<glyph glyph-name="plus" unicode="" d="m911 462l0-223-335 0 0-336-223 0 0 336-335 0 0 223 335 0 0 335 223 0 0-335 335 0z" horiz-adv-x="928" />
|
||||
<glyph glyph-name="minus" unicode="" d="m18 239l0 223 893 0 0-223-893 0z" horiz-adv-x="928" />
|
||||
<glyph glyph-name="folder-empty" unicode="" d="m464 685l447 0 0-669q0-47-33-80t-79-33l-669 0q-46 0-79 33t-33 80l0 781 446 0 0-112z m-334 0l0-223 669 0 0 112-446 0 0 111-223 0z m669-669l0 335-669 0 0-335 669 0z" horiz-adv-x="928" />
|
||||
<glyph glyph-name="download" unicode="" d="m0 46v179q0 22 16 38t38 16h259l75-76q33-32 76-32t76 32l76 76h259q22 0 38-16t16-38v-179q0-22-16-37t-38-16h-821q-23 0-38 16t-16 37z m181 497q10 21 33 21h143v250q0 15 11 25t25 11h143q14 0 25-11t10-25v-250h143q24 0 33-21 10-23-8-40l-250-250q-10-10-25-10t-25 10l-250 250q-17 17-8 40z m462-443q0-14 10-25t26-11 25 11 10 25-10 25-25 11-26-11-10-25z m143 0q0-14 10-25t25-11 26 11 10 25-10 25-26 11-25-11-10-25z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="upload" unicode="" d="m0-25v179q0 22 16 38t38 15h238q12-31 39-51t62-20h143q34 0 61 20t40 51h238q22 0 38-15t16-38v-179q0-22-16-38t-38-16h-821q-23 0-38 16t-16 38z m181 540q-9 22 8 39l250 250q10 10 25 10t25-10l250-250q18-17 8-39-9-22-33-22h-143v-250q0-15-10-25t-25-11h-143q-15 0-25 11t-11 25v250h-143q-23 0-33 22z m462-486q0-15 10-26t26-10 25 10 10 26-10 25-25 10-26-10-10-25z m143 0q0-15 10-26t25-10 26 10 10 26-10 25-26 10-25-10-10-25z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="git" unicode="" d="m38-3q0 92 102 125v3q-38 22-38 70 0 61 35 76v3q-40 13-66 60t-27 92q0 78 53 130t131 51q54 0 100-26 54 0 121 26v-112q-20-7-44-13 9-24 9-47 0-70-41-120t-110-63q-22-5-33-15t-11-33q0-17 13-28t32-18 44-12 48-15 44-21 32-35 13-55q0-170-203-170-38 0-72 7t-65 23-49 46-18 71z m114 6q0-57 96-57 84 0 84 59 0 56-92 56-88 0-88-58z m12 422q0-75 69-75 66 0 66 76 0 35-17 57t-49 23q-69 0-69-81z m324 343q0 33 22 57t55 25q33 0 54-25t22-57-22-57-54-24q-32 0-54 24t-23 57z m15-652q2 25 2 74v340q0 53-2 72h124q-3-19-3-70v-342q0-49 3-74h-124z m176 380v106h54v42q0 30-4 50h127q-3-23-3-92h95v-106q-8 0-24 1t-24 1h-47v-204q0-73 48-73 34 0 61 19v-110q-40-22-97-22-35 0-60 12t-39 27-22 44-10 51-2 58v196h1v2q-4 0-11 0t-10 1q-12 0-33-3z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="cubes" unicode="" d="m0 46v233q0 21 12 39t32 26l242 104v223q0 22 12 39t31 27l250 107q13 6 28 6t28-6l250-107q20-9 32-27t12-39v-223l242-104q20-9 32-26t11-40v-232q0-20-10-37t-29-26l-250-125q-14-8-32-8t-32 8l-250 125q-3 1-4 2-1-1-4-2l-250-125q-14-8-32-8t-31 8l-250 125q-19 9-29 26t-11 37z m96 243l225-96 226 96-226 97z m261-350l214 107v176l-214-92v-191z m4 734l246-105 246 105-246 106z m282-317l214 92v149l-214-92v-149z m24-67l226-96 225 96-225 97z m262-350l214 107v176l-214-92v-191z" horiz-adv-x="1285.7" />
|
||||
<glyph glyph-name="database" unicode="" d="m0-7v95q66-47 181-71t248-24 247 24 181 71v-95q0-39-57-72t-157-52-214-19-215 19-156 52-58 72z m0 214v95q66-47 181-71t248-24 247 24 181 71v-95q0-38-57-71t-157-52-214-20-215 20-156 52-58 71z m0 214v95q66-47 181-71t248-24 247 24 181 71v-95q0-38-57-71t-157-52-214-20-215 20-156 52-58 71z m0 215v71q0 39 58 72t156 52 215 19 214-19 157-52 57-72v-71q0-39-57-72t-157-52-214-19-215 19-156 52-58 72z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="gauge" unicode="" d="m0 207q0 102 40 194t106 160 160 107 194 39 194-39 160-107 106-160 40-194q0-145-79-269-10-17-30-17h-782q-20 0-30 17-79 123-79 269z m71 0q0-29 21-50t51-21 50 21 21 50-21 51-50 21-51-21-21-51z m108 250q0-29 21-50t50-21 51 21 20 50-20 51-51 21-50-21-21-51z m217-330q-11-43 11-81t66-50 81 11 50 66q9 33-4 65t-40 51l57 213q3 14-5 27t-21 16-27-3-17-22l-56-213q-33-3-60-25t-35-55z m33 437q0-29 21-50t50-21 51 21 20 50-20 51-51 21-50-21-21-51z m250-107q0-29 21-50t50-21 51 21 20 50-20 51-51 21-50-21-21-51z m107-250q0-29 21-50t50-21 51 21 21 50-21 51-51 21-50-21-21-51z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="sitemap" unicode="" d="m0-25v179q0 22 16 38t38 15h53v107q0 29 21 51t51 21h285v107h-53q-23 0-38 15t-16 38v179q0 22 16 38t38 16h178q23 0 38-16t16-38v-179q0-22-16-38t-38-15h-53v-107h285q29 0 51-21t21-51v-107h53q23 0 38-15t16-38v-179q0-22-16-38t-38-16h-178q-22 0-38 16t-16 38v179q0 22 16 38t38 15h53v107h-285v-107h53q23 0 38-15t16-38v-179q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v179q0 22 16 38t38 15h53v107h-285v-107h53q22 0 38-15t16-38v-179q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="sort-name-up" unicode="" d="m19 53q4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13q0-6-6-13l-178-178q-5-5-13-5-6 0-13 5l-178 179q-8 9-4 19z m483 368v60h39l128 369h90l129-369h39v-60h-161v60h42l-26 80h-136l-26-80h42v-60h-160z m49-521l206 295q7 10 12 16l6 5v1q-1 0-4 0t-4 0q-6-2-16-2h-130v-64h-67v128h317v-50l-206-296q-4-4-12-14l-6-7v-1l8 1q5 2 16 2h139v66h67v-130h-326v50z m114 722h98l-40 122-6 26q-2 9-2 11h-2l-2-11q0 0-1-10t-5-16z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="sort-name-down" unicode="" d="m19 53q4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13q0-6-6-13l-178-178q-5-5-13-5-6 0-13 5l-178 179q-8 9-4 19z m483-144h39l128 370h90l129-370h39v-59h-161v59h42l-26 80h-136l-26-80h42v-59h-160v59z m49 512v51l206 295q7 10 12 15l6 5v2q-1 0-4-1t-4 0q-6-2-16-2h-130v-64h-67v128h317v-50l-206-295q-4-5-12-15l-6-6v-1l8 1q5 1 16 1h139v66h67v-130h-326z m114-370h98l-40 122-6 26q-2 9-2 11h-2l-2-11q0-1-1-10t-5-16z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="megaphone" unicode="" d="m0 368v107q0 37 26 63t63 26h268q243 0 500 215 29 0 50-22t22-50v-214q29 0 50-21t21-51-21-50-50-21v-214q0-29-22-51t-50-21q-233 194-453 212-32-10-51-37t-17-56 22-51q-11-19-13-37t4-32 18-31 27-28 35-28q-17-32-63-46t-94-7-73 31q-4 13-17 49t-18 53-12 50-9 56 2 55 12 61h-68q-36 0-63 27t-26 63z m429-22q210-23 428-190v532q-220-168-428-191v-151z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="bug" unicode="" d="m18 314q0 15 11 25t25 11h125v164l-97 97q-11 10-11 25t11 25 25 10 25-10l97-97h471l96 97q11 10 25 10t26-10 10-25-10-25l-97-97v-164h125q15 0 25-11t11-25-11-25-25-10h-125q0-96-37-162l116-117q10-11 10-25t-10-25q-10-11-25-11t-26 11l-110 110q-3-3-8-7t-24-16-36-21-46-16-54-7v500h-71v-500q-29 0-57 7t-49 19-36 22-25 18l-8 8-102-116q-11-12-27-12-13 0-24 9-11 10-11 25t8 26l113 127q-32 63-32 153h-125q-15 0-25 10t-11 25z m268 322q0 74 52 126t126 52 127-52 52-126h-357z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="tasks" unicode="" d="m0 29v142q0 15 11 26t25 10h928q15 0 25-10t11-26v-142q0-15-11-26t-25-10h-928q-15 0-25 10t-11 26z m0 285v143q0 15 11 25t25 11h928q15 0 25-11t11-25v-143q0-14-11-25t-25-10h-928q-15 0-25 10t-11 25z m0 286v143q0 14 11 25t25 11h928q15 0 25-11t11-25v-143q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25z m357-250h572v71h-572v-71z m214-286h358v72h-358v-72z m143 572h215v71h-215v-71z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="filter" unicode="" d="m3 685q9 22 33 22h714q23 0 33-22 9-23-8-39l-275-275v-414q0-23-22-33-7-3-14-3-15 0-25 11l-143 143q-10 10-10 25v271l-275 275q-18 16-8 39z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="off" unicode="" d="m0 350q0 102 45 191t126 151q24 18 54 14t46-28q18-23 14-53t-28-47q-54-41-84-101t-30-127q0-58 22-111t62-91 91-61 111-23 110 23 92 61 61 91 22 111q0 68-30 127t-84 101q-24 18-28 47t14 53q17 24 47 28t53-14q81-61 126-151t45-191q0-87-34-166t-91-137-137-92-166-34-167 34-136 92-92 137-34 166z m357 71v358q0 29 21 50t51 21 50-21 21-50v-358q0-29-21-50t-50-21-51 21-21 50z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="book" unicode="" d="m6 96q0 2 1 15t3 20q0 5-2 12t-2 11q1 6 5 12t9 13 9 13q13 21 25 51t17 51q2 6 0 17t0 16q2 6 9 15t10 13q12 20 23 51t14 51q1 5-1 17t0 16q2 7 12 17t13 13q10 14 23 47t16 54q0 4-2 14t-1 15q1 4 5 10t10 13 10 11q4 7 9 17t8 20 9 20 11 18 15 13 20 6 26-3l0-1q21 5 28 5h425q41 0 63-32t10-72l-152-506q-20-66-40-86t-72-19h-485q-15 0-21-8-6-9-1-24 14-39 81-39h515q16 0 31 8t19 24l168 550q4 13 3 32 21-8 33-24 22-32 10-72l-154-505q-10-36-42-60t-69-25h-515q-43 0-83 30t-55 74q-14 37-1 70z m269 343q-3-7 1-12t11-6h339q7 0 14 6t10 12l11 36q3 7-1 13t-11 5h-339q-8 0-14-5t-10-13z m46 143q-2-7 1-12t11-6h339q8 0 15 6t9 12l12 36q2 7-2 12t-11 6h-339q-7 0-14-6t-9-12z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="paste" unicode="" d="m0 46v750q0 23 16 38t38 16h607q22 0 38-16t15-38v-183q12-7 20-15l228-228q16-16 27-42t11-50v-374q0-23-16-38t-38-16h-535q-23 0-38 16t-16 38v89h-303q-23 0-38 15t-16 38z m143 679q0-7 5-13t13-5h393q7 0 12 5t5 13v36q0 7-5 12t-12 5h-393q-7 0-13-5t-5-12v-36z m286-804h500v358h-233q-22 0-38 15t-15 38v232h-214v-643z m285 429h167l-167 167v-167z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="scissors" unicode="" d="m1 81q4 42 31 82t73 69q74 47 155 47 46 0 84-18 5 8 13 13l68 40-68 41q-8 5-13 12-38-17-84-17-81 0-155 47-46 29-73 69t-31 82q-3 33 8 63t36 52q47 44 124 44 80 0 154-47 46-29 74-68t31-83q2-27-6-54 3-1 7-3l62-37 385 216q7 5 17 5 9 0 16-4l71-36q17-9 20-28 2-20-14-32l-283-222 283-222q16-11 14-31-3-20-20-29l-71-35q-7-4-16-4-10 0-17 4l-385 216-62-37q-4-2-7-2 8-28 6-55-4-43-31-82t-74-69q-74-47-154-47-76 0-124 44-51 47-44 115z m93 10q-14-37 12-60 21-20 63-20 55 0 107 33 45 28 59 65t-12 60q-22 20-63 20-56 0-107-33-45-28-59-65z m0 447q14-37 59-66 51-33 107-33 41 0 63 20 26 24 12 61t-59 65q-52 33-107 33-42 0-63-20-26-24-12-60z m281-295l5-5q1-1 4-3 2-2 6-7t6-6l15-15 89 54 54-18 410 321-71 36-429-240v-64z m0 143l54-33v7q0 20 18 31l8 4-44 26-15-14q-1-2-5-6t-7-7q-1-1-2-2t-2-1z m125-72q0 15 11 25t25 11 25-11 10-25-10-25-25-10-25 10-11 25z m68-103l325-182 71 35-290 228-99-77q-1-2-7-4z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="globe" unicode="" d="m0 350q0 117 58 215t155 156 216 58 215-58 156-156 57-215-57-215-156-156-215-58-216 58-155 156-58 215z m126 189q4-4 7-4 2-1 3-5t1-6 6 1q5-4 2-10 1 0 25-15 10-10 11-12 2-6-5-10-1 1-5 5t-5 2q-2-3 0-10t6-7q-4 0-5-9t-2-20 0-13l1-1q-2-6 3-19t12-11q-7-1 11-24 3-4 4-5 2-1 7-4t9-6 5-5q2-3 6-13t8-13q-2-3 5-11t6-13q-1 0-2-1t-1 0q2-4 9-8t8-7q1-2 1-6t2-6 4-1q2 11-13 34-8 14-9 17-2 2-4 8t-2 8q1 0 3 0t5-2 4-3 1-1q-1-4 1-10t7-10 10-11 6-7q4-4 8-11t0-8q5 0 11-5t10-11q3-5 4-15t3-13q1-4 5-8t7-5l9-5t7-3q3-2 10-6t12-7q6-2 9-2t8 1 8 2q8 1 16-8t12-12q20-10 30-6-1 0 1-4t4-9 5-8 3-5q3-3 10-8t10-8q4 2 4 5-1-5 4-11t10-6q8 2 8 18-17-9-27 10 0 0-2 3t-2 5-1 4 0 5 2 1q5 0 6 2t-1 7-2 8q-1 4-6 11t-7 8q-3-5-9-4t-9 5q0-1-1-3t-1-4q-7 0-8 0 1 2 1 10t2 13q1 2 3 6t5 9 2 7-3 5-9 1q-11 0-15-11-1-2-2-6t-2-6-5-4q-4-2-14-1t-13 3q-8 4-13 16t-5 20q0 6 1 15t2 14-3 14q2 1 5 5t5 6q2 1 3 1t2 0 3 1 1 3q0 1-2 2-2 1-2 1 4-1 16 1t15-1q9-6 12 1 0 1-1 6t0 7q3-15 16-5 2-1 9-3t9-2q2-1 4-3t3-3 3 0 5 4q5-8 7-13 6-23 10-25 4-2 6-1t3 5 0 8-1 7l-1 4v11l0 4q-8 2-10 7t0 10 9 10q0 1 4 2t9 4 7 4q12 11 8 20 4 0 6 5 0 0-2 2t-5 2-2 2q5 2 1 8 3 2 4 7t4 5q5-7 12-1 4 5 1 9 2 4 11 6t10 5q4-1 5 1t0 7 2 7q2 2 8 5t8 2l9 7q2 2 0 2 10-1 18 6 5 6-4 11 2 3-2 5t-8 3q2 1 7 1t5 1q9 5-4 9-9 2-24-7-1-1-5-5t-7-6q1 0 2 3t3 6 2 4q3 4 12 8 8 4 29 7 19 5 29-6-1 1 5 7t8 7q2 1 8 2t9 5l1 12q-7-1-10 4t-3 12q0-2-4-5 0 4-2 5t-7-1-5-1q-5 2-8 5t-5 9-2 8q-1 3-5 6t-5 6q-1 1-2 3t-2 4-2 3-3 1-4-3-4-5-2-3q-2 1-4 1t-2-1-3-1-3-2q-1-2-4-2t-5-1q8 3-1 6-5 2-9 2 5 2 5 6t-5 8h3q-1 2-5 5t-10 5-7 3q-5 3-19 5t-18 1q-3-4-3-6t2-8 2-7q1-3-3-7t-3-7q0-4 7-9t6-12q-2-4-9-9t-9-6q-3-5-1-11t6-9q1-1 1-2t-2-3-3-2-4-2l-1-1q-7-3-12 3t-7 15q-4 14-9 17-13 4-17-1-2 7-22 15-14 5-33 2 4 0 0 8-4 9-10 7 1 3 2 10t0 7q2 7 7 13 1 1 4 5t5 7 1 4q19-3 28 6 2 3 6 9t6 10q5 3 8 3t8-3 8-3q8-1 8 6t-4 11q7 0 2 10-3 4-5 5-6 2-15-3-4-2 2-4-1 0-6-6t-9-10-9 3q0 0-3 7t-5 8q-5 0-9-9 1 5-6 9t-14 4q11 7-4 15-4 3-12 3t-11-2q-2-4-3-7t3-4 6-3 6-2 5-2q8-6 5-8-1 0-5-2t-6-2-4-3q-2-2 0-7t-1-8q-3 3-5 10t-4 9q4-5-14-4l-5 1q-3 0-9-1t-12-1-7 5q-3 4 0 11 0 2 2 1-2 2-6 5t-6 5q-25-8-52-23 3 0 6 1 3 1 8 3t5 4q19 7 24 3l3 3q7-9 11-14-4 3-17 1-11-4-12-7 4-7 2-10-2 2-6 6t-8 6-8 3q-9 0-13-1-81-45-131-124z m363-532q0-3 2-9 114 21 195 106-1 2-7 2t-7 2q-10 4-13 5 1 4-1 7t-5 5-7 5-6 4q-1 1-4 3t-4 3-4 2-5 2-5-1l-2-1q-2 0-3-1t-3-2-2-1 0-2q-12 10-20 13-3 0-7 3t-5 4-6 0-6-4q-3-2-4-8t-1-7q-4 3 0 10t1 10q-1 3-6 2t-6-2-7-5-5-3-4-3-5-5q-2-2-4-6t-2-7q-1 3-7 4t-5 3q1-5 2-19t3-22q4-17-7-26-15-14-16-23-2-12 7-14 0-4-5-12t-4-12z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="cloud" unicode="" d="m0 243q0 74 40 135t104 91q-1 15-1 24 0 118 84 202t202 84q88 0 159-50t105-128q39 35 93 35 59 0 101-42t42-101q0-42-23-77 72-17 119-75t46-134q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177z" horiz-adv-x="1071.4" />
|
||||
<glyph glyph-name="flash" unicode="" d="m1 300l112 461q2 8 9 13t15 5h183q11 0 18-7t7-17q0-4-2-10l-96-258 221 54q5 2 7 2 11 0 19-9 10-11 4-24l-302-646q-7-14-23-14-2 0-8 1-9 3-14 11t-3 16l110 451-226-56q-2-1-7-1-10 0-17 7-10 8-7 21z" horiz-adv-x="500" />
|
||||
<glyph glyph-name="signal" unicode="" d="m0-61v107q0 8 5 13t13 5h107q8 0 13-5t5-13v-107q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13z m214 0v179q0 8 5 13t13 5h107q8 0 13-5t5-13v-179q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13z m215 0v322q0 8 5 13t12 5h108q7 0 12-5t5-13v-322q0-8-5-13t-12-5h-108q-7 0-12 5t-5 13z m214 0v536q0 8 5 13t13 5h107q8 0 13-5t5-13v-536q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13z m214 0v822q0 8 5 13t13 5h107q8 0 13-5t5-13v-822q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="down-dir" unicode="" d="m0 457q0 15 11 25t25 11h500q14 0 25-11t10-25-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25z" horiz-adv-x="571.4" />
|
||||
<glyph glyph-name="up-dir" unicode="" d="m0 171q0 15 11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26t-10-25-25-10h-500q-15 0-25 10t-11 25z" horiz-adv-x="571.4" />
|
||||
<glyph glyph-name="left-dir" unicode="" d="m36 350q0 15 10 25l250 250q11 11 25 11t26-11 10-25v-500q0-14-10-25t-26-11-25 11l-250 250q-10 11-10 25z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="right-dir" unicode="" d="m0 100v500q0 15 11 25t25 11 25-11l250-250q10-10 10-25t-10-25l-250-250q-11-11-25-11t-25 11-11 25z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="down-open" unicode="" d="m50 425q0 14 11 25l92 92q11 11 26 11t25-11l296-296 296 296q11 11 25 11t26-11l92-92q11-11 11-25t-11-26l-414-413q-10-11-25-11t-25 11l-414 413q-11 11-11 26z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="right-open" unicode="" d="m50 64q0 15 11 25l296 297-296 296q-11 11-11 25t11 25l92 93q11 10 26 10t25-10l414-414q10-11 10-25t-10-25l-414-414q-11-11-25-11t-26 11l-92 92q-11 11-11 25z" horiz-adv-x="714.3" />
|
||||
<glyph glyph-name="up-open" unicode="" d="m50 133q0 14 11 25l414 414q11 10 25 10t25-10l414-414q11-11 11-25t-11-26l-92-92q-11-10-26-10t-25 10l-296 297-296-297q-11-10-25-10t-26 10l-92 92q-11 11-11 26z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="left-open" unicode="" d="m86 386q0 14 11 25l414 414q10 10 25 10t25-10l92-93q11-10 11-25t-11-25l-296-296 296-297q11-10 11-25t-11-25l-92-93q-11-10-25-10t-25 10l-414 415q-11 10-11 25z" horiz-adv-x="714.3" />
|
||||
<glyph glyph-name="up-big" unicode="" d="m30 308q0 30 21 51l363 363q20 21 50 21 30 0 51-21l363-363q21-22 21-51 0-28-21-50l-42-42q-21-21-50-21-30 0-51 21l-164 164v-393q0-29-20-47t-51-19h-71q-30 0-51 19t-21 47v393l-164-164q-20-21-50-21t-50 21l-42 42q-21 21-21 50z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="right-big" unicode="" d="m0 279v71q0 30 18 51t47 20h393l-163 164q-22 21-22 51t22 50l42 42q21 21 50 21 29 0 51-21l363-363q20-20 20-51 0-30-20-50l-363-364q-22-20-51-20-29 0-50 20l-42 42q-22 21-22 51t22 51l163 163h-393q-29 0-47 21t-18 51z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="left-big" unicode="" d="m36 314q0 29 20 51l364 363q21 21 50 21 29 0 51-21l42-42q21-21 21-50t-21-51l-164-164h393q29 0 47-20t18-51v-71q0-30-18-51t-47-21h-393l164-164q21-20 21-50t-21-50l-42-43q-21-20-51-20-29 0-50 20l-364 364q-20 21-20 50z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="down-big" unicode="" d="m30 386q0 29 21 51l41 41q22 21 51 21 29 0 50-21l164-164v393q0 29 21 50t51 22h71q29 0 50-22t21-50v-393l164 164q21 21 51 21 29 0 50-21l42-42q21-21 21-50 0-30-21-51l-363-363q-22-21-51-21-29 0-50 21l-363 363q-21 20-21 51z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="resize-full-alt" unicode="" d="m0-43v250q0 24 22 33 22 10 39-8l80-80 198 198-198 198-80-80q-11-11-25-11-7 0-14 3-22 9-22 33v250q0 14 11 25t25 11h250q23 0 33-23 9-22-8-38l-80-81 198-198 198 198-81 81q-17 16-7 38 9 23 32 23h250q15 0 26-11t10-25v-250q0-24-22-33-7-3-14-3-14 0-25 11l-80 80-198-198 198-198 80 80q16 17 39 8 22-9 22-33v-250q0-14-10-25t-26-11h-250q-23 0-32 23-10 21 7 38l81 81-198 198-198-198 80-81q17-17 8-38-10-23-33-23h-250q-15 0-25 11t-11 25z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="resize-full" unicode="" d="m0-43v250q0 15 11 25t25 11 25-11l80-80 185 185q6 6 13 6t13-6l64-63q5-6 5-13t-5-13l-185-185 80-81q10-10 10-25t-10-25-25-11h-250q-15 0-25 11t-11 25z m436 482q0 8 5 13l186 185-81 81q-10 10-10 25t10 25 25 11h250q15 0 26-11t10-25v-250q0-15-10-25t-26-11-25 11l-80 80-185-185q-6-6-13-6t-13 6l-64 63q-5 6-5 13z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="resize-small" unicode="" d="m7 11q0 7 6 13l185 185-80 80q-11 11-11 25t11 25 25 11h250q14 0 25-11t11-25v-250q0-14-11-25t-25-10-25 10l-81 81-185-186q-5-5-13-5t-13 5l-63 64q-6 5-6 13z m422 375v250q0 14 10 25t25 10 25-10l81-81 185 186q6 5 13 5t13-5l63-64q6-5 6-13t-6-13l-185-185 80-80q11-11 11-25t-11-25-25-11h-250q-14 0-25 11t-10 25z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="move" unicode="" d="m0 350q0 15 11 25l143 143q10 11 25 11t25-11 10-25v-72h215v215h-72q-14 0-25 10t-11 25 11 26l143 142q11 11 25 11t25-11l143-142q11-11 11-26t-11-25-25-10h-72v-215h215v72q0 14 10 25t25 11 26-11l142-143q11-10 11-25t-11-25l-142-143q-11-11-26-11t-25 11-10 25v72h-215v-215h72q14 0 25-10t11-25-11-26l-143-142q-10-11-25-11t-25 11l-143 142q-11 11-11 26t11 25 25 10h72v215h-215v-72q0-14-10-25t-25-11-26 11l-142 143q-11 11-11 25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="resize-horizontal" unicode="" d="m0 350q0 15 11 25l143 143q10 11 25 11t25-11 10-25v-72h572v72q0 14 10 25t25 11 26-11l142-143q11-10 11-25t-11-25l-142-143q-11-11-26-11t-25 11-10 25v72h-572v-72q0-14-10-25t-25-11-25 11l-143 143q-11 11-11 25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="resize-vertical" unicode="" d="m36 29q0 14 10 25t25 10h72v572h-72q-14 0-25 10t-10 25 10 26l143 142q11 11 25 11t25-11l143-142q11-11 11-26t-11-25-25-10h-71v-572h71q15 0 25-10t11-25-11-26l-143-142q-10-11-25-11t-25 11l-143 142q-10 11-10 26z" horiz-adv-x="428.6" />
|
||||
<glyph glyph-name="zoom-in" unicode="" d="m0 386q0 80 31 152t84 126 125 84 153 31 152-31 126-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51t-21-50-51-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 83-84 126-31 153z m143 0q0-103 73-177t177-73 176 73 74 177-74 176-176 74-177-74-73-176z m71-18v36q0 7 6 12t12 5h125v125q0 8 5 13t13 5h36q7 0 12-5t6-13v-125h125q7 0 12-5t5-12v-36q0-7-5-13t-12-5h-125v-125q0-7-6-13t-12-5h-36q-7 0-13 5t-5 13v125h-125q-7 0-12 5t-6 13z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="block" unicode="" d="m0 352q0 87 34 167t91 137 137 91 167 34 166-34 137-91 91-137 34-167-34-168-91-137-137-92-166-34-167 34-137 92-91 137-34 168z m125 0q0-91 50-167l421 421q-75 50-167 50-83 0-153-40t-110-112-41-152z m138-256q76-50 166-50 62 0 118 25t96 65 65 97 24 119q0 90-48 164z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="zoom-out" unicode="" d="m0 386q0 80 31 152t84 126 125 84 153 31 152-31 126-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51t-21-50-51-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 83-84 126-31 153z m143 0q0-103 73-177t177-73 176 73 74 177-74 176-176 74-177-74-73-176z m71-18v36q0 7 6 12t12 5h322q7 0 12-5t5-12v-36q0-7-5-13t-12-5h-322q-7 0-12 5t-6 13z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="lightbulb" unicode="" d="m0 529q0 55 25 103t65 79 92 49 104 19 104-19 91-49 66-79 24-103q0-87-57-150-25-27-42-49t-33-53-19-60q26-15 26-46 0-20-14-35 14-15 14-36 0-29-25-45 8-13 8-26 0-26-18-40t-43-14q-11-25-34-39t-48-15-49 15-33 39q-26 0-44 14t-17 40q0 13 7 26-25 16-25 45 0 21 14 36-14 15-14 35 0 31 26 46-2 28-19 60t-33 53-41 49q-58 63-58 150z m71 0q0-57 38-101 6-6 17-18t17-19q72-85 79-166h127q8 81 79 166 6 6 17 19t17 18q38 44 38 101 0 40-19 74t-50 57-69 35-76 12-76-12-69-35-50-57-20-74z m197 71q0 7 5 13t13 5q28 0 55-9t49-30 21-50q0-8-6-13t-12-5-13 5-5 13q0 25-30 39t-59 14q-8 0-13 5t-5 13z" horiz-adv-x="571.4" />
|
||||
<glyph glyph-name="clock" unicode="" d="m0 350q0 117 58 215t155 156 216 58 215-58 156-156 57-215-57-215-156-156-215-58-216 58-155 156-58 215z m125 0q0-83 41-152t110-111 153-41 152 41 110 111 41 152-41 152-110 111-152 41-153-41-110-111-41-152z m161-54v36q0 8 5 13t13 5h125v196q0 8 5 13t12 5h36q8 0 13-5t5-13v-250q0-7-5-12t-13-5h-178q-8 0-13 5t-5 12z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="volume-up" unicode="" d="m0 243v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25z m507 9q0 12 6 20t17 14 19 12 16 20 6 32-6 32-16 20-19 12-17 14-6 20q0 15 10 26t25 10q9 0 14-3 39-15 63-52t24-79-24-79-63-52q-5-3-14-3-14 0-25 10t-10 26z m56-132q0 22 21 33 32 16 43 25 41 30 64 75t23 97-23 97-64 75q-11 9-43 25-21 11-21 33 0 14 10 25t25 11q7 0 15-3 78-33 125-105t48-158-48-158-125-105q-8-3-14-3-15 0-26 11t-10 25z m56-131q0 20 22 33 4 2 12 6t13 6q25 14 45 28 69 51 108 127t38 161-38 161-108 127q-20 14-45 28-4 3-13 6t-12 6q-22 13-22 33 0 14 10 25t26 11q7 0 14-3 118-51 189-158t71-236-71-236-189-158q-7-3-14-3-15 0-26 11t-10 25z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="volume-down" unicode="" d="m0 243v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25z m507 9q0 12 6 20t17 14 19 12 16 20 6 32-6 32-16 20-19 12-17 14-6 20q0 15 10 26t25 10q9 0 14-3 39-15 63-52t24-79-24-79-63-52q-5-3-14-3-14 0-25 10t-10 26z" horiz-adv-x="642.9" />
|
||||
<glyph glyph-name="volume-off" unicode="" d="m0 243v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25z" horiz-adv-x="428.6" />
|
||||
<glyph glyph-name="mute" unicode="" d="m7 29q0 7 6 12l688 689q6 6 13 6t13-6l46-46q5-5 5-13t-5-12l-202-202v-71q0-74-52-126t-126-53q-31 0-61 11l-54-54q55-28 115-28 103 0 176 73t74 177v71q0 15 10 25t26 11 25-11 10-25v-71q0-124-82-215t-203-104v-74h142q15 0 26-11t10-25-10-25-26-11h-357q-14 0-25 11t-10 25 10 25 25 11h143v74q-70 7-131 45l-142-142q-5-6-13-6t-12 6l-46 46q-6 5-6 13z m64 357v71q0 15 11 25t25 11 25-11 11-25v-71q0-30 8-63l-56-57q-24 58-24 120z m143 0v285q0 74 53 127t126 52q57 0 103-33t65-85z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="mic" unicode="" d="m0 386v71q0 15 11 25t25 11 25-11 10-25v-71q0-103 74-177t176-73 177 73 73 177v71q0 15 11 25t25 11 25-11 11-25v-71q0-124-82-215t-204-104v-74h143q15 0 25-11t11-25-11-25-25-11h-357q-15 0-25 11t-11 25 11 25 25 11h143v74q-121 13-204 104t-82 215z m143 0v285q0 74 52 127t126 52 127-52 52-127v-285q0-74-52-126t-127-53-126 53-52 126z" horiz-adv-x="642.9" />
|
||||
<glyph glyph-name="login" unicode="" d="m0 243v214q0 15 11 25t25 11h250v161q0 14 10 25t25 10 26-10l303-304q11-10 11-25t-11-25l-303-304q-11-10-26-10t-25 10-10 25v161h-250q-15 0-25 11t-11 25z m499-206q0 6 2 13t5 11 12 3h178q37 0 63 27t27 63v392q0 37-27 63t-63 27h-174t-6 0-6 2-5 3-4 5-1 8q0 2-1 11t0 15 2 13 5 11 12 3h178q67 0 114-47t47-114v-392q0-67-47-114t-114-47h-178q-7 0-13 5t-5 13q0 2-1 11t0 15z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="logout" unicode="" d="m0 154v392q0 67 47 114t114 47h178q8 0 13-5t5-13q0-2 1-11t0-15-2-13-5-11-12-3h-178q-37 0-63-27t-27-63v-392q0-37 27-63t63-27h174t6 0 7-2 4-3 4-5 1-8q0-2 1-11t0-14-2-14-5-11-12-3h-178q-67 0-114 47t-47 114z m214 89v214q0 15 11 25t25 11h250v161q0 14 11 25t25 10 25-10l303-304q11-10 11-25t-11-25l-303-304q-11-10-25-10t-25 10-11 25v161h-250q-14 0-25 11t-11 25z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="calendar-empty" unicode="" d="m0-79v715q0 29 21 50t50 21h72v54q0 36 26 63t63 26h36q37 0 63-26t26-63v-54h214v54q0 36 27 63t63 26h35q37 0 63-26t27-63v-54h71q29 0 50-21t22-50v-715q0-29-22-50t-50-21h-786q-29 0-50 21t-21 50z m71 0h786v572h-786v-572z m143 679q0-8 5-13t13-5h36q8 0 13 5t5 13v161q0 8-5 13t-13 5h-36q-8 0-13-5t-5-13v-161z m429 0q0-8 5-13t13-5h35q8 0 13 5t5 13v161q0 8-5 13t-13 5h-35q-8 0-13-5t-5-13v-161z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="calendar" unicode="" d="m0-79v715q0 29 21 50t50 21h72v54q0 36 26 63t63 26h36q37 0 63-26t26-63v-54h214v54q0 36 27 63t63 26h35q37 0 63-26t27-63v-54h71q29 0 50-21t22-50v-715q0-29-22-50t-50-21h-786q-29 0-50 21t-21 50z m71 0h161v161h-161v-161z m0 197h161v178h-161v-178z m0 214h161v161h-161v-161z m143 268q0-7 6-13t12-5h36q7 0 12 5t6 13v161q0 7-6 12t-12 6h-36q-7 0-12-6t-6-12v-161z m54-679h178v161h-178v-161z m0 197h178v178h-178v-178z m0 214h178v161h-178v-161z m214-411h179v161h-179v-161z m0 197h179v178h-179v-178z m0 214h179v161h-179v-161z m161 268q0-7 5-13t13-5h35q8 0 13 5t5 13v161q0 7-5 12t-13 6h-35q-8 0-13-6t-5-12v-161z m53-679h161v161h-161v-161z m0 197h161v178h-161v-178z m0 214h161v161h-161v-161z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="wrench" unicode="" d="m12-7q0 29 21 51l380 380q22-55 64-97t97-64l-381-381q-21-20-50-20-29 0-51 20l-59 61q-21 20-21 50z m131 36q0-15 10-26t26-10 25 10 10 26-10 25-25 10-26-10-10-25z m286 500q0 103 73 176t177 74q32 0 67-10t60-26q9-6 9-15t-9-16l-163-94v-125l108-60q2 2 44 27t75 45 40 20q8 0 13-5t4-14q0-22-12-60-27-74-92-121t-144-47q-104 0-177 74t-73 176z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="sliders" unicode="" d="m0 404v35q0 23 16 38t38 16h178q22 0 38-16t16-38v-35q0-23-16-38t-38-16h-178q-23 0-38 16t-16 38z m71-465v375h143v-375q0-8-5-13t-13-5h-107q-7 0-13 5t-5 13z m0 590v232q0 8 5 13t13 5h107q8 0 13-5t5-13v-232h-143z m215-411v36q0 22 15 38t38 15h179q22 0 38-15t15-38v-36q0-22-15-38t-38-16h-179q-22 0-38 16t-15 38z m71-89h143v-90q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13v90z m0 214v518q0 8 5 13t13 5h107q8 0 13-5t5-13v-518h-143z m214 303v36q0 22 16 38t38 16h179q22 0 38-16t15-38v-36q0-22-15-38t-38-15h-179q-22 0-38 15t-16 38z m72-607v518h143v-518q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13z m0 732v90q0 8 5 13t13 5h107q8 0 13-5t5-13v-90h-143z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="cog-alt" unicode="" d="m0 299v103q0 6 4 11t9 6l86 14q7 19 18 42-19 27-50 64-4 6-4 11 0 7 4 12 12 16 46 49t44 33q6 0 12-4l64-50q19 10 43 18 6 60 13 86 3 13 16 13h104q6 0 11-4t6-10l13-85q19-6 41-17l66 49q5 4 11 4 7 0 12-4 81-75 81-90 0-5-4-10-7-9-24-30t-25-34q13-27 19-46l85-12q5-2 9-6t4-11v-103q0-6-4-11t-9-6l-86-14q-6-19-18-42 19-27 50-64 4-6 4-11 0-7-4-11-13-17-46-50t-44-33q-6 0-11 4l-64 50q-21-11-43-17-6-60-13-87-4-13-17-13h-104q-6 0-11 4t-5 10l-13 85q-19 6-42 18l-66-50q-4-4-11-4-6 0-12 4-80 75-80 90 0 5 4 10 5 8 23 30t26 34q-13 24-20 46l-85 13q-5 1-9 5t-4 11z m214 51q0-59 42-101t101-42 101 42 42 101-42 101-101 42-101-42-42-101z m429-325v78q0 9 83 18 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 1 17 1t17-1q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-9 83-18v-78q0-9-83-17-6-15-16-29 28-63 28-77 0-2-2-4-68-40-69-40-5 0-26 27t-29 37q-11-1-17-1t-17 1q-7-11-29-37t-25-27q-1 0-69 40-3 2-3 4 0 14 29 77-10 14-17 29-83 8-83 17z m0 572v78q0 9 83 17 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 2 17 2t17-2q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-8 83-17v-78q0-9-83-18-6-15-16-29 28-63 28-77 0-2-2-4-68-39-69-39-5 0-26 26t-29 38q-11-1-17-1t-17 1q-7-12-29-38t-25-26q-1 0-69 39-3 2-3 4 0 14 29 77-10 14-17 29-83 9-83 18z m143-533q0-29 21-50t50-21 51 21 21 50q0 29-22 51t-50 21-50-21-21-51z m0 572q0-30 21-51t50-21 51 21 21 51q0 29-22 50t-50 21-50-21-21-50z" horiz-adv-x="1071.4" />
|
||||
<glyph glyph-name="cog" unicode="" d="m0 289v124q0 7 5 13t10 7l104 16q8 25 22 51-23 32-60 77-6 7-6 14 0 5 5 12 15 20 55 60t53 40q7 0 15-5l77-60q24 13 50 21 9 76 17 104 3 15 20 15h124q7 0 13-4t7-12l15-103q28-9 50-21l80 60q5 5 13 5 7 0 14-5 72-67 92-95 4-5 4-13 0-6-4-12-9-12-29-38t-30-39q14-28 23-55l102-15q7-1 12-7t4-13v-124q0-7-4-13t-11-7l-104-16q-10-30-21-51 19-28 59-77 6-6 6-14t-5-12q-15-21-55-61t-53-39q-7 0-14 5l-77 60q-25-13-51-21-9-76-16-104-4-16-20-16h-124q-8 0-14 5t-6 12l-16 103q-27 9-50 20l-79-59q-6-5-14-5-8 0-14 6-70 63-92 94-4 5-4 12 0 7 5 13 8 12 28 37t30 40q-15 28-23 55l-102 15q-7 1-11 7t-5 13z m286 61q0-59 42-101t101-42 101 42 41 101-41 101-101 42-101-42-42-101z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="phone" unicode="" d="m0 589q0 52 29 104 31 57 59 68 14 6 38 12t39 6q8 0 12-2 10-3 30-43 6-10 16-30t20-35 17-30q2-2 10-14t12-20 4-16q0-11-16-27t-35-31-34-30-16-25q0-5 3-13t4-11 8-14 7-10q42-77 97-132t131-97q1 0 10-6t14-8 11-5 13-2q10 0 25 15t30 35 31 35 28 16q7 0 15-4t20-12 14-10q14-8 30-17t36-20 30-17q39-19 42-29 2-4 2-12 0-15-6-39t-12-38q-11-28-68-60-52-28-103-28-16 0-30 2t-32 7-26 8-31 11-28 10q-54 20-97 47-72 44-148 120t-120 148q-27 43-46 97-2 5-10 28t-12 31-8 26-7 32-2 29z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="file-pdf" unicode="" d="m0-96v892q0 23 16 38t38 16h500q22 0 49-11t42-27l174-174q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38z m71 17h715v572h-232q-23 0-38 15t-16 38v233h-429v-858z m72 105q5 23 32 51t73 54q8 5 13-3 1-1 1-2 29 47 60 110 38 76 58 146-13 46-17 89t4 71q6 22 23 22h12q13 0 20-8 10-12 5-38-1-3-2-4 0-2 0-5v-17q-1-68-8-107 31-91 82-133 18-14 47-31 33 4 65 4 82 0 99-27 9-13 1-29 0-1-1-1l-1-2v0q-3-21-39-21-27 0-65 11t-72 29q-123-13-219-46-85-146-135-146-8 0-15 4l-14 7q0 0-3 2-6 6-4 20z m34-3q30 13 77 88-29-22-49-47t-28-41z m153 145q76 30 159 45-1 0-7 5t-9 8q-43 37-71 98-15-48-47-110-16-31-25-46z m68 295q1 4 4 24 0 2 4 24 1 3 3 5-1 0-1 1t0 1-1 1q0 12-7 20 0-1 0-1v-2q-9-23-2-73z m173 101h210q-5 16-12 23l-175 175q-6 7-23 12v-210z m42-374q42-16 69-16 8 0 10 1 0 0-1 1-14 14-78 14z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="file-word" unicode="" d="m0-96v892q0 23 16 38t38 16h500q22 0 49-11t42-27l174-174q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38z m71 17h715v572h-232q-23 0-38 15t-16 38v233h-429v-858z m59 441h39l92-369h88l72 271q4 11 5 25 1 9 1 14h3l1-14q1-1 2-11t3-14l72-271h89l91 369h39v59h-167v-59h50l-55-245q-3-11-4-25l-1-12h-3l-1 12q-1 2-2 11t-3 14l-81 304h-63l-81-304q-1-5-2-13t-2-12l-2-12h-2l-2 12q-1 14-4 25l-55 245h50v59h-167v-59z m441 202h210q-5 16-12 23l-175 175q-6 7-23 12v-210z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="file-excel" unicode="" d="m0-96v892q0 23 16 38t38 16h500q22 0 49-11t42-27l174-174q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38z m71 17h715v572h-232q-23 0-38 15t-16 38v233h-429v-858z m168 72h157v59h-42l58 90q3 4 5 9t5 8 2 2h1q0-2 2-6 2-2 3-4t3-4 4-5l60-90h-43v-59h163v59h-38l-107 152 108 158h38v59h-156v-59h41l-57-89q-2-4-6-9t-5-8l-1-1h-1q-1 2-3 5-3 6-9 13l-59 89h42v59h-162v-59h38l106-152-109-158h-38v-59z m332 571h210q-5 16-12 23l-175 175q-6 7-23 12v-210z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="doc-text" unicode="" d="m0-96v892q0 23 16 38t38 16h500q22 0 49-11t42-27l174-174q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38z m71 17h715v572h-232q-23 0-38 15t-16 38v233h-429v-858z m143 161v36q0 8 5 13t13 5h393q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13z m0 143v36q0 8 5 13t13 5h393q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13z m0 143v36q0 7 5 12t13 5h393q8 0 13-5t5-12v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13z m357 196h210q-5 16-12 23l-175 175q-6 7-23 12v-210z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="trash" unicode="" d="m0 582v36q0 8 5 13t13 5h172l39 93q9 21 31 35t44 15h178q22 0 44-15t30-35l39-93h173q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-54v-529q0-46-26-80t-63-34h-464q-37 0-63 33t-27 79v531h-53q-8 0-13 5t-5 13z m143-547q0-12 4-22t8-15 6-5h464q2 0 6 5t8 15 4 22v529h-500v-529z m71 83v321q0 8 5 13t13 5h36q8 0 13-5t5-13v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13z m54 518h250l-27 65q-4 5-9 6h-177q-6-1-10-6z m89-518v321q0 8 5 13t13 5h36q8 0 13-5t5-13v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13z m143 0v321q0 8 5 13t13 5h36q7 0 12-5t5-13v-321q0-8-5-13t-12-5h-36q-8 0-13 5t-5 13z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="comment-empty" unicode="" d="m0 350q0 97 67 179t182 130 251 48 251-48 182-130 67-179-67-179-182-130-251-48q-39 0-81 4-110-97-257-135-27-8-63-12h-3q-8 0-15 6t-9 15v1q-2 2 0 6t1 6 2 5l4 5t4 5 4 5q4 5 17 19t20 22 17 22 18 28 15 33 15 42q-88 50-138 123t-51 157z m71 0q0-62 40-119t113-98l48-28-15-54q-13-50-39-96 85 36 154 96l24 21 31-3q39-5 73-5 114 0 213 39t157 105 59 142-59 142-157 105-213 39-213-39-157-105-59-142z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="comment" unicode="" d="m0 350q0 73 40 139t106 114 160 76 194 28q136 0 251-48t182-130 67-179-67-179-182-130-251-48q-39 0-81 4-110-97-257-135-27-7-63-12-10-1-17 5t-10 16v1q-2 2 0 7t1 5 2 5l4 5t4 5 4 5q4 5 17 19t20 22 17 22 18 28 15 33 15 42q-88 50-138 123t-51 157z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="chat" unicode="" d="m0 421q0 78 53 144t143 104 197 38 197-38 143-104 53-144-53-143-143-104-197-38q-48 0-98 9-70-50-155-72-21-5-48-9h-2q-6 0-12 5t-6 11q-1 2-1 4t1 4 1 3l1 3t2 3 2 3 3 2 2 3q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125z m344-354q32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128q0-67-40-126t-108-98q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-13-4q-27 4-48 9-85 23-155 72-50-9-98-9-151 0-263 74z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="chat-empty" unicode="" d="m0 421q0 78 53 144t143 104 197 38 197-38 143-104 53-144-53-143-143-104-197-38q-48 0-98 9-70-50-155-72-21-5-48-9h-2q-6 0-12 5t-6 11q-1 2-1 4t1 4 1 3l1 3t2 3 2 3 3 2 2 3q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125z m71 0q0-45 30-88t83-73l54-32-19-46q19 11 34 21l25 18 30-6q43-8 85-8 85 0 159 29t118 79 44 106-44 107-118 79-159 29-160-29-118-79-44-107z m273-354q32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128q0-67-40-126t-108-98q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-13-4q-27 4-48 9-85 23-155 72-50-9-98-9-151 0-263 74z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="bell" unicode="" d="m0 64q106 90 160 222t54 278q0 92 54 146t147 66q-4 10-4 20 0 23 15 38t38 16 38-16 16-38q0-10-5-20 94-11 148-66t53-146q0-146 54-278t161-222q0-29-22-50t-50-21h-250q0-59-42-101t-101-42-101 42-42 101h-250q-29 0-50 21t-21 50z m102 0h724q-91 101-137 230t-46 270q0 143-179 143t-178-143q0-141-46-270t-138-230z m264-71q0-41 29-70t69-28q9 0 9 9t-9 8q-33 0-56 24t-24 57q0 9-9 9t-9-9z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="bell-alt" unicode="" d="m0 64q106 90 160 222t54 278q0 92 54 146t147 66q-4 10-4 20 0 23 15 38t38 16 38-16 16-38q0-10-5-20 94-11 148-66t53-146q0-146 54-278t161-222q0-29-22-50t-50-21h-250q0-59-42-101t-101-42-101 42-42 101h-250q-29 0-50 21t-21 50z m366-71q0-41 29-70t69-28q9 0 9 9t-9 8q-33 0-56 24t-24 57q0 9-9 9t-9-9z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="attention-alt" unicode="" d="m55 743q-1 14 9 25t25 11h179q14 0 25-11t9-25l-15-429q-1-14-12-25t-25-11h-143q-14 0-25 11t-12 25z m16-714v125q0 14 11 25t25 10h143q15 0 25-10t11-25v-125q0-15-11-26t-25-10h-143q-14 0-25 10t-11 26z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="print" unicode="" d="m0 82v232q0 44 32 76t75 31h36v304q0 22 16 38t37 16h375q23 0 50-12t42-26l85-85q15-16 27-43t11-49v-143h35q45 0 76-31t32-76v-232q0-7-6-12t-12-6h-125v-89q0-22-16-38t-38-16h-536q-22 0-37 16t-16 38v89h-125q-7 0-13 6t-5 12z m214-89h500v143h-500v-143z m0 357h500v214h-89q-22 0-38 16t-16 38v89h-357v-357z m572-36q0-14 10-25t25-10 26 10 10 25-10 25-26 11-25-11-10-25z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="edit" unicode="" d="m0 154v464q0 66 47 113t114 48h464q35 0 65-14 9-4 10-13 2-10-5-16l-27-28q-8-8-18-4-13 3-25 3h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v70q0 7 5 12l36 36q8 8 20 4t11-16v-106q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114z m357-18v160l375 375 161-160-375-375h-161z m54 107h53v-54h32l64 65-85 85-64-65v-31z m116 134q9-9 18 0l196 196q9 9 0 18t-18 0l-196-196q-9-9 0-18z m241 330l51 51q16 16 38 16t38-16l85-84q16-16 16-38t-16-38l-51-52z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="forward" unicode="" d="m0 225q0 111 30 186 90 225 488 225h125v143q0 14 10 25t26 10 25-10l285-286q11-11 11-25t-11-25l-285-286q-11-11-25-11t-26 11-10 25v143h-125q-55 0-98-3t-86-12-74-24-59-39-45-56-27-77-10-101q0-31 3-69 0-4 2-13t1-15q0-8-5-14t-13-6q-9 0-15 10-4 5-8 12t-7 17-6 13q-71 159-71 252z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="reply" unicode="" d="m0 493q0 14 11 25l285 286q11 10 25 10t26-10 10-25v-143h125q398 0 488-225 30-75 30-186 0-93-71-252-2-4-6-13t-7-17-8-12q-6-10-15-10-9 0-13 6t-5 14q0 5 1 15t2 13q3 38 3 69 0 56-10 101t-27 77-45 56-59 39-74 24-86 12-98 3h-125v-143q0-14-10-25t-26-11-25 11l-285 286q-11 10-11 25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="reply-all" unicode="" d="m0 493q0 14 11 25l285 286q17 17 39 7 22-9 22-32v-39l-221-222q-11-11-11-25t11-25l221-222v-39q0-23-22-33-7-3-14-3-15 0-25 11l-285 286q-11 10-11 25z m214 0q0 14 11 25l286 286q16 17 39 7 21-9 21-32v-147q230-15 335-123 94-97 94-284 0-32-9-75t-22-77-27-69-22-51l-12-22q-4-10-15-10-3 0-5 1-14 4-13 19 24 223-59 315-36 40-95 62t-150 29v-140q0-23-21-33-8-3-14-3-15 0-25 11l-286 286q-11 10-11 25z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="eye" unicode="" d="m0 314q0 19 11 39 78 128 210 205t279 78 279-78 210-205q11-20 11-39t-11-38q-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38z m71 0q75-114 187-182t242-68 242 68 187 182q-85 132-213 197 34-58 34-125 0-104-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197z m259 72q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19-8 19-19 7q-70 0-120-50t-50-119z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="tag" unicode="" d="m0 475v232q0 29 21 50t50 22h233q29 0 65-15t57-36l399-399q20-21 20-50 0-30-20-51l-274-274q-22-21-51-21-30 0-50 21l-399 399q-21 21-36 57t-15 65z m107 125q0-30 21-50t51-21 50 21 21 50-21 51-50 20-51-20-21-51z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="tags" unicode="" d="m0 475v232q0 29 21 50t50 22h233q29 0 65-15t57-36l399-399q20-21 20-50 0-30-20-51l-274-274q-22-21-51-21-30 0-50 21l-399 399q-21 21-36 57t-15 65z m107 125q0-30 21-50t51-21 50 21 21 50-21 51-50 20-51-20-21-51z m286 179h125q29 0 65-15t57-36l399-399q21-21 21-50 0-30-21-51l-274-274q-22-21-51-21-20 0-33 8t-29 25l262 262q21 21 21 51 0 29-21 50l-399 399q-21 21-57 36t-65 15z" horiz-adv-x="1071.4" />
|
||||
<glyph glyph-name="lock-open-alt" unicode="" d="m0 46v322q0 22 16 38t38 15h17v179q0 103 74 177t176 73 177-73 73-177q0-15-10-25t-25-11h-36q-14 0-25 11t-11 25q0 59-42 101t-101 42-101-42-41-101v-179h410q23 0 38-15t16-38v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37z" horiz-adv-x="642.9" />
|
||||
<glyph glyph-name="lock-open" unicode="" d="m0 46v322q0 22 16 38t38 15h375v108q0 103 73 176t177 74 176-74 74-176v-143q0-15-11-25t-25-11h-36q-14 0-25 11t-11 25v143q0 59-41 101t-101 41-101-41-42-101v-108h53q23 0 38-15t16-38v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="lock" unicode="" d="m0 46v322q0 22 16 38t38 15h17v108q0 102 74 176t176 74 177-74 73-176v-108h18q23 0 38-15t16-38v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37z m179 375h285v108q0 59-42 101t-101 41-101-41-41-101v-108z" horiz-adv-x="642.9" />
|
||||
<glyph glyph-name="home" unicode="" d="m15 348q0 8 6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13l-34-41q-5-5-12-7h-2q-7 0-12 4l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13z m128-319v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="info" unicode="" d="m0 29v71q0 15 11 25t25 11h35v214h-35q-15 0-25 11t-11 25v71q0 15 11 25t25 11h214q15 0 25-11t11-25v-321h35q15 0 26-11t10-25v-71q0-15-10-26t-26-10h-285q-15 0-25 10t-11 26z m71 607v107q0 14 11 25t25 11h143q15 0 25-11t11-25v-107q0-15-11-25t-25-11h-143q-14 0-25 11t-11 25z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="help" unicode="" d="m54 543q-1 8 3 16 89 148 259 148 45 0 90-17t81-46 59-72 23-88q0-30-8-57t-20-42-31-33-32-25-34-19q-23-13-38-37t-15-37q0-10-7-18t-16-9h-134q-8 0-14 10t-6 21v25q0 47 37 88t79 60q33 15 47 32t14 42q0 23-26 41t-60 18q-36 0-60-16-20-14-60-64-7-9-17-9-7 0-14 4l-91 70q-8 6-9 14z m160-528v134q0 9 7 16t16 6h134q8 0 15-6t7-16v-134q0-9-7-16t-15-6h-134q-9 0-16 6t-7 16z" horiz-adv-x="571.4" />
|
||||
<glyph glyph-name="search" unicode="" d="m0 386q0 80 31 152t84 126 125 84 153 31 152-31 126-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51 0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 83-84 126-31 153z m143 0q0-103 73-177t177-73 176 73 74 177-74 176-176 74-177-74-73-176z" horiz-adv-x="928.6" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 42 KiB |
BIN
application/fonts/fontanello-ifont/font/ifont.ttf
Normal file
BIN
application/fonts/fontanello-ifont/font/ifont.ttf
Normal file
Binary file not shown.
BIN
application/fonts/fontanello-ifont/font/ifont.woff
Normal file
BIN
application/fonts/fontanello-ifont/font/ifont.woff
Normal file
Binary file not shown.
@ -31,7 +31,9 @@ class AutologinBackendForm extends Form
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Backend Name'),
|
||||
'description' => t('The name of this authentication backend'),
|
||||
'description' => t(
|
||||
'The name of this authentication provider that is used to differentiate it from others'
|
||||
),
|
||||
'validators' => array(
|
||||
array(
|
||||
'Regex',
|
||||
@ -50,9 +52,8 @@ class AutologinBackendForm extends Form
|
||||
'text',
|
||||
'strip_username_regexp',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Backend Domain Pattern'),
|
||||
'description' => t('The domain pattern of this authentication backend'),
|
||||
'label' => t('Filter Pattern'),
|
||||
'description' => t('The regular expression to use to strip specific parts off from usernames. Leave empty if you do not want to strip off anything'),
|
||||
'value' => '/\@[^$]+$/',
|
||||
'validators' => array(
|
||||
new Zend_Validate_Callback(function ($value) {
|
||||
@ -82,7 +83,7 @@ class AutologinBackendForm extends Form
|
||||
*
|
||||
* @return bool Whether validation succeeded or not
|
||||
*/
|
||||
public function isValidAuthenticationBackend(Form $form)
|
||||
public static function isValidAuthenticationBackend(Form $form)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
namespace Icinga\Form\Config\Authentication;
|
||||
|
||||
use Exception;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
@ -54,7 +55,9 @@ class DbBackendForm extends Form
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Backend Name'),
|
||||
'description' => t('The name of this authentication provider'),
|
||||
'description' => t(
|
||||
'The name of this authentication provider that is used to differentiate it from others'
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
@ -88,7 +91,7 @@ class DbBackendForm extends Form
|
||||
*/
|
||||
public function onSuccess(Request $request)
|
||||
{
|
||||
if (false === $this->isValidAuthenticationBackend($this)) {
|
||||
if (false === static::isValidAuthenticationBackend($this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -100,21 +103,29 @@ class DbBackendForm extends Form
|
||||
*
|
||||
* @return bool Whether validation succeeded or not
|
||||
*/
|
||||
public function isValidAuthenticationBackend(Form $form)
|
||||
public static function isValidAuthenticationBackend(Form $form)
|
||||
{
|
||||
$element = $form->getElement('resource');
|
||||
|
||||
try {
|
||||
$dbUserBackend = new DbUserBackend(ResourceFactory::create($element->getValue()));
|
||||
$dbUserBackend = new DbUserBackend(ResourceFactory::createResource($form->getResourceConfig()));
|
||||
if ($dbUserBackend->count() < 1) {
|
||||
$element->addError(t('No users found under the specified database backend'));
|
||||
$form->addError(t('No users found under the specified database backend'));
|
||||
return false;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$element->addError(sprintf(t('Using the specified backend failed: %s'), $e->getMessage()));
|
||||
$form->addError(sprintf(t('Using the specified backend failed: %s'), $e->getMessage()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configuration for the chosen resource
|
||||
*
|
||||
* @return Config
|
||||
*/
|
||||
public function getResourceConfig()
|
||||
{
|
||||
return ResourceFactory::getResourceConfig($this->getValue('resource'));
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,11 @@
|
||||
namespace Icinga\Form\Config\Authentication;
|
||||
|
||||
use Exception;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Exception\AuthenticationException;
|
||||
use Icinga\Authentication\Backend\LdapUserBackend;
|
||||
|
||||
/**
|
||||
@ -54,7 +56,9 @@ class LdapBackendForm extends Form
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Backend Name'),
|
||||
'description' => t('The name of this authentication backend')
|
||||
'description' => t(
|
||||
'The name of this authentication provider that is used to differentiate it from others'
|
||||
)
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
@ -97,7 +101,16 @@ class LdapBackendForm extends Form
|
||||
'value' => 'ldap'
|
||||
)
|
||||
);
|
||||
|
||||
$this->addElement(
|
||||
'text',
|
||||
'base_dn',
|
||||
array(
|
||||
'required' => false,
|
||||
'label' => t('Base DN'),
|
||||
'description' => t('The path where users can be found on the ldap server. ' .
|
||||
' Leave empty to select all users available on the specified resource.')
|
||||
)
|
||||
);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -108,7 +121,7 @@ class LdapBackendForm extends Form
|
||||
*/
|
||||
public function onSuccess(Request $request)
|
||||
{
|
||||
if (false === $this->isValidAuthenticationBackend($this)) {
|
||||
if (false === static::isValidAuthenticationBackend($this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -120,22 +133,34 @@ class LdapBackendForm extends Form
|
||||
*
|
||||
* @return bool Whether validation succeeded or not
|
||||
*/
|
||||
public function isValidAuthenticationBackend(Form $form)
|
||||
public static function isValidAuthenticationBackend(Form $form)
|
||||
{
|
||||
$element = $form->getElement('resource');
|
||||
|
||||
try {
|
||||
$ldapUserBackend = new LdapUserBackend(
|
||||
ResourceFactory::create($element->getValue()),
|
||||
ResourceFactory::createResource($form->getResourceConfig()),
|
||||
$form->getElement('user_class')->getValue(),
|
||||
$form->getElement('user_name_attribute')->getValue()
|
||||
$form->getElement('user_name_attribute')->getValue(),
|
||||
$form->getElement('base_dn')->getValue()
|
||||
);
|
||||
$ldapUserBackend->assertAuthenticationPossible();
|
||||
} catch (AuthenticationException $e) {
|
||||
$form->addError($e->getMessage());
|
||||
return false;
|
||||
} catch (Exception $e) {
|
||||
$element->addError(sprintf(t('Connection validation failed: %s'), $e->getMessage()));
|
||||
$form->addError(sprintf(t('Unable to validate authentication: %s'), $e->getMessage()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configuration for the chosen resource
|
||||
*
|
||||
* @return Config
|
||||
*/
|
||||
public function getResourceConfig()
|
||||
{
|
||||
return ResourceFactory::getResourceConfig($this->getValue('resource'));
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ use Icinga\Form\ConfigForm;
|
||||
use Icinga\Web\Notification;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Platform;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
use Icinga\Form\Config\Authentication\DbBackendForm;
|
||||
use Icinga\Form\Config\Authentication\LdapBackendForm;
|
||||
@ -39,8 +40,6 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
* @param Config $resources The resource configuration
|
||||
*
|
||||
* @return self
|
||||
*
|
||||
* @throws ConfigurationError In case no resources are available for authentication
|
||||
*/
|
||||
public function setResourceConfig(Config $resourceConfig)
|
||||
{
|
||||
@ -49,10 +48,6 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
$resources[strtolower($resource->type)][] = $name;
|
||||
}
|
||||
|
||||
if (empty($resources)) {
|
||||
throw new ConfigurationError(t('Could not find any resources for authentication'));
|
||||
}
|
||||
|
||||
$this->resources = $resources;
|
||||
return $this;
|
||||
}
|
||||
@ -201,7 +196,7 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
{
|
||||
if (($el = $this->getElement('force_creation')) === null || false === $el->isChecked()) {
|
||||
$backendForm = $this->getBackendForm($this->getElement('type')->getValue());
|
||||
if (false === $backendForm->isValidAuthenticationBackend($this)) {
|
||||
if (false === $backendForm::isValidAuthenticationBackend($this)) {
|
||||
$this->addElement($this->getForceCreationCheckbox());
|
||||
return false;
|
||||
}
|
||||
@ -251,6 +246,17 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
$configValues['type'] = $configValues['backend'];
|
||||
$configValues['name'] = $authBackend;
|
||||
$this->populate($configValues);
|
||||
} elseif (empty($this->resources)) {
|
||||
$autologinBackends = array_filter(
|
||||
$this->config->toArray(),
|
||||
function ($authBackendCfg) {
|
||||
return isset($authBackendCfg['backend']) && $authBackendCfg['backend'] === 'autologin';
|
||||
}
|
||||
);
|
||||
|
||||
if (false === empty($autologinBackends)) {
|
||||
throw new ConfigurationError(t('Could not find any resources for authentication'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,7 +286,7 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$backendTypes = array();
|
||||
$backendType = isset($formData['type']) ? $formData['type'] : 'db';
|
||||
$backendType = isset($formData['type']) ? $formData['type'] : null;
|
||||
|
||||
if (isset($this->resources['db'])) {
|
||||
$backendTypes['db'] = t('Database');
|
||||
@ -299,6 +305,10 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
$backendTypes['autologin'] = t('Autologin');
|
||||
}
|
||||
|
||||
if ($backendType === null) {
|
||||
$backendType = key($backendTypes);
|
||||
}
|
||||
|
||||
$this->addElement(
|
||||
'select',
|
||||
'type',
|
||||
@ -307,7 +317,7 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
'required' => true,
|
||||
'autosubmit' => true,
|
||||
'label' => t('Backend Type'),
|
||||
'description' => t('The type of the resource to use for this authenticaton backend'),
|
||||
'description' => t('The type of the resource to use for this authenticaton provider'),
|
||||
'multiOptions' => $backendTypes
|
||||
)
|
||||
);
|
||||
@ -319,4 +329,14 @@ class AuthenticationBackendConfigForm extends ConfigForm
|
||||
|
||||
$this->addElements($this->getBackendForm($backendType)->createElements($formData)->getElements());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configuration for the chosen resource
|
||||
*
|
||||
* @return Config
|
||||
*/
|
||||
public function getResourceConfig()
|
||||
{
|
||||
return ResourceFactory::getResourceConfig($this->getValue('resource'));
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,11 @@
|
||||
namespace Icinga\Form\Config\General;
|
||||
|
||||
use DateTimeZone;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Util\Translator;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Util\Translator;
|
||||
use Icinga\Web\Form;
|
||||
|
||||
|
||||
/**
|
||||
* Form class to modify the general application configuration
|
||||
@ -33,12 +35,12 @@ class ApplicationConfigForm extends Form
|
||||
array(
|
||||
'label' => t('Module Path'),
|
||||
'required' => true,
|
||||
'value' => implode(':', Icinga::app()->getModuleManager()->getModuleDirs()),
|
||||
'description' => t(
|
||||
'Contains the directories that will be searched for available modules, separated by '
|
||||
. 'colons. Modules that don\'t exist in these directories can still be symlinked in '
|
||||
. 'the module folder, but won\'t show up in the list of disabled modules.'
|
||||
),
|
||||
'value' => realpath(ICINGAWEB_APPDIR . '/../modules')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -30,13 +30,13 @@ class LoggingConfigForm extends Form
|
||||
'logging_log',
|
||||
array(
|
||||
'required' => true,
|
||||
'class' => 'autosubmit',
|
||||
'autosubmit' => true,
|
||||
'label' => t('Logging Type'),
|
||||
'description' => t('The type of logging to utilize.'),
|
||||
'multiOptions' => array(
|
||||
'syslog' => 'Syslog',
|
||||
'file' => t('File'),
|
||||
'none' => t('None')
|
||||
'file' => t('File', 'app.config.logging.type'),
|
||||
'none' => t('None', 'app.config.logging.type')
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -50,16 +50,16 @@ class LoggingConfigForm extends Form
|
||||
'label' => t('Logging Level'),
|
||||
'description' => t('The maximum logging level to emit.'),
|
||||
'multiOptions' => array(
|
||||
Logger::$levels[Logger::ERROR] => t('Error'),
|
||||
Logger::$levels[Logger::WARNING] => t('Warning'),
|
||||
Logger::$levels[Logger::INFO] => t('Information'),
|
||||
Logger::$levels[Logger::DEBUG] => t('Debug')
|
||||
Logger::$levels[Logger::ERROR] => t('Error', 'app.config.logging.level'),
|
||||
Logger::$levels[Logger::WARNING] => t('Warning', 'app.config.logging.level'),
|
||||
Logger::$levels[Logger::INFO] => t('Information', 'app.config.logging.level'),
|
||||
Logger::$levels[Logger::DEBUG] => t('Debug', 'app.config.logging.level')
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($formData['logging_log']) && $formData['logging_log'] === 'syslog') {
|
||||
if (false === isset($formData['logging_log']) || $formData['logging_log'] === 'syslog') {
|
||||
$this->addElement(
|
||||
'text',
|
||||
'logging_application',
|
||||
|
@ -5,11 +5,12 @@
|
||||
namespace Icinga\Form\Config\Resource;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Web\Form\Element\Number;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Application\Platform;
|
||||
|
||||
/**
|
||||
* Form class for adding/modifying database resources
|
||||
@ -29,6 +30,23 @@ class DbResourceForm extends Form
|
||||
*/
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$dbChoices = array();
|
||||
if (Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')) {
|
||||
$dbChoices['mysql'] = 'MySQL';
|
||||
}
|
||||
if (Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')) {
|
||||
$dbChoices['pgsql'] = 'PostgreSQL';
|
||||
}
|
||||
|
||||
$this->addElement(
|
||||
'text',
|
||||
'name',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Resource Name'),
|
||||
'description' => t('The unique name of this resource')
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
'select',
|
||||
'db',
|
||||
@ -36,11 +54,7 @@ class DbResourceForm extends Form
|
||||
'required' => true,
|
||||
'label' => t('Database Type'),
|
||||
'description' => t('The type of SQL database'),
|
||||
'multiOptions' => array(
|
||||
'mysql' => 'MySQL',
|
||||
'pgsql' => 'PostgreSQL'
|
||||
//'oracle' => 'Oracle'
|
||||
)
|
||||
'multiOptions' => $dbChoices
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
@ -103,7 +117,7 @@ class DbResourceForm extends Form
|
||||
*/
|
||||
public function onSuccess(Request $request)
|
||||
{
|
||||
if (false === $this->isValidResource($this)) {
|
||||
if (false === static::isValidResource($this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -115,10 +129,10 @@ class DbResourceForm extends Form
|
||||
*
|
||||
* @return bool Whether validation succeeded or not
|
||||
*/
|
||||
public function isValidResource(Form $form)
|
||||
public static function isValidResource(Form $form)
|
||||
{
|
||||
try {
|
||||
$resource = ResourceFactory::createResource(new Zend_Config($form->getValues()));
|
||||
$resource = ResourceFactory::createResource(new Config($form->getValues()));
|
||||
$resource->getConnection()->getConnection();
|
||||
} catch (Exception $e) {
|
||||
$form->addError(t('Connectivity validation failed, connection to the given resource not possible.'));
|
||||
|
@ -25,6 +25,15 @@ class FileResourceForm extends Form
|
||||
*/
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$this->addElement(
|
||||
'text',
|
||||
'name',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Resource Name'),
|
||||
'description' => t('The unique name of this resource')
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
'text',
|
||||
'filename',
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace Icinga\Form\Config\Resource;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Web\Form\Element\Number;
|
||||
@ -29,6 +29,15 @@ class LdapResourceForm extends Form
|
||||
*/
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$this->addElement(
|
||||
'text',
|
||||
'name',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Resource Name'),
|
||||
'description' => t('The unique name of this resource')
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
'text',
|
||||
'hostname',
|
||||
@ -56,7 +65,7 @@ class LdapResourceForm extends Form
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Root DN'),
|
||||
'description' => t('The path where users can be found on the ldap server')
|
||||
'description' => t('Only the root and its child nodes will be accessible on this resource.')
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
@ -89,7 +98,7 @@ class LdapResourceForm extends Form
|
||||
*/
|
||||
public function onSuccess(Request $request)
|
||||
{
|
||||
if (false === $this->isValidResource($this)) {
|
||||
if (false === static::isValidResource($this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -101,11 +110,17 @@ class LdapResourceForm extends Form
|
||||
*
|
||||
* @return bool Whether validation succeeded or not
|
||||
*/
|
||||
public function isValidResource(Form $form)
|
||||
public static function isValidResource(Form $form)
|
||||
{
|
||||
try {
|
||||
$resource = ResourceFactory::createResource(new Zend_Config($form->getValues()));
|
||||
$resource->connect();
|
||||
$resource = ResourceFactory::createResource(new Config($form->getValues()));
|
||||
if (false === $resource->testCredentials(
|
||||
$form->getElement('bind_dn')->getValue(),
|
||||
$form->getElement('bind_pw')->getValue()
|
||||
)
|
||||
) {
|
||||
throw new Exception();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$form->addError(t('Connectivity validation failed, connection to the given resource not possible.'));
|
||||
return false;
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace Icinga\Form\Config\Resource;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Application\Icinga;
|
||||
@ -29,6 +29,15 @@ class LivestatusResourceForm extends Form
|
||||
*/
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$this->addElement(
|
||||
'text',
|
||||
'name',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Resource Name'),
|
||||
'description' => t('The unique name of this resource')
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
'text',
|
||||
'socket',
|
||||
@ -50,7 +59,7 @@ class LivestatusResourceForm extends Form
|
||||
*/
|
||||
public function onSuccess(Request $request)
|
||||
{
|
||||
if (false === $this->isValidResource($this)) {
|
||||
if (false === static::isValidResource($this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -62,10 +71,10 @@ class LivestatusResourceForm extends Form
|
||||
*
|
||||
* @return bool Whether validation succeeded or not
|
||||
*/
|
||||
public function isValidResource(Form $form)
|
||||
public static function isValidResource(Form $form)
|
||||
{
|
||||
try {
|
||||
$resource = ResourceFactory::createResource(new Zend_Config($form->getValues()));
|
||||
$resource = ResourceFactory::createResource(new Config($form->getValues()));
|
||||
$resource->connect()->disconnect();
|
||||
} catch (Exception $e) {
|
||||
$form->addError(t('Connectivity validation failed, connection to the given resource not possible.'));
|
||||
|
@ -132,7 +132,7 @@ class ResourceConfigForm extends ConfigForm
|
||||
{
|
||||
if (($el = $this->getElement('force_creation')) === null || false === $el->isChecked()) {
|
||||
$resourceForm = $this->getResourceForm($this->getElement('type')->getValue());
|
||||
if (method_exists($resourceForm, 'isValidResource') && false === $resourceForm->isValidResource($this)) {
|
||||
if (method_exists($resourceForm, 'isValidResource') && false === $resourceForm::isValidResource($this)) {
|
||||
$this->addElement($this->getForceCreationCheckbox());
|
||||
return false;
|
||||
}
|
||||
@ -220,15 +220,6 @@ class ResourceConfigForm extends ConfigForm
|
||||
$resourceTypes['db'] = t('SQL Database');
|
||||
}
|
||||
|
||||
$this->addElement(
|
||||
'text',
|
||||
'name',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Resource Name'),
|
||||
'description' => t('The unique name of this resource')
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
'select',
|
||||
'type',
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Icinga\Form\Dashboard;
|
||||
|
||||
use Icinga\Application\Config as IcingaConfig;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Widget\Dashboard;
|
||||
use Icinga\Web\Form;
|
||||
|
||||
@ -110,7 +110,7 @@ class AddUrlForm extends Form
|
||||
protected function getDashboardPaneSelectionValues()
|
||||
{
|
||||
$dashboard = new Dashboard();
|
||||
$dashboard->readConfig(IcingaConfig::app('dashboard/dashboard'));
|
||||
$dashboard->readConfig(Config::app('dashboard/dashboard'));
|
||||
return $dashboard->getPaneKeyTitleArray();
|
||||
}
|
||||
}
|
||||
|
213
application/forms/LdapDiscoveryForm.php
Normal file
213
application/forms/LdapDiscoveryForm.php
Normal file
@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Form;
|
||||
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Protocol\Ldap\Exception as LdapException;
|
||||
use Icinga\Protocol\Ldap\Connection;
|
||||
use Icinga\Protocol\Dns;
|
||||
use Icinga\Web\Form\Element\Note;
|
||||
use Icinga\Web\Form;
|
||||
|
||||
/**
|
||||
* Form class for application-wide and logging specific settings
|
||||
*/
|
||||
class LdapDiscoveryForm extends Form
|
||||
{
|
||||
/**
|
||||
* The discovered server settings
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $capabilities = null;
|
||||
|
||||
/**
|
||||
* The discovered root_dn
|
||||
*
|
||||
* @var null
|
||||
*/
|
||||
private $namingContext = null;
|
||||
|
||||
/**
|
||||
* The working domain name
|
||||
*
|
||||
* @var null
|
||||
*/
|
||||
private $domain = null;
|
||||
|
||||
/**
|
||||
* The working port name
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $port = 389;
|
||||
|
||||
/**
|
||||
* Initialize this page
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->setName('form_ldap_discovery');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Form::createElements()
|
||||
*/
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$this->addElement(
|
||||
'text',
|
||||
'domain',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => t('Search Domain'),
|
||||
'description' => t('Search this domain for records of available servers.'),
|
||||
)
|
||||
);
|
||||
|
||||
if (false) {
|
||||
$this->addElement(
|
||||
new Note(
|
||||
'additional_description',
|
||||
array(
|
||||
'value' => t('No Ldap servers found on this domain.'
|
||||
. ' You can try to specify host and port and try again, or just skip this step and '
|
||||
. 'configure the server manually.'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
'text',
|
||||
'hostname',
|
||||
array(
|
||||
'required' => false,
|
||||
'label' => t('Host'),
|
||||
'description' => t('IP or host name to search.'),
|
||||
)
|
||||
);
|
||||
|
||||
$this->addElement(
|
||||
'text',
|
||||
'port',
|
||||
array(
|
||||
'required' => false,
|
||||
'label' => t('Port'),
|
||||
'description' => t('Port', 389),
|
||||
)
|
||||
);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isValid($data)
|
||||
{
|
||||
if (false === parent::isValid($data)) {
|
||||
return false;
|
||||
}
|
||||
if ($this->discover($this->getValue('domain'))) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private function discover($domain)
|
||||
{
|
||||
// Attempt 1: Connect to the domain directly
|
||||
if ($this->discoverCapabilities(array(
|
||||
'hostname' => $domain,
|
||||
'port' => 389)
|
||||
)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Attempt 2: Discover all available ldap dns records and connect to the first one
|
||||
$cap = false;
|
||||
$records = array_merge(Dns::getSrvRecords($domain, 'ldap'), Dns::getSrvRecords($domain, 'ldaps'));
|
||||
if (isset($records[0])) {
|
||||
$record = $records[0];
|
||||
if (isset($record['port'])) {
|
||||
$cap = $this->discoverCapabilities(array(
|
||||
'hostname' => $record['target'],
|
||||
'port' => $record['port']
|
||||
));
|
||||
} else {
|
||||
$cap = $this->discoverCapabilities(array(
|
||||
'hostname' => $record['target'],
|
||||
'port' => 389
|
||||
));
|
||||
}
|
||||
}
|
||||
return $cap;
|
||||
}
|
||||
|
||||
private function discoverCapabilities($config)
|
||||
{
|
||||
$conn = new Connection(new Config($config));
|
||||
try {
|
||||
$conn->connect();
|
||||
$this->capabilities = $conn->getCapabilities();
|
||||
$this->namingContext = $conn->getDefaultNamingContext();
|
||||
$this->port = $config['port'];
|
||||
$this->domain = $config['hostname'];
|
||||
return true;
|
||||
} catch (LdapException $e) {
|
||||
Logger::info(
|
||||
'Ldap discovery for ' . $config['hostname'] . ':' . $config['port'] . ' failed: ' . $e->getMessage()
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function suggestResourceSettings()
|
||||
{
|
||||
if (! isset($this->capabilities)) {
|
||||
return array();
|
||||
}
|
||||
if ($this->capabilities->msCapabilities->ActiveDirectoryOid) {
|
||||
return array(
|
||||
'hostname' => $this->domain,
|
||||
'port' => $this->port,
|
||||
'root_dn' => $this->namingContext
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'hostname' => $this->domain,
|
||||
'port' => $this->port,
|
||||
'root_dn' => $this->namingContext
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function hasSuggestion()
|
||||
{
|
||||
return isset($this->capabilities);
|
||||
}
|
||||
|
||||
public function suggestBackendSettings()
|
||||
{
|
||||
if (! isset($this->capabilities)) {
|
||||
return array();
|
||||
}
|
||||
if ($this->capabilities->msCapabilities->ActiveDirectoryOid) {
|
||||
return array(
|
||||
'base_dn' => $this->namingContext,
|
||||
'user_class' => 'user',
|
||||
'user_name_attribute' => 'sAMAccountName'
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'base_dn' => $this->namingContext,
|
||||
'user_class' => 'inetOrgPerson',
|
||||
'user_name_attribute' => 'uid'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function isAd()
|
||||
{
|
||||
return $this->capabilities->msCapabilities->ActiveDirectoryOid;
|
||||
}
|
||||
}
|
@ -102,10 +102,7 @@ class PreferenceForm extends Form
|
||||
}
|
||||
$this->preferences->icingaweb = $webPreferences;
|
||||
|
||||
// TODO: Is this even necessary in case the session is written on response?
|
||||
$session = Session::getSession();
|
||||
$session->user->setPreferences($this->preferences);
|
||||
$session->write();
|
||||
Session::getSession()->user->setPreferences($this->preferences);
|
||||
|
||||
try {
|
||||
if ($this->getElement('btn_submit_preferences')->isChecked()) {
|
||||
|
@ -15,5 +15,17 @@
|
||||
<?php endif ?>
|
||||
<?= $this->form ?>
|
||||
<div class="footer">Icinga Web 2 © 2013-2014 Icinga Team</div>
|
||||
<?php if ($configMissing): ?>
|
||||
<div class="config-note"><?= sprintf(
|
||||
t(
|
||||
'You seem not to have Icinga Web 2 configured yet so it\'s not possible to log in without any defined '
|
||||
. 'authentication method. Please define a authentication method by following the instructions in the'
|
||||
. ' %1$sdocumentation%3$s or by using our %2$sweb-based setup-wizard%3$s.'
|
||||
),
|
||||
'<a href="http://docs.icinga.org/" title="Icinga Web 2 Documentation">', // TODO: Documentation link
|
||||
'<a href="' . $this->href('setup') . '" title="Icinga Web 2 Setup-Wizard">',
|
||||
'</a>'
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
99
application/views/scripts/joystickPagination.phtml
Normal file
99
application/views/scripts/joystickPagination.phtml
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Web\Url;
|
||||
|
||||
if ($xAxisPaginator->count() <= 1 && $yAxisPaginator->count() <= 1) {
|
||||
return; // Display this pagination only if there are multiple pages
|
||||
}
|
||||
|
||||
$fromTo = t('%s: %d to %d of %d');
|
||||
$xAxisPages = $xAxisPaginator->getPages('all');
|
||||
$yAxisPages = $yAxisPaginator->getPages('all');
|
||||
|
||||
$totalYAxisPages = $yAxisPaginator->count();
|
||||
$currentYAxisPage = $yAxisPaginator->getCurrentPageNumber();
|
||||
$prevYAxisPage = $currentYAxisPage > 1 ? $currentYAxisPage - 1 : null;
|
||||
$nextYAxisPage = $currentYAxisPage < $totalYAxisPages ? $currentYAxisPage + 1 : null;
|
||||
|
||||
$totalXAxisPages = $xAxisPaginator->count();
|
||||
$currentXAxisPage = $xAxisPaginator->getCurrentPageNumber();
|
||||
$prevXAxisPage = $currentXAxisPage > 1 ? $currentXAxisPage - 1 : null;
|
||||
$nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 : null;
|
||||
|
||||
?>
|
||||
|
||||
<table class="joystick-pagination">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<?php if ($prevYAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $currentXAxisPage . ',' . $prevYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Hosts'),
|
||||
($prevYAxisPage - 1) * $yAxisPages->itemCountPerPage + 1,
|
||||
$prevYAxisPage * $yAxisPages->itemCountPerPage,
|
||||
$yAxisPages->totalItemCount
|
||||
); ?>"><?= $this->icon('up_petrol.png'); ?></a>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('up.png'); ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ($prevXAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $prevXAxisPage . ',' . $currentYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Services'),
|
||||
($prevXAxisPage - 1) * $xAxisPages->itemCountPerPage + 1,
|
||||
$prevXAxisPage * $xAxisPages->itemCountPerPage,
|
||||
$xAxisPages->totalItemCount
|
||||
); ?>"><?= $this->icon('prev_petrol.png'); ?></a>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('prev.png'); ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<?php if ($nextXAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $nextXAxisPage . ',' . $currentYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Services'),
|
||||
$currentXAxisPage * $xAxisPages->itemCountPerPage + 1,
|
||||
$nextXAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $nextXAxisPage * $xAxisPages->itemCountPerPage,
|
||||
$xAxisPages->totalItemCount
|
||||
); ?>"><?= $this->icon('next_petrol.png'); ?></a>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('next.png'); ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<?php if ($nextYAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $currentXAxisPage . ',' . $nextYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Hosts'),
|
||||
$currentYAxisPage * $yAxisPages->itemCountPerPage + 1,
|
||||
$nextYAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $nextYAxisPage * $yAxisPages->itemCountPerPage,
|
||||
$yAxisPages->totalItemCount
|
||||
); ?>"><?= $this->icon('down_petrol.png'); ?></a>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('down.png'); ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
use Icinga\Application\Cli;
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
require_once dirname(__DIR__) . '/library/Icinga/Application/Cli.php';
|
||||
Cli::start()->dispatch();
|
||||
|
||||
Icinga\Application\Cli::start()->dispatch();
|
||||
|
@ -74,8 +74,7 @@ create all database tables. You will find the installation guides for the differ
|
||||
>
|
||||
> RPM packages install the schema into /usr/share/doc/icingaweb-<version>/schema
|
||||
|
||||
bash$ mysql -u root -p icingaweb < etc/schema/accounts.mysql.sql
|
||||
bash$ mysql -u root -p icingaweb < etc/schema/preferences.mysql.sql
|
||||
bash$ mysql -u root -p icingaweb < etc/schema/mysql.sql
|
||||
|
||||
|
||||
#### PostgreSQL
|
||||
@ -108,8 +107,7 @@ And restart your database ('service postgresql restart' or '/etc/init.d/postgres
|
||||
>
|
||||
> RPM packages install the schema into /usr/share/doc/icingaweb-<version>/schema
|
||||
|
||||
bash$ psql -U icingaweb -a -f etc/schema/accounts.pgsql.sql
|
||||
bash$ psql -U icingaweb -a -f etc/schema/preferences.pgsql.sql
|
||||
bash$ psql -U icingaweb -a -f etc/schema/pgsql.sql
|
||||
|
||||
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
create table account (
|
||||
`username` varchar(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`salt` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`active` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
/*
|
||||
* user: icingaadmin
|
||||
* password: icinga
|
||||
*/
|
||||
INSERT INTO account (
|
||||
`username`,
|
||||
`salt`,
|
||||
`password`,
|
||||
`active`
|
||||
)
|
||||
VALUES (
|
||||
'icingaadmin',
|
||||
'57cfd5746224be4f60c25d4e8514bec35ad2d01810723a138756b285898e71b2',
|
||||
'43f8e0588eb39f1a41383b48def0b1fdc45e79b8f67194cccee4453eb3f4ea13',
|
||||
1
|
||||
);
|
@ -1,28 +0,0 @@
|
||||
create table "account" (
|
||||
"username" character varying(255) NOT NULL,
|
||||
"salt" character varying(255),
|
||||
"password" character varying(255) NOT NULL,
|
||||
"active" boolean
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "account"
|
||||
ADD CONSTRAINT account_pkey PRIMARY KEY ("username");
|
||||
|
||||
CREATE UNIQUE INDEX username_lower_unique_idx ON "account" USING btree (lower((username)::text));
|
||||
|
||||
/*
|
||||
* user: icingaadmin
|
||||
* password: icinga
|
||||
*/
|
||||
INSERT INTO "account" (
|
||||
"username",
|
||||
"salt",
|
||||
"password",
|
||||
"active"
|
||||
)
|
||||
VALUES (
|
||||
'icingaadmin',
|
||||
'57cfd5746224be4f60c25d4e8514bec35ad2d01810723a138756b285898e71b2',
|
||||
'43f8e0588eb39f1a41383b48def0b1fdc45e79b8f67194cccee4453eb3f4ea13',
|
||||
true
|
||||
);
|
96
etc/schema/pgsql.schema.sql
Normal file
96
etc/schema/pgsql.schema.sql
Normal file
@ -0,0 +1,96 @@
|
||||
/**
|
||||
* Table "icingaweb_group"
|
||||
*/
|
||||
CREATE TABLE "icingaweb_group" (
|
||||
"name" character varying(64) NOT NULL,
|
||||
"parent" character varying(64) NULL DEFAULT NULL,
|
||||
"ctime" timestamp NULL DEFAULT NULL,
|
||||
"mtime" timestamp NULL DEFAULT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "icingaweb_group"
|
||||
ADD CONSTRAINT pk_icingaweb_group
|
||||
PRIMARY KEY (
|
||||
"name"
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX idx_icingaweb_group
|
||||
ON "icingaweb_group"
|
||||
USING btree (
|
||||
lower((name)::text)
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Table "icingaweb_group_membership"
|
||||
*/
|
||||
CREATE TABLE "icingaweb_group_membership" (
|
||||
"group_name" character varying(64) NOT NULL,
|
||||
"username" character varying(64) NOT NULL,
|
||||
"ctime" timestamp NULL DEFAULT NULL,
|
||||
"mtime" timestamp NULL DEFAULT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "icingaweb_group_membership"
|
||||
ADD CONSTRAINT pk_icingaweb_group_membership
|
||||
PRIMARY KEY (
|
||||
"group_name",
|
||||
"username"
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX idx_icingaweb_group_membership
|
||||
ON "icingaweb_group_membership"
|
||||
USING btree (
|
||||
lower((group_name)::text),
|
||||
lower((username)::text)
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Table "icingaweb_user"
|
||||
*/
|
||||
CREATE TABLE "icingaweb_user" (
|
||||
"name" character varying(64) NOT NULL,
|
||||
"active" smallint NOT NULL,
|
||||
"password_hash" bytea NOT NULL,
|
||||
"ctime" timestamp NULL DEFAULT NULL,
|
||||
"mtime" timestamp NULL DEFAULT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "icingaweb_user"
|
||||
ADD CONSTRAINT pk_icingaweb_user
|
||||
PRIMARY KEY (
|
||||
"name"
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX idx_icingaweb_user
|
||||
ON "icingaweb_user"
|
||||
USING btree (
|
||||
lower((name)::text)
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Table "icingaweb_user_preference"
|
||||
*/
|
||||
CREATE TABLE "icingaweb_user_preference" (
|
||||
"username" character varying(64) NOT NULL,
|
||||
"name" character varying(64) NOT NULL,
|
||||
"value" character varying(255) NOT NULL,
|
||||
"ctime" timestamp NULL DEFAULT NULL,
|
||||
"mtime" timestamp NULL DEFAULT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "icingaweb_user_preference"
|
||||
ADD CONSTRAINT pk_icingaweb_user_preference
|
||||
PRIMARY KEY (
|
||||
"username",
|
||||
"name"
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX idx_icingaweb_user_preference
|
||||
ON "icingaweb_user_preference"
|
||||
USING btree (
|
||||
lower((username)::text),
|
||||
lower((name)::text)
|
||||
);
|
@ -1,6 +0,0 @@
|
||||
create table `preference`(
|
||||
`username` VARCHAR(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`key` VARCHAR(100) COLLATE latin1_general_ci NOT NULL,
|
||||
`value` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`username`, `key`)
|
||||
) ENGINE=InnoDB;
|
@ -1,10 +0,0 @@
|
||||
create table "preference"(
|
||||
"username" VARCHAR(255) NOT NULL,
|
||||
"key" VARCHAR(100) NOT NULL,
|
||||
"value" VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "preference"
|
||||
ADD CONSTRAINT preference_pkey PRIMARY KEY ("username", "key");
|
||||
|
||||
CREATE UNIQUE INDEX username_and_key_lower_unique_idx ON "preference" USING btree (lower((username)::text), lower((key)::text));
|
@ -6,7 +6,6 @@ namespace Icinga\Application;
|
||||
|
||||
use ErrorException;
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Modules\Manager as ModuleManager;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
@ -41,6 +40,43 @@ use Icinga\Exception\IcingaException;
|
||||
*/
|
||||
abstract class ApplicationBootstrap
|
||||
{
|
||||
/**
|
||||
* Base directory
|
||||
*
|
||||
* Parent folder for at least application, bin, modules, library/vendor and public
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $baseDir;
|
||||
|
||||
/**
|
||||
* Application directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $appDir;
|
||||
|
||||
/**
|
||||
* Vendor library directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $vendorDir;
|
||||
|
||||
/**
|
||||
* Library directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $libDir;
|
||||
|
||||
/**
|
||||
* Configuration directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $configDir;
|
||||
|
||||
/**
|
||||
* Icinga auto loader
|
||||
*
|
||||
@ -48,34 +84,13 @@ abstract class ApplicationBootstrap
|
||||
*/
|
||||
private $loader;
|
||||
|
||||
/**
|
||||
* Library directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $libDir;
|
||||
|
||||
/**
|
||||
* Config object
|
||||
*
|
||||
* @var Zend_Config
|
||||
* @var Config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Configuration directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $configDir;
|
||||
|
||||
/**
|
||||
* Application directory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $appDir;
|
||||
|
||||
/**
|
||||
* Module manager
|
||||
*
|
||||
@ -99,27 +114,20 @@ abstract class ApplicationBootstrap
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $baseDir Icinga Web 2 base directory
|
||||
* @param string $configDir Path to Icinga Web 2's configuration files
|
||||
*/
|
||||
protected function __construct($configDir = null)
|
||||
protected function __construct($baseDir = null, $configDir = null)
|
||||
{
|
||||
if ($baseDir === null) {
|
||||
$baseDir = dirname($this->getBootstrapDirectory());
|
||||
}
|
||||
$this->baseDir = $baseDir;
|
||||
$this->appDir = $baseDir . '/application';
|
||||
$this->vendorDir = $baseDir . '/library/vendor';
|
||||
$this->libDir = realpath(__DIR__ . '/../..');
|
||||
|
||||
if (!defined('ICINGA_LIBDIR')) {
|
||||
define('ICINGA_LIBDIR', $this->libDir);
|
||||
}
|
||||
|
||||
if (defined('ICINGAWEB_APPDIR')) {
|
||||
$this->appDir = ICINGAWEB_APPDIR;
|
||||
} elseif (array_key_exists('ICINGAWEB_APPDIR', $_SERVER)) {
|
||||
$this->appDir = $_SERVER['ICINGAWEB_APPDIR'];
|
||||
} else {
|
||||
$this->appDir = realpath($this->libDir. '/../application');
|
||||
}
|
||||
|
||||
if (!defined('ICINGAWEB_APPDIR')) {
|
||||
define('ICINGAWEB_APPDIR', $this->appDir);
|
||||
}
|
||||
|
||||
if ($configDir === null) {
|
||||
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
|
||||
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
|
||||
@ -197,44 +205,6 @@ abstract class ApplicationBootstrap
|
||||
return $this->isWeb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for application dir
|
||||
*
|
||||
* Optional append sub directory
|
||||
*
|
||||
* @param string $subdir optional subdir
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getApplicationDir($subdir = null)
|
||||
{
|
||||
return $this->getDirWithSubDir($this->appDir, $subdir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for config dir
|
||||
*
|
||||
* @param string $subdir
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getConfigDir($subdir = null)
|
||||
{
|
||||
return $this->getDirWithSubDir($this->configDir, $subdir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path to the bootstrapping directory.
|
||||
*
|
||||
* This is usually /public for Web and EmbeddedWeb
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBootstrapDirecory()
|
||||
{
|
||||
return dirname($_SERVER['SCRIPT_FILENAME']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to glue directories together
|
||||
*
|
||||
@ -253,15 +223,76 @@ abstract class ApplicationBootstrap
|
||||
}
|
||||
|
||||
/**
|
||||
* Starting concrete bootstrap classes
|
||||
* Get the base directory
|
||||
*
|
||||
* @param string $configDir
|
||||
* @param string $subDir Optional sub directory to get
|
||||
*
|
||||
* @return ApplicationBootstrap
|
||||
* @return string
|
||||
*/
|
||||
public static function start($configDir = null)
|
||||
public function getBaseDir($subDir = null)
|
||||
{
|
||||
$application = new static($configDir);
|
||||
return $this->getDirWithSubDir($this->baseDir, $subDir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the application directory
|
||||
*
|
||||
* @param string $subDir Optional sub directory to get
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getApplicationDir($subDir = null)
|
||||
{
|
||||
return $this->getDirWithSubDir($this->appDir, $subDir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the vendor library directory
|
||||
*
|
||||
* @param string $subDir Optional sub directory to get
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getVendorDir($subDir = null)
|
||||
{
|
||||
return $this->getDirWithSubDir($this->vendorDir, $subDir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configuration directory
|
||||
*
|
||||
* @param string $subDir Optional sub directory to get
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getConfigDir($subDir = null)
|
||||
{
|
||||
return $this->getDirWithSubDir($this->configDir, $subDir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path to the bootstrapping directory
|
||||
*
|
||||
* This is usually /public for Web and EmbeddedWeb and /bin for the CLI
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBootstrapDirectory()
|
||||
{
|
||||
return dirname(realpath($_SERVER['SCRIPT_FILENAME']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the bootstrap
|
||||
*
|
||||
* @param string $baseDir Icinga Web 2 base directory
|
||||
* @param string $configDir Path to Icinga Web 2's configuration files
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function start($baseDir = null, $configDir = null)
|
||||
{
|
||||
$application = new static($baseDir, $configDir);
|
||||
$application->bootstrap();
|
||||
return $application;
|
||||
}
|
||||
@ -314,16 +345,26 @@ abstract class ApplicationBootstrap
|
||||
$this->moduleManager = new ModuleManager(
|
||||
$this,
|
||||
$this->configDir . '/enabledModules',
|
||||
explode(
|
||||
':',
|
||||
$this->config->global !== null
|
||||
? $this->config->global->get('modulePath', ICINGAWEB_APPDIR . '/../modules')
|
||||
: ICINGAWEB_APPDIR . '/../modules'
|
||||
)
|
||||
explode(':', $this->config->fromSection('global', 'modulePath', $this->baseDir . '/modules'))
|
||||
);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all core modules
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function loadCoreModules()
|
||||
{
|
||||
try {
|
||||
$this->moduleManager->loadCoreModules();
|
||||
} catch (NotReadableError $e) {
|
||||
Logger::error(new IcingaException('Cannot load core modules. An exception was thrown:', $e));
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all enabled modules
|
||||
*
|
||||
@ -347,7 +388,7 @@ abstract class ApplicationBootstrap
|
||||
protected function setupLogging()
|
||||
{
|
||||
Logger::create(
|
||||
new Zend_Config(
|
||||
new Config(
|
||||
array(
|
||||
'log' => 'syslog'
|
||||
)
|
||||
@ -364,12 +405,14 @@ abstract class ApplicationBootstrap
|
||||
protected function loadConfig()
|
||||
{
|
||||
Config::$configDir = $this->configDir;
|
||||
|
||||
try {
|
||||
$this->config = Config::app();
|
||||
} catch (NotReadableError $e) {
|
||||
Logger::error(new IcingaException('Cannot load application configuration. An exception was thrown:', $e));
|
||||
$this->config = new Zend_Config(array());
|
||||
$this->config = new Config();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -405,9 +448,9 @@ abstract class ApplicationBootstrap
|
||||
*/
|
||||
protected function setupLogger()
|
||||
{
|
||||
if ($this->config->logging !== null) {
|
||||
if (($loggingConfig = $this->config->logging) !== null) {
|
||||
try {
|
||||
Logger::create($this->config->logging);
|
||||
Logger::create($loggingConfig);
|
||||
} catch (ConfigurationError $e) {
|
||||
Logger::error($e);
|
||||
}
|
||||
@ -453,7 +496,7 @@ abstract class ApplicationBootstrap
|
||||
if (! $default) {
|
||||
$default = 'UTC';
|
||||
}
|
||||
$timeZoneString = $this->config->global !== null ? $this->config->global->get('timezone', $default) : $default;
|
||||
$timeZoneString = $this->config->fromSection('global', 'timezone', $default);
|
||||
date_default_timezone_set($timeZoneString);
|
||||
DateTimeFactory::setConfig(array('timezone' => $timeZoneString));
|
||||
return $this;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
namespace Icinga\Application;
|
||||
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Platform;
|
||||
use Icinga\Application\ApplicationBootstrap;
|
||||
use Icinga\Cli\Params;
|
||||
@ -12,7 +13,6 @@ use Icinga\Cli\Screen;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Benchmark;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Zend_Config;
|
||||
|
||||
require_once __DIR__ . '/ApplicationBootstrap.php';
|
||||
|
||||
@ -43,17 +43,17 @@ class Cli extends ApplicationBootstrap
|
||||
->parseBasicParams()
|
||||
->setupLogger()
|
||||
->setupResourceFactory()
|
||||
->setupModuleManager();
|
||||
->setupModuleManager()
|
||||
->loadCoreModules();
|
||||
}
|
||||
|
||||
protected function setupLogging()
|
||||
{
|
||||
Logger::create(
|
||||
new Zend_Config(
|
||||
new Config(
|
||||
array(
|
||||
'level' => Logger::INFO,
|
||||
'log' => 'file',
|
||||
'file' => 'php://stderr'
|
||||
'log' => 'stdout',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -4,14 +4,17 @@
|
||||
|
||||
namespace Icinga\Application;
|
||||
|
||||
use Zend_Config;
|
||||
use Zend_Config_Ini;
|
||||
use Iterator;
|
||||
use Countable;
|
||||
use ArrayAccess;
|
||||
use LogicException;
|
||||
use UnexpectedValueException;
|
||||
use Icinga\Exception\NotReadableError;
|
||||
|
||||
/**
|
||||
* Global registry of application and module configuration.
|
||||
* Container for configuration values and global registry of application and module related configuration.
|
||||
*/
|
||||
class Config extends Zend_Config
|
||||
class Config implements Countable, Iterator, ArrayAccess
|
||||
{
|
||||
/**
|
||||
* Configuration directory where ALL (application and module) configuration is located
|
||||
@ -20,13 +23,6 @@ class Config extends Zend_Config
|
||||
*/
|
||||
public static $configDir;
|
||||
|
||||
/**
|
||||
* The INI file this configuration has been loaded from or should be written to
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $configFile;
|
||||
|
||||
/**
|
||||
* Application config instances per file
|
||||
*
|
||||
@ -42,95 +38,34 @@ class Config extends Zend_Config
|
||||
protected static $modules = array();
|
||||
|
||||
/**
|
||||
* Load configuration from the given INI file
|
||||
* This config's data
|
||||
*
|
||||
* @param string $file The file to parse
|
||||
*
|
||||
* @throws NotReadableError When the file does not exist or cannot be read
|
||||
* @var array
|
||||
*/
|
||||
public static function fromIni($file)
|
||||
{
|
||||
$config = new static(array(), true);
|
||||
$filepath = realpath($file);
|
||||
|
||||
if ($filepath === false) {
|
||||
$config->setConfigFile($file);
|
||||
} elseif (is_readable($filepath)) {
|
||||
$config->setConfigFile($filepath);
|
||||
$config->merge(new Zend_Config_Ini($filepath));
|
||||
} else {
|
||||
throw new NotReadableError('Cannot read config file "%s". Permission denied', $filepath);
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
protected $data;
|
||||
|
||||
/**
|
||||
* Retrieve a application config instance
|
||||
* The INI file this configuration has been loaded from or should be written to
|
||||
*
|
||||
* @param string $configname The configuration name (without ini suffix) to read and return
|
||||
* @param bool $fromDisk When set true, the configuration will be read from the disk, even
|
||||
* if it already has been read
|
||||
*
|
||||
* @return Config The configuration object that has been requested
|
||||
* @var string
|
||||
*/
|
||||
public static function app($configname = 'config', $fromDisk = false)
|
||||
{
|
||||
if (!isset(self::$app[$configname]) || $fromDisk) {
|
||||
self::$app[$configname] = Config::fromIni(self::resolvePath($configname . '.ini'));
|
||||
}
|
||||
return self::$app[$configname];
|
||||
}
|
||||
protected $configFile;
|
||||
|
||||
/**
|
||||
* Set module config
|
||||
* Create a new config
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $configName
|
||||
* @param Zend_Config $config
|
||||
* @param array $data The data to initialize the new config with
|
||||
*/
|
||||
public static function setModuleConfig($moduleName, $configName, Zend_Config $config)
|
||||
public function __construct(array $data = array())
|
||||
{
|
||||
self::$modules[$moduleName][$configName] = $config;
|
||||
}
|
||||
$this->data = array();
|
||||
|
||||
/**
|
||||
* Retrieve a module config instance
|
||||
*
|
||||
* @param string $modulename The name of the module to look for configurations
|
||||
* @param string $configname The configuration name (without ini suffix) to read and return
|
||||
* @param string $fromDisk Whether to read the configuration from disk
|
||||
*
|
||||
* @return Config The configuration object that has been requested
|
||||
*/
|
||||
public static function module($modulename, $configname = 'config', $fromDisk = false)
|
||||
{
|
||||
if (!isset(self::$modules[$modulename])) {
|
||||
self::$modules[$modulename] = array();
|
||||
}
|
||||
$moduleConfigs = self::$modules[$modulename];
|
||||
if (!isset($moduleConfigs[$configname]) || $fromDisk) {
|
||||
$moduleConfigs[$configname] = Config::fromIni(
|
||||
self::resolvePath('modules/' . $modulename . '/' . $configname . '.ini')
|
||||
);
|
||||
}
|
||||
return $moduleConfigs[$configname];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve names of accessible sections or properties
|
||||
*
|
||||
* @param $name
|
||||
* @return array
|
||||
*/
|
||||
public function keys($name = null)
|
||||
{
|
||||
if ($name === null) {
|
||||
return array_keys($this->toArray());
|
||||
} elseif ($this->$name === null) {
|
||||
return array();
|
||||
} else {
|
||||
return array_keys($this->$name->toArray());
|
||||
foreach ($data as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$this->data[$key] = new static($value);
|
||||
} else {
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,13 +93,375 @@ class Config extends Zend_Config
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepend configuration base dir if input is relative
|
||||
* Deep clone this config
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
$array = array();
|
||||
foreach ($this->data as $key => $value) {
|
||||
if ($value instanceof self) {
|
||||
$array[$key] = clone $value;
|
||||
} else {
|
||||
$array[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$this->data = $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the count of available sections and properties
|
||||
*
|
||||
* @param string $path Input path
|
||||
* @return string Absolute path
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the current position of $this->data
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function rewind()
|
||||
{
|
||||
return reset($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the section's or property's value of the current iteration
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function current()
|
||||
{
|
||||
return current($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the position of the current iteration is valid
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return key($this->data) !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the section's or property's name of the current iteration
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function key()
|
||||
{
|
||||
return key($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advance the position of the current iteration and return the new section's or property's value
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function next()
|
||||
{
|
||||
return next($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the given section or property is set
|
||||
*
|
||||
* @param string $key The name of the section or property
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function __isset($key)
|
||||
{
|
||||
return isset($this->data[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value for the given property or the config for the given section
|
||||
*
|
||||
* @param string $key The name of the property or section
|
||||
*
|
||||
* @return mixed|NULL The value or NULL in case $key does not exist
|
||||
*/
|
||||
public function __get($key)
|
||||
{
|
||||
if (array_key_exists($key, $this->data)) {
|
||||
return $this->data[$key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new property or section
|
||||
*
|
||||
* @param string $key The name of the new property or section
|
||||
* @param mixed $value The value to set for the new property or section
|
||||
*/
|
||||
public function __set($key, $value)
|
||||
{
|
||||
if (is_array($value)) {
|
||||
$this->data[$key] = new static($value);
|
||||
} else {
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the given property or section
|
||||
*
|
||||
* @param string $key The property or section to remove
|
||||
*/
|
||||
public function __unset($key)
|
||||
{
|
||||
unset($this->data[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the given section or property is set
|
||||
*
|
||||
* @param string $key The name of the section or property
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function offsetExists($key)
|
||||
{
|
||||
return isset($this->$key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value for the given property or the config for the given section
|
||||
*
|
||||
* @param string $key The name of the property or section
|
||||
*
|
||||
* @return mixed|NULL The value or NULL in case $key does not exist
|
||||
*/
|
||||
public function offsetGet($key)
|
||||
{
|
||||
return $this->$key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new property or section
|
||||
*
|
||||
* @param string $key The name of the new property or section
|
||||
* @param mixed $value The value to set for the new property or section
|
||||
*/
|
||||
public function offsetSet($key, $value)
|
||||
{
|
||||
if ($key === null) {
|
||||
throw new LogicException('Appending values without an explicit key is not supported');
|
||||
}
|
||||
|
||||
$this->$key = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the given property or section
|
||||
*
|
||||
* @param string $key The property or section to remove
|
||||
*/
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
unset($this->$key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this config has any data
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
return $this->count() === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value for the given property or the config for the given section
|
||||
*
|
||||
* @param string $key The name of the property or section
|
||||
* @param mixed $default The value to return in case the property or section is missing
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($key, $default = null)
|
||||
{
|
||||
$value = $this->$key;
|
||||
if ($default !== null && $value === null) {
|
||||
$value = $default;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all section and property names
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function keys()
|
||||
{
|
||||
return array_keys($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this config's data as associative array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray()
|
||||
{
|
||||
$array = array();
|
||||
foreach ($this->data as $key => $value) {
|
||||
if ($value instanceof self) {
|
||||
$array[$key] = $value->toArray();
|
||||
} else {
|
||||
$array[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the given data with this config
|
||||
*
|
||||
* @param array|Config $data An array or a config
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function merge($data)
|
||||
{
|
||||
if ($data instanceof self) {
|
||||
$data = $data->toArray();
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
if (array_key_exists($key, $this->data)) {
|
||||
if (is_array($value)) {
|
||||
if ($this->data[$key] instanceof self) {
|
||||
$this->data[$key]->merge($value);
|
||||
} else {
|
||||
$this->data[$key] = new static($value);
|
||||
}
|
||||
} else {
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
} else {
|
||||
$this->data[$key] = is_array($value) ? new static($value) : $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value from a section's property
|
||||
*
|
||||
* @param string $section The section where the given property can be found
|
||||
* @param string $key The section's property to fetch the value from
|
||||
* @param mixed $default The value to return in case the section or the property is missing
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws UnexpectedValueException In case the given section does not hold any configuration
|
||||
*/
|
||||
public function fromSection($section, $key, $default = null)
|
||||
{
|
||||
$value = $this->$section;
|
||||
if ($value instanceof self) {
|
||||
$value = $value->$key;
|
||||
} elseif ($value !== null) {
|
||||
throw new UnexpectedValueException(
|
||||
sprintf('Value "%s" is not of type "Config" or a sub-type of it', $value)
|
||||
);
|
||||
}
|
||||
|
||||
if ($value === null && $default !== null) {
|
||||
$value = $default;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load configuration from the given INI file
|
||||
*
|
||||
* @param string $file The file to parse
|
||||
*
|
||||
* @throws NotReadableError When the file does not exist or cannot be read
|
||||
*/
|
||||
public static function fromIni($file)
|
||||
{
|
||||
$config = new static();
|
||||
|
||||
$filepath = realpath($file);
|
||||
if ($filepath === false) {
|
||||
$config->setConfigFile($file);
|
||||
} elseif (is_readable($filepath)) {
|
||||
$config->setConfigFile($filepath);
|
||||
$config->merge(parse_ini_file($filepath, true));
|
||||
} else {
|
||||
throw new NotReadableError(t('Cannot read config file "%s". Permission denied'), $filepath);
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepend configuration base dir to the given relative path
|
||||
*
|
||||
* @param string $path A relative path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function resolvePath($path)
|
||||
{
|
||||
return self::$configDir . DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a application config
|
||||
*
|
||||
* @param string $configname The configuration name (without ini suffix) to read and return
|
||||
* @param bool $fromDisk When set true, the configuration will be read from disk, even
|
||||
* if it already has been read
|
||||
*
|
||||
* @return Config The requested configuration
|
||||
*/
|
||||
public static function app($configname = 'config', $fromDisk = false)
|
||||
{
|
||||
if (!isset(self::$app[$configname]) || $fromDisk) {
|
||||
self::$app[$configname] = static::fromIni(static::resolvePath($configname . '.ini'));
|
||||
}
|
||||
|
||||
return self::$app[$configname];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a module config
|
||||
*
|
||||
* @param string $modulename The name of the module where to look for the requested configuration
|
||||
* @param string $configname The configuration name (without ini suffix) to read and return
|
||||
* @param string $fromDisk When set true, the configuration will be read from disk, even
|
||||
* if it already has been read
|
||||
*
|
||||
* @return Config The requested configuration
|
||||
*/
|
||||
public static function module($modulename, $configname = 'config', $fromDisk = false)
|
||||
{
|
||||
if (!isset(self::$modules[$modulename])) {
|
||||
self::$modules[$modulename] = array();
|
||||
}
|
||||
|
||||
$moduleConfigs = self::$modules[$modulename];
|
||||
if (!isset($moduleConfigs[$configname]) || $fromDisk) {
|
||||
$moduleConfigs[$configname] = static::fromIni(
|
||||
static::resolvePath('modules/' . $modulename . '/' . $configname . '.ini')
|
||||
);
|
||||
}
|
||||
|
||||
return $moduleConfigs[$configname];
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ class EmbeddedWeb extends ApplicationBootstrap
|
||||
->setupErrorHandling()
|
||||
->setupTimezone()
|
||||
->setupModuleManager()
|
||||
->loadCoreModules()
|
||||
->loadEnabledModules();
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace Icinga\Application;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger\Writer\FileWriter;
|
||||
use Icinga\Application\Logger\Writer\SyslogWriter;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
@ -71,12 +71,12 @@ class Logger
|
||||
/**
|
||||
* Create a new logger object
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*
|
||||
* @throws ConfigurationError If the logging configuration directive 'log' is missing or if the logging level is
|
||||
* not defined
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
if ($config->log === null) {
|
||||
throw new ConfigurationError('Required logging configuration directive \'log\' missing');
|
||||
@ -118,11 +118,11 @@ class Logger
|
||||
/**
|
||||
* Create a new logger object
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function create(Zend_Config $config)
|
||||
public static function create(Config $config)
|
||||
{
|
||||
static::$instance = new static($config);
|
||||
return static::$instance;
|
||||
@ -131,12 +131,12 @@ class Logger
|
||||
/**
|
||||
* Create a log writer
|
||||
*
|
||||
* @param Zend_Config $config The configuration to initialize the writer with
|
||||
* @param Config $config The configuration to initialize the writer with
|
||||
*
|
||||
* @return \Icinga\Application\Logger\LogWriter The requested log writer
|
||||
* @throws ConfigurationError If the requested writer cannot be found
|
||||
*/
|
||||
protected function createWriter(Zend_Config $config)
|
||||
protected function createWriter(Config $config)
|
||||
{
|
||||
$class = 'Icinga\\Application\\Logger\\Writer\\' . ucfirst(strtolower($config->log)) . 'Writer';
|
||||
if (! class_exists($class)) {
|
||||
|
@ -4,17 +4,25 @@
|
||||
|
||||
namespace Icinga\Application\Logger;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
|
||||
/**
|
||||
* Abstract class for writers that write messages to a log
|
||||
*/
|
||||
abstract class LogWriter
|
||||
{
|
||||
/**
|
||||
* @var Zend_Config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Create a new log writer initialized with the given configuration
|
||||
*/
|
||||
abstract public function __construct(Zend_Config $config);
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a message with the given severity
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace Icinga\Application\Logger\Writer;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Logger\LogWriter;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
@ -26,12 +26,12 @@ class FileWriter extends LogWriter
|
||||
/**
|
||||
* Create a new file log writer
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*
|
||||
* @throws ConfigurationError If the configuration directive 'file' is missing or if the path to 'file' does
|
||||
* not exist or if writing to 'file' is not possible
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
if ($config->file === null) {
|
||||
throw new ConfigurationError('Required logging configuration directive \'file\' missing');
|
||||
|
50
library/Icinga/Application/Logger/Writer/StdoutWriter.php
Normal file
50
library/Icinga/Application/Logger/Writer/StdoutWriter.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Application\Logger\Writer;
|
||||
|
||||
use Icinga\Cli\Screen;
|
||||
use Icinga\Application\Logger\Logger;
|
||||
use Icinga\Application\Logger\LogWriter;
|
||||
use Zend_Config;
|
||||
|
||||
/**
|
||||
* Class to write log messages to STDOUT
|
||||
*/
|
||||
class StdoutWriter extends LogWriter
|
||||
{
|
||||
protected $screen;
|
||||
|
||||
protected function screen()
|
||||
{
|
||||
if ($this->screen === null) {
|
||||
$this->screen = Screen::instance();
|
||||
}
|
||||
return $this->screen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a message with the given severity
|
||||
*
|
||||
* @param int $severity The severity to use
|
||||
* @param string $message The message to log
|
||||
*/
|
||||
public function log($severity, $message)
|
||||
{
|
||||
$color = 'black';
|
||||
switch ($severity) {
|
||||
case Logger::$ERROR:
|
||||
$color = 'red';
|
||||
break;
|
||||
case Logger::$WARNING:
|
||||
$color = 'orange';
|
||||
break;
|
||||
case Logger::$INFO:
|
||||
$color = 'green';
|
||||
break;
|
||||
case Logger::$DEBUG:
|
||||
$color = 'blue';
|
||||
break;
|
||||
}
|
||||
file_put_contents('php://stderr', $this->screen()->colorize($message, $color) . "\n");
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Icinga\Application\Logger\Writer;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Logger\LogWriter;
|
||||
|
||||
@ -51,9 +51,9 @@ class SyslogWriter extends LogWriter
|
||||
/**
|
||||
* Create a new syslog log writer
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
$this->ident = $config->get('application', 'icingaweb');
|
||||
$this->facility = static::$facilities['user'];
|
||||
|
@ -67,6 +67,18 @@ class Manager
|
||||
*/
|
||||
private $modulePaths = array();
|
||||
|
||||
/**
|
||||
* The core modules
|
||||
*
|
||||
* Core modules do not need to be enabled to load and cannot be disabled
|
||||
* by the user. This must not be writable programmatically!
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $coreModules = array(
|
||||
'setup'
|
||||
);
|
||||
|
||||
/**
|
||||
* Create a new instance of the module manager
|
||||
*
|
||||
@ -157,7 +169,21 @@ class Manager
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to set all enabled modules in loaded sate
|
||||
* Try to set all core modules in loaded state
|
||||
*
|
||||
* @return self
|
||||
* @see Manager::loadModule()
|
||||
*/
|
||||
public function loadCoreModules()
|
||||
{
|
||||
foreach ($this->coreModules as $name) {
|
||||
$this->loadModule($name);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to set all enabled modules in loaded state
|
||||
*
|
||||
* @return self
|
||||
* @see Manager::loadModule()
|
||||
@ -211,6 +237,8 @@ class Manager
|
||||
'Cannot enable module "%s". Module is not installed.',
|
||||
$name
|
||||
);
|
||||
} elseif (in_array($name, $this->coreModules)) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
clearstatcache(true);
|
||||
@ -427,7 +455,7 @@ class Manager
|
||||
}
|
||||
|
||||
$installed = $this->listInstalledModules();
|
||||
foreach ($installed as $name) {
|
||||
foreach (array_diff($installed, $this->coreModules) as $name) {
|
||||
$info[$name] = (object) array(
|
||||
'name' => $name,
|
||||
'path' => $this->installedBaseDirs[$name],
|
||||
@ -487,11 +515,14 @@ class Manager
|
||||
/**
|
||||
* Detect installed modules from every path provided in modulePaths
|
||||
*
|
||||
* @param array $availableDirs Installed modules location
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function detectInstalledModules()
|
||||
public function detectInstalledModules(array $availableDirs = null)
|
||||
{
|
||||
foreach ($this->modulePaths as $basedir) {
|
||||
$modulePaths = $availableDirs !== null ? $availableDirs : $this->modulePaths;
|
||||
foreach ($modulePaths as $basedir) {
|
||||
$canonical = realpath($basedir);
|
||||
if ($canonical === false) {
|
||||
Logger::warning('Module path "%s" does not exist', $basedir);
|
||||
@ -528,4 +559,14 @@ class Manager
|
||||
ksort($this->installedBaseDirs);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directories where to look for installed modules
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getModuleDirs()
|
||||
{
|
||||
return $this->modulePaths;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
namespace Icinga\Application\Modules;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Zend_Controller_Router_Route_Abstract;
|
||||
use Zend_Controller_Router_Route as Route;
|
||||
use Zend_Controller_Router_Route_Regex as RegexRoute;
|
||||
@ -18,6 +17,7 @@ use Icinga\Web\Hook;
|
||||
use Icinga\Web\Menu;
|
||||
use Icinga\Web\Widget;
|
||||
use Icinga\Web\Widget\Dashboard\Pane;
|
||||
use Icinga\Module\Setup\SetupWizard;
|
||||
use Icinga\Util\File;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Exception\IcingaException;
|
||||
@ -134,6 +134,13 @@ class Module
|
||||
*/
|
||||
private $configTabs = array();
|
||||
|
||||
/**
|
||||
* Provided setup wizard
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $setupWizard;
|
||||
|
||||
/**
|
||||
* Icinga application
|
||||
*
|
||||
@ -235,7 +242,7 @@ class Module
|
||||
if (array_key_exists($name, $this->menuItems)) {
|
||||
$this->menuItems[$name]->setProperties($properties);
|
||||
} else {
|
||||
$this->menuItems[$name] = new Menu($name, new Zend_Config($properties));
|
||||
$this->menuItems[$name] = new Menu($name, new Config($properties));
|
||||
}
|
||||
|
||||
return $this->menuItems[$name];
|
||||
@ -642,6 +649,31 @@ class Module
|
||||
return $tabs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this module provides a setup wizard
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function providesSetupWizard()
|
||||
{
|
||||
$this->launchConfigScript();
|
||||
if (class_exists($this->setupWizard)) {
|
||||
$wizard = new $this->setupWizard;
|
||||
return $wizard instanceof SetupWizard;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this module's setup wizard
|
||||
*
|
||||
* @return SetupWizard
|
||||
*/
|
||||
public function getSetupWizard()
|
||||
{
|
||||
return new $this->setupWizard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a named permission
|
||||
@ -705,6 +737,19 @@ class Module
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a setup wizard
|
||||
*
|
||||
* @param string $className The name of the class
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function provideSetupWizard($className)
|
||||
{
|
||||
$this->setupWizard = $className;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register new namespaces on the autoloader
|
||||
*
|
||||
|
@ -30,6 +30,16 @@ class Platform
|
||||
*/
|
||||
protected static $fqdn;
|
||||
|
||||
/**
|
||||
* Return the operating system's name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getOperatingSystemName()
|
||||
{
|
||||
return php_uname('s');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of windows
|
||||
*
|
||||
@ -37,7 +47,7 @@ class Platform
|
||||
*/
|
||||
public static function isWindows()
|
||||
{
|
||||
return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
|
||||
return strtoupper(substr(self::getOperatingSystemName(), 0, 3)) === 'WIN';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -47,7 +57,7 @@ class Platform
|
||||
*/
|
||||
public static function isLinux()
|
||||
{
|
||||
return strtoupper(substr(PHP_OS, 0, 5)) === 'LINUX';
|
||||
return strtoupper(substr(self::getOperatingSystemName(), 0, 5)) === 'LINUX';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,7 +126,35 @@ class Platform
|
||||
if (substr(self::$fqdn, 0, strlen(self::$hostname)) === self::$hostname) {
|
||||
self::$domain = substr(self::$fqdn, strlen(self::$hostname) + 1);
|
||||
} else {
|
||||
self::$domain = array_shift(preg_split('~\.~', self::$hostname, 2));
|
||||
$parts = preg_split('~\.~', self::$hostname, 2);
|
||||
self::$domain = array_shift($parts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the version of PHP
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getPhpVersion()
|
||||
{
|
||||
return phpversion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the username PHP is running as
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getPhpUser()
|
||||
{
|
||||
if (static::isWindows()) {
|
||||
return get_current_user(); // http://php.net/manual/en/function.get-current-user.php#75059
|
||||
}
|
||||
|
||||
if (function_exists('posix_geteuid')) {
|
||||
$userInfo = posix_getpwuid(posix_geteuid());
|
||||
return $userInfo['name'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,4 +169,32 @@ class Platform
|
||||
{
|
||||
return extension_loaded($extensionName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value for the given PHP configuration option
|
||||
*
|
||||
* @param string $option The option name for which to return the value
|
||||
*
|
||||
* @return string|false
|
||||
*/
|
||||
public static function getPhpConfig($option)
|
||||
{
|
||||
return ini_get($option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the given Zend framework class exists
|
||||
*
|
||||
* @param string $name The name of the class to check
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function zendClassExists($name)
|
||||
{
|
||||
if (class_exists($name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (@include str_replace('_', '/', $name) . '.php') !== false;
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +103,7 @@ class Web extends ApplicationBootstrap
|
||||
->setupZendMvc()
|
||||
->setupFormNamespace()
|
||||
->setupModuleManager()
|
||||
->loadCoreModules()
|
||||
->loadEnabledModules()
|
||||
->setupRoute()
|
||||
->setupPagination();
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace Icinga\Authentication;
|
||||
|
||||
use Iterator;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
|
||||
@ -17,7 +17,7 @@ class AuthChain implements Iterator
|
||||
/**
|
||||
* User backends configuration
|
||||
*
|
||||
* @var Zend_Config
|
||||
* @var Config
|
||||
*/
|
||||
private $config;
|
||||
|
||||
@ -31,9 +31,9 @@ class AuthChain implements Iterator
|
||||
/**
|
||||
* Create a new authentication chain from config
|
||||
*
|
||||
* @param Zend_Config $config User backends configuration
|
||||
* @param Config $config User backends configuration
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Icinga\Authentication\Backend;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Authentication\UserBackend;
|
||||
use Icinga\User;
|
||||
|
||||
@ -23,9 +23,9 @@ class AutoLoginBackend extends UserBackend
|
||||
/**
|
||||
* Create new autologin backend
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
$this->stripUsernameRegexp = $config->get('strip_username_regexp');
|
||||
}
|
||||
@ -54,7 +54,7 @@ class AutoLoginBackend extends UserBackend
|
||||
if (isset($_SERVER['REMOTE_USER'])) {
|
||||
$username = $_SERVER['REMOTE_USER'];
|
||||
$user->setRemoteUserInformation($username, 'REMOTE_USER');
|
||||
if ($this->stripUsernameRegexp !== null) {
|
||||
if ($this->stripUsernameRegexp) {
|
||||
$stripped = preg_replace($this->stripUsernameRegexp, '', $username);
|
||||
if ($stripped !== false) {
|
||||
// TODO(el): PHP issues a warning when PHP cannot compile the regular expression. Should we log an
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
namespace Icinga\Authentication\Backend;
|
||||
|
||||
use PDO;
|
||||
use Icinga\Authentication\UserBackend;
|
||||
use Icinga\Data\Db\DbConnection;
|
||||
use Icinga\User;
|
||||
@ -11,16 +12,29 @@ use Icinga\Exception\AuthenticationException;
|
||||
use Exception;
|
||||
use Zend_Db_Expr;
|
||||
use Zend_Db_Select;
|
||||
use Icinga\Exception\IcingaException;
|
||||
|
||||
class DbUserBackend extends UserBackend
|
||||
{
|
||||
/**
|
||||
* The algorithm to use when hashing passwords
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const HASH_ALGORITHM = '$1$'; // MD5
|
||||
|
||||
/**
|
||||
* The length of the salt to use when hashing a password
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const SALT_LENGTH = 12; // 12 is required by MD5
|
||||
|
||||
/**
|
||||
* Connection to the database
|
||||
*
|
||||
* @var DbConnection
|
||||
*/
|
||||
private $conn;
|
||||
protected $conn;
|
||||
|
||||
public function __construct(DbConnection $conn)
|
||||
{
|
||||
@ -36,45 +50,69 @@ class DbUserBackend extends UserBackend
|
||||
*/
|
||||
public function hasUser(User $user)
|
||||
{
|
||||
$select = new Zend_Db_Select($this->conn->getConnection());
|
||||
$row = $select->from('account', array(new Zend_Db_Expr(1)))
|
||||
->where('username = ?', $user->getUsername())
|
||||
$select = new Zend_Db_Select($this->conn->getDbAdapter());
|
||||
$row = $select->from('icingaweb_user', array(new Zend_Db_Expr(1)))
|
||||
->where('name = ?', $user->getUsername())
|
||||
->query()->fetchObject();
|
||||
|
||||
return ($row !== false) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate the given user and return true on success, false on failure and null on error
|
||||
* Add a new user
|
||||
*
|
||||
* @param string $username The name of the new user
|
||||
* @param string $password The new user's password
|
||||
* @param bool $active Whether the user is active
|
||||
*/
|
||||
public function addUser($username, $password, $active = true)
|
||||
{
|
||||
$passwordHash = $this->hashPassword($password);
|
||||
|
||||
$stmt = $this->conn->getDbAdapter()->prepare(
|
||||
'INSERT INTO icingaweb_user VALUES (:name, :active, :password_hash, now(), DEFAULT);'
|
||||
);
|
||||
$stmt->bindParam(':name', $username, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':active', $active, PDO::PARAM_INT);
|
||||
$stmt->bindParam(':password_hash', $passwordHash, PDO::PARAM_LOB);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the hashed password for the given user
|
||||
*
|
||||
* @param string $username The name of the user
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getPasswordHash($username)
|
||||
{
|
||||
$stmt = $this->conn->getDbAdapter()->prepare(
|
||||
'SELECT password_hash FROM icingaweb_user WHERE name = :name AND active = 1'
|
||||
);
|
||||
$stmt->execute(array(':name' => $username));
|
||||
$stmt->bindColumn(1, $lob, PDO::PARAM_LOB);
|
||||
$stmt->fetch(PDO::FETCH_BOUND);
|
||||
return is_resource($lob) ? stream_get_contents($lob) : $lob;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate the given user and return true on success, false on failure and throw an exception on error
|
||||
*
|
||||
* @param User $user
|
||||
* @param string $password
|
||||
*
|
||||
* @return bool|null
|
||||
* @return bool
|
||||
*
|
||||
* @throws AuthenticationException
|
||||
*/
|
||||
public function authenticate(User $user, $password)
|
||||
{
|
||||
try {
|
||||
$salt = $this->getSalt($user->getUsername());
|
||||
if ($salt === null) {
|
||||
return false;
|
||||
}
|
||||
if ($salt === '') {
|
||||
throw new IcingaException(
|
||||
'Cannot find salt for user %s',
|
||||
$user->getUsername()
|
||||
);
|
||||
}
|
||||
|
||||
$select = new Zend_Db_Select($this->conn->getConnection());
|
||||
$row = $select->from('account', array(new Zend_Db_Expr(1)))
|
||||
->where('username = ?', $user->getUsername())
|
||||
->where('active = ?', true)
|
||||
->where('password = ?', $this->hashPassword($password, $salt))
|
||||
->query()->fetchObject();
|
||||
|
||||
return ($row !== false) ? true : false;
|
||||
$passwordHash = $this->getPasswordHash($user->getUsername());
|
||||
$passwordSalt = $this->getSalt($passwordHash);
|
||||
$hashToCompare = $this->hashPassword($password, $passwordSalt);
|
||||
return $hashToCompare === $passwordHash;
|
||||
} catch (Exception $e) {
|
||||
throw new AuthenticationException(
|
||||
'Failed to authenticate user "%s" against backend "%s". An exception was thrown:',
|
||||
@ -86,29 +124,40 @@ class DbUserBackend extends UserBackend
|
||||
}
|
||||
|
||||
/**
|
||||
* Get salt by username
|
||||
* Extract salt from the given password hash
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $hash The hashed password
|
||||
*
|
||||
* @return string|null
|
||||
* @return string
|
||||
*/
|
||||
private function getSalt($username)
|
||||
protected function getSalt($hash)
|
||||
{
|
||||
$select = new Zend_Db_Select($this->conn->getConnection());
|
||||
$row = $select->from('account', array('salt'))->where('username = ?', $username)->query()->fetchObject();
|
||||
return ($row !== false) ? $row->salt : null;
|
||||
return substr($hash, strlen(self::HASH_ALGORITHM), self::SALT_LENGTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a random salt
|
||||
*
|
||||
* The returned salt is safe to be used for hashing a user's password
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function generateSalt()
|
||||
{
|
||||
return openssl_random_pseudo_bytes(self::SALT_LENGTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hash a password
|
||||
*
|
||||
* @param string $password
|
||||
* @param string $salt
|
||||
* @param string $password
|
||||
* @param string $salt
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function hashPassword($password, $salt) {
|
||||
return hash_hmac('sha256', $password, $salt);
|
||||
protected function hashPassword($password, $salt = null)
|
||||
{
|
||||
return crypt($password, self::HASH_ALGORITHM . ($salt !== null ? $salt : $this->generateSalt()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,12 +167,29 @@ class DbUserBackend extends UserBackend
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
$select = new Zend_Db_Select($this->conn->getConnection());
|
||||
$select = new Zend_Db_Select($this->conn->getDbAdapter());
|
||||
$row = $select->from(
|
||||
'account',
|
||||
'icingaweb_user',
|
||||
array('count' => 'COUNT(*)')
|
||||
)->query()->fetchObject();
|
||||
|
||||
return ($row !== false) ? $row->count : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the names of all available users
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function listUsers()
|
||||
{
|
||||
$query = $this->conn->select()->from('icingaweb_user', array('name'));
|
||||
|
||||
$users = array();
|
||||
foreach ($query->fetchAll() as $row) {
|
||||
$users[] = $row->name;
|
||||
}
|
||||
|
||||
return $users;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
namespace Icinga\Authentication\Backend;
|
||||
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\User;
|
||||
use Icinga\Authentication\UserBackend;
|
||||
use Icinga\Protocol\Ldap\Connection;
|
||||
@ -20,20 +19,36 @@ class LdapUserBackend extends UserBackend
|
||||
**/
|
||||
protected $conn;
|
||||
|
||||
protected $baseDn;
|
||||
|
||||
protected $userClass;
|
||||
|
||||
protected $userNameAttribute;
|
||||
|
||||
protected $groupOptions;
|
||||
|
||||
public function __construct(Connection $conn, $userClass, $userNameAttribute, $groupOptions = null)
|
||||
public function __construct(Connection $conn, $userClass, $userNameAttribute, $baseDn, $groupOptions = null)
|
||||
{
|
||||
$this->conn = $conn;
|
||||
$this->baseDn = trim($baseDn) !== '' ? $baseDn : $conn->getDN();
|
||||
$this->userClass = $userClass;
|
||||
$this->userNameAttribute = $userNameAttribute;
|
||||
$this->groupOptions = $groupOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Icinga\Protocol\Ldap\Query
|
||||
*/
|
||||
protected function selectUsers()
|
||||
{
|
||||
return $this->conn->select()->setBase($this->baseDn)->from(
|
||||
$this->userClass,
|
||||
array(
|
||||
$this->userNameAttribute
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create query
|
||||
*
|
||||
@ -41,14 +56,9 @@ class LdapUserBackend extends UserBackend
|
||||
*
|
||||
* @return \Icinga\Protocol\Ldap\Query
|
||||
**/
|
||||
protected function createQuery($username)
|
||||
protected function selectUser($username)
|
||||
{
|
||||
return $this->conn->select()
|
||||
->from(
|
||||
$this->userClass,
|
||||
array($this->userNameAttribute)
|
||||
)
|
||||
->where(
|
||||
return $this->selectUsers()->where(
|
||||
$this->userNameAttribute,
|
||||
str_replace('*', '', $username)
|
||||
);
|
||||
@ -69,20 +79,17 @@ class LdapUserBackend extends UserBackend
|
||||
public function assertAuthenticationPossible()
|
||||
{
|
||||
try {
|
||||
$q = $this->conn->select()->from($this->userClass);
|
||||
$q = $this->conn->select()->setBase($this->baseDn)->from($this->userClass);
|
||||
$result = $q->fetchRow();
|
||||
} catch (LdapException $e) {
|
||||
throw new AuthenticationException(
|
||||
'Connection not possible: %s',
|
||||
$e->getMessage()
|
||||
);
|
||||
throw new AuthenticationException('Connection not possible.', $e);
|
||||
}
|
||||
|
||||
if (! isset($result)) {
|
||||
throw new AuthenticationException(
|
||||
'No objects with objectClass="%s" in DN="%s" found.',
|
||||
$this->userClass,
|
||||
$this->conn->getDN()
|
||||
$this->baseDn
|
||||
);
|
||||
}
|
||||
|
||||
@ -102,12 +109,12 @@ class LdapUserBackend extends UserBackend
|
||||
*
|
||||
* @param string $dn
|
||||
*
|
||||
* @return array|null
|
||||
* @return array
|
||||
*/
|
||||
public function getGroups($dn)
|
||||
{
|
||||
if (empty($this->groupOptions) || ! isset($this->groupOptions['group_base_dn'])) {
|
||||
return null;
|
||||
return array();
|
||||
}
|
||||
|
||||
$q = $this->conn->select()
|
||||
@ -143,7 +150,7 @@ class LdapUserBackend extends UserBackend
|
||||
public function hasUser(User $user)
|
||||
{
|
||||
$username = $user->getUsername();
|
||||
return $this->conn->fetchOne($this->createQuery($username)) === $username;
|
||||
return $this->conn->fetchOne($this->selectUser($username)) === $username;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,7 +173,7 @@ class LdapUserBackend extends UserBackend
|
||||
} catch (AuthenticationException $e) {
|
||||
// Authentication not possible
|
||||
throw new AuthenticationException(
|
||||
'Authentication against backend "%s" not possible: %s',
|
||||
'Authentication against backend "%s" not possible.',
|
||||
$this->getName(),
|
||||
$e
|
||||
);
|
||||
@ -176,7 +183,7 @@ class LdapUserBackend extends UserBackend
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$userDn = $this->conn->fetchDN($this->createQuery($user->getUsername()));
|
||||
$userDn = $this->conn->fetchDN($this->selectUser($user->getUsername()));
|
||||
$authenticated = $this->conn->testCredentials(
|
||||
$userDn,
|
||||
$password
|
||||
@ -206,14 +213,20 @@ class LdapUserBackend extends UserBackend
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return $this->conn->count($this->selectUsers());
|
||||
}
|
||||
|
||||
return $this->conn->count(
|
||||
$this->conn->select()->from(
|
||||
$this->userClass,
|
||||
array(
|
||||
$this->userNameAttribute
|
||||
)
|
||||
)
|
||||
);
|
||||
/**
|
||||
* Return the names of all available users
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function listUsers()
|
||||
{
|
||||
$users = array();
|
||||
foreach ($this->selectUsers()->fetchAll() as $row) {
|
||||
$users[] = $row->{$this->userNameAttribute};
|
||||
}
|
||||
return $users;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
namespace Icinga\Authentication;
|
||||
|
||||
use Exception;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Exception\NotReadableError;
|
||||
@ -62,7 +61,7 @@ class Manager
|
||||
$e
|
||||
)
|
||||
);
|
||||
$config = new Zend_Config(array());
|
||||
$config = new Config();
|
||||
}
|
||||
if (($preferencesConfig = $config->preferences) !== null) {
|
||||
try {
|
||||
@ -120,10 +119,7 @@ class Manager
|
||||
*/
|
||||
public function persistCurrentUser()
|
||||
{
|
||||
$session = Session::getSession();
|
||||
$session->set('user', $this->user);
|
||||
$session->write();
|
||||
$session->refreshId();
|
||||
Session::getSession()->set('user', $this->user)->refreshId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,7 +6,7 @@ namespace Icinga\Authentication;
|
||||
|
||||
use Countable;
|
||||
use Icinga\Authentication\Backend\AutoLoginBackend;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Authentication\Backend\DbUserBackend;
|
||||
use Icinga\Authentication\Backend\LdapUserBackend;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
@ -45,7 +45,7 @@ abstract class UserBackend implements Countable
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public static function create($name, Zend_Config $backendConfig)
|
||||
public static function create($name, Config $backendConfig)
|
||||
{
|
||||
if ($backendConfig->name !== null) {
|
||||
$name = $backendConfig->name;
|
||||
@ -103,6 +103,7 @@ abstract class UserBackend implements Countable
|
||||
$resource,
|
||||
$backendConfig->get('user_class', 'user'),
|
||||
$backendConfig->get('user_name_attribute', 'sAMAccountName'),
|
||||
$backendConfig->get('base_dn', $resource->getDN()),
|
||||
$groupOptions
|
||||
);
|
||||
break;
|
||||
@ -129,6 +130,7 @@ abstract class UserBackend implements Countable
|
||||
$resource,
|
||||
$backendConfig->user_class,
|
||||
$backendConfig->user_name_attribute,
|
||||
$backendConfig->get('base_dn', $resource->getDN()),
|
||||
$groupOptions
|
||||
);
|
||||
break;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Icinga\Authentication;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Authentication\Backend\DbUserGroupBackend;
|
||||
use Icinga\Authentication\Backend\IniUserGroupBackend;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
@ -50,13 +50,13 @@ abstract class UserGroupBackend
|
||||
/**
|
||||
* Create a user group backend
|
||||
*
|
||||
* @param string $name
|
||||
* @param Zend_Config $backendConfig
|
||||
* @param string $name
|
||||
* @param Config $backendConfig
|
||||
*
|
||||
* @return DbUserGroupBackend|IniUserGroupBackend
|
||||
* @throws ConfigurationError If the backend configuration is invalid
|
||||
*/
|
||||
public static function create($name, Zend_Config $backendConfig)
|
||||
public static function create($name, Config $backendConfig)
|
||||
{
|
||||
if ($backendConfig->name !== null) {
|
||||
$name = $backendConfig->name;
|
||||
|
@ -66,7 +66,7 @@ class Loader
|
||||
public function __construct(App $app)
|
||||
{
|
||||
$this->app = $app;
|
||||
$this->coreAppDir = ICINGAWEB_APPDIR . '/clicommands';
|
||||
$this->coreAppDir = $app->getBaseDir('clicommands');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
namespace Icinga\Data\Db;
|
||||
|
||||
use PDO;
|
||||
use Zend_Db;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Benchmark;
|
||||
use Icinga\Data\Db\DbQuery;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Data\Selectable;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
use PDO;
|
||||
use Zend_Config;
|
||||
use Zend_Db;
|
||||
|
||||
/**
|
||||
* Encapsulate database connections and query creation
|
||||
@ -21,7 +21,7 @@ class DbConnection implements Selectable
|
||||
/**
|
||||
* Connection config
|
||||
*
|
||||
* @var Zend_Config
|
||||
* @var Config
|
||||
*/
|
||||
private $config;
|
||||
|
||||
@ -59,9 +59,9 @@ class DbConnection implements Selectable
|
||||
/**
|
||||
* Create a new connection object
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*/
|
||||
public function __construct(Zend_Config $config = null)
|
||||
public function __construct(Config $config = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
if (isset($config->prefix)) {
|
||||
@ -216,7 +216,10 @@ class DbConnection implements Selectable
|
||||
*/
|
||||
public function fetchRow(DbQuery $query)
|
||||
{
|
||||
return $this->dbAdapter->fetchRow($query->getSelectQuery());
|
||||
Benchmark::measure('DB is fetching row');
|
||||
$result = $this->dbAdapter->fetchRow($query->getSelectQuery());
|
||||
Benchmark::measure('DB row done');
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,6 +72,12 @@ class DbQuery extends SimpleQuery
|
||||
parent::init();
|
||||
}
|
||||
|
||||
public function setUseSubqueryCount($useSubqueryCount = true)
|
||||
{
|
||||
$this->useSubqueryCount = $useSubqueryCount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function where($condition, $value = null)
|
||||
{
|
||||
// $this->count = $this->select = null;
|
||||
@ -259,11 +265,13 @@ class DbQuery extends SimpleQuery
|
||||
*/
|
||||
public function getCountQuery()
|
||||
{
|
||||
// TODO: there may be situations where we should clone the "select"
|
||||
// TODO: there may be situations where we should clone the "select"
|
||||
$count = $this->dbSelect();
|
||||
|
||||
if ($this->group) {
|
||||
$count->group($this->group);
|
||||
}
|
||||
$this->applyFilterSql($count);
|
||||
if ($this->useSubqueryCount) {
|
||||
if ($this->useSubqueryCount || $this->group) {
|
||||
$count->columns($this->columns);
|
||||
$columns = array('cnt' => 'COUNT(*)');
|
||||
return $this->db->select()->from($count, $columns);
|
||||
|
@ -79,7 +79,7 @@ abstract class Filter
|
||||
}
|
||||
}
|
||||
|
||||
krsort($operators, SORT_NATURAL);
|
||||
krsort($operators, version_compare(PHP_VERSION, '5.4.0') >= 0 ? SORT_NATURAL : SORT_REGULAR);
|
||||
foreach ($operators as $id => $operator) {
|
||||
$f = $filter->getById($id);
|
||||
if ($f->getOperatorName() !== $operator) {
|
||||
|
@ -69,11 +69,13 @@ class PivotTable
|
||||
protected function prepareQueries()
|
||||
{
|
||||
$this->xAxisQuery = clone $this->baseQuery;
|
||||
$this->xAxisQuery->distinct();
|
||||
$this->xAxisQuery->group($this->xAxisColumn);
|
||||
$this->xAxisQuery->columns(array($this->xAxisColumn));
|
||||
$this->xAxisQuery->setUseSubqueryCount();
|
||||
$this->yAxisQuery = clone $this->baseQuery;
|
||||
$this->yAxisQuery->distinct();
|
||||
$this->yAxisQuery->group($this->yAxisColumn);
|
||||
$this->yAxisQuery->columns(array($this->yAxisColumn));
|
||||
$this->yAxisQuery->setUseSubqueryCount();
|
||||
|
||||
return $this;
|
||||
}
|
||||
@ -85,24 +87,14 @@ class PivotTable
|
||||
*/
|
||||
protected function adjustSorting()
|
||||
{
|
||||
$currentOrderColumns = $this->baseQuery->getOrder();
|
||||
$xAxisOrderColumns = array(array($this->baseQuery->getMappedField($this->xAxisColumn), SimpleQuery::SORT_ASC));
|
||||
$yAxisOrderColumns = array(array($this->baseQuery->getMappedField($this->yAxisColumn), SimpleQuery::SORT_ASC));
|
||||
|
||||
foreach ($currentOrderColumns as $orderInfo) {
|
||||
if ($orderInfo[0] === $xAxisOrderColumns[0][0]) {
|
||||
$xAxisOrderColumns[0] = $orderInfo;
|
||||
} elseif ($orderInfo[0] === $yAxisOrderColumns[0][0]) {
|
||||
$yAxisOrderColumns[0] = $orderInfo;
|
||||
} else {
|
||||
$xAxisOrderColumns[] = $orderInfo;
|
||||
$yAxisOrderColumns[] = $orderInfo;
|
||||
}
|
||||
if (false === $this->xAxisQuery->hasOrder($this->xAxisColumn)) {
|
||||
$this->xAxisQuery->order($this->xAxisColumn, 'ASC');
|
||||
}
|
||||
//TODO: simplify this whole function. No need to care about mapping
|
||||
// foreach ($xAxisOrderColumns as
|
||||
// $this->xAxisQuery->setOrder($xAxisOrderColumns);
|
||||
// $this->yAxisQuery->setOrder($yAxisOrderColumns);
|
||||
|
||||
if (false === $this->yAxisQuery->hasOrder($this->yAxisColumn)) {
|
||||
$this->yAxisQuery->order($this->yAxisColumn, 'ASC');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
namespace Icinga\Data;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Util\ConfigAwareFactory;
|
||||
@ -22,14 +21,14 @@ class ResourceFactory implements ConfigAwareFactory
|
||||
/**
|
||||
* Resource configuration
|
||||
*
|
||||
* @var Zend_Config
|
||||
* @var Config
|
||||
*/
|
||||
private static $resources;
|
||||
|
||||
/**
|
||||
* Set resource configurations
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*/
|
||||
public static function setConfig($config)
|
||||
{
|
||||
@ -41,7 +40,7 @@ class ResourceFactory implements ConfigAwareFactory
|
||||
*
|
||||
* @param $resourceName String The resource's name
|
||||
*
|
||||
* @return Zend_Config The configuration of the resource
|
||||
* @return Config The configuration of the resource
|
||||
*
|
||||
* @throws ConfigurationError
|
||||
*/
|
||||
@ -62,7 +61,7 @@ class ResourceFactory implements ConfigAwareFactory
|
||||
*
|
||||
* @param String|null $type Fetch only resources that have the given type.
|
||||
*
|
||||
* @return Zend_Config The configuration containing all resources
|
||||
* @return Config The configuration containing all resources
|
||||
*/
|
||||
public static function getResourceConfigs($type = null)
|
||||
{
|
||||
@ -76,7 +75,7 @@ class ResourceFactory implements ConfigAwareFactory
|
||||
$resources[$name] = $resource;
|
||||
}
|
||||
}
|
||||
return new Zend_Config($resources);
|
||||
return new Config($resources);
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,13 +99,13 @@ class ResourceFactory implements ConfigAwareFactory
|
||||
* NOTE: The factory does not test if the given configuration is valid and the resource is accessible, this
|
||||
* depends entirely on the implementation of the returned resource.
|
||||
*
|
||||
* @param Zend_Config $config The configuration for the created resource.
|
||||
* @param Config $config The configuration for the created resource.
|
||||
*
|
||||
* @return DbConnection|LdapConnection|LivestatusConnection An object that can be used to access
|
||||
* the given resource. The returned class depends on the configuration property 'type'.
|
||||
* @throws ConfigurationError When an unsupported type is given
|
||||
*/
|
||||
public static function createResource(Zend_Config $config)
|
||||
public static function createResource(Config $config)
|
||||
{
|
||||
switch (strtolower($config->type)) {
|
||||
case 'db':
|
||||
|
@ -433,6 +433,9 @@ class IniEditor
|
||||
*/
|
||||
private function formatKey(array $key)
|
||||
{
|
||||
foreach ($key as $i => $separator) {
|
||||
$key[$i] = $this->sanitize($separator);
|
||||
}
|
||||
return implode($this->nestSeparator, $key);
|
||||
}
|
||||
|
||||
@ -599,7 +602,7 @@ class IniEditor
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare a value for INe
|
||||
* Prepare a value for INI
|
||||
*
|
||||
* @param $value The value of the string
|
||||
*
|
||||
@ -613,10 +616,12 @@ class IniEditor
|
||||
return $value;
|
||||
} elseif (is_bool($value)) {
|
||||
return ($value ? 'true' : 'false');
|
||||
} elseif (strpos($value, '"') === false) {
|
||||
return '"' . $value . '"';
|
||||
} else {
|
||||
return '"' . str_replace('"', '\"', $value) . '"';
|
||||
}
|
||||
return '"' . str_replace('"', '\"', $this->sanitize($value)) . '"';
|
||||
}
|
||||
|
||||
private function sanitize($value)
|
||||
{
|
||||
return str_replace('\n', '', $value);
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,9 @@ namespace Icinga\File\Ini;
|
||||
|
||||
use Zend_Config;
|
||||
use Zend_Config_Ini;
|
||||
use Zend_Config_Exception;
|
||||
use Zend_Config_Writer_FileAbstract;
|
||||
use Icinga\Application\Config;
|
||||
|
||||
/**
|
||||
* A INI file adapter that respects the file structure and the comments of already existing ini files
|
||||
@ -20,11 +22,18 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
|
||||
*/
|
||||
protected $options;
|
||||
|
||||
/**
|
||||
* The mode to set on new files
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public static $fileMode = 0664;
|
||||
|
||||
/**
|
||||
* Create a new INI writer
|
||||
*
|
||||
* @param array $options Supports all options of Zend_Config_Writer and additional
|
||||
* options for the internal IniEditor:
|
||||
* @param array $options Supports all options of Zend_Config_Writer and additional options:
|
||||
* * filemode: The mode to set on new files
|
||||
* * valueIndentation: The indentation level of the values
|
||||
* * commentIndentation: The indentation level of the comments
|
||||
* * sectionSeparators: The amount of newlines between sections
|
||||
@ -33,49 +42,16 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
|
||||
*/
|
||||
public function __construct(array $options = null)
|
||||
{
|
||||
if (isset($options['config']) && $options['config'] instanceof Config) {
|
||||
// As this class inherits from Zend_Config_Writer_FileAbstract we must
|
||||
// not pass the config directly as it needs to be of type Zend_Config
|
||||
$options['config'] = new Zend_Config($options['config']->toArray(), true);
|
||||
}
|
||||
|
||||
$this->options = $options;
|
||||
parent::__construct($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all keys containing dots and convert it to a nested configuration
|
||||
*
|
||||
* Ensure that configurations with the same ini representation the have
|
||||
* similarly nested Zend_Config objects. The configuration may be altered
|
||||
* during that process.
|
||||
*
|
||||
* @param Zend_Config $config The configuration to normalize
|
||||
* @return Zend_Config The normalized config
|
||||
*/
|
||||
private function normalizeKeys(Zend_Config $config)
|
||||
{
|
||||
foreach ($config as $key => $value) {
|
||||
if (preg_match('/\./', $key) > 0) {
|
||||
// remove old key
|
||||
unset ($config->$key);
|
||||
|
||||
// insert new key
|
||||
$nests = explode('.', $key);
|
||||
$current = $config;
|
||||
$i = 0;
|
||||
for (; $i < count($nests) - 1; $i++) {
|
||||
if (! isset($current->{$nests[$i]})) {
|
||||
// configuration key doesn't exist, create a new nesting level
|
||||
$current->{$nests[$i]} = new Zend_Config (array(), true);
|
||||
}
|
||||
// move to next nesting level
|
||||
$current = $current->{$nests[$i]};
|
||||
}
|
||||
// reached last nesting level, insert value
|
||||
$current->{$nests[$i]} = $value;
|
||||
}
|
||||
if ($value instanceof Zend_Config) {
|
||||
$config->$key = $this->normalizeKeys ($value);
|
||||
}
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the Zend_Config into a config file string
|
||||
*
|
||||
@ -89,23 +65,37 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
|
||||
$oldconfig = new Zend_Config(array());
|
||||
}
|
||||
|
||||
// create an internal copy of the given configuration, since the user of this class
|
||||
// won't expect that a configuration will ever be altered during
|
||||
// the rendering process.
|
||||
$extends = $this->_config->getExtends();
|
||||
$this->_config = new Zend_Config ($this->_config->toArray(), true);
|
||||
foreach ($extends as $extending => $extended) {
|
||||
$this->_config->setExtend($extending, $extended);
|
||||
}
|
||||
$this->_config = $this->normalizeKeys($this->_config);
|
||||
|
||||
$newconfig = $this->_config;
|
||||
$editor = new IniEditor(file_get_contents($this->_filename), $this->options);
|
||||
$editor = new IniEditor(@file_get_contents($this->_filename), $this->options);
|
||||
$this->diffConfigs($oldconfig, $newconfig, $editor);
|
||||
$this->updateSectionOrder($newconfig, $editor);
|
||||
return $editor->getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write configuration to file and set file mode in case it does not exist yet
|
||||
*
|
||||
* @param string $filename
|
||||
* @param Zend_Config $config
|
||||
* @param bool $exclusiveLock
|
||||
*/
|
||||
public function write($filename = null, Zend_Config $config = null, $exclusiveLock = null)
|
||||
{
|
||||
$filePath = $filename !== null ? $filename : $this->_filename;
|
||||
$setMode = false === file_exists($filePath);
|
||||
|
||||
parent::write($filename, $config, $exclusiveLock);
|
||||
|
||||
if ($setMode) {
|
||||
$mode = isset($this->options['filemode']) ? $this->options['filemode'] : static::$fileMode;
|
||||
$old = umask(0); // Make sure that the mode we're going to set doesn't get mangled
|
||||
if (is_int($mode) && false === @chmod($filePath, $mode)) {
|
||||
throw new Zend_Config_Exception(sprintf('Failed to set file mode "%o" on file "%s"', $mode, $filePath));
|
||||
}
|
||||
umask($old);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a property diff and apply the changes to the editor
|
||||
*
|
||||
|
@ -49,7 +49,7 @@ class Pdf extends DOMPDF
|
||||
$layout->content = $controller->getResponse();
|
||||
$html = $layout->render();
|
||||
$imgDir = Url::fromPath('img');
|
||||
$html = preg_replace('~src="' . $imgDir . '/~', 'src="' . Icinga::app()->getBootstrapDirecory() . '/img/', $html);
|
||||
$html = preg_replace('~src="' . $imgDir . '/~', 'src="' . Icinga::app()->getBootstrapDirectory() . '/img/', $html);
|
||||
$html = preg_replace('~src="/svg/chart.php(.*)"~', 'class="icon" src="http://master1.com/png/chart.php$1"', $html);
|
||||
$this->load_html($html);
|
||||
$this->render();
|
||||
|
@ -9,7 +9,6 @@ namespace Icinga\Protocol;
|
||||
*/
|
||||
class Dns
|
||||
{
|
||||
|
||||
/**
|
||||
* Discover all service records on a given domain
|
||||
*
|
||||
@ -17,21 +16,12 @@ class Dns
|
||||
* @param string $service The type of the service, like for example 'ldaps' or 'ldap'
|
||||
* @param string $protocol The transport protocol used by the service, defaults to 'tcp'
|
||||
*
|
||||
* @return array|null An array of all service domains
|
||||
* @return array An array of all found service records
|
||||
*/
|
||||
public static function getSrvRecords($domain, $service, $protocol = 'tcp')
|
||||
{
|
||||
$records = dns_get_record('_' . $service . '._' . $protocol . '.' . $domain, DNS_SRV);
|
||||
if ($records === false) {
|
||||
return null;
|
||||
}
|
||||
$targets = array();
|
||||
foreach ($records as $record) {
|
||||
if (array_key_exists('target', $record)) {
|
||||
$targets[] = $record['target'];
|
||||
}
|
||||
}
|
||||
return $targets;
|
||||
return $records === false ? array() : $records;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
namespace Icinga\Protocol\File;
|
||||
|
||||
use Icinga\Data\Selectable;
|
||||
use Countable;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Data\Selectable;
|
||||
|
||||
/**
|
||||
* Read file line by line
|
||||
@ -30,11 +30,11 @@ class FileReader implements Selectable, Countable
|
||||
/**
|
||||
* Create a new reader
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*
|
||||
* @throws FileReaderException If a required $config directive (filename or fields) is missing
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
foreach (array('filename', 'fields') as $key) {
|
||||
if (isset($config->{$key})) {
|
||||
|
@ -8,7 +8,6 @@ use Icinga\Protocol\Ldap\Exception as LdapException;
|
||||
use Icinga\Application\Platform;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger;
|
||||
use Zend_Config;
|
||||
|
||||
/**
|
||||
* Backend class managing all the LDAP stuff for you.
|
||||
@ -101,9 +100,9 @@ class Connection
|
||||
*
|
||||
* TODO: Allow to pass port and SSL options
|
||||
*
|
||||
* @param Zend_Config $config
|
||||
* @param Config $config
|
||||
*/
|
||||
public function __construct(Zend_Config $config)
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
$this->hostname = $config->hostname;
|
||||
$this->bind_dn = $config->bind_dn;
|
||||
@ -336,9 +335,9 @@ class Connection
|
||||
|
||||
public function testCredentials($username, $password)
|
||||
{
|
||||
$ds = $this->prepareNewConnection();
|
||||
$this->connect();
|
||||
|
||||
$r = @ldap_bind($ds, $username, $password);
|
||||
$r = @ldap_bind($this->ds, $username, $password);
|
||||
if ($r) {
|
||||
Logger::debug(
|
||||
'Successfully tested LDAP credentials (%s / %s)',
|
||||
@ -351,7 +350,7 @@ class Connection
|
||||
'Testing LDAP credentials (%s / %s) failed: %s',
|
||||
$username,
|
||||
'***',
|
||||
ldap_error($ds)
|
||||
ldap_error($this->ds)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -364,7 +363,7 @@ class Connection
|
||||
*/
|
||||
protected function getConfigDir($sub = null)
|
||||
{
|
||||
$dir = Config::getInstance()->getConfigDir() . '/ldap';
|
||||
$dir = Config::$configDir . '/ldap';
|
||||
if ($sub !== null) {
|
||||
$dir .= '/' . $sub;
|
||||
}
|
||||
@ -388,7 +387,19 @@ class Connection
|
||||
}
|
||||
|
||||
$ds = ldap_connect($this->hostname, $this->port);
|
||||
list($cap, $namingContexts) = $this->discoverCapabilities($ds);
|
||||
try {
|
||||
$capabilities = $this->discoverCapabilities($ds);
|
||||
list($cap, $namingContexts) = $capabilities;
|
||||
} catch (LdapException $e) {
|
||||
|
||||
// discovery failed, guess defaults
|
||||
$cap = (object) array(
|
||||
'supports_ldapv3' => true,
|
||||
'supports_starttls' => false,
|
||||
'msCapabilities' => array()
|
||||
);
|
||||
$namingContexts = null;
|
||||
}
|
||||
$this->capabilities = $cap;
|
||||
$this->namingContexts = $namingContexts;
|
||||
|
||||
@ -626,7 +637,8 @@ class Connection
|
||||
if (! $result) {
|
||||
throw new LdapException(
|
||||
sprintf(
|
||||
'Capability query failed (%s:%d): %s',
|
||||
'Capability query failed (%s:%d): %s. Check if hostname and port of the ldap resource are correct '
|
||||
. ' and if anonymous access is permitted.',
|
||||
$this->hostname,
|
||||
$this->port,
|
||||
ldap_error($ds)
|
||||
@ -634,6 +646,16 @@ class Connection
|
||||
);
|
||||
}
|
||||
$entry = ldap_first_entry($ds, $result);
|
||||
if ($entry === false) {
|
||||
throw new LdapException(
|
||||
sprintf(
|
||||
'Capabilities not available (%s:%d): %s. Discovery of root DSE probably not permitted.',
|
||||
$this->hostname,
|
||||
$this->port,
|
||||
ldap_error($ds)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$cap = (object) array(
|
||||
'supports_ldapv3' => false,
|
||||
@ -641,10 +663,6 @@ class Connection
|
||||
'msCapabilities' => array()
|
||||
);
|
||||
|
||||
if ($entry === false) {
|
||||
// TODO: Is it OK to have no capabilities?
|
||||
return false;
|
||||
}
|
||||
$ldapAttributes = ldap_get_attributes($ds, $entry);
|
||||
$result = $this->cleanupAttributes($ldapAttributes);
|
||||
$cap->supports_ldapv3 = $this->hasCapabilityLdapV3($result);
|
||||
|
@ -24,9 +24,9 @@ namespace Icinga\Test {
|
||||
use Exception;
|
||||
use RuntimeException;
|
||||
use Mockery;
|
||||
use Zend_Config;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Util\DateTimeFactory;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Data\Db\DbConnection;
|
||||
@ -191,17 +191,17 @@ namespace Icinga\Test {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Zend_Config for database configuration
|
||||
* Create Config for database configuration
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return Zend_Config
|
||||
* @return Config
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function createDbConfigFor($name)
|
||||
{
|
||||
if (array_key_exists($name, self::$dbConfiguration)) {
|
||||
return new Zend_Config(self::$dbConfiguration[$name]);
|
||||
return new Config(self::$dbConfiguration[$name]);
|
||||
}
|
||||
|
||||
throw new RuntimeException('Configuration for database type not available: ' . $name);
|
||||
|
@ -4,13 +4,12 @@
|
||||
|
||||
namespace Icinga\User\Preferences;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\User;
|
||||
use Icinga\User\Preferences;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
use Icinga\Data\Db\DbConnection;
|
||||
use Icinga\Application\Config as IcingaConfig;
|
||||
|
||||
/**
|
||||
* Preferences store factory
|
||||
@ -19,13 +18,13 @@ use Icinga\Application\Config as IcingaConfig;
|
||||
* <code>
|
||||
* <?php
|
||||
*
|
||||
* use Zend_Config;
|
||||
* use Icinga\Application\Config;
|
||||
* use Icinga\User\Preferences;
|
||||
* use Icinga\User\Preferences\PreferencesStore;
|
||||
*
|
||||
* // Create a INI store
|
||||
* $store = PreferencesStore::create(
|
||||
* new Zend_Config(
|
||||
* new Config(
|
||||
* 'type' => 'ini',
|
||||
* 'config_path' => '/path/to/preferences'
|
||||
* ),
|
||||
@ -42,7 +41,7 @@ abstract class PreferencesStore
|
||||
/**
|
||||
* Store config
|
||||
*
|
||||
* @var Zend_Config
|
||||
* @var Config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
@ -56,10 +55,10 @@ abstract class PreferencesStore
|
||||
/**
|
||||
* Create a new store
|
||||
*
|
||||
* @param Zend_Config $config The config for this adapter
|
||||
* @param User $user The user to which these preferences belong
|
||||
* @param Config $config The config for this adapter
|
||||
* @param User $user The user to which these preferences belong
|
||||
*/
|
||||
public function __construct(Zend_Config $config, User $user)
|
||||
public function __construct(Config $config, User $user)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->user = $user;
|
||||
@ -69,7 +68,7 @@ abstract class PreferencesStore
|
||||
/**
|
||||
* Getter for the store config
|
||||
*
|
||||
* @return Zend_Config
|
||||
* @return Config
|
||||
*/
|
||||
public function getStoreConfig()
|
||||
{
|
||||
@ -108,14 +107,14 @@ abstract class PreferencesStore
|
||||
/**
|
||||
* Create preferences storage adapter from config
|
||||
*
|
||||
* @param Zend_Config $config The config for the adapter
|
||||
* @param User $user The user to which these preferences belong
|
||||
* @param Config $config The config for the adapter
|
||||
* @param User $user The user to which these preferences belong
|
||||
*
|
||||
* @return self
|
||||
*
|
||||
* @throws ConfigurationError When the configuration defines an invalid storage type
|
||||
*/
|
||||
public static function create(Zend_Config $config, User $user)
|
||||
public static function create(Config $config, User $user)
|
||||
{
|
||||
if (($type = $config->type) === null) {
|
||||
throw new ConfigurationError(
|
||||
@ -133,7 +132,7 @@ abstract class PreferencesStore
|
||||
}
|
||||
|
||||
if ($type === 'Ini') {
|
||||
$config->location = IcingaConfig::resolvePath('preferences');
|
||||
$config->location = Config::resolvePath('preferences');
|
||||
} elseif ($type === 'Db') {
|
||||
$config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Icinga\User\Preferences\Store;
|
||||
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Exception\NotReadableError;
|
||||
use Icinga\Exception\NotWritableError;
|
||||
use Icinga\File\Ini\IniWriter;
|
||||
@ -120,7 +120,7 @@ class IniStore extends PreferencesStore
|
||||
|
||||
$this->writer = new IniWriter(
|
||||
array(
|
||||
'config' => new Zend_Config($this->preferences),
|
||||
'config' => new Config($this->preferences),
|
||||
'filename' => $this->preferencesFile
|
||||
)
|
||||
);
|
||||
|
@ -224,6 +224,7 @@ class Translator
|
||||
}
|
||||
}
|
||||
}
|
||||
sort($codes);
|
||||
|
||||
return $codes;
|
||||
}
|
||||
|
14
library/Icinga/Web/Controller.php
Normal file
14
library/Icinga/Web/Controller.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Web;
|
||||
|
||||
use Icinga\Web\Controller\ModuleActionController;
|
||||
|
||||
/**
|
||||
* This is the controller all modules should inherit from
|
||||
* We will flip code with the ModuleActionController as soon as a couple
|
||||
* of pending feature branches are merged back to the master.
|
||||
*/
|
||||
class Controller extends ModuleActionController
|
||||
{
|
||||
}
|
@ -18,8 +18,6 @@ use Icinga\File\Pdf;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Web\Session;
|
||||
use Icinga\Web\UrlParams;
|
||||
use Icinga\Session\SessionNamespace;
|
||||
use Icinga\Exception\NotReadableError;
|
||||
use Zend_Controller_Action;
|
||||
use Zend_Controller_Action_HelperBroker as ActionHelperBroker;
|
||||
use Zend_Controller_Request_Abstract as Request;
|
||||
@ -325,14 +323,24 @@ class ActionController extends Zend_Controller_Action
|
||||
$this->getResponse()->setHeader('X-Icinga-Reload-Css', 'now');
|
||||
}
|
||||
|
||||
$this->shutdownSession();
|
||||
|
||||
$this->getResponse()
|
||||
->setHeader('X-Icinga-Redirect', rawurlencode($url->getAbsoluteUrl()))
|
||||
->sendHeaders();
|
||||
|
||||
// TODO: Session shutdown?
|
||||
exit;
|
||||
}
|
||||
|
||||
protected function redirectHttp($url)
|
||||
{
|
||||
if (! $url instanceof Url) {
|
||||
$url = Url::fromPath($url);
|
||||
}
|
||||
$this->shutdownSession();
|
||||
$this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect to a specific url, updating the browsers URL field
|
||||
*
|
||||
@ -343,10 +351,7 @@ class ActionController extends Zend_Controller_Action
|
||||
if ($this->isXhr()) {
|
||||
$this->redirectXhr($url);
|
||||
} else {
|
||||
if (! $url instanceof Url) {
|
||||
$url = Url::fromPath($url);
|
||||
}
|
||||
$this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl());
|
||||
$this->redirectHttp($url);
|
||||
}
|
||||
}
|
||||
|
||||
@ -374,6 +379,7 @@ class ActionController extends Zend_Controller_Action
|
||||
|
||||
if ($req->getParam('format') === 'pdf') {
|
||||
$layout->setLayout('pdf');
|
||||
$this->shutdownSession();
|
||||
$this->sendAsPdf();
|
||||
exit;
|
||||
}
|
||||
@ -381,6 +387,8 @@ class ActionController extends Zend_Controller_Action
|
||||
if ($this->isXhr()) {
|
||||
$this->postDispatchXhr();
|
||||
}
|
||||
|
||||
$this->shutdownSession();
|
||||
}
|
||||
|
||||
protected function postDispatchXhr()
|
||||
@ -430,6 +438,14 @@ class ActionController extends Zend_Controller_Action
|
||||
$pdf->renderControllerAction($this);
|
||||
}
|
||||
|
||||
protected function shutdownSession()
|
||||
{
|
||||
$session = Session::getSession();
|
||||
if ($session->hasChanged()) {
|
||||
$session->write();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the benchmark
|
||||
*
|
||||
|
@ -100,11 +100,11 @@ class Form extends Zend_Form
|
||||
* @var array
|
||||
*/
|
||||
public static $defaultElementDecorators = array(
|
||||
'ViewHelper',
|
||||
'Errors',
|
||||
array('Description', array('tag' => 'span', 'class' => 'description')),
|
||||
'Label',
|
||||
array('HtmlTag', array('tag' => 'div'))
|
||||
array('ViewHelper', array('separator' => '')),
|
||||
array('Errors', array('separator' => '')),
|
||||
array('Description', array('tag' => 'span', 'class' => 'description', 'separator' => '')),
|
||||
array('Label', array('separator' => '')),
|
||||
array('HtmlTag', array('tag' => 'div', 'class' => 'element'))
|
||||
);
|
||||
|
||||
/**
|
||||
@ -463,7 +463,15 @@ class Form extends Zend_Form
|
||||
$el = parent::createElement($type, $name, $options);
|
||||
|
||||
if ($el && $el->getAttrib('autosubmit')) {
|
||||
$el->addDecorator(new NoScriptApply()); // Non-JS environments
|
||||
$noScript = new NoScriptApply(); // Non-JS environments
|
||||
$decorators = $el->getDecorators();
|
||||
$pos = array_search('Zend_Form_Decorator_ViewHelper', array_keys($decorators)) + 1;
|
||||
$el->setDecorators(
|
||||
array_slice($decorators, 0, $pos, true)
|
||||
+ array(get_class($noScript) => $noScript)
|
||||
+ array_slice($decorators, $pos, count($decorators) - $pos, true)
|
||||
);
|
||||
|
||||
$class = $el->getAttrib('class');
|
||||
if (is_array($class)) {
|
||||
$class[] = 'autosubmit';
|
||||
@ -473,6 +481,7 @@ class Form extends Zend_Form
|
||||
$class .= ' autosubmit';
|
||||
}
|
||||
$el->setAttrib('class', $class); // JS environments
|
||||
|
||||
unset($el->autosubmit);
|
||||
}
|
||||
|
||||
|
64
library/Icinga/Web/Form/Decorator/ElementDoubler.php
Normal file
64
library/Icinga/Web/Form/Decorator/ElementDoubler.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Form\Decorator;
|
||||
|
||||
use Zend_Form_Element;
|
||||
use Zend_Form_Decorator_Abstract;
|
||||
|
||||
/**
|
||||
* A decorator that will double a single element of a display group
|
||||
*
|
||||
* The options `condition', `double' and `attributes' can be passed to the constructor and are used to affect whether
|
||||
* the doubling should take effect, which element should be doubled and which HTML attributes should be applied to the
|
||||
* doubled element, respectively.
|
||||
*
|
||||
* `condition' must be an element's name that when it's part of the display group causes the condition to be met.
|
||||
* `double' must be an element's name and must be part of the display group.
|
||||
* `attributes' is just an array of key-value pairs.
|
||||
*
|
||||
* You can also pass `placement' to control whether the doubled element is prepended or appended.
|
||||
*/
|
||||
class ElementDoubler extends Zend_Form_Decorator_Abstract
|
||||
{
|
||||
/**
|
||||
* Return the display group's elements with an additional copy of an element being added if the condition is met
|
||||
*
|
||||
* @param string $content The HTML rendered so far
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render($content)
|
||||
{
|
||||
$group = $this->getElement();
|
||||
if ($group->getElement($this->getOption('condition')) !== null) {
|
||||
if ($this->getPlacement() === static::APPEND) {
|
||||
return $content . $this->applyAttributes($group->getElement($this->getOption('double')))->render();
|
||||
} else { // $this->getPlacement() === static::PREPEND
|
||||
return $this->applyAttributes($group->getElement($this->getOption('double')))->render() . $content;
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply all element attributes
|
||||
*
|
||||
* @param Zend_Form_Element $element The element to apply the attributes to
|
||||
*
|
||||
* @return Zend_Form_Element
|
||||
*/
|
||||
protected function applyAttributes(Zend_Form_Element $element)
|
||||
{
|
||||
$attributes = $this->getOption('attributes');
|
||||
if ($attributes !== null) {
|
||||
foreach ($attributes as $name => $value) {
|
||||
$element->setAttrib($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
return $element;
|
||||
}
|
||||
}
|
81
library/Icinga/Web/Form/Element/Button.php
Normal file
81
library/Icinga/Web/Form/Element/Button.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Form\Element;
|
||||
|
||||
use Zend_Form_Element;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Application\Icinga;
|
||||
|
||||
/**
|
||||
* A button
|
||||
*/
|
||||
class Button extends Zend_Form_Element
|
||||
{
|
||||
/**
|
||||
* Use formButton view helper by default
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $helper = 'formButton';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string|array|Zend_Config $spec Element name or configuration
|
||||
* @param string|array|Zend_Config $options Element value or configuration
|
||||
*/
|
||||
public function __construct($spec, $options = null)
|
||||
{
|
||||
if (is_string($spec) && ((null !== $options) && is_string($options))) {
|
||||
$options = array('label' => $options);
|
||||
}
|
||||
|
||||
if (!isset($options['ignore'])) {
|
||||
$options['ignore'] = true;
|
||||
}
|
||||
|
||||
parent::__construct($spec, $options);
|
||||
|
||||
if ($label = $this->getLabel()) {
|
||||
// Necessary to get the label shown on the generated HTML
|
||||
$this->content = $label;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate element value (pseudo)
|
||||
*
|
||||
* There is no need to reset the value
|
||||
*
|
||||
* @param mixed $value Is always ignored
|
||||
* @param mixed $context Is always ignored
|
||||
*
|
||||
* @return bool Returns always TRUE
|
||||
*/
|
||||
public function isValid($value, $context = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has this button been selected?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isChecked()
|
||||
{
|
||||
return $this->getRequest()->getParam($this->getName()) === $this->getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current request
|
||||
*
|
||||
* @return Request
|
||||
*/
|
||||
protected function getRequest()
|
||||
{
|
||||
return Icinga::app()->getFrontController()->getRequest();
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@
|
||||
namespace Icinga\Web\Form\Element;
|
||||
|
||||
use Zend_Form_Element;
|
||||
use Icinga\Web\Form;
|
||||
|
||||
/**
|
||||
* A note
|
||||
@ -32,7 +31,15 @@ class Note extends Zend_Form_Element
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->setDecorators(Form::$defaultElementDecorators);
|
||||
if (count($this->getDecorators()) === 0) {
|
||||
$this->setDecorators(array(
|
||||
'ViewHelper',
|
||||
array(
|
||||
'HtmlTag',
|
||||
array('tag' => 'p')
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,6 @@
|
||||
namespace Icinga\Web\Form\Validator;
|
||||
|
||||
use Zend_Validate_Abstract;
|
||||
use Icinga\Application\Config as IcingaConfig;
|
||||
|
||||
/**
|
||||
* Validator that interprets the value as a path and checks if it's writable
|
||||
|
@ -67,7 +67,7 @@ class JavaScript
|
||||
public static function send($minified = false)
|
||||
{
|
||||
header('Content-Type: application/javascript');
|
||||
$basedir = Icinga::app()->getBootstrapDirecory();
|
||||
$basedir = Icinga::app()->getBootstrapDirectory();
|
||||
|
||||
$js = $out = '';
|
||||
$min = $minified ? '.min' : '';
|
||||
|
@ -7,7 +7,6 @@ namespace Icinga\Web;
|
||||
use Icinga\Authentication\Manager;
|
||||
use Icinga\Web\Menu\MenuItemRenderer;
|
||||
use RecursiveIterator;
|
||||
use Zend_Config;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Logger;
|
||||
@ -80,10 +79,10 @@ class Menu implements RecursiveIterator
|
||||
/**
|
||||
* Create a new menu
|
||||
*
|
||||
* @param int $id The id of this menu
|
||||
* @param Zend_Config $config The configuration for this menu
|
||||
* @param int $id The id of this menu
|
||||
* @param Config $config The configuration for this menu
|
||||
*/
|
||||
public function __construct($id, Zend_Config $config = null, Menu $parent = null)
|
||||
public function __construct($id, Config $config = null, Menu $parent = null)
|
||||
{
|
||||
$this->id = $id;
|
||||
if ($parent !== null) {
|
||||
@ -95,7 +94,7 @@ class Menu implements RecursiveIterator
|
||||
/**
|
||||
* Set all given properties
|
||||
*
|
||||
* @param array|Zend_Config $props Property list
|
||||
* @param array|Config $props Property list
|
||||
*/
|
||||
public function setProperties($props = null)
|
||||
{
|
||||
@ -425,11 +424,11 @@ class Menu implements RecursiveIterator
|
||||
* Add a sub menu to this menu
|
||||
*
|
||||
* @param string $id The id of the menu to add
|
||||
* @param Zend_Config $itemConfig The config with which to initialize the menu
|
||||
* @param Config $itemConfig The config with which to initialize the menu
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function addSubMenu($id, Zend_Config $menuConfig = null)
|
||||
public function addSubMenu($id, Config $menuConfig = null)
|
||||
{
|
||||
if (false === ($pos = strpos($id, '.'))) {
|
||||
$subMenu = new self($id, $menuConfig, $this);
|
||||
@ -519,7 +518,7 @@ class Menu implements RecursiveIterator
|
||||
*/
|
||||
public function add($name, $config = array())
|
||||
{
|
||||
return $this->addSubMenu($name, new Zend_Config($config));
|
||||
return $this->addSubMenu($name, new Config($config));
|
||||
}
|
||||
|
||||
/**
|
||||
|
100
library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php
Normal file
100
library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Menu;
|
||||
|
||||
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
|
||||
use Icinga\Web\Menu;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class MonitoringMenuItemRenderer implements MenuItemRenderer {
|
||||
|
||||
protected static $summary;
|
||||
|
||||
protected $columns = array();
|
||||
|
||||
protected static function summary($column = null)
|
||||
{
|
||||
if (self::$summary === null) {
|
||||
self::$summary = MonitoringBackend::instance()->select()->from(
|
||||
'statusSummary',
|
||||
array(
|
||||
'hosts_down_unhandled',
|
||||
'services_critical_unhandled'
|
||||
)
|
||||
)->getQuery()->fetchRow();
|
||||
}
|
||||
|
||||
if ($column === null) {
|
||||
return self::$summary;
|
||||
} elseif (isset(self::$summary->$column)) {
|
||||
return self::$summary->$column;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected function getBadgeTitle()
|
||||
{
|
||||
$translations = array(
|
||||
'hosts_down_unhandled' => mt('monitoring', '%d unhandled hosts down'),
|
||||
'services_critical_unhandled' => mt('monitoring', '%d unhandled services critical')
|
||||
);
|
||||
|
||||
$titles = array();
|
||||
$sum = $this->summary();
|
||||
|
||||
foreach ($this->columns as $col) {
|
||||
if (isset($sum->$col) && $sum->$col > 0) {
|
||||
$titles[] = sprintf($translations[$col], $sum->$col);
|
||||
}
|
||||
}
|
||||
|
||||
return implode(', ', $titles);
|
||||
}
|
||||
|
||||
protected function countItems()
|
||||
{
|
||||
$sum = self::summary();
|
||||
$count = 0;
|
||||
|
||||
foreach ($this->columns as $col) {
|
||||
if (isset($sum->$col)) {
|
||||
$count += $sum->$col;
|
||||
}
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function render(Menu $menu)
|
||||
{
|
||||
$count = $this->countItems();
|
||||
$badge = '';
|
||||
if ($count) {
|
||||
$badge = sprintf(
|
||||
'<div title="%s" class="badge-container"><span class="badge badge-critical">%s</span></div>',
|
||||
$this->getBadgeTitle(),
|
||||
$count
|
||||
);
|
||||
}
|
||||
if ($menu->getIcon() && strpos($menu->getIcon(), '.') === false) {
|
||||
return sprintf(
|
||||
'<a href="%s" class="icon-%s">%s%s</a>',
|
||||
$menu->getUrl() ?: '#',
|
||||
$menu->getIcon(),
|
||||
htmlspecialchars($menu->getTitle()),
|
||||
$badge
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<a href="%s">%s%s%s</a>',
|
||||
$menu->getUrl() ?: '#',
|
||||
$menu->getIcon() ? '<img src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '',
|
||||
htmlspecialchars($menu->getTitle()),
|
||||
$badge
|
||||
);
|
||||
}
|
||||
}
|
@ -1,39 +1,11 @@
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Menu;
|
||||
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Web\Menu;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class ProblemMenuItemRenderer implements MenuItemRenderer {
|
||||
|
||||
public function render(Menu $menu)
|
||||
{
|
||||
$statusSummary = Backend::createBackend()
|
||||
->select()->from(
|
||||
'statusSummary',
|
||||
array(
|
||||
'hosts_down_unhandled',
|
||||
'services_critical_unhandled'
|
||||
)
|
||||
)->getQuery()->fetchRow();
|
||||
$unhandled = $statusSummary->hosts_down_unhandled + $statusSummary->services_critical_unhandled;
|
||||
$badge = '';
|
||||
if ($unhandled) {
|
||||
$badge = sprintf(
|
||||
'<div class="badge-container"><span class="badge badge-critical">%s</span></div>',
|
||||
$unhandled
|
||||
);
|
||||
}
|
||||
return sprintf(
|
||||
'<a href="%s">%s%s %s</a>',
|
||||
$menu->getUrl() ?: '#',
|
||||
$menu->getIcon() ? '<img src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '',
|
||||
htmlspecialchars($menu->getTitle()),
|
||||
$badge
|
||||
);
|
||||
}
|
||||
class ProblemMenuItemRenderer extends MonitoringMenuItemRenderer
|
||||
{
|
||||
protected $columns = array(
|
||||
'hosts_down_unhandled',
|
||||
'services_critical_unhandled'
|
||||
);
|
||||
}
|
||||
|
@ -1,38 +1,12 @@
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Menu;
|
||||
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Web\Menu;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class UnhandledHostMenuItemRenderer implements MenuItemRenderer {
|
||||
|
||||
public function render(Menu $menu)
|
||||
{
|
||||
$statusSummary = Backend::createBackend()
|
||||
->select()->from(
|
||||
'statusSummary',
|
||||
array(
|
||||
'hosts_down_unhandled'
|
||||
)
|
||||
)->getQuery()->fetchRow();
|
||||
$badge = '';
|
||||
if ($statusSummary->hosts_down_unhandled) {
|
||||
$badge = sprintf(
|
||||
'<div title="%s" class="badge-container"><span class="badge badge-critical">%s</span></div>',
|
||||
t(sprintf('%d unhandled host problems', $statusSummary->hosts_down_unhandled)),
|
||||
$statusSummary->hosts_down_unhandled
|
||||
);
|
||||
}
|
||||
return sprintf(
|
||||
'<a href="%s">%s%s %s</a>',
|
||||
$menu->getUrl() ?: '#',
|
||||
$menu->getIcon() ? '<img src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '',
|
||||
htmlspecialchars($menu->getTitle()),
|
||||
$badge
|
||||
);
|
||||
}
|
||||
class UnhandledHostMenuItemRenderer extends MonitoringMenuItemRenderer
|
||||
{
|
||||
protected $columns = array(
|
||||
'hosts_down_unhandled',
|
||||
);
|
||||
}
|
||||
|
@ -1,38 +1,12 @@
|
||||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Menu;
|
||||
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Web\Menu;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class UnhandledServiceMenuItemRenderer implements MenuItemRenderer {
|
||||
|
||||
public function render(Menu $menu)
|
||||
{
|
||||
$statusSummary = Backend::createBackend()
|
||||
->select()->from(
|
||||
'statusSummary',
|
||||
array(
|
||||
'services_critical_unhandled'
|
||||
)
|
||||
)->getQuery()->fetchRow();
|
||||
$badge = '';
|
||||
if ($statusSummary->services_critical_unhandled) {
|
||||
$badge = sprintf(
|
||||
'<div title="%s" class="badge-container"><span class="badge badge-critical">%s</span></div>',
|
||||
t(sprintf('%d unhandled service problems', $statusSummary->services_critical_unhandled)),
|
||||
$statusSummary->services_critical_unhandled
|
||||
);
|
||||
}
|
||||
return sprintf(
|
||||
'<a href="%s">%s%s %s</a>',
|
||||
$menu->getUrl() ?: '#',
|
||||
$menu->getIcon() ? '<img src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '',
|
||||
htmlspecialchars($menu->getTitle()),
|
||||
$badge
|
||||
);
|
||||
}
|
||||
class UnhandledServiceMenuItemRenderer extends MonitoringMenuItemRenderer
|
||||
{
|
||||
protected $columns = array(
|
||||
'services_critical_unhandled'
|
||||
);
|
||||
}
|
||||
|
@ -114,6 +114,14 @@ class MenuRenderer extends RecursiveIteratorIterator
|
||||
Logger::error('Could not invoke custom renderer. Exception: '. $e->getMessage());
|
||||
}
|
||||
}
|
||||
if ($child->getIcon() && strpos($child->getIcon(), '.') === false) {
|
||||
return sprintf(
|
||||
'<a href="%s" class="icon-%s">%s</a>',
|
||||
$child->getUrl() ?: '#',
|
||||
$child->getIcon(),
|
||||
htmlspecialchars($child->getTitle())
|
||||
);
|
||||
}
|
||||
return sprintf(
|
||||
'<a href="%s">%s%s</a>',
|
||||
$child->getUrl() ?: '#',
|
||||
|
@ -75,35 +75,28 @@ class Notification
|
||||
return;
|
||||
}
|
||||
|
||||
$mo = (object) array(
|
||||
$messages = & Session::getSession()->getByRef('messages');
|
||||
$messages[] = (object) array(
|
||||
'type' => $type,
|
||||
'message' => $message,
|
||||
);
|
||||
|
||||
// Get, change, set - just to be on the safe side:
|
||||
$session = Session::getSession();
|
||||
$msgs = $session->messages;
|
||||
$msgs[] = $mo;
|
||||
$session->messages = $msgs;
|
||||
$session->write();
|
||||
}
|
||||
|
||||
public function hasMessages()
|
||||
{
|
||||
$session = Session::getSession();
|
||||
return !empty($session->messages);
|
||||
return false === empty($session->messages);
|
||||
}
|
||||
|
||||
public function getMessages()
|
||||
{
|
||||
$session = Session::getSession();
|
||||
$msgs = $session->messages;
|
||||
if (false === empty($msgs)) {
|
||||
$messages = $session->messages;
|
||||
if (false === empty($messages)) {
|
||||
$session->messages = array();
|
||||
$session->write();
|
||||
}
|
||||
|
||||
return $msgs;
|
||||
return $messages;
|
||||
}
|
||||
|
||||
final private function __construct()
|
||||
|
@ -21,6 +21,12 @@ class Response extends Zend_Controller_Response_Http
|
||||
} else {
|
||||
$this->setRedirect($url->getAbsoluteUrl());
|
||||
}
|
||||
|
||||
$session = Session::getSession();
|
||||
if ($session->hasChanged()) {
|
||||
$session->write();
|
||||
}
|
||||
|
||||
$this->sendHeaders();
|
||||
exit;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class PhpSession extends Session
|
||||
|
||||
foreach ($_SESSION as $key => $value) {
|
||||
if (strpos($key, self::NAMESPACE_PREFIX) === 0) {
|
||||
$namespace = new SessionNamespace($this);
|
||||
$namespace = new SessionNamespace();
|
||||
$namespace->setAll($value);
|
||||
$this->namespaces[substr($key, strlen(self::NAMESPACE_PREFIX))] = $namespace;
|
||||
} else {
|
||||
|
@ -75,7 +75,7 @@ abstract class Session extends SessionNamespace
|
||||
unset($this->removedNamespaces[array_search($identifier, $this->removedNamespaces)]);
|
||||
}
|
||||
|
||||
$this->namespaces[$identifier] = new SessionNamespace($this);
|
||||
$this->namespaces[$identifier] = new SessionNamespace();
|
||||
}
|
||||
|
||||
return $this->namespaces[$identifier];
|
||||
@ -104,13 +104,22 @@ abstract class Session extends SessionNamespace
|
||||
$this->removedNamespaces[] = $identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the session has changed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasChanged()
|
||||
{
|
||||
return parent::hasChanged() || false === empty($this->namespaces) || false === empty($this->removedNamespaces);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all values and namespaces from the session cache
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->values = array();
|
||||
$this->removed = array();
|
||||
parent::clear();
|
||||
$this->namespaces = array();
|
||||
$this->removedNamespaces = array();
|
||||
}
|
||||
|
@ -14,13 +14,6 @@ use IteratorAggregate;
|
||||
*/
|
||||
class SessionNamespace implements IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* The session this namespace is associated to
|
||||
*
|
||||
* @var Session
|
||||
*/
|
||||
protected $session;
|
||||
|
||||
/**
|
||||
* The actual values stored in this container
|
||||
*
|
||||
@ -35,16 +28,6 @@ class SessionNamespace implements IteratorAggregate
|
||||
*/
|
||||
protected $removed = array();
|
||||
|
||||
/**
|
||||
* Create a new session namespace
|
||||
*
|
||||
* @param Session $session The session this namespace is associated to
|
||||
*/
|
||||
public function __construct(Session $session = null)
|
||||
{
|
||||
$this->session = $session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an iterator for all values in this namespace
|
||||
*
|
||||
@ -120,7 +103,18 @@ class SessionNamespace implements IteratorAggregate
|
||||
$this->values[$key] = $value;
|
||||
|
||||
if (in_array($key, $this->removed)) {
|
||||
unset($this->removed[array_search($key, $this->values)]);
|
||||
unset($this->removed[array_search($key, $this->removed)]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setByRef($key, &$value)
|
||||
{
|
||||
$this->values[$key] = & $value;
|
||||
|
||||
if (in_array($key, $this->removed)) {
|
||||
unset($this->removed[array_search($key, $this->removed)]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@ -139,6 +133,16 @@ class SessionNamespace implements IteratorAggregate
|
||||
return isset($this->values[$key]) ? $this->values[$key] : $default;
|
||||
}
|
||||
|
||||
public function & getByRef($key, $default = null)
|
||||
{
|
||||
$value = $default;
|
||||
if (isset($this->values[$key])) {
|
||||
$value = & $this->values[$key];
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the given value from the session
|
||||
*
|
||||
@ -177,14 +181,21 @@ class SessionNamespace implements IteratorAggregate
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the session this namespace is associated to
|
||||
* Return whether the session namespace has been changed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function write()
|
||||
public function hasChanged()
|
||||
{
|
||||
if (!$this->session) {
|
||||
throw new IcingaException('Cannot save, session not set');
|
||||
}
|
||||
return false === empty($this->values) || false === empty($this->removed);
|
||||
}
|
||||
|
||||
$this->session->write();
|
||||
/**
|
||||
* Clear all values from the session namespace
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->values = array();
|
||||
$this->removed = array();
|
||||
}
|
||||
}
|
||||
|
@ -19,18 +19,21 @@ class StyleSheet
|
||||
'css/icinga/main-content.less',
|
||||
'css/icinga/tabs.less',
|
||||
'css/icinga/forms.less',
|
||||
'css/icinga/setup.less',
|
||||
'css/icinga/widgets.less',
|
||||
'css/icinga/pagination.less',
|
||||
'css/icinga/monitoring-colors.less',
|
||||
'css/icinga/selection-toolbar.less',
|
||||
'css/icinga/login.less',
|
||||
'../application/fonts/fontanello-ifont/css/ifont-embedded.css',
|
||||
'css/vendor/tipsy.css'
|
||||
);
|
||||
|
||||
public static function compileForPdf()
|
||||
{
|
||||
self::checkPhp();
|
||||
$less = new LessCompiler();
|
||||
$basedir = Icinga::app()->getBootstrapDirecory();
|
||||
$basedir = Icinga::app()->getBootstrapDirectory();
|
||||
foreach (self::$lessFiles as $file) {
|
||||
$less->addFile($basedir . '/' . $file);
|
||||
}
|
||||
@ -53,10 +56,19 @@ class StyleSheet
|
||||
);
|
||||
}
|
||||
|
||||
protected static function checkPhp()
|
||||
{
|
||||
// PHP had a rather conservative PCRE backtrack limit unless 5.3.7
|
||||
if (version_compare(PHP_VERSION, '5.3.7') <= 0) {
|
||||
ini_set('pcre.backtrack_limit', 1000000);
|
||||
}
|
||||
}
|
||||
|
||||
public static function send($minified = false)
|
||||
{
|
||||
self::checkPhp();
|
||||
$app = Icinga::app();
|
||||
$basedir = $app->getBootstrapDirecory();
|
||||
$basedir = $app->getBootstrapDirectory();
|
||||
foreach (self::$lessFiles as $file) {
|
||||
$lessFiles[] = $basedir . '/' . $file;
|
||||
}
|
||||
|
@ -51,19 +51,32 @@ $this->addHelperFunction('img', function ($url, array $properties = array()) use
|
||||
});
|
||||
|
||||
$this->addHelperFunction('icon', function ($img, $title = null, array $properties = array()) use ($view) {
|
||||
// TODO: join with classes passed in $properties?
|
||||
$attributes = array(
|
||||
'class' => 'icon',
|
||||
);
|
||||
if ($title !== null) {
|
||||
$attributes['alt'] = $title;
|
||||
$attributes['title'] = $title;
|
||||
}
|
||||
$isClass = strpos($img, '.') === false;
|
||||
$class = null;
|
||||
|
||||
return $view->img(
|
||||
'img/icons/' . $img,
|
||||
array_merge($attributes, $properties)
|
||||
);
|
||||
if ($isClass) {
|
||||
$class = 'icon-' . $img;
|
||||
} else {
|
||||
$class = 'icon';
|
||||
}
|
||||
if ($title !== null) {
|
||||
$properties['alt'] = $title;
|
||||
$properties['title'] = $title;
|
||||
}
|
||||
|
||||
if ($class !== null) {
|
||||
if (isset($props['class'])) {
|
||||
$properties['class'] .= ' ' . $class;
|
||||
} else {
|
||||
$properties['class'] = $class;
|
||||
}
|
||||
}
|
||||
if ($isClass) {
|
||||
return sprintf('<i %s ></i>', $view->propertiesToString($properties));
|
||||
|
||||
} else {
|
||||
return $view->img('img/icons/' . $img, $properties);
|
||||
}
|
||||
});
|
||||
|
||||
$this->addHelperFunction('propertiesToString', function ($properties) use ($view) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user