N°2677 - Add style definition for classes

This commit is contained in:
Eric
2021-01-06 13:57:46 +01:00
parent fca123e127
commit d4aeb4b157
31 changed files with 1105 additions and 372 deletions

View File

@@ -903,10 +903,10 @@ class DashletObjectList extends Dashlet
{
$sTitle = $this->aProperties['title'];
$sShowMenu = $this->aProperties['menu'] ? '1' : '0';
$oPanel = PanelFactory::MakeNeutral(Dict::S($sTitle));
$oFilter = $this->GetDBSearch($aExtraParams);
$sClass = $oFilter->GetClass();
$oPanel = PanelFactory::MakeForClass($sClass, Dict::S($sTitle));
$oBlock = new DisplayBlock($oFilter, 'list');
$aParams = array(
'menu' => $sShowMenu,
@@ -1241,7 +1241,7 @@ abstract class DashletGroupBy extends Dashlet
break;
}
$oPanel = PanelFactory::MakeNeutral(Dict::S($sTitle));
$oPanel = PanelFactory::MakeForClass($sClass, Dict::S($sTitle));
$sBlockId = 'block_'.$this->sId.($bEditMode ? '_edit' : ''); // make a unique id (edition occurring in the same DOM)
@@ -2054,6 +2054,8 @@ class DashletHeaderDynamic extends Dashlet
$aQueryParams = array();
}
$oFilter = DBObjectSearch::FromOQL($sQuery, $aQueryParams);
$sClass = $oFilter->GetClass();
PanelFactory::SetClassColor($sClass, $oPanel);
$oBlock = new DisplayBlock($oFilter, 'summary');
$sBlockId = 'block_'.$this->sId.($bEditMode ? '_edit' : ''); // make a unique id (edition occuring in the same DOM)
$oBlock->DisplayIntoContentBlock($oPanel, $oPage, $sBlockId, array_merge($aExtraParams, $aParams));

View File

