mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 15:52:24 +02:00
N°2060 [WIP] Initialisation of the portal application: Migrate routes to YAML format
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// Copyright (c) 2010-2018 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
//
|
|
||||||
|
|
||||||
namespace Combodo\iTop\Portal\Router;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class AggregatePageBrickRouter
|
|
||||||
*
|
|
||||||
* @package Combodo\iTop\Portal\Router
|
|
||||||
* @author Pierre Goiffon <pierre.goiffon@combodo.com>
|
|
||||||
* @since 2.5.0
|
|
||||||
*/
|
|
||||||
class AggregatePageBrickRouter extends AbstractRouter
|
|
||||||
{
|
|
||||||
static $aRoutes = array(
|
|
||||||
array(
|
|
||||||
'pattern' => '/aggregate-page/{sBrickId}',
|
|
||||||
'callback' => 'Combodo\\iTop\\Portal\\Controller\\AggregatePageBrickController::DisplayAction',
|
|
||||||
'bind' => 'p_aggregatepage_brick',
|
|
||||||
'asserts' => array(),
|
|
||||||
'values' => array()
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -21,20 +21,23 @@
|
|||||||
defaults:
|
defaults:
|
||||||
resource: 'routes/default.yaml'
|
resource: 'routes/default.yaml'
|
||||||
|
|
||||||
#browse_brick:
|
|
||||||
# resource: 'routes/browse_brick.yaml'
|
|
||||||
#
|
|
||||||
#create_brick:
|
|
||||||
# resource: 'routes/create_brick.yaml'
|
|
||||||
#
|
|
||||||
#manage_brick:
|
|
||||||
# resource: 'routes/manage_brick.yaml'
|
|
||||||
|
|
||||||
user_profile_brick:
|
user_profile_brick:
|
||||||
resource: 'routes/user_profile_brick.yaml'
|
resource: 'routes/user_profile_brick.yaml'
|
||||||
#
|
|
||||||
#object_router:
|
object_brick:
|
||||||
# resource: 'routes/object_router.php'
|
resource: 'routes/object_brick.yaml'
|
||||||
|
|
||||||
|
create_brick:
|
||||||
|
resource: 'routes/create_brick.yaml'
|
||||||
|
|
||||||
|
browse_brick:
|
||||||
|
resource: 'routes/browse_brick.yaml'
|
||||||
|
|
||||||
|
manage_brick:
|
||||||
|
resource: 'routes/manage_brick.yaml'
|
||||||
|
|
||||||
|
p_aggregatepage_brick:
|
||||||
|
resource: 'routes/aggregatepage_brick.yaml'
|
||||||
|
|
||||||
extensions_extra_routes:
|
extensions_extra_routes:
|
||||||
resource: 'routes/extensions_extra_routes.php'
|
resource: 'routes/extensions_extra_routes.php'
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (C) 2010-2018 Combodo SARL
|
||||||
|
#
|
||||||
|
# This file is part of iTop.
|
||||||
|
#
|
||||||
|
# iTop is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# iTop is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
p_aggregatepage_brick:
|
||||||
|
path: /aggregate-page/{sBrickId}
|
||||||
|
defaults:
|
||||||
|
_controller: Combodo\iTop\Portal\Controller\AggregatePageBrickController::DisplayAction
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Copyright (C) 2010-2018 Combodo SARL
|
||||||
|
#
|
||||||
|
# This file is part of iTop.
|
||||||
|
#
|
||||||
|
# iTop is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# iTop is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
p_browse_brick:
|
||||||
|
path: '/browse/{sBrickId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\BrowseBrickController::DisplayAction'
|
||||||
|
|
||||||
|
|
||||||
|
p_browse_brick_mode:
|
||||||
|
path: '/browse/{sBrickId}/{sBrowseMode}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\BrowseBrickController::DisplayAction'
|
||||||
|
|
||||||
|
|
||||||
|
p_browse_brick_mode_list:
|
||||||
|
path: '/browse/{sBrickId}/list/page/{iPageNumber}/show/{iListLength}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\BrowseBrickController::DisplayAction'
|
||||||
|
sBrowseMode: 'list'
|
||||||
|
sDataLoading: 'lazy'
|
||||||
|
iPageNumber: 1
|
||||||
|
iListLength: 20
|
||||||
|
requirements:
|
||||||
|
sBrowseMode: 'list'
|
||||||
|
iPageNumber: '\d+'
|
||||||
|
iListLength: '\d+'
|
||||||
|
|
||||||
|
|
||||||
|
p_browse_brick_mode_tree:
|
||||||
|
path: '/browse/{sBrickId}/tree/expand/{sLevelAlias}/{sNodeId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\BrowseBrickController::DisplayAction'
|
||||||
|
sBrowseMode: 'tree'
|
||||||
|
sDataLoading: 'lazy'
|
||||||
|
sNodeId: ~
|
||||||
|
requirements:
|
||||||
|
sBrowseMode: 'tree'
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (C) 2010-2018 Combodo SARL
|
||||||
|
#
|
||||||
|
# This file is part of iTop.
|
||||||
|
#
|
||||||
|
# iTop is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# iTop is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
p_create_brick:
|
||||||
|
path: '/create/{sBrickId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\CreateBrickController::DisplayAction'
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Copyright (C) 2010-2018 Combodo SARL
|
||||||
|
#
|
||||||
|
# This file is part of iTop.
|
||||||
|
#
|
||||||
|
# iTop is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# iTop is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
p_manage_brick:
|
||||||
|
path: '/manage/{sBrickId}/{sGroupingTab}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\ManageBrickController::DisplayAction'
|
||||||
|
sGroupingTab: ~
|
||||||
|
|
||||||
|
p_manage_brick_display_as:
|
||||||
|
path: '/manage/{sBrickId}/display-as/{sDisplayMode}/{sGroupingTab}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\ManageBrickController::DisplayAction'
|
||||||
|
sGroupingTab: ~
|
||||||
|
requirements:
|
||||||
|
sDisplayMode: 'list|pie-chart|bar-chart'
|
||||||
|
|
||||||
|
p_manage_brick_lazy:
|
||||||
|
path: '/manage/{sBrickId}/{sGroupingTab}/{sGroupingArea}/page/{iPageNumber}/show/{iListLength}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\ManageBrickController::DisplayAction'
|
||||||
|
sDataLoading: 'lazy'
|
||||||
|
iPageNumber: 1
|
||||||
|
iListLength: 20
|
||||||
|
requirements:
|
||||||
|
iPageNumber: '\d+'
|
||||||
|
iListLength: '\d+'
|
||||||
|
|
||||||
|
p_manage_brick_excel_export_start:
|
||||||
|
path: '/manage/export/excel/start/{sBrickId}/{sGroupingTab}/{sGroupingArea}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\iTop\Portal\Controller\ManageBrickController::ExcelExportStartAction'
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
# Copyright (C) 2010-2018 Combodo SARL
|
||||||
|
#
|
||||||
|
# This file is part of iTop.
|
||||||
|
#
|
||||||
|
# iTop is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# iTop is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
p_object_create:
|
||||||
|
path: '/object/create/{sObjectClass}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::CreateAction'
|
||||||
|
|
||||||
|
p_object_create_from_factory:
|
||||||
|
path: '/object/create-from-factory/{sObjectClass}/{sObjectId}/{sEncodedMethodName}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::CreateFromFactoryAction'
|
||||||
|
|
||||||
|
p_object_edit:
|
||||||
|
path: '/object/edit/{sObjectClass}/{sObjectId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::EditAction'
|
||||||
|
|
||||||
|
p_object_view:
|
||||||
|
path: '/object/view/{sObjectClass}/{sObjectId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::ViewAction'
|
||||||
|
|
||||||
|
p_object_apply_stimulus:
|
||||||
|
path: '/object/apply-stimulus/{sStimulusCode}/{sObjectClass}/{sObjectId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::ApplyStimulusAction'
|
||||||
|
|
||||||
|
p_object_search_regular:
|
||||||
|
path: '/object/search'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::SearchRegularAction'
|
||||||
|
|
||||||
|
p_object_search_from_attribute:
|
||||||
|
path: '/object/search/from-attribute/{sTargetAttCode}/{sHostObjectClass}/{sHostObjectId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::SearchFromAttributeAction'
|
||||||
|
sHostObjectClass: ~
|
||||||
|
sHostObjectId: ~
|
||||||
|
|
||||||
|
p_object_search_autocomplete:
|
||||||
|
path: '/object/search'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::SearchAutocompleteAction'
|
||||||
|
sHostObjectClass: ~
|
||||||
|
sHostObjectId: ~
|
||||||
|
|
||||||
|
p_object_search_hierarchy:
|
||||||
|
path: '/object/search/hierarchy/{sTargetAttCode}/{sHostObjectClass}/{sHostObjectId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::SearchHierarchyAction'
|
||||||
|
sHostObjectClass: ~
|
||||||
|
sHostObjectId: ~
|
||||||
|
|
||||||
|
|
||||||
|
p_object_search_generic:
|
||||||
|
path: '/object/search/{sMode}/{sTargetAttCode}/{sHostObjectClass}/{sHostObjectId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::SearchAction'
|
||||||
|
sMode: '-sMode-'
|
||||||
|
sHostObjectClass: ~
|
||||||
|
sHostObjectId: ~
|
||||||
|
|
||||||
|
p_object_get_informations_json:
|
||||||
|
path: '/object/get-informations/json'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::GetInformationsAsJsonAction'
|
||||||
|
|
||||||
|
p_object_document_display:
|
||||||
|
path: '/object/document/display/{sObjectClass}/{sObjectId}/{sObjectField}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::DocumentAction'
|
||||||
|
sOperation: 'display'
|
||||||
|
|
||||||
|
p_object_document_download:
|
||||||
|
path: '/object/document/download/{sObjectClass}/{sObjectId}/{sObjectField}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::DocumentAction'
|
||||||
|
sOperation: 'download'
|
||||||
|
|
||||||
|
p_object_attachment_add:
|
||||||
|
path: '/object/attachment/add'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::AttachmentAction'
|
||||||
|
|
||||||
|
p_object_attachment_download:
|
||||||
|
path: '/object/attachment/download/{sAttachmentId}'
|
||||||
|
defaults:
|
||||||
|
_controller: 'Combodo\\iTop\\Portal\\Controller\\ObjectController::AttachmentAction'
|
||||||
|
sOperation: 'download'
|
||||||
Reference in New Issue
Block a user