mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
replace the 'static' template menu by a dashboard menu
SVN:trunk[2060]
This commit is contained in:
@@ -42,7 +42,7 @@ class ItopWelcome extends ModuleHandlerAPI
|
||||
public static function OnMenuCreation()
|
||||
{
|
||||
$oWelcomeMenu = new MenuGroup('WelcomeMenu', 10 /* fRank */);
|
||||
new TemplateMenuNode('WelcomeMenuPage', dirname(__FILE__).'/welcome_menu.html', $oWelcomeMenu->GetIndex() /* oParent */, 1 /* fRank */);
|
||||
new DashboardMenuNode('WelcomeMenuPage', dirname(__FILE__).'/welcome_menu.xml', $oWelcomeMenu->GetIndex() /* oParent */, 1 /* fRank */);
|
||||
|
||||
$oToolsMenu = new MenuGroup('DataAdministration', 70 /* fRank */, 'Organization', UR_ACTION_MODIFY, UR_ALLOWED_YES|UR_ALLOWED_DEPENDS);
|
||||
new WebPageMenuNode('CSVImportMenu', utils::GetAbsoluteUrlAppRoot().'pages/csvimport.php', $oToolsMenu->GetIndex(), 1 /* fRank */);
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
<style>
|
||||
.main_container {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
border-bottom: #ccc 1px solid;
|
||||
border-top: #ccc 1px solid;
|
||||
}
|
||||
.main_header {
|
||||
width:100%;
|
||||
height: 60px;
|
||||
cursor: move;
|
||||
background-color: #F1F1F6;
|
||||
}
|
||||
.main_header h1 {
|
||||
color: #1C94C4;
|
||||
margin-top:0;
|
||||
margin-bottom:0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;p
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.main_header img {
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
float:left;
|
||||
}
|
||||
.item {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
background-color: #fff;
|
||||
padding: 5px;
|
||||
height: auto;
|
||||
}
|
||||
.main_menu {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: auto;
|
||||
background-color: #eee;
|
||||
width: 100%;
|
||||
}
|
||||
.element {
|
||||
display: inline;
|
||||
float: left;
|
||||
}
|
||||
.element a {
|
||||
font-size: 10px;
|
||||
}
|
||||
.element a.actions {
|
||||
font-size: 16px;
|
||||
text-decoration: none;
|
||||
background: transparent;
|
||||
color: #666;
|
||||
}
|
||||
.element a img {
|
||||
border: 0;
|
||||
}
|
||||
.summary-details {
|
||||
float:right;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.summary-details td {
|
||||
text-align: center;
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
}
|
||||
.summary-details th {
|
||||
text-align: center;
|
||||
background: #CCC;
|
||||
padding: 5px;
|
||||
color: #eee;
|
||||
}
|
||||
a.summary {
|
||||
text-decoration: none;
|
||||
background: transparent;
|
||||
color: #666;
|
||||
}
|
||||
a.summary:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<div id="main_menu" class="sortable persistent">
|
||||
|
||||
<div id="menu_1" class="main_container v-resizable">
|
||||
|
||||
<div class="main_header drag_handle" id="main_cfg">
|
||||
|
||||
<img src="$MODULES_URL$itop-config-mgmt-1.0.0/images/database.png"/>
|
||||
<itopblock BlockClass="DisplayBlock" type="summary" asynchronous="false" encoding="text/oql" parameters="title[block]:Menu_ConfigManagement;context_filter:1;label[block]:UI_WelcomeMenu_AllConfigItems;status[block]:status;status_codes[block]:implementation,production,obsolete">SELECT FunctionalCI</itopblock>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
|
||||
<div class="element">
|
||||
<itopcheck class="BusinessProcess">
|
||||
<itopblock BlockClass="DisplayBlock" type="actions" asynchronous="false" encoding="text/oql" parameters="context_filter:1">SELECT BusinessProcess</itopblock>
|
||||
</itopcheck>
|
||||
</div>
|
||||
|
||||
<div class="element">
|
||||
<itopcheck class="Contact">
|
||||
<itopblock BlockClass="DisplayBlock" type="actions" asynchronous="false" encoding="text/oql" parameters="context_filter:1">SELECT Contact</itopblock>
|
||||
</itopcheck>
|
||||
</div>
|
||||
|
||||
<div class="element">
|
||||
<itopcheck class="Location">
|
||||
<itopblock BlockClass="DisplayBlock" type="actions" asynchronous="false" encoding="text/oql" parameters="context_filter:1">SELECT Location</itopblock>
|
||||
</itopcheck>
|
||||
</div>
|
||||
|
||||
<div class="element">
|
||||
<itopcheck class="Server">
|
||||
<itopblock BlockClass="DisplayBlock" type="actions" asynchronous="false" encoding="text/oql" parameters="context_filter:1">SELECT Server</itopblock>
|
||||
</itopcheck>
|
||||
</div>
|
||||
|
||||
<div class="element">
|
||||
<itopcheck class="DatabaseInstance">
|
||||
<itopblock BlockClass="DisplayBlock" type="actions" asynchronous="false" encoding="text/oql" parameters="context_filter:1">SELECT DatabaseInstance</itopblock>
|
||||
</itopcheck>
|
||||
</div>
|
||||
|
||||
<div class="element">
|
||||
<itopcheck class="NetworkDevice">
|
||||
<itopblock BlockClass="DisplayBlock" type="actions" asynchronous="false" encoding="text/oql" parameters="context_filter:1">SELECT NetworkDevice</itopblock>
|
||||
</itopcheck>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<itopcheck class="UserRequest">
|
||||
|
||||
<div id="menu_2" class="main_container v-resizable">
|
||||
|
||||
<div class="main_header drag_handle" id="main_helpdesk">
|
||||
<img src="$MODULES_URL$itop-request-mgmt-1.0.0/images/user-request-deadline.png"/>
|
||||
<itopblock BlockClass="DisplayBlock" type="summary" asynchronous="false" encoding="text/oql" parameters="title[block]:Menu_RequestManagement;context_filter:1;label[block]:UI_WelcomeMenu_AllOpenRequests;status[block]:status;status_codes[block]:new,assigned,escalated_tto,escalated_ttr,resolved">SELECT UserRequest WHERE status != "closed"</itopblock>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<p style="text-align:left; font-family:Verdana, Arial, sans-serif; font-size:14px;"><itopstring>UI:WelcomeMenu:MyCalls</itopstring></p>
|
||||
<itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql" parameters="menu:1">SELECT UserRequest AS i WHERE i.caller_id = :current_contact_id AND status NOT IN ("closed", "resolved")</itopblock>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</itopcheck>
|
||||
|
||||
<itopcheck class="Incident">
|
||||
|
||||
<div id="menu_3" class="main_container v-resizable">
|
||||
|
||||
<div class="main_header drag_handle" id="main_incident">
|
||||
<img src="$MODULES_URL$itop-incident-mgmt-1.0.0/images/incident-escalated.png"/>
|
||||
<itopblock BlockClass="DisplayBlock" type="summary" asynchronous="false" encoding="text/oql" parameters="title[block]:Menu_IncidentManagement;context_filter:1;label[block]:UI_WelcomeMenu_OpenIncidents;status[block]:status;status_codes[block]:new,assigned,escalated_tto,escalated_ttr,resolved">SELECT Incident WHERE status != "closed"</itopblock>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<p style="text-align:left; font-family:Verdana, Arial, sans-serif; font-size:14px;"><itopstring>UI:WelcomeMenu:MyIncidents</itopstring></p>
|
||||
<itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql" parameters="menu:1">SELECT Incident AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")</itopblock>
|
||||
</div>
|
||||
|
||||
</itopcheck>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
66
datamodel/itop-welcome-itil/welcome_menu.xml
Normal file
66
datamodel/itop-welcome-itil/welcome_menu.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0"?>
|
||||
<dashboard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<layout>DashboardLayoutOneCol</layout>
|
||||
<title></title>
|
||||
<cells>
|
||||
<cell>
|
||||
<dashlet id="1" xsi:type="DashletHeaderDynamic">
|
||||
<title>Configuration Management</title>
|
||||
<icon>itop-config-mgmt-1.0.0/images/database.png</icon>
|
||||
<subtitle>Configuration Items</subtitle>
|
||||
<query>SELECT FunctionalCI</query>
|
||||
<group_by>status</group_by>
|
||||
<values>implementation,production,obsolete</values>
|
||||
</dashlet>
|
||||
<dashlet id="2" xsi:type="DashletBadge">
|
||||
<class>BusinessProcess</class>
|
||||
</dashlet>
|
||||
<dashlet id="3" xsi:type="DashletBadge">
|
||||
<class>Contact</class>
|
||||
</dashlet>
|
||||
<dashlet id="4" xsi:type="DashletBadge">
|
||||
<class>Location</class>
|
||||
</dashlet>
|
||||
<dashlet id="5" xsi:type="DashletBadge">
|
||||
<class>Server</class>
|
||||
</dashlet>
|
||||
<dashlet id="6" xsi:type="DashletBadge">
|
||||
<class>DatabaseInstance</class>
|
||||
</dashlet>
|
||||
<dashlet id="7" xsi:type="DashletBadge">
|
||||
<class>NetworkDevice</class>
|
||||
</dashlet>
|
||||
</cell>
|
||||
<cell>
|
||||
<dashlet id="8" xsi:type="DashletHeaderDynamic">
|
||||
<title>Helpdesk</title>
|
||||
<icon>itop-request-mgmt-1.0.0/images/user-request-deadline.png</icon>
|
||||
<subtitle>Open Requests</subtitle>
|
||||
<query>SELECT UserRequest WHERE status != "closed"</query>
|
||||
<group_by>status</group_by>
|
||||
<values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
|
||||
</dashlet>
|
||||
<dashlet id="9" xsi:type="DashletObjectList">
|
||||
<title>My Open Requests</title>
|
||||
<query>SELECT UserRequest AS i WHERE i.caller_id = :current_contact_id AND status NOT IN ("closed", "resolved")</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</cell>
|
||||
<cell>
|
||||
<dashlet id="10" xsi:type="DashletHeaderDynamic">
|
||||
<title>Incident Management</title>
|
||||
<icon>itop-incident-mgmt-1.0.0/images/incident-escalated.png</icon>
|
||||
<subtitle>Open incidents</subtitle>
|
||||
<query>SELECT Incident WHERE status != "closed"</query>
|
||||
<group_by>status</group_by>
|
||||
<values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
|
||||
</dashlet>
|
||||
<dashlet id="11" xsi:type="DashletObjectList">
|
||||
<title>My Open incidents</title>
|
||||
<query>SELECT Incident AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</cell>
|
||||
</cells>
|
||||
</dashboard>
|
||||
|
||||
Reference in New Issue
Block a user