[-]
[+]
|
Changed |
icinga-web.changes
|
|
[-]
[+]
|
Changed |
icinga-web.spec
^
|
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/config/factories.xml.in
^
|
@@ -45,15 +45,7 @@
<ae:parameter name="session_name">icinga-web</ae:parameter>
<ae:parameter name="gzip_level">6</ae:parameter>
</storage>
-
- <!--
- <storage class="AppKitMemcacheSessionStorage">
- <ae:parameter name="session_cookie_lifetime">0</ae:parameter>
- <ae:parameter name="session_name">icinga-web</ae:parameter>
- <ae:parameter name="host">localhost</ae:parameter>
- <ae:parameter name="port">11211</ae:parameter>
- </storage>
- -->
+
<translation_manager class="AppKitTranslationManager" />
<user class="AppKitSecurityUser" />
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Api/config/views/host.xml
^
|
@@ -14,9 +14,6 @@
h.alias AS HOST_ALIAS,
h.display_name AS HOST_DISPLAY_NAME,
hs.current_state AS HOST_CURRENT_STATE,
- hs.last_hard_state AS HOST_HARD_STATE,
- hs.current_state
- AS host_status,
(CASE WHEN hs.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END) as DURATION_START,
hs.last_check AS HOST_LAST_CHECK,
hs.next_check AS HOST_NEXT_CHECK,
@@ -46,7 +43,7 @@
WHERE h.config_type = '${retained_flag}'
]]>
</query>
- <unique_field>h.host_object_id</unique_field>
+
<credential name="UserObjectId" type="UserObjectId">
<parameter name="target_fields">h.host_object_id</parameter>
<parameter name="aggregation">or</parameter>
@@ -78,12 +75,14 @@
<join>h.hostgroups hg</join>
<join>hg.object ohg</join>
<select>ohg.name1 AS hostgroup_name</select>
+ <groupby>h.host_object_id</groupby>
</filter>
<filter name="hostgroup_object_id" type="dql">
<join>h.hostgroups hg</join>
<join>hg.object ohg</join>
<select>ohg.object_id AS hostgroup_object_id</select>
+ <groupby>h.host_object_id</groupby>
</filter>
<filter name="servicegroup_name" type="dql">
@@ -91,6 +90,7 @@
<join>s.servicegroups sg</join>
<join>sg.object osg</join>
<select>osg.name1 AS servicegroup_name</select>
+ <groupby>h.host_object_id</groupby>
</filter>
<filter name="servicegroup_object_id" type="dql">
@@ -98,6 +98,7 @@
<join>s.servicegroups sg</join>
<join>sg.object osg</join>
<select>osg.object_id AS servicegroup_object_id</select>
+ <groupby>h.host_object_id</groupby>
</filter>
@@ -118,7 +119,6 @@
h.alias AS HOST_ALIAS,
h.display_name AS HOST_DISPLAY_NAME,
hs.current_state AS HOST_CURRENT_STATE,
- hs.last_hard_state AS HOST_HARD_STATE,
hs.process_performance_data AS HOST_PROCESS_PERFORMANCE_DATA,
(CASE WHEN hs.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END) as DURATION_START,
hs.last_check AS HOST_LAST_CHECK,
@@ -175,7 +175,6 @@
hs.next_check AS HOST_NEXT_CHECK,
ss.next_check AS SERVICE_NEXT_CHECK
hs.last_check AS HOST_LAST_CHECK,
- hs.last_hard_state AS HOST_HARD_STATE,
ss.last_check AS SERVICE_LAST_CHECK
h.action_url AS HOST_ACTION_URL,
h.notes_url AS HOST_NOTES_URL,
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Api/config/views/service.xml
^
|
@@ -18,8 +18,6 @@
s.display_name AS SERVICE_DISPLAY_NAME,
ss.process_performance_data AS SERVICE_PROCESS_PERFORMANCE_DATA,
ss.current_state AS SERVICE_CURRENT_STATE,
- ss.last_hard_state AS SERVICE_HARD_STATE,
- hs.last_hard_state AS HOST_HARD_STATE,
hs.current_state AS HOST_CURRENT_STATE,
(CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
ps.program_start_time AS SERVICE_PROGRAM_START_TIME,
@@ -37,7 +35,7 @@
s.action_url AS SERVICE_ACTION_URL,
h.notes as HOST_NOTES,
h.notes_url AS HOST_NOTES_URL,
- s.notes as SERVICE_NOTES,
+ s.notes as SERVICE_NOTES
s.notes_url AS SERVICE_NOTES_URL,
ss.has_been_checked as service_has_been_checked
FROM IcingaServices s
@@ -84,26 +82,17 @@
<innerjoin>h.hostgroups hg</innerjoin>
<innerjoin>hg.object ohg</innerjoin>
<select>ohg.name1 AS hostgroup_name</select>
- </filter>
-
- <filter name="hostgroup_object_id" type="dql">
- <join>h.hostgroups hg</join>
- <join>hg.object ohg</join>
- <select>ohg.object_id AS hostgroup_object_id</select>
+ <groupby>s.service_object_id</groupby>
</filter>
<filter name="servicegroup_name" type="dql">
<innerjoin>s.servicegroups sg</innerjoin>
<innerjoin>sg.object osg</innerjoin>
<select>osg.name1 AS servicegroup_name</select>
+ <groupby>s.service_object_id</groupby>
+
</filter>
-
- <filter name="servicegroup_object_id" type="dql">
- <innerjoin>s.servicegroups sg</innerjoin>
- <innerjoin>sg.object osg</innerjoin>
- <select>osg.object_id AS servicegroup_object_id</select>
- </filter>
-
+
<filter name="service_is_pending" type="dql">
<resolve>((ss.has_been_checked-1)*-1)</resolve>
<select>(ss.has_been_checked-1)*-1 AS service_is_pending</select>
@@ -125,7 +114,6 @@
os.name2 AS SERVICE_NAME,
s.display_name AS SERVICE_DISPLAY_NAME,
ss.current_state AS SERVICE_CURRENT_STATE,
- ss.last_hard_state AS SERVICE_HARD_STATE,
(CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
ss.process_performance_data AS SERVICE_PROCESS_PERFORMANCE_DATA,
ss.last_check AS SERVICE_LAST_CHECK,
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Api/models/Filter/UserObjectIdModel.class.php
^
|
@@ -93,7 +93,7 @@
public function postQuery(Doctrine_Query_Abstract $query) {
if ($this->canApply() === true) {
if(count($this->getObjectIds()) < 1) {
- $query->andWhere("1 = 2");
+ $query->andWhere("1 = 2");
AppKitLogger::verbose("Query is now : %s ",$query->getSqlQuery());
} else {
$binds = $this->getObjectIds();
@@ -154,8 +154,7 @@
*/
public function canApply() {
AppKitLogger::verbose("Testing canApply: for %s objects and %s countfields",$this->getObjectIds(),$this->countFields());
-
- if ($this->countFields() > 0 && !in_array("-1",$this->getObjectIds())) {
+ if ($this->countFields() > 0 && $this->getObjectIds() !== array("-1")) {
AppKitLogger::verbose("Extender can be applied on this query");
return true;
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/actions/Widgets/SquishLoaderAction.class.php
^
|
@@ -29,30 +29,20 @@
}
public function executeRead(AgaviRequestDataHolder $rd) {
- $headers = $rd->getHeaders();
- $route = $this->getContext()->getRequest()->getAttribute(
- 'matched_routes', 'org.agavi.routing'
- );
-
- $route = $route[count($route)-1];
- $type = explode(".",$route);
- $type = $type[count($type)-1];
+ $ra = explode('.', array_pop(
+ $this->getContext()->getRequest()->getAttribute(
+ 'matched_routes', 'org.agavi.routing'
+ )
+ ));
+
+ $type = array_pop($ra);
+
$loader = $this->getContext()->getModel(
'SquishFileContainer',
'AppKit',
- array(
- 'type' => $type,
- 'route' => $route
- )
+ array('type' => $type)
);
- if (isset($headers['IF_NONE_MATCH'])) {
- $etag = str_replace('"',"",$headers['IF_NONE_MATCH']);
- if($loader->hasEtagInCache($etag)) {
- header("HTTP/1.1 304 NOT MODIFIED");
- die();
- }
- }
$resources = $this->getContext()->getModel('Resources', 'AppKit');
switch ($type) {
@@ -82,11 +72,21 @@
break;
}
+ $headers = $rd->getHeaders();
+ $etag = rand();
+
+ if (isset($headers['IF_NONE_MATCH'])) {
+ $etag = str_replace('"',"",$headers['IF_NONE_MATCH']);
+ }
+
+ if (!$loader->squishContents($etag)) {
+ $content = $loader->getContent();
+ $this->setAttribute('content', $content. chr(10));
+ } else {
+ $this->setAttribute('existsOnClient',true);
+ }
- $loader->squishContents();
- $content = $loader->getContent();
- $this->setAttribute('content', $content. chr(10));
- $this->setAttribute("etag",$loader->getCachedChecksum());
+ $this->setAttribute('etag',$loader->getChecksum());
return $this->getDefaultViewName();
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/config/autoload.xml
^
|
@@ -41,7 +41,6 @@
<autoload name="AppKitDoctrineLoggerAppender">%core.module_dir%/AppKit/lib/logging/AppKitDoctrineLoggerAppender.class.php</autoload>
<autoload name="AppKitApacheLoggerFormat">%core.module_dir%/AppKit/lib/logging/AppKitApacheLoggerFormat.class.php</autoload>
<autoload name="AppKitExceptionHandler">%core.module_dir%/AppKit/lib/logging/AppKitExceptionHandler.class.php</autoload>
- <autoload name="AppKitMemcacheSessionStorage">%core.module_dir%/AppKit/lib/storage/AppKitMemcacheSessionStorage.class.php</autoload>
<autoload name="AppKitDoctrineSessionStorage">%core.module_dir%/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php</autoload>
<autoload name="AppKitGettextTranslator">%core.module_dir%/AppKit/lib/translator/AppKitGettextTranslator.class.php</autoload>
<autoload name="AppKitTranslationManager">%core.module_dir%/AppKit/lib/translator/AppKitTranslationManager.class.php</autoload>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/lib/auth/AppKitSecurityUser.class.php
^
|
@@ -179,9 +179,6 @@
$this->clearCredentials();
$this->setAuthenticated(false);
- // destroy the session with all settings
- session_destroy();
-
$this->getContext()->getLoggerManager()
->log(sprintf('User %s (%s) logged out!', $this->getAttribute('userobj')->user_name, $this->getAttribute('userobj')->givenName()), AgaviLogger::INFO);
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/lib/database/models/NsmUser.php
^
|
@@ -36,7 +36,7 @@
* @var array
*/
private static $targetValuesCache = array();
- private static $cachedPreferences = array();
+
/**
* @var Doctrine_Collection
*/
@@ -192,10 +192,7 @@
* @author Marius Hein
*/
public function setPref($key, $val, $overwrite = true, $blob = false) {
- $field = "upref_val";
- if ($blob == true) {
- $field = "upref_longval";
- }
+
try {
$pref = $this->getPrefObject($key);
@@ -204,26 +201,27 @@
return false;
}
- Doctrine_Query::create($this->getContext()->getDatabaseConnection("icinga_web"))
- ->update("NsmUserPreference p")->set($field,"?",$val)
- ->where("p.upref_user_id=? and p.upref_key=?",array($this->user_id,$key))
- ->execute();
- if(is_array($pref))
- $pref[$field] = $val;
+ if ($blob == true) {
+ $pref->upref_longval = $val;
+ } else {
+ $pref->upref_val = $val;
+ }
+ $pref->save();
} catch (AppKitDoctrineException $e) {
$pref = new NsmUserPreference();
-
$pref->upref_key = $key;
- $pref->$field = $val;
+
+ if ($blob == true) {
+ $pref->upref_longval = $val;
+ } else {
+ $pref->upref_val = $val;
+ }
+
$pref->NsmUser = $this;
$pref->save();
-
- AppKitLogger::warn("New: Setting %s => %s", $key,$pref->toArray(false) );
}
- NsmUser::$cachedPreferences[$key] = $val;
- // disabled storing cached prefs into session -mfrosch
- //$this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
+
return true;
}
@@ -234,14 +232,20 @@
* @throws AppKitDoctrineException
* @author Marius Hein
*/
- public function getPrefObject($key,$graceful = true) {
- $res = $this->getPreferences();
- if(isset($res[$key]))
- return $res[$key];
- else if($graceful) {
- self::$cachedPreferences = array();
- return $this->getPrefObject($key,false);
+ public function getPrefObject($key) {
+ $res = AppKitDoctrineUtil::createQuery()
+ ->from('NsmUserPreference p')
+ ->where('p.upref_user_id=? and p.upref_key=?', array($this->user_id, $key))
+ ->limit(1)
+ ->execute();
+
+ if ($res->count() == 1 && ($obj = $res->getFirst()) instanceof NsmUserPreference) {
+
+ //var_dump($res->toArray(true));
+
+ return $obj;
}
+
throw new AppKitDoctrineException('Preference record not found!');
}
@@ -253,10 +257,14 @@
* @author Marius Hein
*/
public function getPrefVal($key, $default=null, $blob = false) {
-
try {
- $val = $this->getPrefObject($key,$noThrow = false);
- return $val;
+ $obj = $this->getPrefObject($key,$noThrow = false);
+
+ if ($obj->upref_longval || $blob) {
+ return $obj->upref_longval;
+ } else {
+ return $obj->upref_val;
+ }
} catch (AppKitDoctrineException $e) {
return $default;
}
@@ -311,8 +319,6 @@
->where('p.upref_id=? and p.upref_user_id=? and p.upref_key=?', array($upref_id,$this->user_id, $key))
//->limit(1) -> not supported by postgresql
->execute();
- self::$cachedPreferences = array();
- $this->getStorage()->remove("appkit.nsm_user.preferences");
if ($test) {
return true;
@@ -321,15 +327,7 @@
}
}
- public function getPreferences($shortenBlob = false) {
- if(!empty(self::$cachedPreferences)) {
- return self::$cachedPreferences;
- }
- // disabled storing cached prefs into session -mfrosch
- //self::$cachedPreferences = $this->getStorage()->read("appkit.nsm_user.preferences");
- if(!empty(self::$cachedPreferences)) {
- return self::$cachedPreferences;
- }
+ public function getPreferences() {
$res = AppKitDoctrineUtil::createQuery()
->select('p.upref_val, p.upref_key, p.upref_longval')
->from('NsmUserPreference p INDEXBY p.upref_key')
@@ -337,22 +335,31 @@
->execute(array(), Doctrine::HYDRATE_ARRAY);
$out = array();
- foreach($res as $key=>$d)
- $out[$key] = $d['upref_longval'] ? $d['upref_longval'] : $d['upref_val'];
- if($shortenBlob && $d['upref_longval'])
- $out[$key] = "BLOB";
+ foreach($res as $key=>$d) $out[$key] = $d['upref_longval'] ? 'BLOB' : $d['upref_val'];
+
// Adding defaults
foreach(AgaviConfig::get('modules.appkit.user_preferences_default', array()) as $k=>$v) {
if (!array_key_exists($k, $out)) {
$out[$k] = $v;
}
}
- self::$cachedPreferences = $out;
- // disabled storing cached prefs into session -mfrosch
- //$this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
+
return $out;
}
+ public function getPreferencesList(array $list=array()) {
+ $res = AppKitDoctrineUtil::createQuery()
+ ->select('p.upref_val, p.upref_key')
+ ->from('NsmUserPreference p INDEXBY p.upref_key')
+ ->where('p.upref_user_id=?', array($this->user_id))
+ ->andWhereIn('p.upref_key', $list)
+ ->execute(array(), Doctrine::HYDRATE_ARRAY);
+
+ $out = array();
+ foreach($res as $key=>$d) $out[$key] = $d['upref_val'];
+
+ return $out;
+ }
/**
* Returns the status of the corresponding principal
@@ -435,10 +442,6 @@
* @return Doctrine_Collection
*/
public function getPrincipals($userOnly= false) {
- /* removed caching for principals due to problems on deletion -mfrosch
- if ($this->principals === null)
- $this->principals = $this->getStorage()->read("appkit.nsm_user.principals");
- */
if ($this->principals === null) {
$roles = $this->getRoleIds();
@@ -449,9 +452,7 @@
->orWhere('p.principal_user_id = ?',$this->user_id)
->execute();
- /* removed caching for principals due to problems on deletion -mfrosch
- $this->getStorage()->write("appkit.nsm_user.principals",$this->principals);
- */
+
}
return $this->principals;
@@ -460,9 +461,8 @@
public function getPrincipalsArray() {
static $out = array();
- if (empty($out)) {
- $principals = $this->getPrincipals();
- foreach($principals as $p) {
+ if (count($out) == 0) {
+ foreach($this->getPrincipals() as $p) {
$out[] = $p->principal_id;
}
}
@@ -476,10 +476,8 @@
* @return Doctrine_Collection
*/
public function getTargets($type=null,$userOnly = false) {
- $principals = $userOnly ? $this->getUserPrincipalsList() : $this->getPrincipalsList();
- if(empty($principals))
- return array();
- return $this->getTargetsQuery($type,$userOnly,$principals)->execute();
+
+ return $this->getTargetsQuery($type,$userOnly)->execute();
}
/**
@@ -488,10 +486,8 @@
* @param string $type
* @return Doctrine_Query
*/
- protected function getTargetsQuery($type=null,$userOnly = false,$principals = null) {
- if($principals == null)
- $principals = $userOnly ? $this->getUserPrincipalsList() : $this->getPrincipalsList();
-
+ protected function getTargetsQuery($type=null,$userOnly = false) {
+ $principals = $userOnly ? $this->getUserPrincipalsList() : $this->getPrincipalsList();
$q = AppKitDoctrineUtil::createQuery()
->select('t.*')
->distinct(true)
@@ -575,16 +571,11 @@
$out[] = $r->tv_val;
}
- return $out;
+ return $targets;
}
public function getTargetValuesArray() {
- /* removed caching for target values due to problems on deletion -mfrosch
- if (empty(self::$targetValuesCache)) {
- self::$targetValuesCache = $this->getStorage()->read("appkit.nsm_user.targetvalues");
- }
- if (empty(self::$targetValuesCache)) {
- */
+ if (count(self::$targetValuesCache) == 0) {
$tc = AppKitDoctrineUtil::createQuery()
->select('t.target_name, t.target_id')
->from('NsmTarget t')
@@ -614,12 +605,8 @@
}
}
- /* removed caching for target values due to problems on deletion -mfrosch
self::$targetValuesCache =& $out;
- $this->getStorage()->write("appkit.nsm_user.targetvalues",self::$targetValuesCache);
}
return self::$targetValuesCache;
- */
- return $out;
}
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/lib/database/models/generated/BaseNsmTarget.php
^
|
@@ -214,7 +214,7 @@
'target_id'=>19,
'target_name'=>"IcingaCommandRestrictions",
'target_description'=>"Disable critical commands for this user",
- 'target_class'=> "IcingaDataCommandRestrictionPrincipalTarget",
+ 'target_class'=> null,
'target_type'=>"icinga"),
array(
'target_id'=>20,
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/lib/database/models/generated/BaseNsmUserPreference.php
^
|
@@ -107,15 +107,6 @@
$this->index('upref_search_key_idx', array('fields' => array('upref_key')));
$this->index('principal_role_id_ix', array('fields' => array('upref_user_id')));
-
- $this->index('upref_user_key_unique_idx', array(
- 'fields' => array(
- 'upref_user_id',
- 'upref_key',
- ),
- 'type' => 'unique'
- ));
-
}
public function setUp() {
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php
^
|
@@ -21,48 +21,65 @@
// -----------------------------------------------------------------------------
// {{{ICINGA_LICENSE_CODE}}}
+
/**
- * @author Marius Hein <marius.hein@netways.de>
- * @author Eric Lippmann <eric.lippmann@netways.de>
+ Project wide exception and php error handler. This
+ handler logs also all errors into agavi logger
+ * @author mhein
+ *
*/
class AppKitExceptionHandler {
const LOG_LEVEL = AgaviLogger::FATAL;
+ private static $oldExceptionHandler = null;
+ private static $oldErrorHandler = null;
+ private static $handlerException = array('AppKitExceptionHandler', 'logException');
+ private static $handlerError = array('AppKitExceptionHandler', 'phpErrorException');
+
/**
- * Sets user-defined error and exception handler functions so that
- * errors and exceptions apper in the icinga-web logs.
+ * Prepare php to use something other that its internal stack
*/
public static function initializeHandler() {
- set_exception_handler(array('AppKitExceptionHandler', 'logException'));
- set_error_handler(array('AppKitExceptionHandler', 'exceptionOnError'));
+ self::$oldExceptionHandler = set_exception_handler(self::$handlerException);
+ self::$oldErrorHandler = set_error_handler(self::$handlerError);
+ ini_set('display_errors', false);
}
/**
- * Treats PHP's non-exception errors as exceptions.
+ * Converts php simple error into an exception
+ * @param integer $errno
+ * @param string $errstr
+ * @param string $errfile
+ * @param integer $errline
+ * @param array $errcontext
*/
- public static function exceptionOnError(
- $errno, $errstr, $errfile, $errline, array $errcontext = array()
- ) {
- // do nothing if the error is supressed
- if(error_reporting() == 0) {
- return false;
- }
- $message = sprintf('PHP Error %s (%s:%d)', $errstr, $errfile, $errline);
- self::logException(new AppKitPHPError($message, $errno));
+ public static function phpErrorException($errno, $errstr, $errfile, $errline, array $errcontext = array()) {
+ $string = sprintf('PHP Error %s (%s:%d)', $errstr, $errfile, $errline);
+ self::logException(new AppKitPHPError($string, $errno));
}
- /**
- * Logs exceptions to the icinga-web logs.
- */
public static function logException(Exception $e) {
- AppKitAgaviUtil::log(
- 'Uncaught %s: %s (%s:%d)', get_class($e), $e->getMessage(),
- $e->getFile(), $e->getLine(), self::LOG_LEVEL);
- // Rethrow exception, so Agavi can handle and render it.
- // See AgaviController#dispatch().
- throw $e;
+ AppKitAgaviUtil::log('Uncaught %s: %s (%s:%d)', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine(), self::LOG_LEVEL);
+
+ // don't die in case of supressed errors (like the ob_clean in the agaviException has)
+
+ if (error_reporting()) {
+ $context = AgaviContext::getInstance();
+
+ if ($context !== null && AgaviConfig::get('exception.templates.' . $context->getName()) !== null) {
+ include(AgaviConfig::get('exception.templates.' . $context->getName()));
+ } else {
+ include(AgaviConfig::get('exception.default_template'));
+ }
+
+ die();
+ } else {
+ return true;
+ }
}
+
+
}
class AppKitPHPError extends Exception {}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php
^
|
@@ -63,19 +63,16 @@
*/
public function sessionDestroy($id) {
- AppKitLogger::verbose("Destroying session (%s)", $id);
-
- // loading the session and clearing its data
- // please be aware, we are not really deleting the session
- // from the database, but emptying its data
- // this helps with proper session handling on logon
-
- $this->sessionRead($id);
+ $result = AppKitDoctrineUtil::createQuery()
+ ->delete('NsmSession')
+ ->andWhere('session_name=? and session_id=?', array($this->getParameter('session_name'), $id))
+ ->execute();
- $data = '';
- $this->sessionWrite($id, $data);
+ if ($result > 0) {
+ return true;
+ }
- return true;
+ return false;
}
@@ -138,10 +135,6 @@
$this->NsmSession->session_id = $id;
$this->NsmSession->session_name = $session_name;
- // Immediately saving it empty
- $data = '';
- $this->sessionWrite($id, $data);
-
return '';
} else {
AppKitLogger::verbose("Session found in database, reading data");
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/models/Auth/Provider/LDAPModel.class.php
^
|
@@ -43,21 +43,15 @@
try {
// Check if user always is available
- $search_record = $this->getLdaprecord($this->getSearchFilter($user->user_name));
+ $search_record = $this->getLdaprecord($this->getSearchFilter($user->user_name), $authid);
- $userattr = $this->getParameter('ldap_userattr', 'uid');
- if ($this->getParameter('auth_lowercase_username', false) == true) {
- $username = strtolower($username);
- $search_record[$userattr] = strtolower($search_record[$userattr]);
- }
- if (isset($search_record['dn']) && $search_record[$userattr] === $username) {
+ if (isset($search_record['dn']) && $search_record['dn'] === $authid) {
// Check bind
- $this->log('Auth.Provider.LDAP Trying bind with dn=%s', $search_record['dn'], AgaviLogger::DEBUG);
$conn = $this->getLdapConnection(false);
- $re = @ldap_bind($conn, $search_record['dn'], $password);
+ $re = @ldap_bind($conn, $authid, $password);
if ($this->isLdapError($conn)==false && $re === true && ldap_errno($conn) === 0) {
- $this->log('Auth.Provider.LDAP Successfull bind (dn=%s,user=%s)', $search_record['dn'], $username, AgaviLogger::DEBUG);
+ $this->log('Auth.Provider.LDAP Successfull bind (authkey=%s,user=%s)', $authid, $username, AgaviLogger::DEBUG);
return true;
}
}
@@ -75,25 +69,14 @@
* @see app/modules/AppKit/lib/auth/AppKitIAuthProvider#isAvailable()
*/
public function isAvailable($uid, $authid=null) {
- // checking if this user is inside LDAP
- $this->log('Availability lookup in LDAP for username=%s', $uid, AgaviLogger::DEBUG);
-
- // searching via user filter
- $record = $this->getLdaprecord($this->getSearchFilter($uid));
+ $record = $this->getLdaprecord('(objectClass=*)', $authid);
if (is_array($record)) {
- $userattr = $this->getParameter('ldap_userattr', 'uid');
- if ($this->getParameter('auth_lowercase_username', false) == true) {
- $uid = strtolower($uid);
- $record[$userattr] = strtolower($record[$userattr]);
- }
- if ($record[$userattr] === $uid) {
- $this->log("Availability lookup in LDAP for username=%s found dn: %s", $uid, $record['dn'], AgaviLogger::DEBUG);
+ if ($record['dn'] === $authid) {
return true;
}
}
- $this->log("Availability lookup in LDAP failed, username %s not found!", $uid, AgaviLogger::DEBUG);
return false;
}
@@ -109,7 +92,13 @@
$this->log('Auth.Provider.LDAP Try import (user=%s, authid=%s)', $uid, $authid, AgaviLogger::DEBUG);
- $data = $this->getLdaprecord($this->getSearchFilter($uid));
+ if ($authid == $uid || $authid==false) {
+ $data = $this->getLdaprecord($this->getSearchFilter($uid));
+ }
+
+ elseif(strlen($authid) > strlen($uid)) {
+ $data = $this->getLdaprecord('(objectClass=*)', $authid);
+ }
if (is_array($data)) {
$re = (array)$this->mapUserdata($data);
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/models/Credential/AggregatorModel.class.php
^
|
@@ -98,7 +98,7 @@
$count = $storage->read(self::SESSION_KEY_COUNT);
return ($dbrev && $count) ? true : false;
}
-
+
/**
* Writes our oids to session
*/
@@ -107,7 +107,8 @@
$dbrev = $this->getDatabaseRevision();
$count = $this->getCount();
- $oids = implode(",",array_keys($this->object_ids));
+ $oids = json_encode($this->object_ids);
+
$storage->write(self::SESSION_KEY_COUNT, $count);
$storage->write(self::SESSION_KEY_OID, $oids);
$storage->write(self::SESSION_KEY_REV, $dbrev);
@@ -117,13 +118,10 @@
* Reads oids from session and fill our object
*/
public function readCache() {
-
$storage = $this->getContext()->getStorage();
$oids = $storage->read(self::SESSION_KEY_OID);
- $this->object_ids = array_flip(explode(",",$oids));
- if(isset($this->object_ids["-1"])) {
- $this->object_ids = array("-1"=>"0");
- }
+ $this->object_ids = (array)json_decode($oids);
+
$username = $this->user->getNsmUser()->user_name;
AppKitLogger::verbose('Credentials (%s): Read cache, %d objects',
@@ -493,4 +491,4 @@
}
}
-}
+}
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/models/SquishFileContainerModel.class.php
^
|
@@ -29,7 +29,6 @@
private $files = array();
private $actions = array();
private $type = null;
- private $route = "";
private $content = null;
private $checksum = null;
private $maxCacheTime = 14400;
@@ -44,9 +43,7 @@
if (array_key_exists('type', $parameters)) {
$this->setType($parameters['type']);
}
- if (array_key_exists('route', $parameters)) {
- $this->route = $parameters['route'];
- }
+
parent::initialize($context, $parameters);
$cfg = AgaviConfig::get('modules.appkit.squishloader');
@@ -108,15 +105,15 @@
return $this->type;
}
- public function hasEtagInCache($squishEtag) {
- $sum = $this->getCachedChecksum();
-
- return $sum && ($sum == $squishEtag);
-
- }
-
- public function squishContents() {
+ public function squishContents($lastSquish = null) {
+ if ($lastSquish) {
+ $this->getCachedChecksum();
+ if ($lastSquish == $this->checksum) {
+ return true;
+ }
+ }
+
if ($this->useCaching) {
$this->readCached();
}
@@ -169,11 +166,11 @@
}
}
- return true;
+ return $lastSquish && $lastSquish == $this->checksum;
}
private function getCacheFilename() {
- $file = "squish_".md5($this->route);
+ $file = "squish_".md5(implode(";",$this->files));
$cached = $this->cache_dir.'/'.$file;
@@ -208,9 +205,7 @@
return null;
}
- public function getCachedChecksum() {
- if($this->checksum)
- return $this->checksum;
+ private function getCachedChecksum() {
$cached = $this->getCacheFilename().".sum";
if (is_readable($cached) && file_exists($cached)) {
@@ -219,7 +214,6 @@
}
$this->checksum = file_get_contents($cached);
- return $this->checksum;
}
return null;
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
^
|
@@ -28,20 +28,49 @@
if ($this->getAttribute('errors', false)) {
return "throw '". join(", ", $this->getAttribute('errors')). "';";
} else {
- // Only cache in browser, not in proxys
- header('Cache-Control: private', true);
- header('Pragma: no-cache', true);
-
- header('Expires: '.date("r",time()+60*60*24));
- header('ETag: "'. $this->getAttribute("etag",rand()). '"', true);
- header('Content-Type: text/javascript',true);
-
-
- $this->printJSConfig();
- echo $this->getAttribute('content');
-
-
- return "";
+
+ $content = '';
+ $this->copyConfigToJavascript($content);
+ $content .= $this->getAttribute('content');
+
+ $etag = $this->getAttribute("etag",rand());
+
+ $this->getResponse()->setHttpHeader('Cache-Control', 'private', true);
+ $this->getResponse()->setHttpHeader('Pragma', null, true);
+ $this->getResponse()->setHttpHeader('Expires', null, true);
+ $this->getResponse()->setHttpHeader('ETag', '"'. $etag. '"', true);
+
+ if ($this->getAttribute('existsOnClient',false)) {
+ $this->getResponse()->setHttpStatusCode("304");
+ return "";
+ }
+
+ $options = AgaviConfig::get('modules.appkit.squishloader', array());
+ $gz_level = isset($options['gzcompress_level']) ?
+ (integer)$options['gzcompress_level'] : 3;
+ $gz_use = isset($options['use_gzcompress']) ?
+ (boolean)$options['use_gzcompress'] : false;
+
+ if ($gz_use === true) {
+
+ $encoding = $rd->getHeader('ACCEPT_ENCODING', false);
+
+ if (strpos($encoding, 'gzip') !== false) {
+ $encoding = 'gzip';
+ } elseif(strpos($encoding, 'x-gzip') !== false) {
+ $encoding = 'x-gzip';
+ }
+
+ if ($encoding !== false) {
+ header('Content-Encoding: '. $encoding);
+ $l = strlen($content);
+ $content = gzcompress($content, 4);
+ $content = substr($content, 0, $l);
+ return "\x1f\x8b\x08\x00\x00\x00\x00\x00". $content;
+ }
+ }
+
+ return $content;
}
}
@@ -59,15 +88,15 @@
* Mapping configuration items from AgaviConfig to JS AppKit.util.Config
* @param string $content
*/
- private function printJSConfig() {
+ private function copyConfigToJavascript(&$content) {
$map = AgaviConfig::get('modules.appkit.js_config_mapping', array ());
if (count($map)) {
- echo 'var Icinga = { AppKit: { configMap: {} }};'. chr(10);
+ $out = 'var Icinga = { AppKit: { configMap: {} }};'. chr(10);
foreach ($map as $target=>$source) {
$val = AgaviConfig::get($source ? $source : $target, null);
- echo 'Icinga.AppKit.configMap['. json_encode($target). '] = '. json_encode($val). ';'. chr(10);
+ $out .= 'Icinga.AppKit.configMap['. json_encode($target). '] = '. json_encode($val). ';'. chr(10);
}
-
+ $content .= $out;
}
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/config/javascript.xml
^
|
@@ -17,7 +17,6 @@
<ae:parameter>%core.module_dir%/Cronks/lib/js//Ext/ux/form/MultiSelect.Override.js</ae:parameter>
<ae:parameter>%core.module_dir%/Cronks/lib/js/Ext/ux/Portlet.js</ae:parameter>
<ae:parameter>%core.module_dir%/Cronks/lib/js/Ext/ux/LazyStore.js</ae:parameter>
- <ae:parameter>%core.module_dir%/Cronks/lib/js/Ext/ux/FlashComponent.js</ae:parameter>
<!-- Misc libs -->
<ae:parameter>%core.module_dir%/Cronks/lib/js/rmd160.js</ae:parameter>
@@ -121,4 +120,4 @@
<ae:parameter>%core.module_dir%/Cronks/lib/js/Cronk/grid/MetaGridPanel.js</ae:parameter>
</javascript>
</ae:configuration>
-</ae:configurations>
+</ae:configurations>
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/config/routing.xml
^
|
@@ -64,7 +64,7 @@
<route name=".categories" pattern="^/categories" stop="false">
<route name=".categories" pattern="^$" action="Provider.Categories" />
- <route name=".principal" pattern="^/security/(catid:(.+))" action="Provider.CategorySecurity" />
+ <route name=".principal" pattern="^/security/(catid:([\w\d\_\-]+))" action="Provider.CategorySecurity" />
</route>
<route name=".cronks" pattern="^/$" action="Provider.Cronks" />
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
^
|
@@ -1032,6 +1032,7 @@
<parameter name="default">false</parameter>
</order>
</field>
+
<field name="host_last_check">
<datasource>
<parameter name="field">HOST_LAST_CHECK</parameter>
@@ -1254,7 +1255,7 @@
<parameter name="field">HOST_MAX_CHECK_ATTEMPT</parameter>
</datasource>
<display>
- <parameter name="visible">false</parameter>
+ <parameter name="visible">false"</parameter>
<parameter name="label">Max attempt</parameter>
</display>
@@ -1267,46 +1268,6 @@
<parameter name="default">false</parameter>
</order>
</field>
- <field name="host_hard_status">
- <datasource>
- <parameter name="field">HOST_HARD_STATE</parameter>
- </datasource>
-
- <display>
- <parameter name="visible">false</parameter>
- <parameter name="label">Hard state</parameter>
- <parameter name="width">100</parameter>
-
- <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
- <parameter name="Ext.grid.Column">
- <parameter name="fixed">true</parameter>
- </parameter>
-
- <parameter name="jsFunc">
- <parameter name="namespace">Cronk.grid.AdvancedHostStatusColumnRenderer</parameter>
- <parameter name="function">hostStatus</parameter>
-
- <!-- renderer/gridevent[cellclick|celldblclick|...] -->
- <parameter name="type">renderer</parameter>
- </parameter>
- </display>
-
- <filter>
- <parameter name="enabled">true</parameter>
-
- <!-- Filter configuration -->
- <parameter name="type">extjs</parameter>
- <parameter name="subtype">appkit.ext.filter.hoststatus</parameter>
-
- <parameter name="no_operator">false</parameter>
- </filter>
-
- <order>
- <parameter name="enabled">true</parameter>
- <parameter name="default">false</parameter>
- </order>
- </field>
-
</fields>
</template>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
^
|
@@ -1009,86 +1009,8 @@
<parameter name="default">false</parameter>
</order>
</field>
- <field name="service_hard_status">
- <datasource>
- <parameter name="field">SERVICE_HARD_STATE</parameter>
- </datasource>
-
- <display>
- <parameter name="visible">false</parameter>
- <parameter name="label">Hard service state</parameter>
- <parameter name="width">100</parameter>
-
- <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
- <parameter name="Ext.grid.Column">
- <parameter name="fixed">true</parameter>
- </parameter>
-
- <parameter name="jsFunc">
- <parameter name="namespace">Cronk.grid.ColumnRenderer</parameter>
- <parameter name="function">serviceStatus</parameter>
-
- <!-- renderer/gridevent[cellclick|celldblclick|...] -->
- <parameter name="type">renderer</parameter>
- </parameter>
- </display>
-
- <filter>
- <parameter name="enabled">true</parameter>
-
- <!-- Filter configuration -->
- <parameter name="type">extjs</parameter>
- <parameter name="subtype">appkit.ext.filter.servicestatus</parameter>
-
- <parameter name="no_operator">false</parameter>
- </filter>
-
- <order>
- <parameter name="enabled">true</parameter>
- <parameter name="default">false</parameter>
- </order>
- </field>
-
- <field name="host_hard_status">
- <datasource>
- <parameter name="field">HOST_HARD_STATE</parameter>
- </datasource>
-
- <display>
- <parameter name="visible">false</parameter>
- <parameter name="label">Hard state</parameter>
- <parameter name="width">100</parameter>
-
- <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
- <parameter name="Ext.grid.Column">
- <parameter name="fixed">true</parameter>
- </parameter>
-
- <parameter name="jsFunc">
- <parameter name="namespace">Cronk.grid.AdvancedHostStatusColumnRenderer</parameter>
- <parameter name="function">hostStatus</parameter>
-
- <!-- renderer/gridevent[cellclick|celldblclick|...] -->
- <parameter name="type">renderer</parameter>
- </parameter>
- </display>
-
- <filter>
- <parameter name="enabled">true</parameter>
-
- <!-- Filter configuration -->
- <parameter name="type">extjs</parameter>
- <parameter name="subtype">appkit.ext.filter.hoststatus</parameter>
-
- <parameter name="no_operator">false</parameter>
- </filter>
-
- <order>
- <parameter name="enabled">true</parameter>
- <parameter name="default">false</parameter>
- </order>
- </field>
-
+
+
</fields>
</template>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-servicegroup-summary-template.xml
^
|
@@ -181,7 +181,7 @@
-->
<fields>
- <field name="instance_name">
+ <field name="instance_funky_name">
<datasource>
<parameter name="field">instance_name</parameter>
</datasource>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-unhandled-host-problems.xml
^
|
@@ -414,6 +414,15 @@
<parameter name="start">0</parameter>
</pager>
+ <grouping>
+ <parameter name="enabled">true</parameter>
+ <parameter name="field">host_name</parameter>
+
+ <parameter name="Ext.grid.GroupingView">
+ <parameter name="hideGroupedColumn">true</parameter>
+ </parameter>
+ </grouping>
+
<fields>
<field name="host_icon">
<datasource>
@@ -1024,7 +1033,7 @@
<parameter name="field">HOST_MAX_CHECK_ATTEMPT</parameter>
</datasource>
<display>
- <parameter name="visible">false</parameter>
+ <parameter name="visible">false"</parameter>
<parameter name="label">Max attempt</parameter>
</display>
@@ -1037,46 +1046,5 @@
<parameter name="default">false</parameter>
</order>
</field>
- <field name="host_hard_status">
- <datasource>
- <parameter name="field">HOST_HARD_STATE</parameter>
- </datasource>
-
- <display>
- <parameter name="visible">false</parameter>
- <parameter name="label">Hard state</parameter>
- <parameter name="width">100</parameter>
-
- <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
- <parameter name="Ext.grid.Column">
- <parameter name="fixed">true</parameter>
- </parameter>
-
- <parameter name="jsFunc">
- <parameter name="namespace">Cronk.grid.AdvancedHostStatusColumnRenderer</parameter>
- <parameter name="function">hostStatus</parameter>
-
- <!-- renderer/gridevent[cellclick|celldblclick|...] -->
- <parameter name="type">renderer</parameter>
- </parameter>
- </display>
-
- <filter>
- <parameter name="enabled">true</parameter>
-
- <!-- Filter configuration -->
- <parameter name="type">extjs</parameter>
- <parameter name="subtype">appkit.ext.filter.hoststatus</parameter>
-
- <parameter name="no_operator">false</parameter>
- </filter>
-
- <order>
- <parameter name="enabled">true</parameter>
- <parameter name="default">false</parameter>
- </order>
- </field>
-
-
</fields>
</template>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-unhandled-service-problems.xml
^
|
@@ -752,6 +752,7 @@
<parameter name="field">SERVICE_CURRENT_STATE</parameter>
</order>
</field>
+
<field name="service_last_check">
<datasource>
<parameter name="field">SERVICE_LAST_CHECK</parameter>
@@ -904,45 +905,6 @@
</filter>
<order>
- <parameter name="enabled">true</parameter>
- <parameter name="default">false</parameter>
- </order>
- </field>
- <field name="service_hard_status">
- <datasource>
- <parameter name="field">SERVICE_HARD_STATE</parameter>
- </datasource>
-
- <display>
- <parameter name="visible">false</parameter>
- <parameter name="label">Hard service state</parameter>
- <parameter name="width">100</parameter>
-
- <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
- <parameter name="Ext.grid.Column">
- <parameter name="fixed">true</parameter>
- </parameter>
-
- <parameter name="jsFunc">
- <parameter name="namespace">Cronk.grid.ColumnRenderer</parameter>
- <parameter name="function">serviceStatus</parameter>
-
- <!-- renderer/gridevent[cellclick|celldblclick|...] -->
- <parameter name="type">renderer</parameter>
- </parameter>
- </display>
-
- <filter>
- <parameter name="enabled">true</parameter>
-
- <!-- Filter configuration -->
- <parameter name="type">extjs</parameter>
- <parameter name="subtype">appkit.ext.filter.servicestatus</parameter>
-
- <parameter name="no_operator">false</parameter>
- </filter>
-
- <order>
<parameter name="enabled">true</parameter>
<parameter name="default">false</parameter>
</order>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/CommandHandler.js
^
|
@@ -136,7 +136,7 @@
width: 200,
allowBlank: !o.fieldRequired
};
-
+ AppKit.log(oDef);
var data = [];
var form = o.form;
@@ -199,43 +199,34 @@
case 'checkbox':
Ext.apply(oDef, {
name: o.fieldName + '-group',
- layout: 'column',
+ columns: 2,
items: [{
- xtype: 'radio',
boxLabel: _('Yes'),
inputValue: 1,
- columnWidth: 0.5,
- name: o.fieldName,
- checked: o.fieldValue === "true"
+ name: o.fieldName
}, {
- xtype: 'radio',
boxLabel: _('No'),
inputValue: 0,
name: o.fieldName,
- columnWidth: 0.5,
- checked: o.fieldValue !== "true"
+ checked: true
}]
});
if (o.fieldName === "fixed") {
- AppKit.log(oDef);
var affectedForms = ['duration', 'duration-minute', 'duration-hour'];
- for(var i=0;i<oDef.items.length;i++) {
- oDef.items[i].listeners = {
- check: function (checkedBox,val) {
- AppKit.log("?");
- for (var i = 0; i < affectedForms.length; i++) {
- var m = form.getForm().findField(affectedForms[i]);
-
- if (m) {
- m.setReadOnly((checkedBox.initialConfig.boxLabel === _('Yes')) ? !val : val);
- m.container.setVisible((checkedBox.initialConfig.boxLabel === _('Yes')) ? val : !val);
- }
+ oDef.listeners = {
+ change: function (rg, checkedBox) {
+ for (var i = 0; i < affectedForms.length; i++) {
+ var m = form.getForm().findField(affectedForms[i]);
+
+ if (m) {
+ m.setReadOnly((checkedBox.initialConfig.boxLabel === _('Yes')) ? true : false);
+ m.container.setVisible((checkedBox.initialConfig.boxLabel === _('Yes')) ? false : true);
}
}
}
};
}
- return new Ext.Container(oDef);
+ return new Ext.form.RadioGroup(oDef);
case 'duration':
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
^
|
@@ -168,7 +168,6 @@
this.fieldIterator(function (fieldName, field) {
if (field.order['default'] === true) {
- field.order.order = field.order.order || field.order.direction;
storeConfig.sortInfo = {
direction: (field.order.order ? field.order.order.toUpperCase() : 'ASC'),
field: fieldName
@@ -458,7 +457,7 @@
getView: function () {
if (!this.view) {
var viewConfig = {
- forceFit: false,
+ forceFit: true,
groupTextTpl: '{text} ({[values.rs.length]}' + ' {[values.rs.length > 1 ? "Items" : "Item"]})'
};
@@ -558,7 +557,6 @@
btn.setChecked(v, true);
});
},
-
scope: this
},
@@ -820,9 +818,7 @@
}
}
}, this);
- this.store.on("load",function() {
- this.saveState();
- },this)
+
this.on("show", function () {
if (this.autoRefreshEnabled) {
this.startRefreshTimer();
@@ -841,10 +837,6 @@
msg: _("Loading ...")
});
}, this);
-
- this.on("columnmove", function(grid) {
- this.saveState();
- }, this);
},
/**
@@ -1016,9 +1008,9 @@
}
var o = {
+ nativeState: Ext.grid.GridPanel.prototype.getState.apply(this),
filter_params: this.filter_params || {},
filter_types: this.filter_types || {},
- nativeState: Ext.grid.GridPanel.prototype.getState.apply(this),
store_origin_params: ("originParams" in store) ? store.originParams : {},
sortToggle: store.sortToggle,
sortInfo: store.sortInfo,
@@ -1026,7 +1018,7 @@
autoRefresh: aR,
connection: this.store.baseParams.connection
};
-
+
return o;
},
@@ -1084,6 +1076,7 @@
if (state.connection) {
this.setConnection(state.connection);
+
}
if (Ext.isObject(state.nativeState)) {
return Ext.grid.GridPanel.prototype.applyState.call(this, {
@@ -1210,4 +1203,4 @@
*/
Ext.reg('cronkgrid', Cronk.grid.MetaGridPanel);
-})();
+})();
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
^
|
@@ -546,7 +546,7 @@
}, this);
- if (items.length || group.xtype) {
+ if (items.length) {
// Copy, because we're loosing our objects after
// deleting items
@@ -560,10 +560,9 @@
var componentGroup = null;
if (this.menuOrganizations.indexOf(this.organizeAs) > -1) {
- groupConfig.menu = {
- items: items,
- xtype: group.xtype || 'menu'
- };
+ groupConfig.menu = new Ext.menu.Menu({
+ items: items
+ });
// groupConfig.menu.on("afterrender", function(menu) {
// Ext.fly(menu.getEl()).select("img.x-menu-item-icon").remove();
@@ -712,4 +711,4 @@
}
});
-})();
+})();
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js
^
|
@@ -37,9 +37,6 @@
def_webpath: '/modules/web/api/json',
def_sortorder: 'asc',
- minListWidth: 240,
- pageSize: 20,
-
constructor: function (cfg, meta) {
var kf = meta.api_keyfield; // ValueField
@@ -81,18 +78,11 @@
root: 'result',
- paramNames: {
- start : 'limit_start'
- },
-
baseParams: {
target: meta.api_target,
order_col: (meta.api_order_col || meta.api_keyfield),
order_dir: (meta.api_order_dir || this.def_sortorder),
- columns: cols,
- limit_start: 0,
- limit: 20,
- countColumn: (meta.api_id || meta.api_keyfield)
+ columns: cols
},
idProperty: (meta.api_id || meta.api_keyfield),
@@ -139,4 +129,4 @@
}
});
-})();
+})();
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/filter/Handler.js
^
|
@@ -152,7 +152,8 @@
},
anchor: '-5',
scope: this,
- width: 25
+ width: 25,
+ columnWidth: '25px'
});
return button;
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/filter/Window.js
^
|
@@ -126,24 +126,12 @@
render: function (oc) {
if (oGrid.filter_types) {
- AppKit.log(oGrid.filter_types);
var i = 0;
Ext.iterate(oGrid.filter_types, function (key, item) {
+ var r = new Ext.data.Record(item);
- // New format (since 1.7.0)
- if (Ext.isEmpty(item['fType'])) {
- var r = new Ext.data.Record(item);
- selectRestrictionHandler(oCombo, r, i);
-
- // Old format, 1.6 versions
- } else {
- var searchId = item['fType'];
- var record = oCombo.getStore().getById(searchId);
- if (record) {
- selectRestrictionHandler(oCombo, record, i);
- }
- }
+ selectRestrictionHandler(oCombo, r, i);
i++;
});
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
^
|
@@ -219,19 +219,10 @@
Ext.iterate(cm.columns, function(col, idx) {
if (col instanceof Ext.grid.Column) {
-
+
// && this.noautoclose === false
if (this.panel.hasSubItems() === true) {
cm.addColumn(subEventColumn, idx++);
- } else {
- cm.addColumn(subEventColumn, idx++);
- subEventColumn.on("click",function(el,grid,idx,ev) {
- var menu = this.panel.createContextMenu();
- AppKit.log(menu);
- menu.items.removeAt(0);
- menu.show(ev.target);
- ev.preventDefault();
- },this)
}
if (this.panel.hasInlineComponents() === true) {
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/renderer/AdvancedHostStatusColumnRenderer.js
^
|
@@ -43,7 +43,7 @@
hostcols.each(function (elem) {
- if (current.HOST_OBJECT_ID != elem.getAttribute("host_object_id")) {
+ if (current.HOST_OBJECT_ID !== elem.getAttribute("host_object_id")) {
return true;
}
@@ -138,7 +138,7 @@
this.hostStatus = function () {
return function (value, metaData, record, rowIndex, colIndex, store) {
if (Ext.isDefined(record.json.host_has_been_checked)) {
- if (record.json.host_has_been_checked == 0) {
+ if (record.json.host_has_been_checked === 0) {
value = 99;
}
}
@@ -156,4 +156,4 @@
};
})();
-})();
+})();
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/renderer/ColumnRenderer.js
^
|
@@ -252,11 +252,11 @@
return function (value, metaData, record, rowIndex, colIndex, store) {
if (Ext.isDefined(record.json.service_is_pending)) {
- if (record.json.service_is_pending == 1) {
+ if (record.json.service_is_pending > 0) {
value = 99;
}
} else if (Ext.isDefined(record.json.service_has_been_checked)) {
- if (record.json.service_has_been_checked == 0) {
+ if (record.json.service_has_been_checked === 0) {
value = 99;
}
}
@@ -270,11 +270,11 @@
hostStatus: function (cfg) {
return function (value, metaData, record, rowIndex, colIndex, store) {
if (Ext.isDefined(record.json.host_is_pending)) {
- if (record.json.host_is_pending == 1) {
+ if (record.json.host_is_pending > 0) {
value = 99;
}
} else if (Ext.isDefined(record.json.host_has_been_checked)) {
- if (record.json.host_has_been_checked == 0) {
+ if (record.json.host_has_been_checked === 0) {
value = 99;
}
}
@@ -312,4 +312,4 @@
}
};
-})();
+})();
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Cronk/util/CronkBuilder.js
^
|
@@ -38,9 +38,6 @@
minHeight: 400,
height: 400,
- // Contains only one direct child item, a form
- layout: 'fit',
-
constructor : function(config) {
this.addEvents({
writeSuccess : true
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/js/Icinga/Cronks/System/CronkPortal.js
^
|
@@ -266,7 +266,7 @@
region: 'west',
id: 'west-frame',
layout: 'fit',
- autoScroll: false,
+ autoScroll: true,
split: true,
minSize: 200,
maxSize: 400,
@@ -286,4 +286,4 @@
});
-})();
+})();
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/lib/template/CronkGridTemplateXmlParser.class.php
^
|
@@ -30,7 +30,7 @@
}
-class CronkGridTemplateXmlParser implements Serializable {
+class CronkGridTemplateXmlParser {
/**
* @var DOMDocument
@@ -70,18 +70,6 @@
$this->rewrite = new CronkGridTemplateXmlReplace();
}
}
- public function serialize() {
- return serialize(array(
- "data"=>$this->data,
- "fields"=>$this->fields
- ));
- }
- public function unserialize($serialized) {
- $data = unserialize($serialized);
-
- $this->data = $data["data"];
- $this->fields = $data["fields"];
- }
/**
* Inits the dom with a file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/models/Provider/CronksDataModel.class.php
^
|
@@ -100,11 +100,9 @@
}
$this->initializeXmlData();
-
- if (!isset($parameters['lazy'])) {
- $this->cronks = $this->getCronks(true);
- }
-
+
+ $this->cronks = $this->getCronks(true);
+
}
/**
@@ -227,13 +225,8 @@
* @return array
*/
private function getXmlCronks($all=false) {
- $cached = $this->user->getStorage()->read("icinga.cronks.cache.xml");
-
- if($cached) {
- return $cached;
- }
-
$out = array();
+
foreach(self::$xml_cronk_data as $uid=>$cronk) {
/*
@@ -264,7 +257,7 @@
$this->getContext()->getLoggerManager()->log('No action or module for cronk: '. $uid, AgaviLogger::ERROR);
continue;
}
-
+
$out[$uid] = array(
'cronkid' => $uid,
'module' => $cronk['module'],
@@ -283,10 +276,9 @@
'position' => isset($cronk['position']) ? $cronk['position'] : 0,
'owner_name' => self::DEFAULT_CRONK_OWNER,
'owner_id' => self::DEFAULT_CRONK_OWNERID
- );
-
+ );
}
- $this->user->getStorage()->write("icinga.cronks.cache.xml",$out);
+
return $out;
}
@@ -391,6 +383,7 @@
$cronks = (array)$this->getDbCronks() + $cronks;
$this->reorderCronks($cronks);
+
return $cronks;
}
@@ -547,7 +540,7 @@
* -> defining a new owner of the object
*/
if (count($parr)<=0) {
- $parr = array($this->user->principal->principal_id);
+ $parr = $this->user->principal->principal_id;
}
$rarr = AppKitArrayUtil::trimSplit($roles, ',');
@@ -687,17 +680,13 @@
$cronks_out = array();
$categories = $this->getCategoryModel()->getCategories();
-
+
$cronks = $this->getCronks();
foreach($categories as $category_name=>$category) {
$tmp = array();
foreach($cronks as $cronk) {
- // skipping hidden cronks for the output
- if ($cronk['hide'] == true) {
- continue;
- }
if (AppKitArrayUtil::matchAgainstStringList($cronk['categories'], $category_name)) {
$tmp[] = $cronk;
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/models/System/CommandSenderModel.class.php
^
|
@@ -91,8 +91,8 @@
* @return string
*/
public function genTimeKey() {
- //$data = strftime('%Y-%d-%H-').(date('i') - (date('i') % self::TIME_VALID));
- $data = '-'. $this->getContext()->getUser()->getNsmUser()->user_id;
+ $data = strftime('%Y-%d-%H-').(date('i') - (date('i') % self::TIME_VALID));
+ $data .= '-'. $this->getContext()->getUser()->getNsmUser()->user_id;
$data .= '-'. session_id();
return hash_hmac(self::TIME_ALGO, $data, self::TIME_KEY);
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/views/System/ViewProc/MetaInformationSuccessView.class.php
^
|
@@ -42,7 +42,7 @@
if($file === null)
$file = AppKitFileUtil::getAlternateFilename(AgaviConfig::get('modules.cronks.xml.path.grid'), $rd->getParameter('template'), '.xml');
- $template = new CronkGridTemplateXmlParser($file->getRealPath());
+ $template = new CronkGridTemplateXmlParser($file);
$template->parseTemplate();
$user = $this->getContext()->getUser()->getNsmUser();
$data = $template->getTemplateData();
@@ -67,4 +67,4 @@
}
-?>
+?>
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
^
|
@@ -54,24 +54,20 @@
public function executeHtml(AgaviRequestDataHolder $rd) {
$this->setupHtml($rd);
- $storage = $this->getContext()->getUser()->getNsmUser()->getStorage();
try {
-
$file = $this->getTemplateFile($rd);
- $template = unserialize($storage->read("icinga.cronks.template.".$file));
- if(!$template) {
- $template = new CronkGridTemplateXmlParser($file->getRealPath(), $this->getContext());
- $template->parseTemplate();
- $storage->write("icinga.cronks.template".$file,serialize($template));
- }
+
+ $template = new CronkGridTemplateXmlParser($file->getRealPath(), $this->getContext());
+ $template->parseTemplate();
$worker = CronkGridTemplateWorkerFactory::createWorker($template, $this->getContext());
+
$layout_class = $template->getSectionParams('option')->getParameter('layout');
$layout = AppKitClassUtil::createInstance($layout_class);
- $layout->setWorker($worker);
$layout->setContainer($this->getContainer());
+ $layout->setWorker($worker);
$layout->setParameters($rd);
return $layout->getLayoutContent();
@@ -84,18 +80,13 @@
$data = array();
$jsonResult = new AppKitExtJsonDocument();
- $storage = $this->getContext()->getUser()->getNsmUser()->getStorage();
-
+
try {
$file = $this->getTemplateFile($rd);
- $template = unserialize($storage->read("icinga.cronks.template.".$file));
- if(!$template) {
- $template = new CronkGridTemplateXmlParser($file->getRealPath(), $this->getContext());
- $template->parseTemplate();
- $storage->write("icinga.cronks.template".$file,serialize($template));
- }
+ $template = new CronkGridTemplateXmlParser($file->getRealPath(), $this->getContext());
+ $template->parseTemplate();
$connection = $rd->getParameter("connection","icinga");
$worker = CronkGridTemplateWorkerFactory::createWorker($template, $this->getContext(), $connection);
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/modules/Reporting/config/module.xml.in
^
|
@@ -76,7 +76,6 @@
<ae:parameter name="valueField">HOST_OBJECT_ID</ae:parameter>
<ae:parameter name="displayField">HOST_NAME</ae:parameter>
</ae:parameter>
-
<ae:parameter name="p_hostgroup_object_id">
<ae:parameter name="className">Icinga.Reporting.inputControl.ApiSelectionField</ae:parameter>
<ae:parameter name="target">hostgroup</ae:parameter>
@@ -100,17 +99,6 @@
<ae:parameter name="displayField">SERVICE_NAME</ae:parameter>
<ae:parameter name="tpl"><![CDATA[{HOST_NAME} - {SERVICE_NAME}]]></ae:parameter>
</ae:parameter>
-
- <ae:parameter name="p_servicegroup_object_id">
- <ae:parameter name="className">Icinga.Reporting.inputControl.ApiSelectionField</ae:parameter>
- <ae:parameter name="target">servicegroup</ae:parameter>
- <ae:parameter name="columns">
- <ae:parameter>SERVICEGROUP_OBJECT_ID</ae:parameter>
- <ae:parameter>SERVICEGROUP_NAME</ae:parameter>
- </ae:parameter>
- <ae:parameter name="valueField">SERVICEGROUP_OBJECT_ID</ae:parameter>
- <ae:parameter name="displayField">SERVICEGROUP_NAME</ae:parameter>
- </ae:parameter>
</setting>
<!-- Mapping for datatypes e.g. 4 == Date -->
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/app/templates/exceptions/web.php
^
|
@@ -135,5 +135,9 @@
<?php
}
}
-
+try {
+ AppKitExceptionHandler::logException($e);
+} catch(Exception $e) {
+
+}
?>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/bin/clearcache.sh.in
^
|
@@ -43,7 +43,7 @@
msg_start "Deleting cache from $CUR_CNAME ($CC_FILES files)"
- find $CUR_CDIR/ -type f -exec rm {} \;
+ rm $CUR_CDIR/* > /dev/null 2>&1
msg_result
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for icinga-web 1.8.3.
+# Generated by GNU Autoconf 2.68 for icinga-web 1.8.0.
#
# Report bugs to <dev.icinga.org>.
#
@@ -560,8 +560,8 @@
# Identity of this package.
PACKAGE_NAME='icinga-web'
PACKAGE_TARNAME='icinga-web'
-PACKAGE_VERSION='1.8.3'
-PACKAGE_STRING='icinga-web 1.8.3'
+PACKAGE_VERSION='1.8.0'
+PACKAGE_STRING='icinga-web 1.8.0'
PACKAGE_BUGREPORT='dev.icinga.org'
PACKAGE_URL=''
@@ -1254,7 +1254,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures icinga-web 1.8.3 to adapt to many kinds of systems.
+\`configure' configures icinga-web 1.8.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1315,7 +1315,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of icinga-web 1.8.3:";;
+ short | recursive ) echo "Configuration of icinga-web 1.8.0:";;
esac
cat <<\_ACEOF
@@ -1447,7 +1447,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-icinga-web configure 1.8.3
+icinga-web configure 1.8.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1464,7 +1464,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by icinga-web $as_me 1.8.3, which was
+It was created by icinga-web $as_me 1.8.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1814,7 +1814,7 @@
# Release date
-RELEASE_DATE=2013-03-25
+RELEASE_DATE=2012-10-18
@@ -3349,7 +3349,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by icinga-web $as_me 1.8.3, which was
+This file was extended by icinga-web $as_me 1.8.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3402,7 +3402,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-icinga-web config.status 1.8.3
+icinga-web config.status 1.8.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
^
|
@@ -30,7 +30,7 @@
<parameter name="condition">show</parameter>
<parameter name="fn"><![CDATA[
function() {
- if (this.getRecord().get("process_performance_data") == "1") {
+ if (this.getRecord().get("process_performance_data") === "1") {
return true;
} else {
return false;
@@ -68,7 +68,7 @@
<parameter name="condition">show</parameter>
<parameter name="fn"><![CDATA[
function() {
- if (this.getRecord().get("process_performance_data") == "1") {
+ if (this.getRecord().get("process_performance_data") === "1") {
return true;
} else {
return false;
@@ -96,7 +96,7 @@
<parameter name="field">HOST_PROCESS_PERFORMANCE_DATA</parameter>
</datasource>
<display>
- <parameter name="visible">false</parameter>
+ <parameter name="visible">false"</parameter>
<parameter name="label"></parameter>
</display>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
^
|
@@ -30,7 +30,7 @@
<parameter name="condition">show</parameter>
<parameter name="fn"><![CDATA[
function() {
- if (this.getRecord().get("process_performance_data") == "1") {
+ if (this.getRecord().get("process_performance_data") === "1") {
return true;
} else {
return false;
@@ -68,7 +68,7 @@
<parameter name="condition">show</parameter>
<parameter name="fn"><![CDATA[
function() {
- if (this.getRecord().get("process_performance_data") == "1") {
+ if (this.getRecord().get("process_performance_data") === "1") {
return true;
} else {
return false;
@@ -96,7 +96,7 @@
<parameter name="field">SERVICE_PROCESS_PERFORMANCE_DATA</parameter>
</datasource>
<display>
- <parameter name="visible">false</parameter>
+ <parameter name="visible">false"</parameter>
<parameter name="label"></parameter>
</display>
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/contrib/businessprocess-icinga-cronk/BPAddon/models/businessProcessModel.class.php
^
|
@@ -63,7 +63,7 @@
}
public function setName($name) {
- $this->name = trim(str_replace(":","",$name));
+ $this->name = $name;
}
public function setLongName($name) {
@@ -266,4 +266,4 @@
return $string;
}
-}
+}
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/contrib/businessprocess-icinga-cronk/BPAddon/templates/OverviewSuccess.php
^
|
@@ -111,8 +111,8 @@
},
applyState: function(state) {
if(!state) {
- this.autoRefresh = false;
- this.toggleAutorefresh(null,false,true);
+ this.autoRefresh = true;
+ this.toggleAutorefresh(null,true,true);
return null;
}
if(state.conf)
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/contrib/businessprocess-icinga-cronk/doc/VERSION
^
|
@@ -1 +1 @@
-1.2.3rc
+1.2.2.
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/doc/CHANGELOG-1.8
^
|
@@ -5,75 +5,6 @@
Thanks to all contributers, testers and developers. Please read AUTHORS and
THANKS for a detailed list :-)
-1.8.3 (2013-03-25)
-
-Bugs
- * Session does not get cleared on logout #3721
- * Fixed duplicated user preferences / appstate #3727 #3870
- (caused a Doctrine_Hydrator_Exception)
- * Fix for PHP 5.3.22 / 5.4.xx #3751
- * Fix Pending states shown as OK #3843
- * Fix order handling with Cronk templates #3886
- * Disabed all caching of permissions for a user #3880
- (caused problems when deleting a user from the system)
-
- Please make sure to apply the SQL update for MySQL and PgSQL
-
- It should clean up duplicated user preferences from the database!
-
-1.8.2
-
-Bugs
- * Bugfix update of contrib businessprocess-icinga-cronk #3690
- * Fix Cronk listing - hide hidden Cronks from userdisplay #3569
- * Fix session handling for creation and destruction #3530
- * Fix missing change on the DB model of NsmTarget #3652
- * Reporting Module: fix servicegroup reports (thx jschanz, wolle) #3503
- * icinga-web.spec: several updates (see changlog within)
- (includes #3526 #3452)
- * Fix missing comma in Api Target SERVICE #3588
- * status cronk: state filter urls don't work, sql exception in json #3515
- * wrong selects not working with other databases than mysql #3330
- (overlapping with the performance tweaks and fixed there)
- * Fixed wrong credentials being given when user without credentials is being
- created #3423
- * Fix for AdvancedHoststatusColumnRenderer when db returns object id as a
- number (thx to crysmi, #3417)
- * Fixed wrong hard state filter (service views)
- * Removed wrong columnWidth definition crashing IE #3485 (thx tgelf)
- * Fix case handling with LDAP user attributes
- * Some smaller fixes, including fixes for IE and php 5.4
-
-Features
- * Several performance tweaks
- * Caching of permissions in the user session (cronks, hosts, services, etc.)
- * XML template caching
- * Squishloader performance (javascript / css)
- * Added memcache session provider #2035
- * Added hard states to views
- * Added host_status field for host view, should fix #3492
- * Added hostgroup_object_id filter
- * Removing authid requirement from LDAP Auth #3473
-
-1.8.1
-
-Bugs
- * Removed duplicate insert in sql upgrade scripts #3328
- * IE7 window fix for cronk save dialog
- * Disabled grouping of of unhandled problems grid #3320
- * Re-added missing command restriction class #3457
- * Removed ghost column after changing to new grid events #3458
- * Fixes PNP extension #3427
- * Removed flash for packaging and flash security fixes
- * Various custom cronk dialog fixes
-
-
-Features
-
- * Allow xtypes in grid events to customize menues
- * Clearcache enhancements
- * Make ApiComboBox default for filters (Pagination)
-
1.8.0
Bugs
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/doc/THANKS
^
|
@@ -27,8 +27,7 @@
* mopp
* darkarchon
* Markus Frosch
- * Philipp Deneu
- * abraxas
+ * Philipp Deneu
* Design stuff
* Karolina Hein
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/doc/VERSION
^
|
@@ -1 +1 @@
-1.8.3
+1.8.0
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/conf.d/module_appkit.xml
^
|
@@ -10,10 +10,9 @@
<setting name="debug.verbose">
<!-- Debug output for db queries -->
- <!--
+ <!--
<ae:parameter>API_Views_ApiDQLViewModel</ae:parameter>
-->
-
<!--
<ae:parameter>Api_Store_LegacyLayer_IcingaApiModel</ae:parameter>
-->
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/make/version.m4
^
|
@@ -9,5 +9,5 @@
dnl this name.
dnl
-m4_define([ICINGA_VERSION], [1.8.3])
-m4_define([ICINGA_RELEASE_DATE], [2013-03-25])
+m4_define([ICINGA_VERSION], [1.8.0])
+m4_define([ICINGA_RELEASE_DATE], [2012-10-18])
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/schema/mysql.sql
^
|
@@ -19,7 +19,7 @@
CREATE TABLE nsm_target (target_id INT AUTO_INCREMENT, target_name VARCHAR(45) NOT NULL, target_description VARCHAR(100), target_class VARCHAR(80), target_type VARCHAR(45) NOT NULL, PRIMARY KEY(target_id)) ENGINE = INNODB;
CREATE TABLE nsm_target_value (tv_pt_id INT, tv_key VARCHAR(45), tv_val VARCHAR(45) NOT NULL, PRIMARY KEY(tv_pt_id, tv_key)) ENGINE = INNODB;
CREATE TABLE nsm_user (user_id INT AUTO_INCREMENT, user_account INT DEFAULT 0 NOT NULL, user_name VARCHAR(127) NOT NULL, user_lastname VARCHAR(40) NOT NULL, user_firstname VARCHAR(40) NOT NULL, user_password VARCHAR(64) NOT NULL, user_salt VARCHAR(64) NOT NULL, user_authsrc VARCHAR(45) DEFAULT 'internal' NOT NULL, user_authid TEXT, user_authkey VARCHAR(64), user_email VARCHAR(254) NOT NULL, user_disabled TINYINT DEFAULT '1' NOT NULL, user_created DATETIME NOT NULL, user_modified DATETIME NOT NULL, UNIQUE INDEX user_name_unique_idx (user_name), INDEX user_search_idx (user_name, user_authsrc, user_disabled, user_authid(127)), PRIMARY KEY(user_id)) ENGINE = INNODB;
-CREATE TABLE nsm_user_preference (upref_id INT AUTO_INCREMENT, upref_user_id INT NOT NULL, upref_val VARCHAR(100), upref_longval LONGTEXT, upref_key VARCHAR(50) NOT NULL, upref_created DATETIME NOT NULL, upref_modified DATETIME NOT NULL, INDEX upref_search_key_idx_idx (upref_key), INDEX principal_role_id_ix_idx (upref_user_id), PRIMARY KEY(upref_id), UNIQUE KEY `upref_user_key_unique_idx` (`upref_user_id`,`upref_key`)) ENGINE = INNODB;
+CREATE TABLE nsm_user_preference (upref_id INT AUTO_INCREMENT, upref_user_id INT NOT NULL, upref_val VARCHAR(100), upref_longval LONGTEXT, upref_key VARCHAR(50) NOT NULL, upref_created DATETIME NOT NULL, upref_modified DATETIME NOT NULL, INDEX upref_search_key_idx_idx (upref_key), INDEX principal_role_id_ix_idx (upref_user_id), PRIMARY KEY(upref_id)) ENGINE = INNODB;
CREATE TABLE nsm_user_role (usro_user_id INT, usro_role_id INT, INDEX nsm_user_role_ix_idx (usro_role_id), PRIMARY KEY(usro_user_id, usro_role_id)) ENGINE = INNODB;
ALTER TABLE cronk ADD CONSTRAINT cronk_cronk_user_id_nsm_user_user_id FOREIGN KEY (cronk_user_id) REFERENCES nsm_user(user_id);
ALTER TABLE cronk_category_cronk ADD CONSTRAINT cronk_category_cronk_ccc_cronk_id_cronk_cronk_id FOREIGN KEY (ccc_cronk_id) REFERENCES cronk(cronk_id);
@@ -42,7 +42,7 @@
/* Initial data import */
INSERT INTO nsm_user (user_id,user_account,user_name,user_firstname,user_lastname,user_password,user_salt,user_authsrc,user_email,user_disabled) VALUES ('1','0','root','Enoch','Root','42bc5093863dce8c150387a5bb7e3061cf3ea67d2cf1779671e1b0f435e953a1','0c099ae4627b144f3a7eaa763ba43b10fd5d1caa8738a98f11bb973bebc52ccd','internal','root@localhost.local','0');
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.3', NOW(), NOW());
+INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.0', NOW(), NOW());
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('1','IcingaHostgroup','Limit data access to specific hostgroups','IcingaDataHostgroupPrincipalTarget','icinga');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('2','IcingaServicegroup','Limit data access to specific servicegroups','IcingaDataServicegroupPrincipalTarget','icinga');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('3','IcingaHostCustomVariablePair','Limit data access to specific custom variables','IcingaDataHostCustomVariablePrincipalTarget','icinga');
@@ -61,7 +61,7 @@
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('16','icinga.cronk.log','Allow user to view icinga-log','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('17','icinga.control.view','Allow user to view icinga status','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('18','icinga.control.admin','Allow user to administrate the icinga process','','credential');
-INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('19','IcingaCommandRestrictions','Disable critical commands for this user','IcingaDataCommandRestrictionPrincipalTarget','icinga');
+INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('19','IcingaCommandRestrictions','Disable critical commands for this user','','icinga');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('20','icinga.cronk.custom','Allow user to create and modify custom cronks','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('21','icinga.cronk.admin','Allow user to edit and delete all cronks','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('22','IcingaService','Limit data access to specific services','IcingaDataServicePrincipalTarget','icinga');
@@ -90,4 +90,4 @@
INSERT INTO nsm_principal_target (pt_id,pt_principal_id,pt_target_id) VALUES ('13','3','21');
INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','1');
INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','2');
-INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','3');
+INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','3');
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/schema/oracle.sql
^
|
@@ -20,7 +20,7 @@
-- check for errors in create_icingaweb_objects.log
--
-- initial version: 2012-03-07 Thomas Dreßler
--- current version: 2013-03-17 Thomas Dreßler
+-- current version: 2012-05-10 Thomas Dreßler
-- -- --------------------------------------------------------
*/
set sqlprompt "&&_USER@&&_CONNECT_IDENTIFIER SQL>"
@@ -267,8 +267,6 @@
tablespace &DATATBS;
alter table nsm_user_preference add constraint nsm_user_pref_pk PRIMARY KEY (upref_id)
using index tablespace &IXTBS;
-alter table nsm_user_preference add constraint nsm_user_pref_userid_key_uq UNIQUE (upref_user_id, upref_key)
- using index tablespace &IXTBS;
--use index organized table because all data is within index
CREATE TABLE nsm_user_role
@@ -612,7 +610,7 @@
INSERT INTO nsm_user (user_id,user_account,user_name,user_firstname,user_lastname,user_password,user_salt,user_authsrc,user_email,user_disabled,user_created,user_modified) VALUES ('1','0','root','Enoch','Root','42bc5093863dce8c150387a5bb7e3061cf3ea67d2cf1779671e1b0f435e953a1','0c099ae4627b144f3a7eaa763ba43b10fd5d1caa8738a98f11bb973bebc52ccd','internal','root@localhost.local','0',sysdate,sysdate);
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.3', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
+INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO nsm_principal (principal_id,principal_user_id,principal_type,principal_disabled) VALUES ('1','1','user','0');
INSERT INTO nsm_principal (principal_id,principal_role_id,principal_type,principal_disabled) VALUES ('2','2','role','0');
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/schema/pgsql.sql
^
|
@@ -653,7 +653,7 @@
--
COPY nsm_db_version (id, version, modified, created) FROM stdin;
-1 icinga-web/v1.8.3 2013-03-25 00:00:00 2013-03-23 00:00:00
+1 icinga-web/v1.8.0 2012-10-11 11:13:07 2012-10-11 11:13:07
\.
@@ -742,7 +742,7 @@
16 icinga.cronk.log Allow user to view icinga-log credential
17 icinga.control.view Allow user to view icinga status credential
18 icinga.control.admin Allow user to administrate the icinga process credential
-19 IcingaCommandRestrictions Disable critical commands for this user IcingaDataCommandRestrictionPrincipalTarget icinga
+19 IcingaCommandRestrictions Disable critical commands for this user \N icinga
20 icinga.cronk.custom Allow user to create and modify custom cronks \N credential
21 icinga.cronk.admin Allow user to edit and delete all cronks credential
22 IcingaService Limit data access to specific services IcingaDataServicePrincipalTarget icinga
@@ -971,13 +971,6 @@
--
--- Name: upref_user_key_unique_idx; Type: INDEX; Schema: public; Owner: icinga_web; Tablespace:
---
-
-CREATE UNIQUE INDEX upref_user_key_unique_idx ON nsm_user_preference USING btree (upref_user_id, upref_key);
-
-
---
-- Name: user_name_unique; Type: INDEX; Schema: public; Owner: icinga_web; Tablespace:
--
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/schema/updates/mysql/mysql_v1-7-2_to_v1-8-0.sql
^
|
@@ -1,6 +1,15 @@
DELETE FROM nsm_db_version;
INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.0', NOW(), NOW());
+INSERT INTO nsm_target
+ (target_name,target_description,target_class,target_type)
+VALUES (
+ 'icinga.cronk.admin',
+ 'Allow user edit and delete all cronks',
+ '',
+ 'credential'
+);
+
ALTER TABLE cronk
ADD COLUMN cronk_system tinyint(1) DEFAULT 0;
@@ -44,4 +53,4 @@
);
ALTER TABLE nsm_user
- CHANGE COLUMN user_authid user_authid varchar(512) NULL DEFAULT NULL;
+ CHANGE COLUMN user_authid user_authid varchar(512) NULL DEFAULT NULL;
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/schema/updates/oracle/oracle_v1-7-2_to_v1-8-0.sql
^
|
@@ -3,6 +3,16 @@
DELETE FROM nsm_db_version;
INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
+INSERT INTO nsm_target
+ (target_id, target_name,target_description,target_class,target_type)
+VALUES (
+ NSM_TARGET_seq.NEXTVAL,
+ 'icinga.cronk.admin',
+ 'Allow user edit and delete all cronks',
+ '',
+ 'credential'
+);
+
ALTER TABLE cronk
ADD (cronk_system NUMBER(3) DEFAULT 0);
@@ -43,4 +53,4 @@
'icinga',
'IcingaDataHostPrincipalTarget' );
-ALTER TABLE NSM_USER MODIFY ("USER_AUTHID" VARCHAR2(512 BYTE));
+ALTER TABLE NSM_USER MODIFY ("USER_AUTHID" VARCHAR2(512 BYTE));
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/etc/schema/updates/pgsql/pgsql_v1-7-2_to_v1-8-0.sql
^
|
@@ -3,6 +3,16 @@
DELETE FROM nsm_db_version;
INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.0', NOW(), NOW());
+INSERT INTO nsm_target
+ (target_name,target_description,target_class,target_type)
+VALUES (
+ 'icinga.cronk.admin',
+ 'Allow user edit and delete all cronks',
+ '',
+ 'credential'
+);
+
+
ALTER TABLE cronk
ADD COLUMN cronk_system boolean DEFAULT false;
@@ -44,4 +54,4 @@
);
ALTER TABLE nsm_user
- ALTER COLUMN user_authid TYPE varchar(512);
+ ALTER COLUMN user_authid TYPE varchar(512);
\ No newline at end of file
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/icinga-web.spec
^
|
@@ -10,20 +10,6 @@
%define reportingcachedir %{_localstatedir}/cache/%{name}/reporting
%if "%{_vendor}" == "suse"
-%define phpname php5
-%endif
-%if "%{_vendor}" == "redhat"
-%define phpname php
-%endif
-
-# on RHEL5 php is php-5.1 and php53 is php-5.3
-# icinga-web requires at least php-5.2.3 so
-# enforce the correct php package name on RHEL5
-%if 0%{?el5}
-%define phpname php53
-%endif
-
-%if "%{_vendor}" == "suse"
%define apacheconfdir %{_sysconfdir}/apache2/conf.d
%define apacheuser wwwrun
%define apachegroup www
@@ -44,7 +30,7 @@
Summary: Open Source host, service and network monitoring Web UI
Name: icinga-web
-Version: 1.8.3
+Version: 1.8.0
Release: %{revision}%{?dist}
License: GPLv3
Group: Applications/System
@@ -59,46 +45,22 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildRequires: %{phpname} >= 5.2.3
-BuildRequires: %{phpname}-gd
-BuildRequires: %{phpname}-ldap
-BuildRequires: %{phpname}-pdo
-
-%if "%{_vendor}" == "redhat"
-BuildRequires: %{phpname}-xml
-BuildRequires: php-pear
-%endif
-%if "%{_vendor}" == "suse"
-BuildRequires: %{phpname}-devel >= 5.2.3
-BuildRequires: %{phpname}-json
-BuildRequires: %{phpname}-sockets
-BuildRequires: %{phpname}-xsl
-BuildRequires: %{phpname}-dom
-BuildRequires: %{phpname}-pear
-%endif
-
-
Requires: perl(Locale::PO)
-Requires: %{phpname} >= 5.2.3
-Requires: %{phpname}-gd
-Requires: %{phpname}-ldap
-Requires: %{phpname}-pdo
-%if "%{_vendor}" == "redhat"
-Requires: %{phpname}-common
-Requires: %{phpname}-xml
+Requires: php >= 5.2.3
Requires: php-pear
+Requires: php-gd
+Requires: php-xml
+Requires: php-ldap
+Requires: php-pdo
+Requires: php-dom
+%if "%{_vendor}" == "redhat"
+Requires: php-common
%endif
%if "%{_vendor}" == "suse"
-Requires: %{phpname}-pear
-Requires: %{phpname}-xsl
-Requires: %{phpname}-dom
-Requires: %{phpname}-tokenizer
-Requires: %{phpname}-gettext
-Requires: %{phpname}-ctype
-Requires: %{phpname}-json
-Requires: %{phpname}-pear
+Requires: php-xsl
Requires: apache2-mod_php5
%endif
+Requires: php-spl
Requires: pcre >= 7.6
@@ -120,24 +82,11 @@
##############################
PNP Integration module for Icinga Web
-##############################
-%package module-nagiosbp
-##############################
-Summary: Nagios Business Process Addon Integration module for Icinga Web
-Group: Applications/System
-Requires: nagios-business-process-addon-icinga
-Requires: %{name} = %{version}-%{release}
-
-##############################
-%description module-nagiosbp
-##############################
-Summary: Nagios Business Process Addon Integration module for Icinga Web
-
##############################
%prep
##############################
-%setup -q -n %{name}-%{version}
+%setup -n %{name}-%{version}
##############################
%build
@@ -184,16 +133,6 @@
# place the pnp templates for -module-pnp
%{__cp} contrib/PNP_Integration/templateExtensions/* %{buildroot}%{_datadir}/%{name}/app/modules/Cronks/data/xml/extensions/
-# place the nagiosbp files for -module-nagiosbp
-%{__mkdir} %{buildroot}%{_datadir}/%{name}/app/modules/BPAddon
-%{__cp} -r contrib/businessprocess-icinga-cronk/BPAddon/* %{buildroot}%{_datadir}/%{name}/app/modules/BPAddon/
-# adjust the config for the packaged nagiosbp
-%{__sed} -i -e 's|/usr/local/nagiosbp/etc|/etc/nagiosbp|' \
- -i -e 's|/usr/local/nagiosbp/bin|/usr/bin|' \
- %{buildroot}%{_datadir}/%{name}/app/modules/BPAddon/config/bp.xml
-%{__sed} -i -e 's|\(name="pass">\)icingaadmin|\1password|' \
- %{buildroot}%{_datadir}/%{name}/app/modules/BPAddon/config/cronks.xml
-
##############################
%pre
##############################
@@ -232,12 +171,6 @@
%{__rm} -rf %{cachedir}/CronkTemplates/*.php
##############################
-%post module-nagiosbp
-##############################
-
-%{_bindir}/%{name}-clearcache
-
-##############################
%clean
##############################
@@ -247,11 +180,8 @@
%files
##############################
# main dirs
+%doc etc/schema contrib doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
%defattr(-,root,root)
-%doc etc/schema doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
-# packaged by subpackages
-%exclude %{_datadir}/%{name}/app/modules/BPAddon
-%exclude %{_datadir}/%{name}/app/modules/Cronks/data/xml/extensions
%{_datadir}/%{name}/app
%{_datadir}/%{name}/doc
%{_datadir}/%{name}/etc
@@ -275,42 +205,14 @@
%files module-pnp
##############################
# templates, experimental treatment as configs (noreplace)
+%doc contrib/PNP_Integration/README
%defattr(-,root,root)
-%doc contrib/PNP_Integration/README contrib/PNP_Integration/INSTALL
-%doc contrib/PNP_Integration/doc contrib/nginx
%dir %{_datadir}/icinga-web/app/modules/Cronks/data/xml/extensions
%config(noreplace) %attr(644,-,-) %{_datadir}/%{name}/app/modules/Cronks/data/xml/extensions/*
-%files module-nagiosbp
-##############################
-# templates, experimental treatment as configs (noreplace)
-%defattr(-,root,root)
-%doc contrib/businessprocess-icinga-cronk/doc
-%config(noreplace) %{_datadir}/%{name}/app/modules/BPAddon/config/*
-%{_datadir}/%{name}/app/modules/BPAddon
-
##############################
%changelog
##############################
-* Mon Mar 18 2013 Markus Frosch <markus.frosch@netways.de> - 1.8.3-1
-- bump to 1.8.3
-
-* Thu Feb 15 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.2-2
-- fix rpmlint errors/warnings
-
-* Wed Feb 11 2013 Markus Frosch <markus.frosch@netways.de> - 1.8.2-1
-- bump to 1.8.2
-
-* Wed Feb 06 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.1-3
-- fix php5-pear reqs
-- fix php5-dom (suse), php-xml (rhel) and other missing/faulty reqs
-
-* Fri Jan 25 2013 Christian Dengler <christian.dengler@netways.de> - 1.8.1-2
-- add BuildRequires; add subpackage for nagiosbp
-
-* Wed Dec 5 2012 Marius Hein <marius.hein@netways.de> - 1.8.1-1
-- bump to 1.8.1
-
* Mon Sep 24 2012 Michael Friedrich <michael.friedrich@gmail.com> - 1.8.0-1
- bump to 1.8.0
@@ -343,7 +245,7 @@
* Mon Feb 20 2012 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.6.2-1
- bump to 1.6.2
-- clean config cache in post (important for upgrades) #2217
+- clean config cache in %post (important for upgrades) #2217
* Mon Dec 12 2011 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.6.1-1
- bump to 1.6.1
@@ -351,15 +253,15 @@
* Sat Oct 22 2011 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.6.0-1
- bump to 1.6.0
-- add --with-cache-dir and use _localstatedir/cache/icinga-web
+- add --with-cache-dir and use %{_localstatedir}/cache/icinga-web
* Thu Sep 15 2011 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.5.2-1
- drop icinga-api dependency
- drop BuildRequires - not needed at this stage
-- add --with-api-cmd-file, using same location as icinga rpm _localstatedir/icinga/rw/icinga.cmd
-- change new config location from default $prefix/etc/conf.d to _sysconfdir/icinga-web
+- add --with-api-cmd-file, using same location as icinga rpm %{_localstatedir}/icinga/rw/icinga.cmd
+- change new config location from default $prefix/etc/conf.d to %{_sysconfdir}/icinga-web
- mark all config xmls as config noreplace
-- set _localstatedir/log/icinga-web and use it instead of $prefix/logs
+- set %{_localstatedir}/log/icinga-web and use it instead of $prefix/logs
- set apache user/group to write logdir
- reorder files to be included in the package
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/lib/agavi/src/exception/AgaviException.class.php
^
|
@@ -288,6 +288,11 @@
$exceptions[] = $e;
}
+ // discard any previous output waiting in the buffer
+ if(ob_get_length()) {
+ while(@ob_end_clean());
+ }
+
if($container !== null && $container->getOutputType() !== null && $container->getOutputType()->getExceptionTemplate() !== null) {
// an exception template was defined for the container's output type
include($container->getOutputType()->getExceptionTemplate());
|
|
Changed |
icinga-web-1.8.0.tar.bz2/lib/ext3/resources/charts.swf
^
|
|
Added |
icinga-web-1.8.0.tar.bz2/lib/ext3/resources/expressinstall.swf
^
|
[-]
[+]
|
Added |
icinga-web-1.8.0.tar.bz2/pub/soap/icinga.wsdl
^
|
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:nls="http://xml.apache.org/xml-soap"
+ xmlns:tns="http://www.icinga.org/icingaApi/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="icingaApi" targetNamespace="http://www.icinga.org/icingaApi/">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.icinga.org/icingaApi/">
+
+ <xsd:element name="nsl:map">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element minOccurs="0" maxOccurs="unbounded"
+ name="item" type="tns:keyValuePair"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="keyValuePair">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element minOccurs="1" maxOccurs="1" name="key" type="xsd:string"/>
+ <xsd:element minOccurs="1" maxOccurs="1" name="value" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="out" type="xsd:anyxml"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="apiRequest">
+ <wsdl:part element="xsd:string" name="target"/>
+ <wsdl:part element="nsl:map" name="soapFilter"/>
+ <wsdl:part element="xsd:string" name="group"/>
+ <wsdl:part element="nsl:map" name="soapColumns"/>
+ <wsdl:part element="xsd:string" name="order"/>
+ <wsdl:part element="xsd:int" name="limit"/>
+ <wsdl:part element="xsd:string" name="authkey"/>
+ </wsdl:message>
+
+ <wsdl:message name="apiResponse">
+ <wsdl:part element="xsd:anyxml" name="results"/>
+ </wsdl:message>
+
+ <wsdl:portType name="icingaApi">
+ <wsdl:operation name="getIcingaAPI">
+ <wsdl:input message="tns:apiRequest"/>
+ <wsdl:output message="tns:apiResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <!-- Icinga Api binding -->
+ <wsdl:binding name="icingaApiSOAP" type="tns:icingaApi">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getIcingaAPI">
+ <soap:operation soapAction="http://localhost/icinga-web/soap/getIcingaAPI"/>
+ <wsdl:input>
+ <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use='internal' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="icinga">
+ <!-- Our soap interface to the icinga-api -->
+ <wsdl:port binding="tns:icingaApiSOAP" name="icingaSOAP">
+ <soap:address location="http://localhost/icinga-web/soap/"/>
+ </wsdl:port>
+ </wsdl:service>
+
+
+</wsdl:definitions>
|
[-]
[+]
|
Added |
icinga-web-1.8.0.tar.bz2/pub/soap/index.php
^
|
@@ -0,0 +1,43 @@
+<?php
+
+// +---------------------------------------------------------------------------+
+// | An absolute filesystem path to the agavi/agavi.php script. |
+// +---------------------------------------------------------------------------+
+require (dirname(dirname(__FILE__)). '/../lib/agavi/src/agavi.php');
+
+// +---------------------------------------------------------------------------+
+// | An absolute filesystem path to our app/config.php script. |
+// +---------------------------------------------------------------------------+
+// Not needed, we work with bootstrap events
+require('../../app/config.php');
+
+// +---------------------------------------------------------------------------+
+// | Initialize the framework. You may pass an environment name to this method.|
+// | By default the 'development' environment sets Agavi into a debug mode. |
+// | In debug mode among other things the cache is cleaned on every request. |
+// +---------------------------------------------------------------------------+
+Agavi::bootstrap('development');
+
+// Setting the running context to web ...
+AgaviConfig::set('core.default_context', 'soap');
+AgaviConfig::set('core.debug', true); //sets debug mode to on
+
+
+AgaviSoapController::initializeModule('Web');
+AgaviSoapController::initializeModule('AppKit');
+
+AgaviConfig::set('core.context_implementation', 'AppKitAgaviContext');
+
+// +---------------------------------------------------------------------------+
+// | Call the controller's dispatch method on the default context |
+// +---------------------------------------------------------------------------+
+
+// AppKitEventDispatcher::getInstance()->triggerSimpleEvent('agavi.dispatch', 'Agavi is starting its container');
+$ctx = AgaviContext::getInstance('soap');
+$controller = $ctx->getController();
+$controller->dispatch();
+// AppKitEventDispatcher::getInstance()->triggerSimpleEvent('agavi.afterdispatch', 'Agavi stoped, response is served');
+
+exit (0);
+
+?>
|
[-]
[+]
|
Added |
icinga-web-1.8.0.tar.bz2/pub/soapRequestTest.php
^
|
@@ -0,0 +1,13 @@
+<?php
+$client = new SoapClient("http://localhost/icinga-web/soap/icinga.wsdl",array("trace"=>1,'features' => SOAP_SINGLE_ELEMENT_ARRAYS));
+try {
+ $filters = array(
+ array("column"=>"HOST_NAME","relation"=>"=","value"=>"localhost"));
+ $filterParam = new SoapVar($filters,SOAP_ENC_ARRAY,null,null,"soapFilter");
+ $result = $client->getIcingaAPI("service",$filterParam," "," "," ",0,"authkey123412345");
+} catch(Exception $e) {
+ echo $e;
+}
+print_r($client->__getLastRequest());
+print_r($client->__getLastResponse());
+
|
[-]
[+]
|
Changed |
icinga-web-1.8.0.tar.bz2/tests/phpunit/tests/module/ModuleLoadingTest.php
^
|
@@ -3,7 +3,7 @@
class ModuleLoadingTest extends PHPUnit_Framework_TestCase {
const MODULE_NAME = 'TestDummy';
-
+
/**
* @group Module
*/
@@ -63,26 +63,23 @@
$resource = $database->getConnection();
}
- /**
- * @group Module
- */
+ /**
+ * @group Module
+ */
public function testCronkSecurityModel() {
// Name of a system cronk
static $cronk_name = 'gridInstanceStatus';
- // Test init
- IcingaWebTestTool::authenticateTestUser();
-
- // Drop cache
- unset($_SESSION["icinga.cronks.cache.xml"]);
+ // Test init
+ IcingaWebTestTool::authenticateTestUser();
- // Initialize
- $ctx = IcingaWebTestTool::getContext();
- $cronks = $ctx->getModel('Provider.CronksData', 'Cronks');
- $security = $ctx->getModel('Provider.CronksSecurity', 'Cronks');
+ // Initialize
+ $ctx = IcingaWebTestTool::getContext();
+ $cronks = $ctx->getModel('Provider.CronksData', 'Cronks');
+ $security = $ctx->getModel('Provider.CronksSecurity', 'Cronks');
- // 1. Reset, test for empty groups
+ // 1. Reset, test for empty groups
$security->setCronkUid($cronk_name);
$cronk = $security->getCronk();
@@ -99,7 +96,7 @@
$this->assertEquals('appkit_admin', $roles[0]['role_name']);
$this->assertEquals('icinga_user', $roles[1]['role_name']);
- $this->assertContains('appkit_admin', $security->getRoleNames());
+ $this->assertContains('appkit_admin', $security->getRoleNames());
$this->assertContains('icinga_user', $security->getRoleNames());
// Test role_ids
@@ -107,15 +104,15 @@
$this->assertContains(3, $security->getRoleUids());
// Test principal_ids
- $this->assertContains(3, $security->getPrincipals());
+ $this->assertContains(3, $security->getPrincipals());
$this->assertContains(4, $security->getPrincipals());
// 3. Reset, remove roles and test again
$security->updateRoles(array());
$security->setCronkUid($cronk_name);
- $roles = $security->getRoles();
+ $roles = $security->getRoles();
- $this->assertNull($roles);
+ $this->assertNull($roles);
}
/**
@@ -126,10 +123,7 @@
IcingaWebTestTool::authenticateTestUser();
$ctx = IcingaWebTestTool::getContext();
-
- // Drop cache
- unset($_SESSION["icinga.cronks.cache.xml"]);
-
+
$cronk_model = $ctx->getModel('Provider.CronksData', 'Cronks');
$this->assertTrue($cronk_model->hasCronk('dummyTestCronk1'));
@@ -160,17 +154,12 @@
public function testModuleCategories() {
IcingaWebTestTool::authenticateTestUser();
-
- // Drop cache
- unset($_SESSION["icinga.cronks.cache.xml"]);
$ctx = IcingaWebTestTool::getContext();
$ctx->getUser()->removeCredential('icinga.cronk.admin');
- $cronk_model = $ctx->getModel('Provider.CronksData', 'Cronks', array(
- 'lazy' => true
- ));
+ $cronk_model = $ctx->getModel('Provider.CronksData', 'Cronks');
$data = $cronk_model->combinedData();
@@ -184,7 +173,7 @@
$this->assertArrayHasKey('rows', $jarray);
$this->assertArrayHasKey('success', $jarray);
$this->assertArrayHasKey('total', $jarray);
-
+
$this->assertEquals(1, count($jarray['rows']));
// $this->assertInternalType('array', $data['categories']);
@@ -200,9 +189,6 @@
$ctx = IcingaWebTestTool::getContext();
$ctx->getUser()->removeCredential('icinga.cronk.admin');
-
- // Drop cache
- unset($_SESSION["icinga.cronks.cache.xml"]);
$cronk_model = $ctx->getModel('Provider.CronksData', 'Cronks');
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/app/modules/AppKit/lib/storage/AppKitMemcacheSessionStorage.class.php
^
|
@@ -1,117 +0,0 @@
-<?php
-// {{{ICINGA_LICENSE_CODE}}}
-// -----------------------------------------------------------------------------
-// This file is part of icinga-web.
-//
-// Copyright (c) 2009-2012 Icinga Developer Team.
-// All rights reserved.
-//
-// icinga-web is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// icinga-web is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with icinga-web. If not, see <http://www.gnu.org/licenses/>.
-// -----------------------------------------------------------------------------
-// {{{ICINGA_LICENSE_CODE}}}
-
-class AppKitMemcacheSessionStorage extends AgaviSessionStorage {
-
- /**
- * @var NsmSession
- */
- private $NsmSession = null;
- private $host = "localhost";
- private $port = 11211;
- private $prefix;
-
- /**
- * @var Memcache
- */
- private $memcache = null;
-
- public function initialize(AgaviContext $context, array $parameters = array()) {
-
- // initialize the parent
- parent::initialize($context, $parameters);
- $this->host = isset($parameters["host"]) ? $parameters["host"] : 'localhost';
- $this->port = isset($parameters["port"]) ? $parameters["port"] : 11211;
- session_set_save_handler(
- array(&$this, 'sessionOpen'),
- array(&$this, 'sessionClose'),
- array(&$this, 'sessionRead'),
- array(&$this, 'sessionWrite'),
- array(&$this, 'sessionDestroy'),
- array(&$this, 'sessionGC')
- );
-
- }
-
- public function sessionClose() {
- // Hm, the same as sessionOpen?!
-
- }
-
- /**
- * Trigger the sesstion destroy and remove
- * data from database
- * @param string $id
- */
- public function sessionDestroy($id) {
- memcache_delete($this->memcache,$this->prefix.$this->getParameter('session_name').":".$id);
- return true;
- }
-
- /**
- Memcache has a expire value
- * @param integer $lifetime
- */
- public function sessionGC($lifetime) {
- /**/
- return true;
- }
-
- /**
- * Trigger to open the session
- * @param string $path
- * @param string $name
- */
- public function sessionOpen($path, $name) {
- $this->prefix = $path.$name;
- $this->memcache = memcache_pconnect($this->host,$this->port);
- }
-
- /**
- * Reads data from doctrine tables and return its content
- * @param string $id
- * @throws AppKitDoctrineSessionStorageException
- */
- public function sessionRead($id) {
- $session = memcache_get($this->memcache,$this->prefix.$this->getParameter('session_name').":".$id);
- if(!$session) {
- memcache_add($this->memcache,$this->prefix.$this->getParameter('session_name').":".$id,"");
- return '';
- }
-
- return $session;
-
- }
-
- /**
- * Writes session data to database tables
- * @param string $id
- * @param mixed $data
- */
- public function sessionWrite($id, &$data) {
- memcache_set($this->memcache,$this->prefix.$this->getParameter('session_name').":".$id,$data);
- }
-
-}
-
-class AppKitDoctrineSessionStorageException extends AppKitException {}
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/app/modules/Cronks/lib/js/Ext/ux/FlashComponent.js
^
|
@@ -1,59 +0,0 @@
-// {{{ICINGA_LICENSE_CODE}}}
-// -----------------------------------------------------------------------------
-// This file is part of icinga-web.
-//
-// Copyright (c) 2009-2012 Icinga Developer Team.
-// All rights reserved.
-//
-// icinga-web is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// icinga-web is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with icinga-web. If not, see <http://www.gnu.org/licenses/>.
-// -----------------------------------------------------------------------------
-// {{{ICINGA_LICENSE_CODE}}}
-/*global Ext: false, Icinga: false, AppKit: false, _: false, Cronk: false */
-
-(function() {
- "use strict";
-
- Ext.ns('Ext.chart', 'YAHOO.widget');
-
- /**
- * @class Ext.chart.PieChart
- * @overrides Ext.chart.PieChart
- * @namespace Ext.chart
- * @author Markus Frosch <markus.frosch@netways.de>
- * @getId
- */
- Ext.override(Ext.chart.PieChart, {
- /*
- Replacing getId with a new version to give the YUI swf
- an id that he wants and allows
- */
- getId: function() {
- return this.id || (this.id = "yuiswf" + (++Ext.Component.AUTO_ID));
- }
- });
-
- /**
- * @class YAHOO.widget.SWF
- * @extends Ext.FlashEventProxy
- * @namespace YAHOO.widget
- * @author Markus Frosch <markus.frosch@netways.de>
- *
- * A proxy object to call Ext.FlashEventProxy
- * from a YUI flash component
- */
- YAHOO.widget.SWF = Ext.FlashEventProxy;
- YAHOO.widget.SWF.eventHandler = function(id, e) {
- this.onEvent(id, e);
- };
-}());
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/contrib/businessprocess-icinga-cronk/doc/CHANGELOG
^
|
@@ -1,3 +0,0 @@
-1.2.3
-------------------------------
-* Bugfix in config parser
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/etc/schema/updates/mysql/mysql_v1-8-0_to_v-1-8-1.sql
^
|
@@ -1,5 +0,0 @@
-DELETE FROM nsm_db_version;
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.1', NOW(), NOW());
-
-UPDATE nsm_target SET target_class = 'IcingaDataCommandRestrictionPrincipalTarget' WHERE target_name = 'IcingaCommandRestrictions';
-
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/etc/schema/updates/mysql/mysql_v1-8-1_to_v1-8-3.sql
^
|
@@ -1,44 +0,0 @@
-BEGIN;
-SET autocommit = 0;
-
---
--- renaming duplicate appstate in user preference data by using the newest row
---
-DROP TABLE IF EXISTS `nsm_user_preference_trans`;
-
--- copying current data to temp table
-CREATE TEMPORARY TABLE nsm_user_preference_trans
-SELECT * FROM nsm_user_preference;
-
--- locking
-LOCK TABLES `nsm_user_preference` WRITE, `nsm_user_preference_trans` WRITE;
-
--- cleaning the table
-DELETE FROM nsm_user_preference;
-
--- inserting deduplicated data
-INSERT INTO nsm_user_preference
-SELECT
- upref_id,
- upref_user_id,
- upref_val,
- upref_longval,
- upref_key,
- upref_created,
- upref_modified
-FROM nsm_user_preference_trans
-GROUP by upref_user_id, upref_key
-HAVING MAX(upref_modified);
-
--- adding unique key for user_id and key of preference
-ALTER TABLE nsm_user_preference ADD UNIQUE KEY upref_user_key_unique_idx (upref_user_id, upref_key);
-
--- clean up
-DROP TABLE nsm_user_preference_trans;
-UNLOCK TABLES;
-
--- update version info
-DELETE FROM nsm_db_version;
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.3', NOW(), NOW());
-
-COMMIT;
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/etc/schema/updates/oracle/oracle_v1-8-0_to_v1-8-3.sql
^
|
@@ -1,41 +0,0 @@
-/* update script for icinga-web on oracle version v1.8.3 */
-set echo on
-set feedback on
-/* logging */
-spool oracle_v1-8-0_to_v1-8-3.log
-
-/* define index tablespace. change this for your needs */
-define IXTBS='ICINGAWEB_IDX1';
-
-/*
-drop existing constraint if any
-ignore ORA-02443 nonexistent constraint warning!
-*/
-alter table nsm_user_preference drop constraint nsm_user_pref_userid_key_uq drop index;
-
-/* from now leave on error */
-whenever sqlerror exit failure
-
-
-/* delete duplicates first if any and than add unique key for preference user_id and key #3870 */
-delete from nsm_user_preference ud
-where
- upref_id <
- (select max(upref_id) from nsm_user_preference ur
- where ud.upref_user_id=ur.upref_user_id
- and ud.upref_key=ur.upref_key);
-alter table nsm_user_preference add constraint nsm_user_pref_userid_key_uq UNIQUE (upref_user_id, upref_key)
- using index tablespace &IXTBS;
-
-
-/* update version info */
-DELETE FROM nsm_db_version;
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.3', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-
-/* commit all changes as single transaction, this will not be reached on error */
-commit;
-
-/* done */
-spool off;
-exit;
-
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/etc/schema/updates/pgsql/pgsql_v1-8-0_to_v-1-8-1.sql
^
|
@@ -1,5 +0,0 @@
-DELETE FROM nsm_db_version;
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.1', NOW(), NOW());
-
-UPDATE nsm_target SET target_class = 'IcingaDataCommandRestrictionPrincipalTarget' WHERE target_name = 'IcingaCommandRestrictions';
-
|
[-]
[+]
|
Deleted |
icinga-web-1.8.3.tar.bz2/etc/schema/updates/pgsql/pgsql_v1-8-1_to_v1-8-3.sql
^
|
@@ -1,46 +0,0 @@
-BEGIN;
-
---
--- renaming duplicate appstate in user preference data by using the newest row
---
-DROP TABLE IF EXISTS nsm_user_preference_trans;
-
--- copying current data to temp table
-CREATE TEMPORARY TABLE nsm_user_preference_trans AS
-SELECT * FROM nsm_user_preference;
-
--- locking
-LOCK TABLE nsm_user_preference, nsm_user_preference_trans IN ACCESS EXCLUSIVE MODE;
-
--- cleaning the table
-DELETE FROM nsm_user_preference;
-
--- inserting deduplicated data
-INSERT INTO nsm_user_preference
-SELECT
- upref_id,
- upref_user_id,
- upref_val,
- upref_longval,
- upref_key,
- upref_created,
- upref_modified
-FROM nsm_user_preference_trans t
-WHERE upref_id = (
- SELECT MAX(upref_id)
- FROM nsm_user_preference_trans t2
- WHERE t.upref_key = t2.upref_key
- and t.upref_user_id = t2.upref_user_id
-);
-
--- adding unique key for user_id and key of preference
-CREATE UNIQUE INDEX upref_user_key_unique_idx ON nsm_user_preference USING btree (upref_user_id, upref_key);
-
--- clean up
-DROP TABLE nsm_user_preference_trans;
-
--- update version info
-DELETE FROM nsm_db_version;
-INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.3', NOW(), NOW());
-
-COMMIT;
|