Skip to content

Commit

Permalink
[GT-183] Apply code styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Sae126V committed Sep 15, 2023
1 parent 7bc3b3f commit 55aa780
Show file tree
Hide file tree
Showing 10 changed files with 787 additions and 471 deletions.
318 changes: 158 additions & 160 deletions config/web_portal/menu.xml
Original file line number Diff line number Diff line change
@@ -1,171 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<menus>
<main_menu>
<spacer>
<show_on_instance>all</show_on_instance>
<spacer>Browse</spacer>
</spacer>

<MySites>
<show_on_instance>all</show_on_instance>
<name>My Resources</name>
<link>index.php?Page_Type=My_Sites</link>
</MySites>

<Projects>
<show_on_instance>all</show_on_instance>
<name>Projects</name>
<link>index.php?Page_Type=Projects</link>
</Projects>

<NGI> <!-- was 'roc' -->
<show_on_instance>all</show_on_instance>
<name>NGIs</name>
<link>index.php?Page_Type=NGIs</link>
</NGI>

<Sites>
<show_on_instance>all</show_on_instance>
<name>Sites</name>
<link>index.php?Page_Type=Sites</link>
</Sites>

<ServiceGroups>
<show_on_instance>all</show_on_instance>
<name>Service Groups</name>
<link>index.php?Page_Type=Service_Groups</link>
</ServiceGroups>

<Services>
<show_on_instance>all</show_on_instance>
<name>Services</name>
<link>index.php?Page_Type=Services</link>
</Services>

<ServiceTypes>
<show_on_instance>all</show_on_instance>
<name>Service Types</name>
<link>index.php?Page_Type=Service_Types</link>
</ServiceTypes>

<Scopes>
<show_on_instance>all</show_on_instance>
<name>Scopes</name>
<link>index.php?Page_Type=Scopes</link>
</Scopes>

<RoleActionMappings>
<show_on_instance>all</show_on_instance>
<name>Role Action Map</name>
<link>index.php?Page_Type=View_Role_Action_Mappings</link>
</RoleActionMappings>

<spacer>
<spacer>Add</spacer>
<show_on_instance>write_enabled</show_on_instance>
</spacer>

<AddSite>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Site</name>
<link>index.php?Page_Type=Add_Site</link>
</AddSite>

<AddServiceGroup>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Service Group</name>
<link>index.php?Page_Type=Add_Service_Group</link>
</AddServiceGroup>

<AddService>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Service</name>
<link>index.php?Page_Type=Add_Service</link>
</AddService>

<AddDowntime>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Downtime</name>
<link>index.php?Page_Type=Add_Downtime</link>
</AddDowntime>

<spacer>
<spacer>Downtimes</spacer>
<show_on_instance>all</show_on_instance>
</spacer>

<main_menu>
<spacer>
<show_on_instance>all</show_on_instance>
<spacer>Browse</spacer>
</spacer>

<MySites>
<show_on_instance>all</show_on_instance>
<name>My Resources</name>
<link>index.php?Page_Type=My_Sites</link>
</MySites>

<Projects>
<show_on_instance>all</show_on_instance>
<name>Projects</name>
<link>index.php?Page_Type=Projects</link>
</Projects>

<NGI> <!-- was 'roc' -->
<show_on_instance>all</show_on_instance>
<name>NGIs</name>
<link>index.php?Page_Type=NGIs</link>
</NGI>

<Sites>
<show_on_instance>all</show_on_instance>
<name>Sites</name>
<link>index.php?Page_Type=Sites</link>
</Sites>

<ServiceGroups>
<show_on_instance>all</show_on_instance>
<name>Service Groups</name>
<link>index.php?Page_Type=Service_Groups</link>
</ServiceGroups>

<Services>
<show_on_instance>all</show_on_instance>
<name>Services</name>
<link>index.php?Page_Type=Services</link>
</Services>

<ServiceTypes>
<show_on_instance>all</show_on_instance>
<name>Service Types</name>
<link>index.php?Page_Type=Service_Types</link>
</ServiceTypes>

<Scopes>
<show_on_instance>all</show_on_instance>
<name>Scopes</name>
<link>index.php?Page_Type=Scopes</link>
</Scopes>

<RoleActionMappings>
<show_on_instance>all</show_on_instance>
<name>Role Action Map</name>
<link>index.php?Page_Type=View_Role_Action_Mappings</link>
</RoleActionMappings>

<spacer>
<spacer>Add</spacer>
<show_on_instance>write_enabled</show_on_instance>
</spacer>

<AddSite>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Site</name>
<link>index.php?Page_Type=Add_Site</link>
</AddSite>

<AddServiceGroup>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Service Group</name>
<link>index.php?Page_Type=Add_Service_Group</link>
</AddServiceGroup>

<AddService>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Service</name>
<link>index.php?Page_Type=Add_Service</link>
</AddService>

<AddDowntime>
<show_on_instance>write_enabled</show_on_instance>
<name>Add Downtime</name>
<link>index.php?Page_Type=Add_Downtime</link>
</AddDowntime>

<spacer>
<spacer>Downtimes</spacer>
<show_on_instance>all</show_on_instance>
</spacer>

<!--<current_downtimes>
<show_on_instance>all</show_on_instance>
<name>Recent &amp; Planned</name>
<link>http://operations-portal.in2p3.fr/index.php/dashboard/do</link>
</current_downtimes>-->

