Skip to content

Commit

Permalink
Merge branch 'master' into feature/conditional-requirements-8508
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed Mar 9, 2015
2 parents d0a8dd8 + 8ef119d commit 4badbc6
Show file tree
Hide file tree
Showing 145 changed files with 1,943 additions and 1,080 deletions.
2 changes: 1 addition & 1 deletion .puppet/profiles/icingaweb2_dev/manifests/init.pp
Expand Up @@ -90,7 +90,7 @@
source => $name,
}

icingaweb2::config::general { [ 'config', 'resources' ]:
icingaweb2::config::general { [ 'config', 'resources', 'roles' ]:
source => $name,
replace => false,
}
Expand Down
3 changes: 3 additions & 0 deletions .puppet/profiles/icingaweb2_dev/templates/roles.ini.erb
@@ -0,0 +1,3 @@
[admins]
users = icingaadmin
permissions = *
5 changes: 3 additions & 2 deletions AUTHORS
@@ -1,5 +1,6 @@
Alexander Fuhr <alexander.fuhr@netways.de>
Alexander Klimov <alexander.klimov@netways.de>
ayoubabid <ayoubabid@users.noreply.github.com>
baufrecht <baufrecht@users.noreply.github.com>
Bernd Erk <bernd.erk@icinga.org>
Boden Garman <boden.garman@spintel.net.au>
Expand All @@ -11,8 +12,9 @@ Goran Rakic <grakic@devbase.net>
Gunnar Beutner <gunnar.beutner@netways.de>
Jannis Moßhammer <jannis.mosshammer@netways.de>
Johannes Meyer <johannes.meyer@netways.de>
Marius Hein <marius.hein@netways.de>
Louis Sautier <sautier.louis@gmail.com>
Marcus Cobden <marcus@marcuscobden.co.uk>
Marius Hein <marius.hein@netways.de>
Markus Frosch <markus@lazyfrosch.de>
Matthias Jentsch <matthias.jentsch@netways.de>
Michael Friedrich <michael.friedrich@netways.de>
Expand All @@ -22,4 +24,3 @@ Sylph Lin <sylph.lin@gmail.com>
Thomas Gelf <thomas.gelf@netways.de>
Tom Ford <exptom@users.noreply.github.com>
Ulf Lange <mopp@gmx.net>
ayoubabid <ayoubabid@users.noreply.github.com>
36 changes: 24 additions & 12 deletions application/controllers/ConfigController.php
Expand Up @@ -121,7 +121,8 @@ public function modulesAction()
// @TODO(el): This seems not natural to me. Module configuration should have its own controller.
$this->view->tabs = Widget::create('tabs')
->add('modules', array(
'title' => $this->translate('Modules'),
'label' => $this->translate('Modules'),
'title' => $this->translate('List intalled modules'),
'url' => 'config/modules'
))
->activate('modules');
Expand All @@ -134,22 +135,23 @@ public function modulesAction()

public function moduleAction()
{
$name = $this->getParam('name');
$app = Icinga::app();
$manager = $app->getModuleManager();
$name = $this->getParam('name');
if ($manager->hasInstalled($name)) {
$this->view->moduleData = Icinga::app()
->getModuleManager()
->select()
->from('modules')
->where('name', $name)
->fetchRow();
$module = new Module($app, $name, $manager->getModuleDir($name));
$this->view->moduleData = $manager->select()->from('modules')->where('name', $name)->fetchRow();
if ($manager->hasLoaded($name)) {
$module = $manager->getModule($name);
} else {
$module = new Module($app, $name, $manager->getModuleDir($name));
}

$this->view->module = $module;
$this->view->tabs = $module->getConfigTabs()->activate('info');
} else {
$this->view->module = false;
$this->view->tabs = null;
}
$this->view->tabs = $module->getConfigTabs()->activate('info');
}

/**
Expand All @@ -162,7 +164,6 @@ public function moduleenableAction()
$manager = Icinga::app()->getModuleManager();
try {
$manager->enableModule($module);
$manager->loadModule($module);
Notification::success(sprintf($this->translate('Module "%s" enabled'), $module));
$this->rerenderLayout()->reloadCss()->redirectNow('config/modules');
} catch (Exception $e) {
Expand Down Expand Up @@ -215,6 +216,11 @@ public function createauthenticationbackendAction()
{
$this->assertPermission('system/config/authentication');
$form = new AuthenticationBackendConfigForm();
$form->setTitle($this->translate('Create New Authentication Backend'));
$form->addDescription($this->translate(
'Create a new backend for authenticating your users. This backend'
. ' will be added at the end of your authentication order.'
));
$form->setIniConfig(Config::app('authentication'));
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
$form->setRedirectUrl('config/authentication');
Expand All @@ -232,6 +238,7 @@ public function editauthenticationbackendAction()
{
$this->assertPermission('system/config/authentication');
$form = new AuthenticationBackendConfigForm();
$form->setTitle($this->translate('Edit Backend'));
$form->setIniConfig(Config::app('authentication'));
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
$form->setRedirectUrl('config/authentication');
Expand Down Expand Up @@ -271,6 +278,7 @@ public function removeauthenticationbackendAction()
}
}
));
$form->setTitle($this->translate('Remove Backend'));
$form->setRedirectUrl('config/authentication');
$form->handleRequest();

Expand All @@ -296,6 +304,8 @@ public function createresourceAction()
{
$this->assertPermission('system/config/resources');
$form = new ResourceConfigForm();
$form->setTitle($this->translate('Create A New Resource'));
$form->addDescription($this->translate('Resources are entities that provide data to Icinga Web 2.'));
$form->setIniConfig(Config::app('resources'));
$form->setRedirectUrl('config/resource');
$form->handleRequest();
Expand All @@ -311,6 +321,7 @@ public function editresourceAction()
{
$this->assertPermission('system/config/resources');
$form = new ResourceConfigForm();
$form->setTitle($this->translate('Edit Existing Resource'));
$form->setIniConfig(Config::app('resources'));
$form->setRedirectUrl('config/resource');
$form->handleRequest();
Expand Down Expand Up @@ -345,6 +356,7 @@ public function removeresourceAction()
}
}
));
$form->setTitle($this->translate('Remove Existing Resource'));
$form->setRedirectUrl('config/resource');
$form->handleRequest();

Expand All @@ -353,7 +365,7 @@ public function removeresourceAction()
$authConfig = Config::app('authentication');
foreach ($authConfig as $backendName => $config) {
if ($config->get('resource') === $resource) {
$form->addError(sprintf(
$form->addDescription(sprintf(
$this->translate(
'The resource "%s" is currently in use by the authentication backend "%s". ' .
'Removing the resource can result in noone being able to log in any longer.'
Expand Down
9 changes: 7 additions & 2 deletions application/controllers/DashboardController.php
Expand Up @@ -66,6 +66,7 @@ public function newDashletAction()
Notification::success(t('Dashlet created'));
return true;
});
$form->setTitle($this->translate('Add Dashlet To Dashboard'));
$form->setRedirectUrl('dashboard');
$form->handleRequest();
$this->view->form = $form;
Expand Down Expand Up @@ -128,6 +129,7 @@ public function updateDashletAction()
Notification::success(t('Dashlet updated'));
return true;
});
$form->setTitle($this->translate('Edit Dashlet'));
$form->setRedirectUrl('dashboard/settings');
$form->handleRequest();
$pane = $dashboard->getPane($this->getParam('pane'));
Expand Down Expand Up @@ -176,6 +178,7 @@ public function removeDashletAction()
}
return false;
});
$form->setTitle($this->translate('Remove Dashlet From Dashboard'));
$form->setRedirectUrl('dashboard/settings');
$form->handleRequest();
$this->view->pane = $pane;
Expand Down Expand Up @@ -215,6 +218,7 @@ public function removePaneAction()
}
return false;
});
$form->setTitle($this->translate('Remove Dashboard'));
$form->setRedirectUrl('dashboard/settings');
$form->handleRequest();
$this->view->pane = $pane;
Expand Down Expand Up @@ -249,8 +253,9 @@ public function indexAction()
$this->view->tabs->add(
'Add',
array(
'title' => '+',
'url' => Url::fromPath('dashboard/new-dashlet')
'label' => '+',
'title' => 'Add a dashlet to an existing or new dashboard',
'url' => Url::fromPath('dashboard/new-dashlet')
)
);
$this->view->dashboard = $this->dashboard;
Expand Down
5 changes: 3 additions & 2 deletions application/controllers/RolesController.php
Expand Up @@ -86,6 +86,7 @@ public function newAction()
}
));
$role
->setTitle($this->translate('New Role'))
->setSubmitLabel($this->translate('Create Role'))
->setIniConfig(Config::app('roles', true))
->setRedirectUrl('roles')
Expand All @@ -108,6 +109,7 @@ public function updateAction()
);
}
$role = new RoleForm();
$role->setTitle(sprintf($this->translate('Update Role %s'), $name));
$role->setSubmitLabel($this->translate('Update Role'));
try {
$role
Expand Down Expand Up @@ -138,7 +140,6 @@ public function updateAction()
})
->setRedirectUrl('roles')
->handleRequest();
$this->view->name = $name;
$this->view->form = $role;
}

Expand Down Expand Up @@ -183,10 +184,10 @@ public function removeAction()
}
));
$confirmation
->setTitle(sprintf($this->translate('Remove Role %s'), $name))
->setSubmitLabel($this->translate('Remove Role'))
->setRedirectUrl('roles')
->handleRequest();
$this->view->name = $name;
$this->view->form = $confirmation;
}
}
9 changes: 9 additions & 0 deletions application/fonts/fontello-ifont/LICENSE.txt
Expand Up @@ -37,3 +37,12 @@ Font license info
Homepage: http://www.entypo.com


## Fontelico

Copyright (C) 2012 by Fontello project

Author: Crowdsourced, for Fontello project
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://fontello.com


6 changes: 6 additions & 0 deletions application/fonts/fontello-ifont/config.json
Expand Up @@ -6,6 +6,12 @@
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "9bc2902722abb366a213a052ade360bc",
"css": "spin6",
"code": 59508,
"src": "fontelico"
},
{
"uid": "9dd9e835aebe1060ba7190ad2b2ed951",
"css": "search",
Expand Down
3 changes: 2 additions & 1 deletion application/fonts/fontello-ifont/css/ifont-codes.css
Expand Up @@ -114,4 +114,5 @@
.icon-chart-area:before { content: '\e870'; } /* '' */
.icon-chart-bar:before { content: '\e871'; } /* '' */
.icon-beaker:before { content: '\e872'; } /* '' */
.icon-magic:before { content: '\e873'; } /* '' */
.icon-magic:before { content: '\e873'; } /* '' */
.icon-spin6:before { content: '\e874'; } /* '' */
13 changes: 7 additions & 6 deletions application/fonts/fontello-ifont/css/ifont-embedded.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion application/fonts/fontello-ifont/css/ifont-ie7-codes.css
Expand Up @@ -114,4 +114,5 @@
.icon-chart-area { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe870;&nbsp;'); }
.icon-chart-bar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe871;&nbsp;'); }
.icon-beaker { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe872;&nbsp;'); }
.icon-magic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe873;&nbsp;'); }
.icon-magic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe873;&nbsp;'); }
.icon-spin6 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe874;&nbsp;'); }
3 changes: 2 additions & 1 deletion application/fonts/fontello-ifont/css/ifont-ie7.css
Expand Up @@ -125,4 +125,5 @@
.icon-chart-area { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe870;&nbsp;'); }
.icon-chart-bar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe871;&nbsp;'); }
.icon-beaker { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe872;&nbsp;'); }
.icon-magic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe873;&nbsp;'); }
.icon-magic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe873;&nbsp;'); }
.icon-spin6 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe874;&nbsp;'); }
15 changes: 8 additions & 7 deletions application/fonts/fontello-ifont/css/ifont.css
@@ -1,10 +1,10 @@
@font-face {
font-family: 'ifont';
src: url('../font/ifont.eot?81587324');
src: url('../font/ifont.eot?81587324#iefix') format('embedded-opentype'),
url('../font/ifont.woff?81587324') format('woff'),
url('../font/ifont.ttf?81587324') format('truetype'),
url('../font/ifont.svg?81587324#ifont') format('svg');
src: url('../font/ifont.eot?6491776');
src: url('../font/ifont.eot?6491776#iefix') format('embedded-opentype'),
url('../font/ifont.woff?6491776') format('woff'),
url('../font/ifont.ttf?6491776') format('truetype'),
url('../font/ifont.svg?6491776#ifont') format('svg');
font-weight: normal;
font-style: normal;
}
Expand All @@ -14,7 +14,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'ifont';
src: url('../font/ifont.svg?81587324#ifont') format('svg');
src: url('../font/ifont.svg?6491776#ifont') format('svg');
}
}
*/
Expand Down Expand Up @@ -165,4 +165,5 @@
.icon-chart-area:before { content: '\e870'; } /* '' */
.icon-chart-bar:before { content: '\e871'; } /* '' */
.icon-beaker:before { content: '\e872'; } /* '' */
.icon-magic:before { content: '\e873'; } /* '' */
.icon-magic:before { content: '\e873'; } /* '' */
.icon-spin6:before { content: '\e874'; } /* '' */
3 changes: 3 additions & 0 deletions application/fonts/fontello-ifont/demo.html
Expand Up @@ -428,6 +428,9 @@ <h1>
<div title="Code: 0xe872" class="the-icons span3"><i class="icon-beaker"></i> <span class="i-name">icon-beaker</span><span class="i-code">0xe872</span></div>
<div title="Code: 0xe873" class="the-icons span3"><i class="icon-magic"></i> <span class="i-name">icon-magic</span><span class="i-code">0xe873</span></div>
</div>
<div class="row">
<div title="Code: 0xe874" class="the-icons span3"><i class="icon-spin6 animate-spin"></i> <span class="i-name">icon-spin6</span><span class="i-code">0xe874</span></div>
</div>
</div>
<div class="container footer">Generated by <a href="http://fontello.com">fontello.com</a></div>
</body>
Expand Down
1 change: 1 addition & 0 deletions application/forms/Authentication/LoginForm.php
Expand Up @@ -16,6 +16,7 @@ class LoginForm extends Form
*/
public function init()
{
$this->setRequiredCue(null);
$this->setName('form_login');
$this->setSubmitLabel($this->translate('Login'));
}
Expand Down
Expand Up @@ -53,7 +53,7 @@ public function createElements(array $formData)
return @preg_match($value, '') !== false;
});
$callbackValidator->setMessage(
$this->translate('"%value%" is not a valid regular expression'),
$this->translate('"%value%" is not a valid regular expression.'),
Zend_Validate_Callback::INVALID_VALUE
);
$this->addElement(
Expand All @@ -62,9 +62,10 @@ public function createElements(array $formData)
array(
'label' => $this->translate('Filter Pattern'),
'description' => $this->translate(
'The regular expression to use to strip specific parts off from usernames.'
. ' Leave empty if you do not want to strip off anything'
'The filter to use to strip specific parts off from usernames.'
. ' Leave empty if you do not want to strip off anything.'
),
'requirement' => $this->translate('The filter pattern must be a valid regular expression.'),
'validators' => array($callbackValidator)
)
);
Expand Down
1 change: 1 addition & 0 deletions application/forms/Config/General/LoggingConfigForm.php
Expand Up @@ -66,6 +66,7 @@ public function createElements(array $formData)
'description' => $this->translate(
'The name of the application by which to prefix syslog messages.'
),
'requirement' => $this->translate('The application prefix must not contain whitespace.'),
'value' => 'icingaweb2',
'validators' => array(
array(
Expand Down
1 change: 1 addition & 0 deletions application/forms/Config/GeneralConfigForm.php
Expand Up @@ -20,6 +20,7 @@ public function init()
{
$this->setName('form_config_general');
$this->setSubmitLabel($this->translate('Save Changes'));
$this->setTitle($this->translate('General Configuration'));
}

/**
Expand Down

0 comments on commit 4badbc6

Please sign in to comment.