From 3e0328d348fe86240202c975911ae6358a7b6122 Mon Sep 17 00:00:00 2001 From: JuanGarriuz Date: Tue, 23 Apr 2024 15:59:36 +0200 Subject: [PATCH] Remove AngularJS component click-action.js (#6613) * remove click-action.js * update changelog * Update changelog --------- Co-authored-by: Federico Rodriguez --- CHANGELOG.md | 1 + plugins/main/public/services/click-action.js | 68 -------------------- 2 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 plugins/main/public/services/click-action.js diff --git a/CHANGELOG.md b/CHANGELOG.md index c8390016be..641641a803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Removed API endpoint GET /api/timestamp [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481) - Removed API endpoint PUT /api/update-hostname/{id} [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481) - Removed API endpoint DELETE /hosts/remove-orphan-entries [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481) +- Remove AngularJS component `click-action` [#6613](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6613) ## Wazuh v4.8.2 - OpenSearch Dashboards 2.10.0 - Revision 00 diff --git a/plugins/main/public/services/click-action.js b/plugins/main/public/services/click-action.js deleted file mode 100644 index 23400d7875..0000000000 --- a/plugins/main/public/services/click-action.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Wazuh app - Wazuh table directive click wrapper - * Copyright (C) 2015-2022 Wazuh, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Find more information about this on the LICENSE file. - */ - -export function clickAction( - item, - openAction = false, - instance, - shareAgent, - $location, - $scope -) { - if ( - instance.path === '/agents' || - new RegExp(/^\/agents\/groups\/[a-zA-Z0-9_\-.]*$/).test(instance.path) - ) { - shareAgent.setAgent(item); - // Check location target and go to that path - switch (openAction) { - case 'configuration': - shareAgent.setTargetLocation({ - tab: 'configuration', - subTab: 'panels' - }); - break; - case 'discover': - shareAgent.setTargetLocation({ - tab: 'general', - subTab: 'discover' - }); - break; - default: - shareAgent.setTargetLocation({ - tab: 'welcome', - subTab: 'panels' - }); - } - - $location.path('/agents'); - } else if (instance.path === '/agents/groups') { - $scope.$emit('wazuhShowGroup', { group: item }); - } else if ( - new RegExp(/^\/agents\/groups\/[a-zA-Z0-9_\-.]*\/files$/).test( - instance.path - ) - ) { - $scope.$emit('wazuhShowGroupFile', { - groupName: instance.path.split('groups/')[1].split('/files')[0], - fileName: item.filename - }); - } else if (instance.path === '/rules') { - $scope.$emit('wazuhShowRule', { rule: item }); - } else if (instance.path.includes('/decoders')) { - $scope.$emit('wazuhShowDecoder', { decoder: item }); - } else if (instance.path.includes('/lists/files')) { - $scope.$emit('wazuhShowCdbList', { cdblist: item }); - } else if (instance.path === '/cluster/nodes') { - $scope.$emit('wazuhShowClusterNode', { node: item }); - } -}