diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php
index 3feebfe66b..1e2b10e88c 100644
--- a/application/dashboard.class.inc.php
+++ b/application/dashboard.class.inc.php
@@ -59,22 +59,54 @@ abstract class Dashboard
$oCellsNode = $this->oDOMNode->getElementsByTagName('cells')->item(0);
$oCellsList = $oCellsNode->getElementsByTagName('cell');
+ $aCellOrder = array();
+ $iCellRank = 0;
foreach($oCellsList as $oCellNode)
{
$aDashletList = array();
- $oDashletList = $oCellNode->getElementsByTagName('dashlet');
+ $oCellRank = $oCellNode->getElementsByTagName('rank')->item(0);
+ if ($oCellRank)
+ {
+ $iCellRank = (int)$oCellRank->textContent;
+ }
+ $oDashletsNode = $oCellNode->getElementsByTagName('dashlets')->item(0);
+ $oDashletList = $oDashletsNode->getElementsByTagName('dashlet');
+ $iRank = 0;
+ $aDashletOrder = array();
foreach($oDashletList as $oDomNode)
{
$sDashletClass = $oDomNode->getAttribute('xsi:type');
+ $oRank = $oDomNode->getElementsByTagName('rank')->item(0);
+ if ($oRank)
+ {
+ $iRank = (int)$oRank->textContent;
+ }
$sId = $oDomNode->getAttribute('id');
$oNewDashlet = new $sDashletClass($sId);
$oNewDashlet->FromDOMNode($oDomNode);
- $aDashletList[] = $oNewDashlet;
+ $aDashletOrder[] = array('rank' => $iRank, 'dashlet' => $oNewDashlet);
}
- $this->aCells[] = $aDashletList;
+ usort($aDashletOrder, array(get_class($this), 'SortOnRank'));
+ $aDashletList = array();
+ foreach($aDashletOrder as $aItem)
+ {
+ $aDashletList[] = $aItem['dashlet'];
+ }
+ $aCellOrder[] = array('rank' => $iCellRank, 'dashlets' => $aDashletList);
}
+ usort($aCellOrder, array(get_class($this), 'SortOnRank'));
+ foreach($aCellOrder as $aItem)
+ {
+ $this->aCells[] = $aItem['dashlets'];
+ }
+
+
}
+ static function SortOnRank($aItem1, $aItem2)
+ {
+ return ($aItem1['rank'] > $aItem2['rank']) ? +1 : -1;
+ }
/**
* Error handler to turn XML loading warnings into exceptions
*/
@@ -108,17 +140,29 @@ abstract class Dashboard
$oCellsNode = $oDoc->createElement('cells');
$oMainNode->appendChild($oCellsNode);
-
+
+ $iCellRank = 0;
foreach ($this->aCells as $aCell)
{
$oCellNode = $oDoc->createElement('cell');
+ $oCellNode->setAttribute('id', $iCellRank);
$oCellsNode->appendChild($oCellNode);
+ $oCellRank = $oDoc->createElement('rank', $iCellRank);
+ $oCellNode->appendChild($oCellRank);
+ $iCellRank++;
+
+ $iDashletRank = 0;
+ $oDashletsNode = $oDoc->createElement('dashlets');
+ $oCellNode->appendChild($oDashletsNode);
foreach ($aCell as $oDashlet)
{
$oNode = $oDoc->createElement('dashlet');
- $oCellNode->appendChild($oNode);
+ $oDashletsNode->appendChild($oNode);
$oNode->setAttribute('id', $oDashlet->GetID());
$oNode->setAttribute('xsi:type', get_class($oDashlet));
+ $oDashletRank = $oDoc->createElement('rank', $iDashletRank);
+ $oNode->appendChild($oDashletRank);
+ $iDashletRank++;
$oDashlet->ToDOMNode($oNode);
}
}
diff --git a/datamodels/1.x/itop-change-mgmt-1.0.0/overview.xml b/datamodels/1.x/itop-change-mgmt-1.0.0/overview.xml
index afa855ae3c..4194ec0e67 100644
--- a/datamodels/1.x/itop-change-mgmt-1.0.0/overview.xml
+++ b/datamodels/1.x/itop-change-mgmt-1.0.0/overview.xml
@@ -3,25 +3,39 @@
DashboardLayoutTwoCols
-
-
- UI-ChangeManagementOverview-ChangeByType
- SELECT Change
- finalclass
-
-
+ |
+ 0
+
+
+ 0
+ UI-ChangeManagementOverview-ChangeByType
+ SELECT Change
+ finalclass
+
+
+
|
-
-
- UI-ChangeManagementOverview-ChangeUnassigned
- SELECT Change WHERE status = 'new'
-
+ |
+ 1
+
+
+ 0
+ UI-ChangeManagementOverview-ChangeUnassigned
+ SELECT Change WHERE status = 'new'
+
+
+
|
-
-
- UI-ChangeManagementOverview-ChangeWithOutage
- SELECT Change WHERE outage = 'yes'
-
+ |
+ 2
+
+
+ 0
+ UI-ChangeManagementOverview-ChangeWithOutage
+ SELECT Change WHERE outage = 'yes'
+
+
+
|
| | |
diff --git a/datamodels/1.x/itop-config-mgmt-1.0.0/cis_menu.xml b/datamodels/1.x/itop-config-mgmt-1.0.0/cis_menu.xml
index 44e81f5a6c..56c367ab85 100644
--- a/datamodels/1.x/itop-config-mgmt-1.0.0/cis_menu.xml
+++ b/datamodels/1.x/itop-config-mgmt-1.0.0/cis_menu.xml
@@ -3,72 +3,99 @@
DashboardLayoutOneCol
-
-
- Menu_ConfigManagement_Devices
- itop-config-mgmt-1.0.0/images/server.png
- Menu_ConfigManagement_AllDevices
- SELECT FunctionalCI
- status
- implementation,production,obsolete
-
-
- Server
-
-
- NetworkDevice
-
-
- PC
-
-
- MobilePhone
-
-
- Printer
-
+ |
+ 0
+
+
+ 0
+ Menu_ConfigManagement_Devices
+ itop-config-mgmt-1.0.0/images/server.png
+ Menu_ConfigManagement_AllDevices
+ SELECT FunctionalCI
+ status
+ implementation,production,obsolete
+
+
+ 1
+ Server
+
+
+ 2
+ NetworkDevice
+
+
+ 3
+ PC
+
+
+ 4
+ MobilePhone
+
+
+ 5
+ Printer
+
+
|
-
-
- Menu:ConfigManagement:SWAndApps
- itop-config-mgmt-1.0.0/images/application.png
-
-
- ApplicationInstance
-
-
- DBServerInstance
-
-
- DatabaseInstance
-
-
- Patch
-
-
- Licence
-
+ |
+ 1
+
+
+ 0
+ Menu:ConfigManagement:SWAndApps
+ itop-config-mgmt-1.0.0/images/application.png
+
+
+ 1
+ ApplicationInstance
+
+
+ 2
+ DBServerInstance
+
+
+ 3
+ DatabaseInstance
+
+
+ 4
+ Patch
+
+
+ 5
+ Licence
+
+
|
-
-
- Menu:ConfigManagement:Misc
- itop-config-mgmt-1.0.0/images/subnet.png
-
-
- NetworkInterface
-
-
- Subnet
-
-
- BusinessProcess
-
-
- ApplicationSolution
-
-
- Group
-
+ |
+ 2
+
+
+ 0
+ Menu:ConfigManagement:Misc
+ itop-config-mgmt-1.0.0/images/subnet.png
+
+
+ 1
+ NetworkInterface
+
+
+ 2
+ Subnet
+
+
+ 3
+ BusinessProcess
+
+
+ 4
+ ApplicationSolution
+
+
+ 5
+ Group
+
+
|
| | |
diff --git a/datamodels/1.x/itop-config-mgmt-1.0.0/config-dashboard.xml b/datamodels/1.x/itop-config-mgmt-1.0.0/config-dashboard.xml
index 83dfea44bf..a490a43cba 100644
--- a/datamodels/1.x/itop-config-mgmt-1.0.0/config-dashboard.xml
+++ b/datamodels/1.x/itop-config-mgmt-1.0.0/config-dashboard.xml
@@ -1,31 +1,43 @@
-UI:ConfigMgmtMenuOverview:Title
-DashboardLayoutTwoCols
-
-
-
- UI-ConfigMgmtMenuOverview-FunctionalCIbyStatus
- SELECT FunctionalCI
- status
-
-
- |
-
-
- UI-ConfigMgmtMenuOverview-FunctionalCIByType
- SELECT FunctionalCI
- finalclass
-
-
- |
-
-
- UI-ConfigMgmtMenuOverview-FunctionalCIByType
- SELECT FunctionalCI
- finalclass
-
-
- |
-
+ UI:ConfigMgmtMenuOverview:Title
+ DashboardLayoutTwoCols
+
+
+ 0
+
+
+ 0
+ UI-ConfigMgmtMenuOverview-FunctionalCIbyStatus
+ SELECT FunctionalCI
+ status
+
+
+
+ |
+
+ 0
+
+
+ 0
+ UI-ConfigMgmtMenuOverview-FunctionalCIByType
+ SELECT FunctionalCI
+ finalclass
+
+
+
+ |
+
+ 0
+
+
+ 0
+ UI-ConfigMgmtMenuOverview-FunctionalCIByType
+ SELECT FunctionalCI
+ finalclass
+
+
+
+ |
+
diff --git a/datamodels/1.x/itop-config-mgmt-1.0.0/contacts_menu.xml b/datamodels/1.x/itop-config-mgmt-1.0.0/contacts_menu.xml
index ed1020ac21..18b17938b2 100644
--- a/datamodels/1.x/itop-config-mgmt-1.0.0/contacts_menu.xml
+++ b/datamodels/1.x/itop-config-mgmt-1.0.0/contacts_menu.xml
@@ -4,28 +4,38 @@
-
- UI:ContactsMenu
- itop-config-mgmt-1.0.0/images/team.png
- Menu:ConfigManagement:AllContacts
- SELECT Contact
- status
- active,inactive
-
-
- Team
-
-
- Person
-
+ 0
+
+
+ 0
+ UI:ContactsMenu
+ itop-config-mgmt-1.0.0/images/team.png
+ Menu:ConfigManagement:AllContacts
+ SELECT Contact
+ status
+ active,inactive
+
+
+ 1
+ Team
+
+
+ 2
+ Person
+
+
|
-
- UI-ContactsMenu-ContactsByLocation
- SELECT Contact
- location_id
-
-
+ 1
+
+
+ 0
+ UI-ContactsMenu-ContactsByLocation
+ SELECT Contact
+ location_id
+
+
+
|
diff --git a/datamodels/1.x/itop-incident-mgmt-1.0.0/incident-dashboard.xml b/datamodels/1.x/itop-incident-mgmt-1.0.0/incident-dashboard.xml
index 6efe574509..bce38adeaf 100644
--- a/datamodels/1.x/itop-incident-mgmt-1.0.0/incident-dashboard.xml
+++ b/datamodels/1.x/itop-incident-mgmt-1.0.0/incident-dashboard.xml
@@ -1,29 +1,41 @@
-UI:IncidentMgmtMenuOverview:Title
-DashboardLayoutTwoCols
-
-
-
- UI-IncidentManagementOverview-IncidentByService
- SELECT Incident
- service_id
-
-
- |
-
-
- UI-IncidentManagementOverview-IncidentByPriority
- SELECT Incident
- priority
-
-
- |
-
-
- UI-IncidentManagementOverview-IncidentUnassigned
- SELECT Incident WHERE status IN ("new", "escalated_tto")
-
- |
-
+ UI:IncidentMgmtMenuOverview:Title
+ DashboardLayoutTwoCols
+
+
+ 0
+
+
+ 0
+ UI-IncidentManagementOverview-IncidentByService
+ SELECT Incident
+ service_id
+
+
+
+ |
+
+ 1
+
+
+ 0
+ UI-IncidentManagementOverview-IncidentByPriority
+ SELECT Incident
+ priority
+
+
+
+ |
+
+ 2
+
+
+ 0
+ UI-IncidentManagementOverview-IncidentUnassigned
+ SELECT Incident WHERE status IN ("new", "escalated_tto")
+
+
+ |
+
diff --git a/datamodels/1.x/itop-problem-mgmt-1.0.0/overview.xml b/datamodels/1.x/itop-problem-mgmt-1.0.0/overview.xml
index bfb64de0c9..a6923665fe 100644
--- a/datamodels/1.x/itop-problem-mgmt-1.0.0/overview.xml
+++ b/datamodels/1.x/itop-problem-mgmt-1.0.0/overview.xml
@@ -3,27 +3,40 @@
DashboardLayoutTwoCols
-
-
- UI-ProblemManagementOverview-ProblemByService
- SELECT Problem
- service_id
-
-
+ |
+ 0
+
+
+ 0
+ UI-ProblemManagementOverview-ProblemByService
+ SELECT Problem
+ service_id
+
+
+
|
-
-
- UI-ProblemManagementOverview-ProblemByPriority
- SELECT Problem
- priority
-
-
+ |
+ 1
+
+
+ 0
+ UI-ProblemManagementOverview-ProblemByPriority
+ SELECT Problem
+ priority
+
+
+
|
-
-
- UI-ProblemManagementOverview-ProblemUnassigned
- SELECT Problem WHERE status IN ("new")
-
+ |
+ 2
+
+
+ 0
+ UI-ProblemManagementOverview-ProblemUnassigned
+ SELECT Problem WHERE status IN ("new")
+
+
+
|
| | |
diff --git a/datamodels/1.x/itop-request-mgmt-1.0.0/request-dashboard.xml b/datamodels/1.x/itop-request-mgmt-1.0.0/request-dashboard.xml
index b61e43a259..2785132716 100644
--- a/datamodels/1.x/itop-request-mgmt-1.0.0/request-dashboard.xml
+++ b/datamodels/1.x/itop-request-mgmt-1.0.0/request-dashboard.xml
@@ -1,29 +1,41 @@
-UI:RequestMgmtMenuOverview:Title
-DashboardLayoutTwoCols
-
-
-
- UI-RequestManagementOverview-RequestByService
- SELECT UserRequest
- service_id
-
-
- |
-
-
- UI-RequestManagementOverview-RequestByPriority
- SELECT UserRequest
- priority
-
-
- |
-
-
- UI-RequestManagementOverview-RequestUnassigned
- SELECT UserRequest WHERE status IN ("new", "escalated_tto")
-
- |
-
+ UI:RequestMgmtMenuOverview:Title
+ DashboardLayoutTwoCols
+
+
+ 0
+
+
+ 0
+ UI-RequestManagementOverview-RequestByService
+ SELECT UserRequest
+ service_id
+
+
+
+ |
+
+ 1
+
+
+ 0
+ UI-RequestManagementOverview-RequestByPriority
+ SELECT UserRequest
+ priority
+
+
+
+ |
+
+ 2
+
+
+ 0
+ UI-RequestManagementOverview-RequestUnassigned
+ SELECT UserRequest WHERE status IN ("new", "escalated_tto")
+
+
+ |
+
diff --git a/datamodels/1.x/itop-welcome-itil/welcome_menu.xml b/datamodels/1.x/itop-welcome-itil/welcome_menu.xml
index e516b7809b..9edb8eede9 100644
--- a/datamodels/1.x/itop-welcome-itil/welcome_menu.xml
+++ b/datamodels/1.x/itop-welcome-itil/welcome_menu.xml
@@ -4,62 +4,82 @@
-
- UI:ConfigurationManagementMenu
- itop-config-mgmt-1.0.0/images/database.png
- UI:WelcomeMenu:AllConfigItems
- SELECT FunctionalCI
- status
- implementation,production,obsolete
-
-
- BusinessProcess
-
-
- Contact
-
-
- Location
-
-
- Server
-
-
- DatabaseInstance
-
-
- NetworkDevice
-
+ 0
+
+
+ 0
+ UI:ConfigurationManagementMenu
+ itop-config-mgmt-1.0.0/images/database.png
+ UI:WelcomeMenu:AllConfigItems
+ SELECT FunctionalCI
+ status
+ implementation,production,obsolete
+
+
+ 1
+ BusinessProcess
+
+
+ 2
+ Contact
+
+
+ 3
+ Location
+
+
+ 4
+ Server
+
+
+ 5
+ DatabaseInstance
+
+
+ 6
+ NetworkDevice
+
+
|
-
- Menu:RequestManagement
- itop-request-mgmt-1.0.0/images/user-request-deadline.png
- UI:WelcomeMenu:AllOpenRequests
- SELECT UserRequest WHERE status != "closed"
- status
- new,assigned,escalated_tto,escalated_ttr,resolved
-
-
- UI:WelcomeMenu:MyCalls
- SELECT UserRequest AS i WHERE i.caller_id = :current_contact_id AND status NOT IN ("closed", "resolved")
-
-
+ 0
+
+
+ 0
+ Menu:RequestManagement
+ itop-request-mgmt-1.0.0/images/user-request-deadline.png
+ UI:WelcomeMenu:AllOpenRequests
+ SELECT UserRequest WHERE status != "closed"
+ status
+ new,assigned,escalated_tto,escalated_ttr,resolved
+
+
+ 1
+ UI:WelcomeMenu:MyCalls
+ SELECT UserRequest AS i WHERE i.caller_id = :current_contact_id AND status NOT IN ("closed", "resolved")
+
+
+
|
-
- Menu:IncidentManagement
- itop-incident-mgmt-1.0.0/images/incident-escalated.png
- UI:WelcomeMenu:OpenIncidents
- SELECT Incident WHERE status != "closed"
- status
- new,assigned,escalated_tto,escalated_ttr,resolved
-
-
- UI:WelcomeMenu:MyIncidents
- SELECT Incident AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")
-
-
+ 0
+
+
+ 0
+ Menu:IncidentManagement
+ itop-incident-mgmt-1.0.0/images/incident-escalated.png
+ UI:WelcomeMenu:OpenIncidents
+ SELECT Incident WHERE status != "closed"
+ status
+ new,assigned,escalated_tto,escalated_ttr,resolved
+
+
+ 1
+ UI:WelcomeMenu:MyIncidents
+ SELECT Incident AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")
+
+
+
|
diff --git a/datamodels/2.x/itop-change-mgmt/overview.xml b/datamodels/2.x/itop-change-mgmt/overview.xml
index f44a337e4a..47bef0f6c9 100755
--- a/datamodels/2.x/itop-change-mgmt/overview.xml
+++ b/datamodels/2.x/itop-change-mgmt/overview.xml
@@ -3,37 +3,54 @@
DashboardLayoutTwoCols
UI:ChangeMgmtMenuOverview:Title
-
-
- UI-ChangeManagementOverview-ChangeByCategory-last-7-days
- SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
- category
-
-
+ |
+ 0
+
+
+ 0
+ UI-ChangeManagementOverview-ChangeByCategory-last-7-days
+ SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
+ category
+
+
+
|
-
-
- UI-ChangeManagementOverview-Last-7-days
- SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
- start_date:day_of_month
-
-
+ |
+ 1
+
+
+ 0
+ UI-ChangeManagementOverview-Last-7-days
+ SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
+ start_date:day_of_month
+
+
+
|
-
-
- UI-ChangeManagementOverview-ChangeByDomain-last-7-days
- SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
- finalclass
-
-
+ |
+ 2
+
+
+ 0
+ UI-ChangeManagementOverview-ChangeByDomain-last-7-days
+ SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
+ finalclass
+
+
+
|
-
-
- UI-ChangeManagementOverview-ChangeByStatus-last-7-days
- SELECT Change WHERE start_date > DATE_SUB(NOW(), INTERVAL 7 DAY)
- status
-
-
+ |
+ 3
+
+
+ 0
+ UI-ChangeManagementOverview-ChangeByStatus-last-7-days
+ SELECT Change WHERE start_date > DATE_SUB(NOW(),
+ INTERVAL 7 DAY)
+ status
+
+
+
|
| | | |
-
+
\ No newline at end of file
diff --git a/datamodels/2.x/itop-config-mgmt/cis_menu.xml b/datamodels/2.x/itop-config-mgmt/cis_menu.xml
index 9fa4c42a0f..f98896b455 100755
--- a/datamodels/2.x/itop-config-mgmt/cis_menu.xml
+++ b/datamodels/2.x/itop-config-mgmt/cis_menu.xml
@@ -3,138 +3,192 @@
DashboardLayoutOneCol
-
-
- Menu:ConfigManagement:AllDevices
- itop-config-mgmt/images/server.png
- Menu_ConfigManagement_AllDevices
-
-
- Rack
-
-
- Enclosure
-
-
- Server
-
-
- NetworkDevice
-
-
- StorageSystem
-
-
- SANSwitch
-
-
- NAS
-
-
- TapeLibrary
-
-
- ElectricalConnection
-
+ |
+ 0
+
+
+ 0
+ Menu:ConfigManagement:AllDevices
+ itop-config-mgmt/images/server.png
+ Menu_ConfigManagement_AllDevices
+
+
+ 1
+ Rack
+
+
+ 2
+ Enclosure
+
+
+ 3
+ Server
+
+
+ 4
+ NetworkDevice
+
+
+ 5
+ StorageSystem
+
+
+ 6
+ SANSwitch
+
+
+ 7
+ NAS
+
+
+ 8
+ TapeLibrary
+
+
+ 9
+ ElectricalConnection
+
+
|
-
-
- Menu:ConfigManagement:virtualization
- itop-config-mgmt/images/application.png
-
-
- Farm
-
-
- Hypervisor
-
-
- VirtualMachine
-
+ |
+ 1
+
+
+ 0
+ Menu:ConfigManagement:virtualization
+ itop-config-mgmt/images/application.png
+
+
+ 1
+ Farm
+
+
+ 2
+ Hypervisor
+
+
+ 3
+ VirtualMachine
+
+
|
-
-
- Menu:ConfigManagement:EndUsers
- itop-config-mgmt/images/team.png
-
-
- PC
-
-
- Phone
-
-
- IpPhone
-
-
- MobilePhone
-
-
- Tablet
-
-
- Printer
-
-
- Peripheral
-
+ |
+ 2
+
+
+ 0
+ Menu:ConfigManagement:EndUsers
+ itop-config-mgmt/images/team.png
+
+
+ 1
+ PC
+
+
+ 2
+ Phone
+
+
+ 3
+ IpPhone
+
+
+ 4
+ MobilePhone
+
+
+ 5
+ Tablet
+
+
+ 6
+ Printer
+
+
+ 7
+ Peripheral
+
+
|
-
-
- Menu:ConfigManagement:SWAndApps
- itop-config-mgmt/images/application.png
-
-
- Middleware
-
-
- DBserver
-
-
- Webserver
-
-
- OtherSoftware
-
-
- MiddlewareInstance
-
-
- DatabaseSchema
-
-
- WebApplication
-
-
- Patch
-
-
- Licence
-
+ |
+ 3
+
+
+ 0
+ Menu:ConfigManagement:SWAndApps
+ itop-config-mgmt/images/application.png
+
+
+ 1
+ Middleware
+
+
+ 2
+ DBserver
+
+
+ 3
+ Webserver
+
+
+ 4
+ OtherSoftware
+
+
+ 5
+ MiddlewareInstance
+
+
+ 6
+ DatabaseSchema
+
+
+ 7
+ WebApplication
+
+
+ 8
+ Patch
+
+
+ 9
+ Licence
+
+
|
-
-
- Menu:ConfigManagement:Misc
- itop-config-mgmt/images/subnet.png
-
-
- NetworkInterface
-
-
- Subnet
-
-
- LogicalVolume
-
-
- BusinessProcess
-
-
- ApplicationSolution
-
-
- Group
-
+ |
+ 4
+
+
+ 0
+ Menu:ConfigManagement:Misc
+ itop-config-mgmt/images/subnet.png
+
+
+ 1
+ NetworkInterface
+
+
+ 2
+ Subnet
+
+
+ 3
+ LogicalVolume
+
+
+ 4
+ BusinessProcess
+
+
+ 5
+ ApplicationSolution
+
+
+ 6
+ Group
+
+
|
| | | | |
-
+
\ No newline at end of file
diff --git a/datamodels/2.x/itop-config-mgmt/contacts_menu.xml b/datamodels/2.x/itop-config-mgmt/contacts_menu.xml
index 477f5ab858..f2bce57167 100755
--- a/datamodels/2.x/itop-config-mgmt/contacts_menu.xml
+++ b/datamodels/2.x/itop-config-mgmt/contacts_menu.xml
@@ -3,21 +3,27 @@
DashboardLayoutOneCol
-
-
- Menu:Contact
- itop-config-mgmt/images/team.png
- Menu:Contact:Count
- SELECT Contact
- status
- active,inactive
-
-
- Team
-
-
- Person
-
+ |
+ 0
+
+
+ 1
+ Menu:Contact
+ itop-config-mgmt/images/team.png
+ Menu:Contact:Count
+ SELECT Contact
+ status
+ active,inactive
+
+
+ 2
+ Team
+
+
+ 3
+ Person
+
+
|
|
diff --git a/datamodels/2.x/itop-incident-mgmt-itil/overview.xml b/datamodels/2.x/itop-incident-mgmt-itil/overview.xml
index 8589487a75..6efe03c919 100755
--- a/datamodels/2.x/itop-incident-mgmt-itil/overview.xml
+++ b/datamodels/2.x/itop-incident-mgmt-itil/overview.xml
@@ -3,51 +3,74 @@
DashboardLayoutTwoCols
UI:IncidentMgmtMenuOverview:Title
-
-
- UI-IncidentManagementOverview-IncidentByPriority-last-14-days
- SELECT Incident WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
- priority
-
-
+ |
+ 0
+
+
+ UI-IncidentManagementOverview-IncidentByPriority-last-14-days
+ SELECT Incident WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
+ priority
+
+
+
|
-
-
- UI-IncidentManagementOverview-Last-14-days
- SELECT Incident WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
- start_date:day_of_month
-
-
+ |
+ 1
+
+
+ UI-IncidentManagementOverview-Last-14-days
+ SELECT Incident WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
+ start_date:day_of_month
+
+
+
|
-
-
- UI-IncidentManagementOverview-OpenIncidentByStatus
- SELECT Incident WHERE status NOT IN ('closed','rejected')
- status
-
-
+ |
+ 2
+
+
+ UI-IncidentManagementOverview-OpenIncidentByStatus
+ SELECT Incident WHERE status NOT IN
+ ('closed','rejected')
+ status
+
+
+
|
-
-
- UI-IncidentManagementOverview-OpenIncidentByAgent
- SELECT Incident WHERE status NOT IN ('closed','rejected')
- agent_id
-
-
+ |
+ 3
+
+
+ UI-IncidentManagementOverview-OpenIncidentByAgent
+ SELECT Incident WHERE status NOT IN
+ ('closed','rejected')
+ agent_id
+
+
+
|
-
-
- UI-IncidentManagementOverview-OpenIncidentByCustomer
- SELECT Incident WHERE status NOT IN ('closed','rejected')
- org_id
-
-
+ |
+ 4
+
+
+ UI-IncidentManagementOverview-OpenIncidentByCustomer
+ SELECT Incident WHERE status NOT IN ('closed','rejected')
+ org_id
+
+
+
|
-
-
+ |
+ 5
+
+
+
|
-
-
+ |
+ 6
+
+
+
|
| | | | | | |
diff --git a/datamodels/2.x/itop-problem-mgmt/overview.xml b/datamodels/2.x/itop-problem-mgmt/overview.xml
index 92a088bdc9..3603f043c0 100755
--- a/datamodels/2.x/itop-problem-mgmt/overview.xml
+++ b/datamodels/2.x/itop-problem-mgmt/overview.xml
@@ -3,28 +3,40 @@
DashboardLayoutTwoCols
UI:ProblemMgmtMenuOverview:Title
-
-
- UI-ProblemManagementOverview-ProblemByService
- SELECT Problem
- service_id
-
-
+ |
+ 0
+
+
+ 0
+ UI-ProblemManagementOverview-ProblemByService
+ SELECT Problem
+ service_id
+
+
+
|
-
-
- UI-ProblemManagementOverview-ProblemByPriority
- SELECT Problem
- priority
-
-
+ |
+ 1
+
+
+ 0
+ UI-ProblemManagementOverview-ProblemByPriority
+ SELECT Problem
+ priority
+
+
+
|
-
-
- UI-ProblemManagementOverview-ProblemUnassigned
- SELECT Problem WHERE status IN ("new")
-
-
+ |
+ 2
+
+
+ 0
+ UI-ProblemManagementOverview-ProblemUnassigned
+ SELECT Problem WHERE status IN ("new")
+
+
+
|
| | |
diff --git a/datamodels/2.x/itop-request-mgmt-itil/overview.xml b/datamodels/2.x/itop-request-mgmt-itil/overview.xml
index 076c8f35ae..07fb623378 100755
--- a/datamodels/2.x/itop-request-mgmt-itil/overview.xml
+++ b/datamodels/2.x/itop-request-mgmt-itil/overview.xml
@@ -3,59 +3,84 @@
DashboardLayoutTwoCols
UI:RequestMgmtMenuOverview:Title
-
-
- UI-RequestManagementOverview-RequestByType-last-14-days
- SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
- request_type
-
-
+ |
+ 0
+
+
+ 0
+ UI-RequestManagementOverview-RequestByType-last-14-days
+ SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14
+ DAY) < start_date
+ request_type
+
+
+
|
-
-
- UI-RequestManagementOverview-Last-14-days
- SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
- start_date:day_of_month
-
-
+ |
+ 1
+
+
+ 0
+ UI-RequestManagementOverview-Last-14-days
+ SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14
+ DAY)
+ < start_date
+ start_date:day_of_month
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByStatus
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- status
-
-
+ |
+ 2
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByStatus
+ SELECT UserRequest WHERE status NOT IN
+ ('closed','rejected')
+ status
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByAgent
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- agent_id
-
-
+ |
+ 3
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByAgent
+ SELECT UserRequest WHERE status NOT IN
+ ('closed','rejected')
+ agent_id
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByType
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- finalclass
-
-
+ |
+ 4
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByType
+ SELECT UserRequest WHERE status NOT IN
+ ('closed','rejected')
+ finalclass
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByCustomer
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- org_id
-
-
- |
-
-
- |
-
-
+ |
+ 5
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByCustomer
+ SELECT UserRequest WHERE status NOT IN
+ ('closed','rejected')
+ org_id
+
+
+
|
| | | | | |
diff --git a/datamodels/2.x/itop-request-mgmt/overview.xml b/datamodels/2.x/itop-request-mgmt/overview.xml
index 076c8f35ae..0cb5502754 100755
--- a/datamodels/2.x/itop-request-mgmt/overview.xml
+++ b/datamodels/2.x/itop-request-mgmt/overview.xml
@@ -3,59 +3,77 @@
DashboardLayoutTwoCols
UI:RequestMgmtMenuOverview:Title
-
-
- UI-RequestManagementOverview-RequestByType-last-14-days
- SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
- request_type
-
-
+ |
+ 0
+
+
+ 0
+ UI-RequestManagementOverview-RequestByType-last-14-days
+ SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
+ request_type
+
+
+
|
-
-
- UI-RequestManagementOverview-Last-14-days
- SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
- start_date:day_of_month
-
-
+ |
+ 1
+
+
+ 0
+ UI-RequestManagementOverview-Last-14-days
+ SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date
+ start_date:day_of_month
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByStatus
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- status
-
-
+ |
+ 2
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByStatus
+ SELECT UserRequest WHERE status NOT IN ('closed','rejected')
+ status
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByAgent
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- agent_id
-
-
+ |
+ 3
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByAgent
+ SELECT UserRequest WHERE status NOT IN ('closed','rejected')
+ agent_id
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByType
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- finalclass
-
-
+ |
+ 4
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByType
+ SELECT UserRequest WHERE status NOT IN ('closed','rejected')
+ finalclass
+
+
+
|
-
-
- UI-RequestManagementOverview-OpenRequestByCustomer
- SELECT UserRequest WHERE status NOT IN ('closed','rejected')
- org_id
-
-
- |
-
-
- |
-
-
+ |
+ 5
+
+
+ 0
+ UI-RequestManagementOverview-OpenRequestByCustomer
+ SELECT UserRequest WHERE status NOT IN ('closed','rejected')
+ org_id
+
+
+
|
| | | | | |
diff --git a/datamodels/2.x/itop-welcome-itil/welcome_menu.xml b/datamodels/2.x/itop-welcome-itil/welcome_menu.xml
index 8ce9c77522..984cb68049 100755
--- a/datamodels/2.x/itop-welcome-itil/welcome_menu.xml
+++ b/datamodels/2.x/itop-welcome-itil/welcome_menu.xml
@@ -3,48 +3,63 @@
DashboardLayoutOneCol
-
-
- Menu:ConfigManagementCI
- itop-welcome-itil/images/database.png
-
-
- BusinessProcess
-
-
- ApplicationSolution
-
-
- Contact
-
-
- Location
-
-
- Contract
-
-
- Server
-
-
- NetworkDevice
-
+ |
+ 0
+
+
+ 0
+ Menu:ConfigManagementCI
+ itop-welcome-itil/images/database.png
+
+
+ 1
+ BusinessProcess
+
+
+ 2
+ ApplicationSolution
+
+
+ 3
+ Contact
+
+
+ 4
+ Location
+
+
+ 5
+ Contract
+
+
+ 6
+ Server
+
+
+ 7
+ NetworkDevice
+
+
|
-
-
- Menu:RequestManagement
- itop-welcome-itil/images/user-request-deadline.png
- Open Requests
- SELECT UserRequest WHERE status != "closed"
- status
- new,assigned,escalated_tto,escalated_ttr,resolved
-
-
- UI:WelcomeMenu:MyCalls
- SELECT UserRequest AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")
-
-
+ |
+ 1
+
+
+ 0
+ Menu:RequestManagement
+ itop-welcome-itil/images/user-request-deadline.png
+ Open Requests
+ SELECT UserRequest WHERE status != "closed"
+ status
+ new,assigned,escalated_tto,escalated_ttr,resolved
+
+
+ 1
+ UI:WelcomeMenu:MyCalls
+ SELECT UserRequest AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")
+
+
+
|
| |
-
diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php
index ee9845d546..4da7fdf9ea 100644
--- a/setup/compiler.class.inc.php
+++ b/setup/compiler.class.inc.php
@@ -176,7 +176,7 @@ EOF;
}
try
{
- $sCompiledCode .= $this->CompileMenu($oMenuNode, $sRelativeDir, $oP);
+ $sCompiledCode .= $this->CompileMenu($oMenuNode, $sTargetDir, $sRelativeDir, $oP);
}
catch (ssDOMFormatException $e)
{
@@ -929,7 +929,7 @@ EOF;
}// function CompileClass()
- protected function CompileMenu($oMenu, $sModuleRelativeDir, $oP)
+ protected function CompileMenu($oMenu, $sTargetDir, $sModuleRelativeDir, $oP)
{
$sMenuId = $oMenu->getAttribute("id");
$sMenuClass = $oMenu->getAttribute("xsi:type");
@@ -954,8 +954,35 @@ EOF;
break;
case 'DashboardMenuNode':
- $sTemplateFile = $oMenu->GetChildText('definition_file');
- $sTemplateSpec = $this->PathToPHP($sTemplateFile, $sModuleRelativeDir);
+ $sTemplateFile = $oMenu->GetChildText('definition_file', '');
+ if ($sTemplateFile != '')
+ {
+ $sTemplateSpec = $this->PathToPHP($sTemplateFile, $sModuleRelativeDir);
+ }
+ else
+ {
+ $oDashboardDefinition = $oMenu->GetOptionalElement('definition');
+ if ($oDashboardDefinition == null)
+ {
+ throw(new Exception('Missing definition for Dashboard menu "'.$sMenuId.'" expecting either a tag "definition_file" or "definition".'));
+ }
+ $sFileName = strtolower(str_replace(array(':', '/', '\\', '*'), '_', $sMenuId)).'_dashboard_menu.xml';
+ $sTemplateSpec = $this->PathToPHP($sFileName, $sModuleRelativeDir);
+
+ $oXMLDoc = new DOMDocument('1.0', 'UTF-8');
+ $oXMLDoc->formatOutput = true; // indent (must be loaded with option LIBXML_NOBLANKS)
+ $oXMLDoc->preserveWhiteSpace = true; // otherwise the formatOutput option would have no effect
+
+ $oRootNode = $oXMLDoc->createElement('dashboard'); // make sure that the document is not empty
+ $oRootNode->setAttribute('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance");
+ $oXMLDoc->appendChild($oRootNode);
+ foreach($oDashboardDefinition->childNodes as $oNode)
+ {
+ $oDefNode = $oXMLDoc->importNode($oNode, true); // layout, cells, etc Nodes and below
+ $oRootNode->appendChild($oDefNode);
+ }
+ $oXMLDoc->save($sTargetDir.'/'.$sModuleRelativeDir.'/'.$sFileName);
+ }
$sNewMenu = "new DashboardMenuNode('$sMenuId', $sTemplateSpec, $sParentSpec, $fRank);";
break;