[-]
[+]
|
Changed |
icinga-web.changes
|
|
[-]
[+]
|
Changed |
icinga-web.spec
^
|
|
|
Deleted |
icinga-web-1.8.0.tar.bz2/lib/ext3/resources/expressinstall.swf
^
|
[-]
[+]
|
Deleted |
icinga-web-1.8.0.tar.bz2/pub/soap/icinga.wsdl
^
|
@@ -1,78 +0,0 @@
-<?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>
|
[-]
[+]
|
Deleted |
icinga-web-1.8.0.tar.bz2/pub/soap/index.php
^
|
@@ -1,43 +0,0 @@
-<?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);
-
-?>
|
[-]
[+]
|
Deleted |
icinga-web-1.8.0.tar.bz2/pub/soapRequestTest.php
^
|
@@ -1,13 +0,0 @@
-<?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.2.tar.bz2/app/config/factories.xml.in
^
|
@@ -45,7 +45,15 @@
<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.2.tar.bz2/app/modules/Api/config/views/host.xml
^
|
@@ -14,6 +14,9 @@
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,
@@ -43,7 +46,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>
@@ -75,14 +78,12 @@
<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">
@@ -90,7 +91,6 @@
<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,7 +98,6 @@
<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>
@@ -119,6 +118,7 @@
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,6 +175,7 @@
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.2.tar.bz2/app/modules/Api/config/views/service.xml
^
|
@@ -18,6 +18,8 @@
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,
@@ -35,7 +37,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
@@ -82,17 +84,26 @@
<innerjoin>h.hostgroups hg</innerjoin>
<innerjoin>hg.object ohg</innerjoin>
<select>ohg.name1 AS hostgroup_name</select>
- <groupby>s.service_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>
</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>
@@ -114,6 +125,7 @@
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.2.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,7 +154,8 @@
*/
public function canApply() {
AppKitLogger::verbose("Testing canApply: for %s objects and %s countfields",$this->getObjectIds(),$this->countFields());
- if ($this->countFields() > 0 && $this->getObjectIds() !== array("-1")) {
+
+ if ($this->countFields() > 0 && !in_array("-1",$this->getObjectIds())) {
AppKitLogger::verbose("Extender can be applied on this query");
return true;
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/actions/Widgets/SquishLoaderAction.class.php
^
|
@@ -29,20 +29,30 @@
}
public function executeRead(AgaviRequestDataHolder $rd) {
- $ra = explode('.', array_pop(
- $this->getContext()->getRequest()->getAttribute(
- 'matched_routes', 'org.agavi.routing'
- )
- ));
-
- $type = array_pop($ra);
-
+ $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];
$loader = $this->getContext()->getModel(
'SquishFileContainer',
'AppKit',
- array('type' => $type)
+ array(
+ 'type' => $type,
+ 'route' => $route
+ )
);
+ 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) {
@@ -72,21 +82,11 @@
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);
- }
- $this->setAttribute('etag',$loader->getChecksum());
+ $loader->squishContents();
+ $content = $loader->getContent();
+ $this->setAttribute('content', $content. chr(10));
+ $this->setAttribute("etag",$loader->getCachedChecksum());
return $this->getDefaultViewName();
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/config/autoload.xml
^
|
@@ -41,6 +41,7 @@
<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.2.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,7 +192,10 @@
* @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);
@@ -201,27 +204,26 @@
return false;
}
- if ($blob == true) {
- $pref->upref_longval = $val;
- } else {
- $pref->upref_val = $val;
- }
+ 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;
- $pref->save();
} catch (AppKitDoctrineException $e) {
$pref = new NsmUserPreference();
- $pref->upref_key = $key;
-
- if ($blob == true) {
- $pref->upref_longval = $val;
- } else {
- $pref->upref_val = $val;
- }
+ $pref->upref_key = $key;
+ $pref->$field = $val;
$pref->NsmUser = $this;
$pref->save();
- }
+ AppKitLogger::warn("New: Setting %s => %s", $key,$pref->toArray(false) );
+ }
+ NsmUser::$cachedPreferences[$key] = array();
+ NsmUser::$cachedPreferences[$key] = $val;
+ $this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
return true;
}
@@ -232,20 +234,14 @@
* @throws AppKitDoctrineException
* @author Marius Hein
*/
- 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;
+ 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);
}
-
throw new AppKitDoctrineException('Preference record not found!');
}
@@ -257,14 +253,10 @@
* @author Marius Hein
*/
public function getPrefVal($key, $default=null, $blob = false) {
- try {
- $obj = $this->getPrefObject($key,$noThrow = false);
- if ($obj->upref_longval || $blob) {
- return $obj->upref_longval;
- } else {
- return $obj->upref_val;
- }
+ try {
+ $val = $this->getPrefObject($key,$noThrow = false);
+ return $val;
} catch (AppKitDoctrineException $e) {
return $default;
}
@@ -319,6 +311,8 @@
->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;
@@ -327,7 +321,14 @@
}
}
- public function getPreferences() {
+ public function getPreferences($shortenBlob = false) {
+ if(!empty(self::$cachedPreferences)) {
+ return self::$cachedPreferences;
+ }
+ self::$cachedPreferences = $this->getStorage()->read("appkit.nsm_user.preferences");
+ if(!empty(self::$cachedPreferences)) {
+ return self::$cachedPreferences;
+ }
$res = AppKitDoctrineUtil::createQuery()
->select('p.upref_val, p.upref_key, p.upref_longval')
->from('NsmUserPreference p INDEXBY p.upref_key')
@@ -335,31 +336,21 @@
->execute(array(), Doctrine::HYDRATE_ARRAY);
$out = array();
- foreach($res as $key=>$d) $out[$key] = $d['upref_longval'] ? 'BLOB' : $d['upref_val'];
-
+ foreach($res as $key=>$d)
+ $out[$key] = $d['upref_longval'] ? $d['upref_longval'] : $d['upref_val'];
+ if($shortenBlob && $d['upref_longval'])
+ $out[$key] = "BLOB";
// 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;
+ $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
@@ -442,6 +433,8 @@
* @return Doctrine_Collection
*/
public function getPrincipals($userOnly= false) {
+ if ($this->principals === null)
+ $this->principals = $this->getStorage()->read("appkit.nsm_user.principals");
if ($this->principals === null) {
$roles = $this->getRoleIds();
@@ -452,7 +445,7 @@
->orWhere('p.principal_user_id = ?',$this->user_id)
->execute();
-
+ $this->getStorage()->write("appkit.nsm_user.principals",$this->principals);
}
return $this->principals;
@@ -461,8 +454,9 @@
public function getPrincipalsArray() {
static $out = array();
- if (count($out) == 0) {
- foreach($this->getPrincipals() as $p) {
+ if (empty($out)) {
+ $principals = $this->getPrincipals();
+ foreach($principals as $p) {
$out[] = $p->principal_id;
}
}
@@ -476,8 +470,10 @@
* @return Doctrine_Collection
*/
public function getTargets($type=null,$userOnly = false) {
-
- return $this->getTargetsQuery($type,$userOnly)->execute();
+ $principals = $userOnly ? $this->getUserPrincipalsList() : $this->getPrincipalsList();
+ if(empty($principals))
+ return array();
+ return $this->getTargetsQuery($type,$userOnly,$principals)->execute();
}
/**
@@ -486,8 +482,10 @@
* @param string $type
* @return Doctrine_Query
*/
- protected function getTargetsQuery($type=null,$userOnly = false) {
- $principals = $userOnly ? $this->getUserPrincipalsList() : $this->getPrincipalsList();
+ protected function getTargetsQuery($type=null,$userOnly = false,$principals = null) {
+ if($principals == null)
+ $principals = $userOnly ? $this->getUserPrincipalsList() : $this->getPrincipalsList();
+
$q = AppKitDoctrineUtil::createQuery()
->select('t.*')
->distinct(true)
@@ -571,11 +569,14 @@
$out[] = $r->tv_val;
}
- return $targets;
+ return $out;
}
public function getTargetValuesArray() {
- if (count(self::$targetValuesCache) == 0) {
+ if (empty(self::$targetValuesCache)) {
+ self::$targetValuesCache = $this->getStorage()->read("appkit.nsm_user.targetvalues");
+ }
+ if (empty(self::$targetValuesCache)) {
$tc = AppKitDoctrineUtil::createQuery()
->select('t.target_name, t.target_id')
->from('NsmTarget t')
@@ -606,6 +607,7 @@
}
self::$targetValuesCache =& $out;
+ $this->getStorage()->write("appkit.nsm_user.targetvalues",self::$targetValuesCache);
}
return self::$targetValuesCache;
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.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'=> null,
+ 'target_class'=> "IcingaDataCommandRestrictionPrincipalTarget",
'target_type'=>"icinga"),
array(
'target_id'=>20,
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php
^
|
@@ -21,65 +21,48 @@
// -----------------------------------------------------------------------------
// {{{ICINGA_LICENSE_CODE}}}
-
/**
- Project wide exception and php error handler. This
- handler logs also all errors into agavi logger
- * @author mhein
- *
+ * @author Marius Hein <marius.hein@netways.de>
+ * @author Eric Lippmann <eric.lippmann@netways.de>
*/
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');
-
/**
- * Prepare php to use something other that its internal stack
+ * Sets user-defined error and exception handler functions so that
+ * errors and exceptions apper in the icinga-web logs.
*/
public static function initializeHandler() {
- self::$oldExceptionHandler = set_exception_handler(self::$handlerException);
- self::$oldErrorHandler = set_error_handler(self::$handlerError);
- ini_set('display_errors', false);
+ set_exception_handler(array('AppKitExceptionHandler', 'logException'));
+ set_error_handler(array('AppKitExceptionHandler', 'exceptionOnError'));
}
/**
- * Converts php simple error into an exception
- * @param integer $errno
- * @param string $errstr
- * @param string $errfile
- * @param integer $errline
- * @param array $errcontext
+ * Treats PHP's non-exception errors as exceptions.
*/
- 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));
+ 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));
}
+ /**
+ * 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);
-
- // 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;
- }
+ 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;
}
-
-
}
class AppKitPHPError extends Exception {}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php
^
|
@@ -63,16 +63,19 @@
*/
public function sessionDestroy($id) {
- $result = AppKitDoctrineUtil::createQuery()
- ->delete('NsmSession')
- ->andWhere('session_name=? and session_id=?', array($this->getParameter('session_name'), $id))
- ->execute();
+ AppKitLogger::verbose("Destroying session (%s)", $id);
- if ($result > 0) {
- return true;
- }
+ // 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
- return false;
+ $this->sessionRead($id);
+
+ $data = '';
+ $this->sessionWrite($id, $data);
+
+ return true;
}
@@ -135,6 +138,10 @@
$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");
|
[-]
[+]
|
Added |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/lib/storage/AppKitMemcacheSessionStorage.class.php
^
|
@@ -0,0 +1,117 @@
+<?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 {}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/models/Auth/Provider/LDAPModel.class.php
^
|
@@ -43,15 +43,21 @@
try {
// Check if user always is available
- $search_record = $this->getLdaprecord($this->getSearchFilter($user->user_name), $authid);
+ $search_record = $this->getLdaprecord($this->getSearchFilter($user->user_name));
- if (isset($search_record['dn']) && $search_record['dn'] === $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) {
// 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, $authid, $password);
+ $re = @ldap_bind($conn, $search_record['dn'], $password);
if ($this->isLdapError($conn)==false && $re === true && ldap_errno($conn) === 0) {
- $this->log('Auth.Provider.LDAP Successfull bind (authkey=%s,user=%s)', $authid, $username, AgaviLogger::DEBUG);
+ $this->log('Auth.Provider.LDAP Successfull bind (dn=%s,user=%s)', $search_record['dn'], $username, AgaviLogger::DEBUG);
return true;
}
}
@@ -69,14 +75,25 @@
* @see app/modules/AppKit/lib/auth/AppKitIAuthProvider#isAvailable()
*/
public function isAvailable($uid, $authid=null) {
- $record = $this->getLdaprecord('(objectClass=*)', $authid);
+ // 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));
if (is_array($record)) {
- if ($record['dn'] === $authid) {
+ $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);
return true;
}
}
+ $this->log("Availability lookup in LDAP failed, username %s not found!", $uid, AgaviLogger::DEBUG);
return false;
}
@@ -92,13 +109,7 @@
$this->log('Auth.Provider.LDAP Try import (user=%s, authid=%s)', $uid, $authid, AgaviLogger::DEBUG);
- if ($authid == $uid || $authid==false) {
- $data = $this->getLdaprecord($this->getSearchFilter($uid));
- }
-
- elseif(strlen($authid) > strlen($uid)) {
- $data = $this->getLdaprecord('(objectClass=*)', $authid);
- }
+ $data = $this->getLdaprecord($this->getSearchFilter($uid));
if (is_array($data)) {
$re = (array)$this->mapUserdata($data);
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.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,8 +107,7 @@
$dbrev = $this->getDatabaseRevision();
$count = $this->getCount();
- $oids = json_encode($this->object_ids);
-
+ $oids = implode(",",array_keys($this->object_ids));
$storage->write(self::SESSION_KEY_COUNT, $count);
$storage->write(self::SESSION_KEY_OID, $oids);
$storage->write(self::SESSION_KEY_REV, $dbrev);
@@ -118,10 +117,13 @@
* 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)json_decode($oids);
-
+ $this->object_ids = array_flip(explode(",",$oids));
+ if(isset($this->object_ids["-1"])) {
+ $this->object_ids = array("-1"=>"0");
+ }
$username = $this->user->getNsmUser()->user_name;
AppKitLogger::verbose('Credentials (%s): Read cache, %d objects',
@@ -491,4 +493,4 @@
}
}
-}
\ No newline at end of file
+}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/models/SquishFileContainerModel.class.php
^
|
@@ -29,6 +29,7 @@
private $files = array();
private $actions = array();
private $type = null;
+ private $route = "";
private $content = null;
private $checksum = null;
private $maxCacheTime = 14400;
@@ -43,7 +44,9 @@
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');
@@ -105,15 +108,15 @@
return $this->type;
}
- public function squishContents($lastSquish = null) {
- if ($lastSquish) {
- $this->getCachedChecksum();
+ public function hasEtagInCache($squishEtag) {
+ $sum = $this->getCachedChecksum();
+
+ return $sum && ($sum == $squishEtag);
+
+ }
+
+ public function squishContents() {
- if ($lastSquish == $this->checksum) {
- return true;
- }
- }
-
if ($this->useCaching) {
$this->readCached();
}
@@ -166,11 +169,11 @@
}
}
- return $lastSquish && $lastSquish == $this->checksum;
+ return true;
}
private function getCacheFilename() {
- $file = "squish_".md5(implode(";",$this->files));
+ $file = "squish_".md5($this->route);
$cached = $this->cache_dir.'/'.$file;
@@ -205,7 +208,9 @@
return null;
}
- private function getCachedChecksum() {
+ public function getCachedChecksum() {
+ if($this->checksum)
+ return $this->checksum;
$cached = $this->getCacheFilename().".sum";
if (is_readable($cached) && file_exists($cached)) {
@@ -214,6 +219,7 @@
}
$this->checksum = file_get_contents($cached);
+ return $this->checksum;
}
return null;
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
^
|
@@ -28,49 +28,20 @@
if ($this->getAttribute('errors', false)) {
return "throw '". join(", ", $this->getAttribute('errors')). "';";
} else {
-
- $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;
+ // 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 "";
}
}
@@ -88,15 +59,15 @@
* Mapping configuration items from AgaviConfig to JS AppKit.util.Config
* @param string $content
*/
- private function copyConfigToJavascript(&$content) {
+ private function printJSConfig() {
$map = AgaviConfig::get('modules.appkit.js_config_mapping', array ());
if (count($map)) {
- $out = 'var Icinga = { AppKit: { configMap: {} }};'. chr(10);
+ echo 'var Icinga = { AppKit: { configMap: {} }};'. chr(10);
foreach ($map as $target=>$source) {
$val = AgaviConfig::get($source ? $source : $target, null);
- $out .= 'Icinga.AppKit.configMap['. json_encode($target). '] = '. json_encode($val). ';'. chr(10);
+ echo 'Icinga.AppKit.configMap['. json_encode($target). '] = '. json_encode($val). ';'. chr(10);
}
- $content .= $out;
+
}
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/config/javascript.xml
^
|
@@ -17,6 +17,7 @@
<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>
@@ -120,4 +121,4 @@
<ae:parameter>%core.module_dir%/Cronks/lib/js/Cronk/grid/MetaGridPanel.js</ae:parameter>
</javascript>
</ae:configuration>
-</ae:configurations>
\ No newline at end of file
+</ae:configurations>
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.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:([\w\d\_\-]+))" action="Provider.CategorySecurity" />
+ <route name=".principal" pattern="^/security/(catid:(.+))" action="Provider.CategorySecurity" />
</route>
<route name=".cronks" pattern="^/$" action="Provider.Cronks" />
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
^
|
@@ -1032,7 +1032,6 @@
<parameter name="default">false</parameter>
</order>
</field>
-
<field name="host_last_check">
<datasource>
<parameter name="field">HOST_LAST_CHECK</parameter>
@@ -1255,7 +1254,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>
@@ -1268,6 +1267,46 @@
<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.2.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
^
|
@@ -1009,8 +1009,86 @@
<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.2.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-servicegroup-summary-template.xml
^
|
@@ -181,7 +181,7 @@
-->
<fields>
- <field name="instance_funky_name">
+ <field name="instance_name">
<datasource>
<parameter name="field">instance_name</parameter>
</datasource>
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-unhandled-host-problems.xml
^
|
@@ -414,15 +414,6 @@
<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>
@@ -1033,7 +1024,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>
@@ -1046,5 +1037,46 @@
<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.2.tar.bz2/app/modules/Cronks/data/xml/grid/icinga-unhandled-service-problems.xml
^
|
@@ -752,7 +752,6 @@
<parameter name="field">SERVICE_CURRENT_STATE</parameter>
</order>
</field>
-
<field name="service_last_check">
<datasource>
<parameter name="field">SERVICE_LAST_CHECK</parameter>
@@ -905,6 +904,45 @@
</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.2.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,34 +199,43 @@
case 'checkbox':
Ext.apply(oDef, {
name: o.fieldName + '-group',
- columns: 2,
+ layout: 'column',
items: [{
+ xtype: 'radio',
boxLabel: _('Yes'),
inputValue: 1,
- name: o.fieldName
+ columnWidth: 0.5,
+ name: o.fieldName,
+ checked: o.fieldValue === "true"
}, {
+ xtype: 'radio',
boxLabel: _('No'),
inputValue: 0,
name: o.fieldName,
- checked: true
+ columnWidth: 0.5,
+ checked: o.fieldValue !== "true"
}]
});
if (o.fieldName === "fixed") {
+ AppKit.log(oDef);
var affectedForms = ['duration', 'duration-minute', 'duration-hour'];
- 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);
+ 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);
+ }
}
}
}
};
}
- return new Ext.form.RadioGroup(oDef);
+ return new Ext.Container(oDef);
case 'duration':
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
^
|
@@ -457,7 +457,7 @@
getView: function () {
if (!this.view) {
var viewConfig = {
- forceFit: true,
+ forceFit: false,
groupTextTpl: '{text} ({[values.rs.length]}' + ' {[values.rs.length > 1 ? "Items" : "Item"]})'
};
@@ -557,6 +557,7 @@
btn.setChecked(v, true);
});
},
+
scope: this
},
@@ -818,7 +819,9 @@
}
}
}, this);
-
+ this.store.on("load",function() {
+ this.saveState();
+ },this)
this.on("show", function () {
if (this.autoRefreshEnabled) {
this.startRefreshTimer();
@@ -837,6 +840,10 @@
msg: _("Loading ...")
});
}, this);
+
+ this.on("columnmove", function(grid) {
+ this.saveState();
+ }, this);
},
/**
@@ -1008,9 +1015,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,
@@ -1018,7 +1025,7 @@
autoRefresh: aR,
connection: this.store.baseParams.connection
};
-
+
return o;
},
@@ -1076,7 +1083,6 @@
if (state.connection) {
this.setConnection(state.connection);
-
}
if (Ext.isObject(state.nativeState)) {
return Ext.grid.GridPanel.prototype.applyState.call(this, {
@@ -1203,4 +1209,4 @@
*/
Ext.reg('cronkgrid', Cronk.grid.MetaGridPanel);
-})();
\ No newline at end of file
+})();
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
^
|
@@ -546,7 +546,7 @@
}, this);
- if (items.length) {
+ if (items.length || group.xtype) {
// Copy, because we're loosing our objects after
// deleting items
@@ -560,9 +560,10 @@
var componentGroup = null;
if (this.menuOrganizations.indexOf(this.organizeAs) > -1) {
- groupConfig.menu = new Ext.menu.Menu({
- items: items
- });
+ groupConfig.menu = {
+ items: items,
+ xtype: group.xtype || 'menu'
+ };
// groupConfig.menu.on("afterrender", function(menu) {
// Ext.fly(menu.getEl()).select("img.x-menu-item-icon").remove();
@@ -711,4 +712,4 @@
}
});
-})();
\ No newline at end of file
+})();
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js
^
|
@@ -37,6 +37,9 @@
def_webpath: '/modules/web/api/json',
def_sortorder: 'asc',
+ minListWidth: 240,
+ pageSize: 20,
+
constructor: function (cfg, meta) {
var kf = meta.api_keyfield; // ValueField
@@ -78,11 +81,18 @@
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
+ columns: cols,
+ limit_start: 0,
+ limit: 20,
+ countColumn: (meta.api_id || meta.api_keyfield)
},
idProperty: (meta.api_id || meta.api_keyfield),
@@ -129,4 +139,4 @@
}
});
-})();
\ No newline at end of file
+})();
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/filter/Handler.js
^
|
@@ -152,8 +152,7 @@
},
anchor: '-5',
scope: this,
- width: 25,
- columnWidth: '25px'
+ width: 25
});
return button;
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/filter/Window.js
^
|
@@ -126,12 +126,24 @@
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);
- selectRestrictionHandler(oCombo, r, i);
+ // 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);
+ }
+ }
i++;
});
}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
^
|
@@ -219,10 +219,19 @@
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.2.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;
}
@@ -156,4 +156,4 @@
};
})();
-})();
\ No newline at end of file
+})();
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Cronk/util/CronkBuilder.js
^
|
@@ -38,6 +38,9 @@
minHeight: 400,
height: 400,
+ // Contains only one direct child item, a form
+ layout: 'fit',
+
constructor : function(config) {
this.addEvents({
writeSuccess : true
|
[-]
[+]
|
Added |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Ext/ux/FlashComponent.js
^
|
@@ -0,0 +1,59 @@
+// {{{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);
+ };
+}());
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/js/Icinga/Cronks/System/CronkPortal.js
^
|
@@ -266,7 +266,7 @@
region: 'west',
id: 'west-frame',
layout: 'fit',
- autoScroll: true,
+ autoScroll: false,
split: true,
minSize: 200,
maxSize: 400,
@@ -286,4 +286,4 @@
});
-})();
\ No newline at end of file
+})();
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/app/modules/Cronks/lib/template/CronkGridTemplateXmlParser.class.php
^
|
@@ -30,7 +30,7 @@
}
-class CronkGridTemplateXmlParser {
+class CronkGridTemplateXmlParser implements Serializable {
/**
* @var DOMDocument
@@ -70,6 +70,18 @@
$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.2.tar.bz2/app/modules/Cronks/models/Provider/CronksDataModel.class.php
^
|
@@ -100,9 +100,11 @@
}
$this->initializeXmlData();
-
- $this->cronks = $this->getCronks(true);
-
+
+ if (!isset($parameters['lazy'])) {
+ $this->cronks = $this->getCronks(true);
+ }
+
}
/**
@@ -225,8 +227,13 @@
* @return array
*/
private function getXmlCronks($all=false) {
- $out = array();
+ $cached = $this->user->getStorage()->read("icinga.cronks.cache.xml");
+
+ if($cached) {
+ return $cached;
+ }
+ $out = array();
foreach(self::$xml_cronk_data as $uid=>$cronk) {
/*
@@ -257,7 +264,7 @@
$this->getContext()->getLoggerManager()->log('No action or module for cronk: '. $uid, AgaviLogger::ERROR);
continue;
}
-
+
$out[$uid] = array(
'cronkid' => $uid,
'module' => $cronk['module'],
@@ -276,9 +283,10 @@
'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;
}
@@ -383,7 +391,6 @@
$cronks = (array)$this->getDbCronks() + $cronks;
$this->reorderCronks($cronks);
-
return $cronks;
}
@@ -540,7 +547,7 @@
* -> defining a new owner of the object
*/
if (count($parr)<=0) {
- $parr = $this->user->principal->principal_id;
+ $parr = array($this->user->principal->principal_id);
}
$rarr = AppKitArrayUtil::trimSplit($roles, ',');
@@ -680,13 +687,17 @@
$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.2.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.2.tar.bz2/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
^
|
@@ -54,20 +54,24 @@
public function executeHtml(AgaviRequestDataHolder $rd) {
$this->setupHtml($rd);
+ $storage = $this->getContext()->getUser()->getNsmUser()->getStorage();
try {
- $file = $this->getTemplateFile($rd);
- $template = new CronkGridTemplateXmlParser($file->getRealPath(), $this->getContext());
- $template->parseTemplate();
+ $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));
+ }
$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();
@@ -80,13 +84,18 @@
$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.2.tar.bz2/app/modules/Reporting/config/module.xml.in
^
|
@@ -76,6 +76,7 @@
<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>
@@ -99,6 +100,17 @@
<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.2.tar.bz2/app/templates/exceptions/web.php
^
|
@@ -135,9 +135,5 @@
<?php
}
}
-try {
- AppKitExceptionHandler::logException($e);
-} catch(Exception $e) {
-
-}
+
?>
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/bin/clearcache.sh.in
^
|
@@ -43,7 +43,7 @@
msg_start "Deleting cache from $CUR_CNAME ($CC_FILES files)"
- rm $CUR_CDIR/* > /dev/null 2>&1
+ find $CUR_CDIR/ -type f -exec rm {} \;
msg_result
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.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.0.
+# Generated by GNU Autoconf 2.68 for icinga-web 1.8.2.
#
# 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.0'
-PACKAGE_STRING='icinga-web 1.8.0'
+PACKAGE_VERSION='1.8.2'
+PACKAGE_STRING='icinga-web 1.8.2'
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.0 to adapt to many kinds of systems.
+\`configure' configures icinga-web 1.8.2 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.0:";;
+ short | recursive ) echo "Configuration of icinga-web 1.8.2:";;
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.0
+icinga-web configure 1.8.2
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.0, which was
+It was created by icinga-web $as_me 1.8.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1814,7 +1814,7 @@
# Release date
-RELEASE_DATE=2012-10-18
+RELEASE_DATE=2013-02-12
@@ -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.0, which was
+This file was extended by icinga-web $as_me 1.8.2, 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.0
+icinga-web config.status 1.8.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.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.2.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.2.tar.bz2/contrib/businessprocess-icinga-cronk/BPAddon/models/businessProcessModel.class.php
^
|
@@ -63,7 +63,7 @@
}
public function setName($name) {
- $this->name = $name;
+ $this->name = trim(str_replace(":","",$name));
}
public function setLongName($name) {
@@ -266,4 +266,4 @@
return $string;
}
-}
\ No newline at end of file
+}
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/contrib/businessprocess-icinga-cronk/BPAddon/templates/OverviewSuccess.php
^
|
@@ -111,8 +111,8 @@
},
applyState: function(state) {
if(!state) {
- this.autoRefresh = true;
- this.toggleAutorefresh(null,true,true);
+ this.autoRefresh = false;
+ this.toggleAutorefresh(null,false,true);
return null;
}
if(state.conf)
|
[-]
[+]
|
Added |
icinga-web-1.8.2.tar.bz2/contrib/businessprocess-icinga-cronk/doc/CHANGELOG
^
|
@@ -0,0 +1,3 @@
+1.2.3
+------------------------------
+* Bugfix in config parser
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/contrib/businessprocess-icinga-cronk/doc/VERSION
^
|
@@ -1 +1 @@
-1.2.2.
+1.2.3rc
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/doc/CHANGELOG-1.8
^
|
@@ -5,6 +5,59 @@
Thanks to all contributers, testers and developers. Please read AUTHORS and
THANKS for a detailed list :-)
+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.2.tar.bz2/doc/THANKS
^
|
@@ -27,7 +27,8 @@
* mopp
* darkarchon
* Markus Frosch
- * Philipp Deneu
+ * Philipp Deneu
+ * abraxas
* Design stuff
* Karolina Hein
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/doc/VERSION
^
|
@@ -1 +1 @@
-1.8.0
+1.8.2
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/etc/conf.d/module_appkit.xml
^
|
@@ -10,9 +10,10 @@
<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.2.tar.bz2/etc/make/version.m4
^
|
@@ -9,5 +9,5 @@
dnl this name.
dnl
-m4_define([ICINGA_VERSION], [1.8.0])
-m4_define([ICINGA_RELEASE_DATE], [2012-10-18])
+m4_define([ICINGA_VERSION], [1.8.2])
+m4_define([ICINGA_RELEASE_DATE], [2013-02-12])
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/etc/schema/mysql.sql
^
|
@@ -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','','icinga');
+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 ('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');
\ No newline at end of file
+INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','3');
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/etc/schema/pgsql.sql
^
|
@@ -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 \N icinga
+19 IcingaCommandRestrictions Disable critical commands for this user IcingaDataCommandRestrictionPrincipalTarget 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
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/etc/schema/updates/mysql/mysql_v1-7-2_to_v1-8-0.sql
^
|
@@ -1,15 +1,6 @@
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;
@@ -53,4 +44,4 @@
);
ALTER TABLE nsm_user
- CHANGE COLUMN user_authid user_authid varchar(512) NULL DEFAULT NULL;
\ No newline at end of file
+ CHANGE COLUMN user_authid user_authid varchar(512) NULL DEFAULT NULL;
|
[-]
[+]
|
Added |
icinga-web-1.8.2.tar.bz2/etc/schema/updates/mysql/mysql_v1-8-0_to_v-1-8-1.sql
^
|
@@ -0,0 +1,5 @@
+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';
+
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/etc/schema/updates/oracle/oracle_v1-7-2_to_v1-8-0.sql
^
|
@@ -3,16 +3,6 @@
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);
@@ -53,4 +43,4 @@
'icinga',
'IcingaDataHostPrincipalTarget' );
-ALTER TABLE NSM_USER MODIFY ("USER_AUTHID" VARCHAR2(512 BYTE));
\ No newline at end of file
+ALTER TABLE NSM_USER MODIFY ("USER_AUTHID" VARCHAR2(512 BYTE));
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/etc/schema/updates/pgsql/pgsql_v1-7-2_to_v1-8-0.sql
^
|
@@ -3,16 +3,6 @@
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;
@@ -54,4 +44,4 @@
);
ALTER TABLE nsm_user
- ALTER COLUMN user_authid TYPE varchar(512);
\ No newline at end of file
+ ALTER COLUMN user_authid TYPE varchar(512);
|
[-]
[+]
|
Added |
icinga-web-1.8.2.tar.bz2/etc/schema/updates/pgsql/pgsql_v1-8-0_to_v-1-8-1.sql
^
|
@@ -0,0 +1,5 @@
+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';
+
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/icinga-web.spec
^
|
@@ -10,6 +10,20 @@
%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
@@ -30,7 +44,7 @@
Summary: Open Source host, service and network monitoring Web UI
Name: icinga-web
-Version: 1.8.0
+Version: 1.8.2
Release: %{revision}%{?dist}
License: GPLv3
Group: Applications/System
@@ -45,22 +59,46 @@
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: php >= 5.2.3
-Requires: php-pear
-Requires: php-gd
-Requires: php-xml
-Requires: php-ldap
-Requires: php-pdo
-Requires: php-dom
+Requires: %{phpname} >= 5.2.3
+Requires: %{phpname}-gd
+Requires: %{phpname}-ldap
+Requires: %{phpname}-pdo
%if "%{_vendor}" == "redhat"
-Requires: php-common
+Requires: %{phpname}-common
+Requires: %{phpname}-xml
+Requires: php-pear
%endif
%if "%{_vendor}" == "suse"
-Requires: php-xsl
+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: apache2-mod_php5
%endif
-Requires: php-spl
Requires: pcre >= 7.6
@@ -82,6 +120,19 @@
##############################
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
@@ -133,6 +184,16 @@
# 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
##############################
@@ -171,6 +232,12 @@
%{__rm} -rf %{cachedir}/CronkTemplates/*.php
##############################
+%post module-nagiosbp
+##############################
+
+%{_bindir}/%{name}-clearcache
+
+##############################
%clean
##############################
@@ -180,8 +247,11 @@
%files
##############################
# main dirs
-%doc etc/schema contrib doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
+%doc etc/schema doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
%defattr(-,root,root)
+# 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
@@ -205,14 +275,36 @@
%files module-pnp
##############################
# templates, experimental treatment as configs (noreplace)
-%doc contrib/PNP_Integration/README
+%doc contrib/PNP_Integration/README contrib/PNP_Integration/INSTALL
+%doc contrib/PNP_Integration/doc contrib/nginx
%defattr(-,root,root)
%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)
+%doc contrib/businessprocess-icinga-cronk/doc
+%defattr(-,root,root)
+%config(noreplace) %{_datadir}/%{name}/app/modules/BPAddon/config/*
+%{_datadir}/%{name}/app/modules/BPAddon
+
##############################
%changelog
##############################
+* 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
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.tar.bz2/lib/agavi/src/exception/AgaviException.class.php
^
|
@@ -288,11 +288,6 @@
$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.2.tar.bz2/lib/ext3/resources/charts.swf
^
|
[-]
[+]
|
Changed |
icinga-web-1.8.2.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,23 +63,26 @@
$resource = $database->getConnection();
}
- /**
- * @group Module
- */
+ /**
+ * @group Module
+ */
public function testCronkSecurityModel() {
// Name of a system cronk
static $cronk_name = 'gridInstanceStatus';
- // Test init
- IcingaWebTestTool::authenticateTestUser();
+ // Test init
+ IcingaWebTestTool::authenticateTestUser();
+
+ // Drop cache
+ unset($_SESSION["icinga.cronks.cache.xml"]);
- // 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();
@@ -96,7 +99,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
@@ -104,15 +107,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);
}
/**
@@ -123,7 +126,10 @@
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'));
@@ -154,12 +160,17 @@
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');
+ $cronk_model = $ctx->getModel('Provider.CronksData', 'Cronks', array(
+ 'lazy' => true
+ ));
$data = $cronk_model->combinedData();
@@ -173,7 +184,7 @@
$this->assertArrayHasKey('rows', $jarray);
$this->assertArrayHasKey('success', $jarray);
$this->assertArrayHasKey('total', $jarray);
-
+
$this->assertEquals(1, count($jarray['rows']));
// $this->assertInternalType('array', $data['categories']);
@@ -189,6 +200,9 @@
$ctx = IcingaWebTestTool::getContext();
$ctx->getUser()->removeCredential('icinga.cronk.admin');
+
+ // Drop cache
+ unset($_SESSION["icinga.cronks.cache.xml"]);
$cronk_model = $ctx->getModel('Provider.CronksData', 'Cronks');
|