@@ -454,8 +454,10 @@ abstract class MetaModel
self::_check_subclass($sClass);
$sIcon = '';
if (array_key_exists('icon', self::$m_aClassParams[$sClass])) {
$sIcon = self::$m_aClassParams[$sClass]['icon'];
if (array_key_exists('style', self::$m_aClassParams[$sClass])) {
/** @var ormStyle $oStyle */
$oStyle = self::$m_aClassParams[$sClass]['style'];
$sIcon = $oStyle->GetIcon();
}
if (strlen($sIcon) == 0) {
$sParentClass = self::GetParentPersistentClass($sClass);
@@ -471,6 +473,29 @@ abstract class MetaModel
return $sIcon;
}
/**
* @param string $sClass
*
* @return ormStyle|null
* @throws \CoreException
*
* @since 3.0
*/
final public static function GetClassStyle($sClass)
{
self::_check_subclass($sClass);
if (array_key_exists('style', self::$m_aClassParams[$sClass])) {
return self::$m_aClassParams[$sClass]['style'];
}
$sParentClass = self::GetParentPersistentClass($sClass);
if (strlen($sParentClass) > 0) {
return self::GetClassStyle($sParentClass);
}
return null;
}
/**
* @param string $sClass
*

View File

@@ -1,10 +1,14 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @copyright Copyright (C) 2010-2021 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Class ormStyle
*
* @since 3.0
*/
class ormStyle
{
/** @var string */
@@ -25,12 +29,12 @@ class ormStyle
*
* @param string $sStyleClass
* @param string $sAltStyleClass
* @param string $sMainColor
* @param string $sComplementaryColor
* @param string $sDecorationClasses
* @param string $sIcon
* @param string|null $sMainColor
* @param string|null $sComplementaryColor
* @param string|null $sDecorationClasses
* @param string|null $sIcon
*/
public function __construct(string $sStyleClass = '', string $sAltStyleClass = '', string $sMainColor = '#2B6CB0', string $sComplementaryColor = '#FFFFFF', string $sDecorationClasses = '', string $sIcon = '')
public function __construct(string $sStyleClass, string $sAltStyleClass, string $sMainColor = null, string $sComplementaryColor = null, string $sDecorationClasses = null, string $sIcon = null)
{
$this->sMainColor = $sMainColor;
$this->sComplementaryColor = $sComplementaryColor;
@@ -43,17 +47,17 @@ class ormStyle
/**
* @return string
*/
public function GetMainColor(): string
public function GetMainColor(): ?string
{
return $this->sMainColor;
}
/**
* @param string $sMainColor
* @param string|null $sMainColor
*
* @return $this
*/
public function SetMainColor(string $sMainColor)
public function SetMainColor(?string $sMainColor)
{
$this->sMainColor = $sMainColor;
return $this;
@@ -62,17 +66,17 @@ class ormStyle
/**
* @return string
*/
public function GetComplementaryColor(): string
public function GetComplementaryColor(): ?string
{
return $this->sComplementaryColor;
}
/**
* @param string $sComplementaryColor
* @param string|null $sComplementaryColor
*
* @return $this
*/
public function SetComplementaryColor(string $sComplementaryColor)
public function SetComplementaryColor(?string $sComplementaryColor)
{
$this->sComplementaryColor = $sComplementaryColor;
return $this;
@@ -119,17 +123,17 @@ class ormStyle
/**
* @return string
*/
public function GetDecorationClasses(): string
public function GetDecorationClasses(): ?string
{
return $this->sDecorationClasses;
}
/**
* @param string $sDecorationClasses
* @param string|null $sDecorationClasses
*
* @return $this
*/
public function SetDecorationClasses(string $sDecorationClasses)
public function SetDecorationClasses(?string $sDecorationClasses)
{
$this->sDecorationClasses = $sDecorationClasses;
return $this;
@@ -138,17 +142,17 @@ class ormStyle
/**
* @return string
*/
public function GetIcon(): string
public function GetIcon(): ?string
{
return $this->sIcon;
}
/**
* @param string $sIcon
* @param string|null $sIcon
*
* @return $this
*/
public function SetIcon(string $sIcon)
public function SetIcon(?string $sIcon)
{
$this->sIcon = $sIcon;
return $this;

View File

@@ -22,9 +22,11 @@
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/change.png</icon>
<style>
<icon>images/change.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -277,17 +279,23 @@
<item id="approved">
<rank>1</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/change-approved.png</icon>
<style>
<icon>images/change-approved.png</icon>
</style>
</item>
<item id="rejected">
<rank>2</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/change-rejected.png</icon>
<style>
<icon>images/change-rejected.png</icon>
</style>
</item>
<item id="closed">
<rank>3</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/change-closed.png</icon>
<style>
<icon>images/change-closed.png</icon>
</style>
</item>
</highlight_scale>
<stimuli>
@@ -1288,7 +1296,9 @@
<attribute id="ref"/>
</attributes>
</naming>
<icon>images/change.png</icon>
<style>
<icon>images/change.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -2084,7 +2094,9 @@
<attribute id="ref"/>
</attributes>
</naming>
<icon>images/change.png</icon>
<style>
<icon>images/change.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -3085,7 +3097,9 @@
<attribute id="ref"/>
</attributes>
</naming>
<icon>images/change.png</icon>
<style>
<icon>images/change.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -3778,7 +3792,9 @@
<attribute id="ref"/>
</attributes>
</naming>
<icon>images/change.png</icon>
<style>
<icon>images/change.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -4638,14 +4654,37 @@
<down>
<items type="array">
<item id="open_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
</style>
</item>
<item id="recent_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id) AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
</style>
</item>
</items>
</down>
@@ -4656,14 +4695,37 @@
<down>
<items type="array">
<item id="open_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
</style>
</item>
<item id="recent_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id) AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
</style>
</item>
</items>
</down>
@@ -4674,14 +4736,37 @@
<down>
<items type="array">
<item id="open_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
</style>
</item>
<item id="recent_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id) AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
</style>
</item>
</items>
</down>
@@ -4696,28 +4781,70 @@
<down>
<items type="array">
<item id="open_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted')]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
</style>
</item>
<item id="recent_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
</style>
</item>
</items>
</down>
<up>
<items type="array">
<item id="open_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted')]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-ongoing.png</icon>
</style>
</item>
<item id="recent_changes" _delta="define">
<oql><![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<oql><![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt-itil/images/change-done.png</icon>
</style>
</item>
</items>
</up>

View File

@@ -24,7 +24,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/change.png</icon>
<style>
<icon>images/change.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -208,17 +210,23 @@
<item id="approved">
<rank>1</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/change-approved.png</icon>
<style>
<icon>images/change-approved.png</icon>
</style>
</item>
<item id="rejected">
<rank>2</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/change-rejected.png</icon>
<style>
<icon>images/change-rejected.png</icon>
</style>
</item>
<item id="closed">
<rank>3</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/change-closed.png</icon>
<style>
<icon>images/change-closed.png</icon>
</style>
</item>
</highlight_scale>
<stimuli>
@@ -902,16 +910,39 @@
<items type="array">
<item id="open_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
</style>
<default>yes</default>
</item>
<item id="recent_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt/images/change-done.png</icon>
</style>
<default>no</default>
</item>
</items>
@@ -924,16 +955,39 @@
<items type="array">
<item id="open_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
</style>
<default>yes</default>
</item>
<item id="recent_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt/images/change-done.png</icon>
</style>
<default>no</default>
</item>
</items>
@@ -946,16 +1000,39 @@
<items type="array">
<item id="open_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
</style>
<default>yes</default>
</item>
<item id="recent_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed')) AND (L.impact_code != 'not_impacted') AND (C.id != :this->id)AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.id != :this->id)
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt/images/change-done.png</icon>
</style>
<default>no</default>
</item>
</items>
@@ -972,16 +1049,37 @@
<items type="array">
<item id="open_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted')]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
</style>
<default>yes</default>
</item>
<item id="recent_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status IN ('closed')) AND (L.impact_code != 'not_impacted')AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt/images/change-done.png</icon>
</style>
<default>no</default>
</item>
</items>
@@ -990,16 +1088,37 @@
<items type="array">
<item id="open_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status NOT IN ('closed', 'rejected')) AND (L.impact_code != 'not_impacted')]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status NOT IN ('closed', 'rejected'))
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenChanges</dict>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
<style>
<icon>itop-change-mgmt/images/change-ongoing.png</icon>
</style>
<default>yes</default>
</item>
<item id="recent_changes" _delta="define">
<oql>
<![CDATA[SELECT FCI, C FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Change AS C ON L.ticket_id = C.id WHERE (C.outage = 'yes') AND (C.status IN ('closed')) AND (L.impact_code != 'not_impacted')AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))]]></oql>
<![CDATA[
SELECT FCI, C
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Change AS C ON L.ticket_id = C.id
WHERE (C.outage = 'yes')
AND (C.status IN ('closed'))
AND (L.impact_code != 'not_impacted')
AND (C.end_date < NOW() AND C.end_date > DATE_SUB(NOW(), INTERVAL 3 DAY ))
]]></oql>
<dict>Tickets:Related:RecentChanges</dict>
<icon>itop-change-mgmt/images/change-done.png</icon>
<style>
<icon>itop-change-mgmt/images/change-done.png</icon>
</style>
<default>no</default>
</item>
</items>

View File

@@ -15,7 +15,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/server.png</icon>
<style>
<icon>images/server.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -265,7 +267,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/server.png</icon>
<style>
<icon>images/server.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -510,7 +514,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/server.png</icon>
<style>
<icon>images/server.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -676,7 +682,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/server.png</icon>
<style>
<icon>images/server.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -960,7 +968,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/switch.png</icon>
<style>
<icon>images/switch.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1233,7 +1243,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/server.png</icon>
<style>
<icon>images/server.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1536,7 +1548,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/solution.png</icon>
<style>
<icon>images/solution.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1694,7 +1708,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/business-process.png</icon>
<style>
<icon>images/business-process.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1822,7 +1838,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/application.png</icon>
<style>
<icon>images/application.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2016,7 +2034,9 @@
<attribute id="system_name"/>
</attributes>
</naming>
<icon>images/middleware.png</icon>
<style>
<icon>images/middleware.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2143,7 +2163,9 @@
<attribute id="system_name"/>
</attributes>
</naming>
<icon>images/database.png</icon>
<style>
<icon>images/database.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2270,7 +2292,9 @@
<attribute id="system_name"/>
</attributes>
</naming>
<icon>images/webserver.png</icon>
<style>
<icon>images/webserver.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2397,7 +2421,9 @@
<attribute id="system_name"/>
</attributes>
</naming>
<icon>images/application.png</icon>
<style>
<icon>images/application.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2503,7 +2529,9 @@
<attribute id="system_name"/>
</attributes>
</naming>
<icon>images/application.png</icon>
<style>
<icon>images/application.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2608,7 +2636,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/middleware.png</icon>
<style>
<icon>images/middleware.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2725,7 +2755,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/database-schema.png</icon>
<style>
<icon>images/database-schema.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2840,7 +2872,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/webapp.png</icon>
<style>
<icon>images/webapp.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2965,7 +2999,9 @@
<attribute id="version"/>
</attributes>
</naming>
<icon>images/software.png</icon>
<style>
<icon>images/software.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -3131,7 +3167,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/patch.png</icon>
<style>
<icon>images/patch.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -3217,7 +3255,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/patch.png</icon>
<style>
<icon>images/patch.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -3304,7 +3344,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/patch.png</icon>
<style>
<icon>images/patch.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -3391,7 +3433,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/licence.png</icon>
<style>
<icon>images/licence.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -3575,7 +3619,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/licence.png</icon>
<style>
<icon>images/licence.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -3712,7 +3758,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/licence.png</icon>
<style>
<icon>images/licence.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -4867,7 +4915,9 @@
<attribute id="ip_mask"/>
</attributes>
</naming>
<icon>images/subnet.png</icon>
<style>
<icon>images/subnet.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ip"/>
@@ -5061,7 +5111,9 @@
<attribute id="vlan_tag"/>
</attributes>
</naming>
<icon>images/vlan.png</icon>
<style>
<icon>images/vlan.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="vlan_tag"/>
@@ -5263,7 +5315,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/interface.png</icon>
<style>
<icon>images/interface.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -5324,7 +5378,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/interface.png</icon>
<style>
<icon>images/interface.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -5467,7 +5523,9 @@
<attribute id="connectableci_name"/>
</attributes>
</naming>
<icon>images/interface.png</icon>
<style>
<icon>images/interface.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -6097,7 +6155,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/group.png</icon>
<style>
<icon>images/group.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -6495,7 +6555,9 @@
<dashlet id="1" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagement:AllDevices</title>
<icon>itop-config-mgmt/images/server.png</icon>
<style>
<icon>itop-config-mgmt/images/server.png</icon>
</style>
<subtitle>Menu_ConfigManagement_AllDevices</subtitle>
</dashlet>
<dashlet id="2" xsi:type="DashletBadge">
@@ -6514,7 +6576,9 @@
<dashlet id="4" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagement:SWAndApps</title>
<icon>itop-config-mgmt/images/application.png</icon>
<style>
<icon>itop-config-mgmt/images/application.png</icon>
</style>
</dashlet>
<dashlet id="5" xsi:type="DashletBadge">
<rank>1</rank>
@@ -6564,7 +6628,9 @@
<dashlet id="15" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagement:Misc</title>
<icon>itop-config-mgmt/images/subnet.png</icon>
<style>
<icon>itop-config-mgmt/images/subnet.png</icon>
</style>
</dashlet>
<dashlet id="16" xsi:type="DashletBadge">
<rank>1</rank>

View File

@@ -15,7 +15,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/rack.png</icon>
<style>
<icon>images/rack.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -197,7 +199,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/enclosure.png</icon>
<style>
<icon>images/enclosure.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -386,7 +390,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/power-connection.png</icon>
<style>
<icon>images/power-connection.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -552,7 +558,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/power-connection.png</icon>
<style>
<icon>images/power-connection.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -711,7 +719,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/pdu.png</icon>
<style>
<icon>images/pdu.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>

View File

@@ -15,7 +15,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/mobile-phone.png</icon>
<style>
<icon>images/mobile-phone.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -167,7 +169,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/phone.png</icon>
<style>
<icon>images/phone.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -318,7 +322,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/mobile-phone.png</icon>
<style>
<icon>images/mobile-phone.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -492,7 +498,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/ipphone.png</icon>
<style>
<icon>images/ipphone.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -643,7 +651,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/tablet.png</icon>
<style>
<icon>images/tablet.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -791,7 +801,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/laptop.png</icon>
<style>
<icon>images/laptop.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1045,7 +1057,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/printer.png</icon>
<style>
<icon>images/printer.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1229,7 +1243,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/peripherals.png</icon>
<style>
<icon>images/peripherals.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1374,7 +1390,9 @@
<dashlet id="25" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagement:EndUsers</title>
<icon>itop-config-mgmt/images/team.png</icon>
<style>
<icon>itop-config-mgmt/images/team.png</icon>
</style>
</dashlet>
<dashlet id="26" xsi:type="DashletBadge">
<rank>1</rank>

View File

@@ -15,7 +15,9 @@
<attribute id="title"/>
</attributes>
</naming>
<icon>images/faq.png</icon>
<style>
<icon>images/faq.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="title"/>

View File

@@ -21,10 +21,12 @@
<attribute id="ref"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/incident.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/incident.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -480,17 +482,23 @@
<item id="warning">
<rank>1</rank>
<color>HIGHLIGHT_CLASS_WARNING</color>
<icon>images/incident-deadline.png</icon>
<style>
<icon>images/incident-deadline.png</icon>
</style>
</item>
<item id="critical">
<rank>2</rank>
<color>HIGHLIGHT_CLASS_CRITICAL</color>
<icon>images/incident-escalated.png</icon>
<style>
<icon>images/incident-escalated.png</icon>
</style>
</item>
<item id="closed">
<rank>3</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/incident-closed.png</icon>
<style>
<icon>images/incident-closed.png</icon>
</style>
</item>
</highlight_scale>
<stimuli>
@@ -1940,9 +1948,19 @@
<down>
<items type="array">
<item id="open_incidents" _delta="define">
<oql><![CDATA[SELECT FCI, I FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Incident AS I ON L.ticket_id = I.id WHERE (I.status NOT IN ('closed', 'resolved')) AND (L.impact_code != 'not_impacted') AND (I.id != :this->id)]]></oql>
<oql><![CDATA[
SELECT FCI, I
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Incident AS I ON L.ticket_id = I.id
WHERE (I.status NOT IN ('closed', 'resolved'))
AND (L.impact_code != 'not_impacted')
AND (I.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
<style>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -1954,9 +1972,19 @@
<down>
<items type="array">
<item id="open_incidents" _delta="define">
<oql><![CDATA[SELECT FCI, I FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Incident AS I ON L.ticket_id = I.id WHERE (I.status NOT IN ('closed', 'resolved')) AND (L.impact_code != 'not_impacted') AND (I.id != :this->id)]]></oql>
<oql><![CDATA[
SELECT FCI, I
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Incident AS I ON L.ticket_id = I.id
WHERE (I.status NOT IN ('closed', 'resolved'))
AND (L.impact_code != 'not_impacted')
AND (I.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
<style>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -1968,9 +1996,19 @@
<down>
<items type="array">
<item id="open_incidents" _delta="define">
<oql><![CDATA[SELECT FCI, I FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Incident AS I ON L.ticket_id = I.id WHERE (I.status NOT IN ('closed', 'resolved')) AND (L.impact_code != 'not_impacted') AND (I.id != :this->id)]]></oql>
<oql><![CDATA[
SELECT FCI, I
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Incident AS I ON L.ticket_id = I.id
WHERE (I.status NOT IN ('closed', 'resolved'))
AND (L.impact_code != 'not_impacted')
AND (I.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
<style>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -1986,9 +2024,18 @@
<down>
<items type="array">
<item id="open_incidents" _delta="define">
<oql><![CDATA[SELECT FCI, I FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Incident AS I ON L.ticket_id = I.id WHERE (I.status NOT IN ('closed', 'resolved')) AND (L.impact_code != 'not_impacted')]]></oql>
<oql><![CDATA[
SELECT FCI, I
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Incident AS I ON L.ticket_id = I.id
WHERE (I.status NOT IN ('closed', 'resolved'))
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
<style>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -1996,9 +2043,18 @@
<up>
<items type="array">
<item id="open_incidents" _delta="define">
<oql><![CDATA[SELECT FCI, I FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN Incident AS I ON L.ticket_id = I.id WHERE (I.status NOT IN ('closed', 'resolved')) AND (L.impact_code != 'not_impacted')]]></oql>
<oql><![CDATA[
SELECT FCI, I
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN Incident AS I ON L.ticket_id = I.id
WHERE (I.status NOT IN ('closed', 'resolved'))
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
<style>
<icon>itop-incident-mgmt-itil/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>

View File

@@ -18,7 +18,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/known-error.png</icon>
<style>
<icon>images/known-error.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="org_id"/>

View File

@@ -23,6 +23,7 @@ namespace Combodo\iTop\Portal\Controller;
use AttributeDate;
use AttributeDateTime;
use AttributeDefinition;
use AttributeEnum;
use AttributeExternalKey;
use AttributeImage;
use AttributeSet;
@@ -47,7 +48,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use UnaryExpression;
use URLButtonItem;
use VariableExpression;
/**
* Class ManageBrickController
@@ -716,15 +716,14 @@ class ManageBrickController extends BrickController
/** @var \AttributeTagSet $oAttDef */
$sValue = $oAttDef->GenerateViewHtmlForValues($aCodes, '', false);
$sSortValue = implode(' ', $aCodes);
}
elseif ($oAttDef instanceof AttributeSet)
{
} elseif ($oAttDef instanceof AttributeSet) {
$oAttDef->SetDisplayLink(false);
$sValue = $oAttDef->GetAsHTML($oCurrentRow->Get($sItemAttr));
$sSortValue = "".$oCurrentRow->Get($sItemAttr);
}
else
{
} elseif ($oAttDef instanceof AttributeEnum) {
$sValue = $oAttDef->GetAsPlainText($oCurrentRow->Get($sItemAttr));
$sSortValue = $oCurrentRow->Get($sItemAttr);
} else {
$sValue = $oAttDef->GetAsHTML($oCurrentRow->Get($sItemAttr));
$sSortValue = $oCurrentRow->Get($sItemAttr);
}

View File

@@ -24,7 +24,9 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/problem.png</icon>
<style>
<icon>images/problem.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>

View File

@@ -21,10 +21,13 @@
<attribute id="ref"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/user-request.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/user-request.png</icon>
<main_color>red</main_color>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -523,17 +526,23 @@
<item id="warning">
<rank>1</rank>
<color>HIGHLIGHT_CLASS_WARNING</color>
<icon>images/user-request-deadline.png</icon>
<style>
<icon>images/user-request-deadline.png</icon>
</style>
</item>
<item id="critical">
<rank>2</rank>
<color>HIGHLIGHT_CLASS_CRITICAL</color>
<icon>images/user-request-escalated.png</icon>
<style>
<icon>images/user-request-escalated.png</icon>
</style>
</item>
<item id="closed">
<rank>3</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/user-request-closed.png</icon>
<style>
<icon>images/user-request-closed.png</icon>
</style>
</item>
</highlight_scale>
<stimuli>
@@ -1858,19 +1867,21 @@
</dashlets>
</cell>
<cell id="1" _delta="define">
<rank>10</rank>
<dashlets>
<dashlet id="9" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Organization:Overview:UserRequests</title>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
<subtitle>Menu:UserRequest:OpenRequests</subtitle>
<query>SELECT UserRequest WHERE status != "closed" AND org_id=:this-&gt;id</query>
<group_by>status</group_by>
<values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
</dashlet>
</dashlets>
</cell>
<rank>10</rank>
<dashlets>
<dashlet id="9" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Organization:Overview:UserRequests</title>
<style>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
</style>
<subtitle>Menu:UserRequest:OpenRequests</subtitle>
<query>SELECT UserRequest WHERE status != "closed" AND org_id=:this-&gt;id</query>
<group_by>status</group_by>
<values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
</dashlet>
</dashlets>
</cell>
<cell id="3" _delta="define">
<rank>30</rank>
<dashlets>
@@ -1910,7 +1921,9 @@
<dashlet id="11" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Menu:RequestManagement</title>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
<style>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
</style>
<subtitle>Menu:UserRequest:OpenRequests</subtitle>
<query>SELECT UserRequest WHERE status != "closed"</query>
<group_by>status</group_by>

View File

@@ -24,7 +24,10 @@
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/user-request.png</icon>
<style>
<icon>images/user-request.png</icon>
<main_color>red</main_color>
</style>
<reconciliation>
<attributes>
<attribute id="ref"/>
@@ -562,17 +565,23 @@
<item id="warning">
<rank>1</rank>
<color>HIGHLIGHT_CLASS_WARNING</color>
<icon>images/user-request-deadline.png</icon>
<style>
<icon>images/user-request-deadline.png</icon>
</style>
</item>
<item id="critical">
<rank>2</rank>
<color>HIGHLIGHT_CLASS_CRITICAL</color>
<icon>images/user-request-escalated.png</icon>
<style>
<icon>images/user-request-escalated.png</icon>
</style>
</item>
<item id="closed">
<rank>3</rank>
<color>HIGHLIGHT_CLASS_NONE</color>
<icon>images/user-request-closed.png</icon>
<style>
<icon>images/user-request-closed.png</icon>
</style>
</item>
</highlight_scale>
<stimuli>
@@ -1910,18 +1919,20 @@
</dashlets>
</cell>
<cell id="1" _delta="define">
<rank>10</rank>
<dashlets>
<dashlet id="9" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Organization:Overview:UserRequests</title>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
<subtitle>Menu:UserRequest:OpenRequests</subtitle>
<query>SELECT UserRequest WHERE status != "closed" AND org_id=:this-&gt;id</query>
<group_by>status</group_by>
<values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
</dashlet>
</dashlets>
<rank>10</rank>
<dashlets>
<dashlet id="9" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Organization:Overview:UserRequests</title>
<style>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
</style>
<subtitle>Menu:UserRequest:OpenRequests</subtitle>
<query>SELECT UserRequest WHERE status != "closed" AND org_id=:this-&gt;id</query>
<group_by>status</group_by>
<values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
</dashlet>
</dashlets>
</cell>
<cell id="3" _delta="define">
<rank>30</rank>
@@ -1962,7 +1973,9 @@
<dashlet id="9" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Menu:RequestManagement</title>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
<style>
<icon>itop-welcome-itil/images/user-request-deadline.png</icon>
</style>
<subtitle>Menu:UserRequest:OpenRequests</subtitle>
<query>SELECT UserRequest WHERE status != "closed"</query>
<group_by>status</group_by>
@@ -2125,9 +2138,20 @@
<items type="array">
<item id="open_incidents" _delta="define">
<oql>
<![CDATA[SELECT FCI, R FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN UserRequest AS R ON L.ticket_id = R.id WHERE (R.status NOT IN ('closed', 'resolved')) AND (R.request_type='incident') AND (L.impact_code != 'not_impacted') AND (R.id != :this->id)]]></oql>
<![CDATA[
SELECT FCI, R
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN UserRequest AS R ON L.ticket_id = R.id
WHERE (R.status NOT IN ('closed', 'resolved'))
AND (R.request_type = 'incident')
AND (L.impact_code != 'not_impacted')
AND (R.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-request-mgmt/images/incident-red.png</icon>
<style>
<icon>itop-request-mgmt/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -2140,9 +2164,20 @@
<items type="array">
<item id="open_incidents" _delta="define">
<oql>
<![CDATA[SELECT FCI, R FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN UserRequest AS R ON L.ticket_id = R.id WHERE (R.status NOT IN ('closed', 'resolved')) AND (R.request_type='incident') AND (L.impact_code != 'not_impacted') AND (R.id != :this->id)]]></oql>
<![CDATA[
SELECT FCI, R
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN UserRequest AS R ON L.ticket_id = R.id
WHERE (R.status NOT IN ('closed', 'resolved'))
AND (R.request_type = 'incident')
AND (L.impact_code != 'not_impacted')
AND (R.id != :this->id)
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-request-mgmt/images/incident-red.png</icon>
<style>
<icon>itop-request-mgmt/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -2159,9 +2194,19 @@
<items type="array">
<item id="open_incidents" _delta="define">
<oql>
<![CDATA[SELECT FCI, R FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN UserRequest AS R ON L.ticket_id = R.id WHERE (R.status NOT IN ('closed', 'resolved')) AND (R.request_type='incident') AND (L.impact_code != 'not_impacted')]]></oql>
<![CDATA[
SELECT FCI, R
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN UserRequest AS R ON L.ticket_id = R.id
WHERE (R.status NOT IN ('closed', 'resolved'))
AND (R.request_type = 'incident')
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-request-mgmt/images/incident-red.png</icon>
<style>
<icon>itop-request-mgmt/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>
@@ -2170,9 +2215,19 @@
<items type="array">
<item id="open_incidents" _delta="define">
<oql>
<![CDATA[SELECT FCI, R FROM FunctionalCI AS FCI JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id JOIN UserRequest AS R ON L.ticket_id = R.id WHERE (R.status NOT IN ('closed', 'resolved')) AND (R.request_type='incident') AND (L.impact_code != 'not_impacted')]]></oql>
<![CDATA[
SELECT FCI, R
FROM FunctionalCI AS FCI
JOIN lnkFunctionalCIToTicket AS L ON L.functionalci_id = FCI.id
JOIN UserRequest AS R ON L.ticket_id = R.id
WHERE (R.status NOT IN ('closed', 'resolved'))
AND (R.request_type = 'incident')
AND (L.impact_code != 'not_impacted')
]]></oql>
<dict>Tickets:Related:OpenIncidents</dict>
<icon>itop-request-mgmt/images/incident-red.png</icon>
<style>
<icon>itop-request-mgmt/images/incident-red.png</icon>
</style>
<default>yes</default>
</item>
</items>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -61,9 +61,11 @@
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/contract.png</icon>
<style>
<icon>images/contract.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -407,7 +409,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/contract.png</icon>
<style>
<icon>images/contract.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -579,7 +583,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/contract.png</icon>
<style>
<icon>images/contract.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -918,9 +924,11 @@ public function PrefillSearchForm(&$aContextParam)
</attributes>
</naming>
<fields_semantic>
<image_attribute>icon</image_attribute>
<image_attribute>icon</image_attribute>
</fields_semantic>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1003,10 +1011,12 @@ public function PrefillSearchForm(&$aContextParam)
</attributes>
</naming>
<fields_semantic>
<image_attribute>icon</image_attribute>
<state_attribute>status</state_attribute>
<image_attribute>icon</image_attribute>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1362,9 +1372,11 @@ public function PrefillSearchForm(&$aContextParam)
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1526,7 +1538,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/sla.png</icon>
<style>
<icon>images/sla.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1665,7 +1679,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/slt.png</icon>
<style>
<icon>images/slt.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2206,7 +2222,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -60,10 +60,12 @@
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/contract.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/contract.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -407,7 +409,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/contract.png</icon>
<style>
<icon>images/contract.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -554,7 +558,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/contract.png</icon>
<style>
<icon>images/contract.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -892,7 +898,9 @@ public function PrefillSearchForm(&$aContextParam)
<fields_semantic>
<image_attribute>icon</image_attribute>
</fields_semantic>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -978,7 +986,9 @@ public function PrefillSearchForm(&$aContextParam)
<image_attribute>icon</image_attribute>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1355,10 +1365,12 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/service.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1520,7 +1532,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/sla.png</icon>
<style>
<icon>images/sla.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1659,7 +1673,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/slt.png</icon>
<style>
<icon>images/slt.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -2120,7 +2136,9 @@ public function PrefillSearchForm(&$aContextParam)
<attribute id="name"/>
</attributes>
</naming>
<icon>images/service.png</icon>
<style>
<icon>images/service.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>

View File

@@ -15,7 +15,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/storageArea.png</icon>
<style>
<icon>images/storageArea.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -264,7 +266,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/switch-san.png</icon>
<style>
<icon>images/switch-san.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -510,7 +514,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/tapelibrary.png</icon>
<style>
<icon>images/tapelibrary.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -756,7 +762,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/nas.png</icon>
<style>
<icon>images/nas.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1002,7 +1010,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/tape.png</icon>
<style>
<icon>images/tape.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="tapelibrary_id"/>
@@ -1094,7 +1104,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/filesystem.png</icon>
<style>
<icon>images/filesystem.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="nas_id"/>
@@ -1201,7 +1213,9 @@
<attribute id="datacenterdevice_name"/>
</attributes>
</naming>
<icon>images/fc-interface.png</icon>
<style>
<icon>images/fc-interface.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1309,7 +1323,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/volume.png</icon>
<style>
<icon>images/volume.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="lun_id"/>

View File

@@ -21,10 +21,12 @@
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/building.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/building.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -94,7 +96,9 @@
<dashlet id="11" xsi:type="DashletHeaderDynamic">
<rank>0</rank>
<title>Organization:Overview:FunctionalCIs</title>
<icon>itop-config-mgmt/images/server.png</icon>
<style>
<icon>itop-config-mgmt/images/server.png</icon>
</style>
<subtitle>Organization:Overview:FunctionalCIs:subtitle</subtitle>
<query>SELECT FunctionalCI WHERE org_id=:this-&gt;id</query>
<group_by>finalclass</group_by>
@@ -198,10 +202,12 @@
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/location.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/location.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -381,10 +387,14 @@
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/team.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/team.png</icon>
<main_color>green</main_color>
<complementary_color>white</complementary_color>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -569,10 +579,12 @@
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<image_attribute>picture</image_attribute>
</fields_semantic>
<icon>images/person.png</icon>
<fields_semantic>
<image_attribute>picture</image_attribute>
</fields_semantic>
<style>
<icon>images/person.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -889,7 +901,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/team.png</icon>
<style>
<icon>images/team.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1154,10 +1168,12 @@
<naming>
<attributes/>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/document.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/document.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1312,7 +1328,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/document.png</icon>
<style>
<icon>images/document.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1425,7 +1443,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/document.png</icon>
<style>
<icon>images/document.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1519,7 +1539,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/document.png</icon>
<style>
<icon>images/document.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -1743,7 +1765,9 @@
<dashlet id="1" xsi:type="DashletHeaderDynamic">
<rank>1</rank>
<title>Menu:Contact</title>
<icon>itop-structure/images/team.png</icon>
<style>
<icon>itop-structure/images/team.png</icon>
</style>
<subtitle>Menu:Contact:Count</subtitle>
<query>SELECT Contact</query>
<group_by>status</group_by>
@@ -1797,7 +1821,9 @@
<dashlet id="1" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagement:Typology</title>
<icon>itop-structure/images/typology.png</icon>
<style>
<icon>itop-structure/images/typology.png</icon>
</style>
</dashlet>
<dashlet id="9" xsi:type="DashletBadge">
<rank>8</rank>

View File

@@ -502,10 +502,12 @@
<attribute id="name"/>
</attributes>
</naming>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<icon>images/workorder.png</icon>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
<style>
<icon>images/workorder.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>

View File

@@ -269,14 +269,16 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/hypervisor.png</icon>
<style>
<icon>images/hypervisor.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
<attribute id="server_id"/>
<attribute id="farm_id"/>
<attribute id="server_id"/>
<attribute id="farm_id"/>
</attributes>
</reconciliation>
<obsolescence>
@@ -416,7 +418,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/cluster.png</icon>
<style>
<icon>images/cluster.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -541,7 +545,9 @@
<attribute id="name"/>
</attributes>
</naming>
<icon>images/virtualmachine.png</icon>
<style>
<icon>images/virtualmachine.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -551,7 +557,7 @@
</attributes>
</reconciliation>
<obsolescence>
<condition><![CDATA[status='obsolete']]></condition>
<condition><![CDATA[status='obsolete']]></condition>
</obsolescence>
</properties>
<fields>
@@ -773,7 +779,9 @@
<attribute id="virtualmachine_name"/>
</attributes>
</naming>
<icon>images/interface.png</icon>
<style>
<icon>images/interface.png</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
@@ -782,7 +790,7 @@
</attributes>
</reconciliation>
<obsolescence>
<condition>virtualmachine_id_obsolescence_flag</condition>
<condition>virtualmachine_id_obsolescence_flag</condition>
</obsolescence>
</properties>
<fields>
@@ -893,7 +901,9 @@
<dashlet id="38" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagement:virtualization</title>
<icon>itop-virtualization-mgmt/images/hypervisor-sw.png</icon>
<style>
<icon>itop-virtualization-mgmt/images/hypervisor-sw.png</icon>
</style>
</dashlet>
<dashlet id="39" xsi:type="DashletBadge">
<rank>1</rank>

View File

@@ -12,10 +12,12 @@
<rank>0</rank>
<dashlets>
<dashlet id="1" xsi:type="DashletHeaderStatic">
<rank>0</rank>
<title>Menu:ConfigManagementCI</title>
<icon>itop-welcome-itil/images/database.png</icon>
</dashlet>
<rank>0</rank>
<title>Menu:ConfigManagementCI</title>
<style>
<icon>itop-welcome-itil/images/database.png</icon>
</style>
</dashlet>
<dashlet id="4" xsi:type="DashletBadge">
<rank>3</rank>
<class>Contact</class>

View File

@@ -1051,7 +1051,7 @@ EOF
// State attribute (for XML v1.7- the lifecycle/attribute node should have been migrated in this one)
$oStateAttribute = $oFieldsSemantic->GetOptionalElement('state_attribute');
if($oStateAttribute) {
if ($oStateAttribute) {
$sStateAttCode = $oStateAttribute->GetText();
}
}
@@ -1059,61 +1059,62 @@ EOF
$aClassParams['state_attcode'] = "'$sStateAttCode'";
// Reconcialiation
if ($oReconciliation = $oProperties->GetOptionalElement('reconciliation'))
{
if ($oReconciliation = $oProperties->GetOptionalElement('reconciliation')) {
$oReconcAttributes = $oReconciliation->getElementsByTagName('attribute');
$aReconcAttCodes = array();
foreach($oReconcAttributes as $oAttribute)
{
foreach ($oReconcAttributes as $oAttribute) {
$aReconcAttCodes[] = $oAttribute->getAttribute('id');
}
if (empty($aReconcAttCodes))
{
$sReconcKeys = "array()";
}
else
{
$sReconcKeys = "array('".implode("', '", $aReconcAttCodes)."')";
}
}
else
{
if (empty($aReconcAttCodes)) {
$sReconcKeys = "array()";
} else {
$sReconcKeys = "array('".implode("', '", $aReconcAttCodes)."')";
}
} else {
$sReconcKeys = "array()";
}
$aClassParams['reconc_keys'] = $sReconcKeys;
$aClassParams['db_table'] = $this->GetPropString($oProperties, 'db_table', '');
$aClassParams['db_key_field'] = $this->GetPropString($oProperties, 'db_key_field', 'id');
if (array_key_exists($sClass, $this->aRootClasses))
{
if (array_key_exists($sClass, $this->aRootClasses)) {
$sDefaultFinalClass = 'finalclass';
}
else
{
} else {
$sDefaultFinalClass = '';
}
$aClassParams['db_finalclass_field'] = $this->GetPropString($oProperties, 'db_final_class_field', $sDefaultFinalClass);
$this->CompileFiles($oProperties, $sTempTargetDir.'/'.$sModuleRelativeDir, $sFinalTargetDir.'/'.$sModuleRelativeDir, '');
if (($sIcon = $oProperties->GetChildText('icon')) && (strlen($sIcon) > 0))
{
$sIcon = $sModuleRelativeDir.'/'.$sIcon;
$aClassParams['icon'] = "utils::GetAbsoluteUrlModulesRoot().'$sIcon'";
// Style
if ($oStyle = $oProperties->GetOptionalElement('style')) {
$sMainColor = $oStyle->GetChildText('main_color');
$sComplementaryColor = $oStyle->GetChildText('complementary_color');
// $bHasMainColor = (strlen($sMainColor) > 0);
// $bHasComplementaryColor = (strlen($sComplementaryColor) > 0);
// if ($bHasMainColor xor $bHasComplementaryColor) {
// throw new DOMFormatException("Tags 'main_color' and 'complementary_color' must be set or empty together in node 'style' of class $sClass");
// }
$sStyleCSSClass = "ibo-class-style--$sClass";
$sStyleCSSAltClass = "ibo-class-style-alt--$sClass";
if (($sIcon = $oStyle->GetChildText('icon')) && (strlen($sIcon) > 0)) {
$sIcon = $sModuleRelativeDir.'/'.$sIcon;
$sIcon = ", utils::GetAbsoluteUrlModulesRoot().'$sIcon'";
}
$aClassParams['style'] = "new ormStyle('$sStyleCSSClass', '$sStyleCSSAltClass', '$sMainColor', '$sComplementaryColor', null $sIcon)";
}
$oOrder = $oProperties->GetOptionalElement('order');
if ($oOrder)
{
if ($oOrder) {
$oColumnsNode = $oOrder->GetUniqueElement('columns');
$oColumns = $oColumnsNode->getElementsByTagName('column');
$aSortColumns = array();
foreach($oColumns as $oColumn)
{
foreach ($oColumns as $oColumn) {
$aSortColumns[] = "'".$oColumn->getAttribute('id')."' => ".(($oColumn->getAttribute('ascending') == 'true') ? 'true' : 'false');
}
if (count($aSortColumns) > 0)
{
if (count($aSortColumns) > 0) {
$aClassParams['order_by_default'] = "array(".implode(", ", $aSortColumns).")";
}
}

View File

@@ -801,10 +801,9 @@ class iTopDesignFormat
// New Enum values format
$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field[@xsi:type='AttributeEnum']/values/value");
foreach ($oNodeList as $oNode) {
$oNode->textContent = '';
$oCodeNode = $oNode->ownerDocument->createElement("enum_code", $oNode->textContent);
$oNode->appendChild($oCodeNode);
$oNode->textContent = '';
}
// MetaEnum
@@ -827,12 +826,28 @@ class iTopDesignFormat
$sTestRedBannerBackgroundColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-background-color"]';
$this->SetNodeAttribute($sTestRedBannerBackgroundColorPath, 'id', 'ibo-page-banner-background-color');
$sTestRedBannerTextColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-text-color"]';
$this->SetNodeAttribute($sTestRedBannerTextColorPath, 'id', 'ibo-page-banner-text-color');
$sTestRedBannerTextContentPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-text-content"]';
$this->SetNodeAttribute($sTestRedBannerTextContentPath, 'id', 'ibo-page-banner-text-content');
// Add Class Style
$oNodeList = $oXPath->query("/itop_design/classes//class");
foreach ($oNodeList as $oNode) {
// Move "icon" node under "style" node
$oIconNode = $oXPath->query('icon', $oNode)->item(0);
if ($oIconNode) {
$sIcon = $oIconNode->textContent;
$this->DeleteNode($oIconNode);
$oStyleNode = $oNode->ownerDocument->createElement("style");
$oNode->appendChild($oStyleNode);
$oIconNode = $oNode->ownerDocument->createElement("icon", $sIcon);
$oStyleNode->appendChild($oIconNode);
}
}
}
/**
@@ -863,8 +878,7 @@ class iTopDesignFormat
foreach ($oNodeList as $oNode) {
// Move node under lifecycle only if there is such a node
$oLifecycleNode = $oXPath->query("../../../lifecycle", $oNode)->item(0);
if($oLifecycleNode !== null)
{
if ($oLifecycleNode !== null) {
// Create attribute node
$oAttributeNode = $oLifecycleNode->ownerDocument->createElement("attribute", $oNode->nodeValue);
$oLifecycleNode->appendChild($oAttributeNode);
@@ -881,10 +895,13 @@ class iTopDesignFormat
$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field[@xsi:type='AttributeEnum']/values/value");
foreach ($oNodeList as $oNode) {
$oCodeNode = $oXPath->query('enum_code', $oNode)->item(0);
$oNode->textContent = $oCodeNode->textContent;
$sCode = $oCodeNode->textContent;
$this->DeleteNode($oCodeNode);
$oStyleNode = $oXPath->query('style', $oNode)->item(0);
$this->DeleteNode($oStyleNode);
if ($oStyleNode) {
$this->DeleteNode($oStyleNode);
}
$oNode->textContent = $sCode;
}
$sPath = "/itop_design/classes//class/fields/field[@xsi:type='AttributeEnum']/default_style";
@@ -894,15 +911,18 @@ class iTopDesignFormat
$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field[@xsi:type='AttributeMetaEnum']/values/value");
foreach ($oNodeList as $oNode) {
$oCodeNode = $oXPath->query('enum_code', $oNode)->item(0);
$oNode->textContent = $oCodeNode->textContent;
$sCode = $oCodeNode->textContent;
$this->DeleteNode($oCodeNode);
$oStyleNode = $oXPath->query('style', $oNode)->item(0);
$this->DeleteNode($oStyleNode);
if ($oStyleNode) {
$this->DeleteNode($oStyleNode);
}
$oNode->textContent = $sCode;
}
$sPath = "/itop_design/classes//class/fields/field[@xsi:type='AttributeMetaEnum']/default_style";
$this->RemoveNodeFromXPath($sPath);
// N°3516 Bring back legacy themes
// Update test-red theme
$sTestRedBannerBackgroundColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-background-color"]';
@@ -913,6 +933,23 @@ class iTopDesignFormat
$sTestRedBannerTextContentPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-text-content"]';
$this->SetNodeAttribute($sTestRedBannerTextContentPath, 'id', 'backoffice-environment-banner-text-content');
// Remove class style
$oNodeList = $oXPath->query("/itop_design/classes//class");
foreach ($oNodeList as $oNode) {
$oStyleNode = $oXPath->query('style', $oNode)->item(0);
if ($oStyleNode) {
$oIconNode = $oXPath->query('icon', $oStyleNode)->item(0);
if ($oIconNode) {
// Move back the "icon" node to the class
$sIcon = $oIconNode->textContent;
$oNewIconNode = $oNode->ownerDocument->createElement("icon", $sIcon);
$oNode->appendChild($oNewIconNode);
$this->DeleteNode($oIconNode);
}
$this->DeleteNode($oStyleNode);
}
}
}
/**

View File

@@ -20,19 +20,21 @@ class FieldBadgeFactory
*/
public static function MakeForField(string $sValue, ?ormStyle $oStyle)
{
$oBadge = null;
if ($oStyle) {
$sStyleClass = $oStyle->GetStyleClass();
$sPrimaryColor = $oStyle->GetMainColor();
$oBadge = new FieldBadge(null, $sStyleClass.' ibo-field-badge');
$sComplementaryColor = $oStyle->GetComplementaryColor();
$sDecorationClasses = $oStyle->GetDecorationClasses();
if ($sDecorationClasses != '') {
$oBadge->AddHtml("<i class=\"$sDecorationClasses\"></i>&nbsp;");
}
$oBadge->AddHtml("<span>$sValue</span>");
// Add custom style
// TODO 3.0 To be removed when compilation supports generated CSS
$oBadge->AddHtml(<<<HTML
if (!is_null($sPrimaryColor) && !is_null($sComplementaryColor)) {
$oBadge = new FieldBadge(null, $sStyleClass.' ibo-field-badge');
$sDecorationClasses = $oStyle->GetDecorationClasses();
if (!is_null($sDecorationClasses)) {
$oBadge->AddHtml("<i class=\"$sDecorationClasses\"></i>&nbsp;");
}
$oBadge->AddHtml("<span>$sValue</span>");
// Add custom style
// TODO 3.0 To be removed when compilation supports generated CSS
$oBadge->AddHtml(<<<HTML
<style>
.$sStyleClass {
color: $sComplementaryColor;
@@ -40,8 +42,10 @@ class FieldBadgeFactory
}
</style>
HTML
);
} else {
);
}
}
if (!$oBadge) {
$oBadge = new FieldBadge();
$oBadge->AddHtml("<span>$sValue</span>");
}

View File

@@ -19,6 +19,9 @@
namespace Combodo\iTop\Application\UI\Base\Component\Panel;
use MetaModel;
use ormStyle;
/**
* Class PanelFactory
*
@@ -163,8 +166,7 @@ class PanelFactory
public static function MakeForClass(string $sClass, string $sTitle)
{
$oPanel = new Panel($sTitle);
// TODO 3.0.0: Change this to class color when done
$oPanel->SetColor(Panel::ENUM_COLOR_BLUE);
self::SetClassColor($sClass, $oPanel);
return $oPanel;
}
@@ -185,4 +187,24 @@ class PanelFactory
return $oPanel;
}
/**
* @param string $sClass
* @param \Combodo\iTop\Application\UI\Base\Component\Panel\Panel $oPanel
*
* @throws \CoreException
*/
public static function SetClassColor(string $sClass, Panel $oPanel): void
{
/** @var ormStyle $oStyle */
$sColor = null;
$oStyle = MetaModel::GetClassStyle($sClass);
if ($oStyle) {
$sColor = $oStyle->GetMainColor();
}
if (strlen($sColor) == 0) {
$sColor = Panel::ENUM_COLOR_BLUE;
}
$oPanel->SetColor($sColor);
}
}

View File

@@ -15,6 +15,19 @@ class UIHelper
{
public static function GetColorFromStatus(string $sClass, ?string $sStateCode): string
{
// Example on how to get the color for the current status of a class
// $sStatusColor = 'neutral';
// $sStateAttCode = MetaModel::GetStateAttributeCode($sClass);
// if (strlen($sStateAttCode) == 0) {
// return $sStatusColor;
// }
//
// $oStyle = MetaModel::GetEnumStyle($sClass, $sStateAttCode, $sStateCode);
// if ($oStyle) {
// $sStatusColor = $oStyle->GetMainColor();
// }
// return $sStatusColor;
$sRootClass = MetaModel::GetRootClass($sClass);
switch ($sRootClass) {
case 'Ticket':