mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
Reduced vis tab checking to 2 elements
This commit is contained in:
parent
adcffd8483
commit
9dbd8fa9f7
@ -43,7 +43,7 @@ app.controller('agentsController', function ($timeout, $scope, $location, $rootS
|
|||||||
$scope.tab = "general";
|
$scope.tab = "general";
|
||||||
$location.search("tab", "general");
|
$location.search("tab", "general");
|
||||||
}
|
}
|
||||||
tabHistory.push($scope.tab)
|
if($scope.tab !== 'configuration' && $scope.tab !== 'welcome') tabHistory.push($scope.tab)
|
||||||
|
|
||||||
// Metrics Audit
|
// Metrics Audit
|
||||||
const metricsAudit = {
|
const metricsAudit = {
|
||||||
@ -214,14 +214,14 @@ app.controller('agentsController', function ($timeout, $scope, $location, $rootS
|
|||||||
|
|
||||||
// Switch tab
|
// Switch tab
|
||||||
$scope.switchTab = (tab, force = false) => {
|
$scope.switchTab = (tab, force = false) => {
|
||||||
tabHistory.push(tab)
|
if(tab !== 'configuration' && tab !== 'welcome') tabHistory.push(tab)
|
||||||
if (tabHistory.length > 3) tabHistory = tabHistory.slice(-3);
|
if (tabHistory.length > 2) tabHistory = tabHistory.slice(-2);
|
||||||
tabVisualizations.setTab(tab);
|
tabVisualizations.setTab(tab);
|
||||||
if ($scope.tab === tab && !force) return;
|
if ($scope.tab === tab && !force) return;
|
||||||
const onlyAgent = $scope.tab === tab && force;
|
const onlyAgent = $scope.tab === tab && force;
|
||||||
const sameTab = $scope.tab === tab;
|
const sameTab = $scope.tab === tab;
|
||||||
$location.search('tab', tab);
|
$location.search('tab', tab);
|
||||||
const preserveDiscover = tabHistory.length === 3 && tabHistory[0] === tabHistory[2] && tabHistory[1] === 'configuration';
|
const preserveDiscover = tabHistory.length === 2 && tabHistory[0] === tabHistory[1];
|
||||||
$scope.tab = tab;
|
$scope.tab = tab;
|
||||||
|
|
||||||
if($scope.tab === 'configuration'){
|
if($scope.tab === 'configuration'){
|
||||||
|
Loading…
Reference in New Issue
Block a user