diff --git a/datamodels/2.x/itop-portal-base/portal-silex/src/routers/aggregatepagebrickrouter.class.inc.php b/datamodels/2.x/itop-portal-base/portal-silex/src/routers/aggregatepagebrickrouter.class.inc.php deleted file mode 100644 index 526e0297fe..0000000000 --- a/datamodels/2.x/itop-portal-base/portal-silex/src/routers/aggregatepagebrickrouter.class.inc.php +++ /dev/null @@ -1,41 +0,0 @@ - -// - -namespace Combodo\iTop\Portal\Router; - -/** - * Class AggregatePageBrickRouter - * - * @package Combodo\iTop\Portal\Router - * @author Pierre Goiffon - * @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() - ), - ); -} diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes.yaml index 08e96dbc57..3ec5a839ef 100644 --- a/datamodels/2.x/itop-portal-base/portal/config/routes.yaml +++ b/datamodels/2.x/itop-portal-base/portal/config/routes.yaml @@ -21,20 +21,23 @@ defaults: 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: resource: 'routes/user_profile_brick.yaml' -# -#object_router: -# resource: 'routes/object_router.php' + +object_brick: + 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: resource: 'routes/extensions_extra_routes.php' \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes/aggregatepage_brick.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes/aggregatepage_brick.yaml new file mode 100644 index 0000000000..f691e70fc3 --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/config/routes/aggregatepage_brick.yaml @@ -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 + +p_aggregatepage_brick: + path: /aggregate-page/{sBrickId} + defaults: + _controller: Combodo\iTop\Portal\Controller\AggregatePageBrickController::DisplayAction \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes/browse_brick.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes/browse_brick.yaml new file mode 100644 index 0000000000..91e957ea92 --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/config/routes/browse_brick.yaml @@ -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 + +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' \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes/create_brick.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes/create_brick.yaml new file mode 100644 index 0000000000..f7a3bbac6b --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/config/routes/create_brick.yaml @@ -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 + +p_create_brick: + path: '/create/{sBrickId}' + defaults: + _controller: 'Combodo\iTop\Portal\Controller\CreateBrickController::DisplayAction' \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes/manage_brick.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes/manage_brick.yaml new file mode 100644 index 0000000000..7462c3878c --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/config/routes/manage_brick.yaml @@ -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 + +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' + + diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml new file mode 100644 index 0000000000..87c5c87c05 --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml @@ -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 + +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'