<CurrentDowntimes>
<show_on_instance>all</show_on_instance>
<name>Active &amp; Imminent</name>
<link>index.php?Page_Type=Downtimes_Overview</link>
</CurrentDowntimes>

<Calendar>
<show_on_instance>all</show_on_instance>
<name>Downtime Calendar</name>
<link>index.php?Page_Type=Downtimes_Calendar</link>
</Calendar>

<spacer>
<spacer>About GOCDB5</spacer>
<show_on_instance>all</show_on_instance>
</spacer>



<HelpAndContact>
<show_on_instance>all</show_on_instance>
<name>Doc, Help &amp; Support</name>
<link>index.php?Page_Type=Static_HTML&amp;Page=Help_And_Contact</link>
</HelpAndContact>

<spacer>
<spacer>GOCDB Admin</spacer>
<show_on_instance>admin</show_on_instance>
</spacer>

<AddNGI>
<show_on_instance>admin</show_on_instance>
<name>Add NGI</name>
<link>index.php?Page_Type=Admin_Add_NGI</link>
</AddNGI>

<AddProject>
<show_on_instance>admin</show_on_instance>
<name>Add Project</name>
<link>index.php?Page_Type=Admin_Add_Project</link>
</AddProject>

<AddServiceTypes>
<show_on_instance>admin</show_on_instance>
<name>Add Service Type</name>
<link>index.php?Page_Type=Admin_Add_Service_Type</link>
</AddServiceTypes>

<MoveServiceEndPoint>
<show_on_instance>admin</show_on_instance>
<name>Move Service</name>
<link>index.php?Page_Type=Admin_Move_SEP</link>
</MoveServiceEndPoint>

<MoveSite>
<show_on_instance>admin</show_on_instance>
<name>Move Site</name>
<link>index.php?Page_Type=Admin_Move_Site</link>
</MoveSite>

<Users>
<show_on_instance>admin</show_on_instance>
<name>Users</name>
<link>index.php?Page_Type=Admin_Users</link>
</Users>

<CurrentDowntimes>
<show_on_instance>all</show_on_instance>
<name>Active &amp; Imminent</name>
<link>index.php?Page_Type=Downtimes_Overview</link>
</CurrentDowntimes>

<Calendar>
<show_on_instance>all</show_on_instance>
<name>Downtime Calendar</name>
<link>index.php?Page_Type=Downtimes_Calendar</link>
</Calendar>

<spacer>
<spacer>About GOCDB5</spacer>
<show_on_instance>all</show_on_instance>
</spacer>

<HelpAndContact>
<show_on_instance>all</show_on_instance>
<name>Doc, Help &amp; Support</name>
<link>
index.php?Page_Type=Static_HTML&amp;Page=Help_And_Contact
</link>
</HelpAndContact>

<spacer>
<spacer>GOCDB Admin</spacer>
<show_on_instance>admin</show_on_instance>
</spacer>

<AddNGI>
<show_on_instance>admin</show_on_instance>
<name>Add NGI</name>
<link>index.php?Page_Type=Admin_Add_NGI</link>
</AddNGI>

<AddProject>
<show_on_instance>admin</show_on_instance>
<name>Add Project</name>
<link>index.php?Page_Type=Admin_Add_Project</link>
</AddProject>

<AddServiceTypes>
<show_on_instance>admin</show_on_instance>
<name>Add Service Type</name>
<link>index.php?Page_Type=Admin_Add_Service_Type</link>
</AddServiceTypes>

<MoveServiceEndPoint>
<show_on_instance>admin</show_on_instance>
<name>Move Service</name>
<link>index.php?Page_Type=Admin_Move_SEP</link>
</MoveServiceEndPoint>

<MoveSite>
<show_on_instance>admin</show_on_instance>
<name>Move Site</name>
<link>index.php?Page_Type=Admin_Move_Site</link>
</MoveSite>

<Users>
<show_on_instance>admin</show_on_instance>
<name>Users</name>
<link>index.php?Page_Type=Admin_Users</link>
</Users>
</main_menu>
</menus>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
function view_service_type()
{
$params = [];

$identifier = Get_User_Principle();
$user = \Factory::getUserService()->getUserByPrinciple($identifier);

Expand All @@ -45,7 +44,8 @@ function view_service_type()
$params['Name'] = $serviceType->getName();
$params['Description'] = $serviceType->getDescription();
$params['ID'] = $serviceType->getId();
$params['AllowMonitoringException'] = $serviceType->getAllowMonitoringException();
$params['AllowMonitoringException'] = $serviceType
->getAllowMonitoringException();
$params['Services'] = $serv->getServices($params['ID']);

show_view("service_type/view_service_type.php", $params, $params['Name']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
require_once __DIR__ . '/../utils.php';
require_once __DIR__ . '/../../../web_portal/components/Get_User_Principle.php';

function show_all(){
function show_all()
{

$serviceTypes = \Factory::getServiceTypeService()->getServiceTypes();
$params['ServiceTypes']= $serviceTypes;
$params['ServiceTypes'] = $serviceTypes;

show_view('service_type/view_service_types.php', $params, 'Service Types');
}
Loading

0 comments on commit 55aa780

Please sign in to comment.