mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 18:28:55 +00:00
Fixing frozen Overview tab
This commit is contained in:
commit
6036e48efe
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wazuh",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"revision": "0335",
|
||||
"kibana": {
|
||||
"version" : "5.4.1"
|
||||
|
@ -64,7 +64,7 @@ app.controller('overviewController', function ($scope, appState, $window, generi
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
decodedTimeFilter = JSON.parse(sessionStorage.getItem($route.current.params._g));
|
||||
}else{
|
||||
decodedTimeFilter = rison.decode($route.current.params._g);
|
||||
decodedTimeFilter = rison.decode($route.current.params._g);
|
||||
}
|
||||
|
||||
if(decodedTimeFilter.time){
|
||||
@ -112,11 +112,16 @@ app.controller('overviewController', function ($scope, appState, $window, generi
|
||||
var currentTimeFilter = rison.decode($location.search()._g);
|
||||
// Check if timefilter has changed and update values
|
||||
var gParameter;
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
gParameter = sessionStorage.getItem($route.current.params._g);
|
||||
}else{
|
||||
gParameter = $route.current.params._g;
|
||||
}
|
||||
if($route.current.params._g){
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
gParameter = sessionStorage.getItem($route.current.params._g);
|
||||
}else{
|
||||
gParameter = $route.current.params._g;
|
||||
}
|
||||
}
|
||||
else{
|
||||
gParameter="{}";
|
||||
}
|
||||
if(gParameter != "{}" && gParameter != "()" && currentTimeFilter.time && ($scope.timeGTE != currentTimeFilter.time.from || $scope.timeLT != currentTimeFilter.time.to)){
|
||||
$scope.timeGTE = currentTimeFilter.time.from;
|
||||
$scope.timeLT = currentTimeFilter.time.to;
|
||||
|
@ -159,10 +159,15 @@ require('ui/modules').get('app/wazuh', []).controller('discoverW', function($sco
|
||||
|
||||
// Set default time
|
||||
var gParameter;
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
gParameter = sessionStorage.getItem($route.current.params._g);
|
||||
}else{
|
||||
gParameter = $route.current.params._g;
|
||||
if($route.current.params._g){
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
gParameter = sessionStorage.getItem($route.current.params._g);
|
||||
}else{
|
||||
gParameter = $route.current.params._g;
|
||||
}
|
||||
}
|
||||
else{
|
||||
gParameter="()";
|
||||
}
|
||||
if (gParameter == "()")
|
||||
$scope.timefilter.time.from = "now-24h";
|
||||
|
@ -32,12 +32,17 @@ require('ui/modules').get('app/wazuh', []).controller('kibanaSearchBar', functio
|
||||
|
||||
// Set default time
|
||||
var gParameter;
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
gParameter = sessionStorage.getItem($route.current.params._g);
|
||||
}else{
|
||||
gParameter = $route.current.params._g;
|
||||
}
|
||||
if (gParameter == "()"){
|
||||
if($route.current.params._g){
|
||||
if($route.current.params._g.startsWith("h@")){
|
||||
gParameter = sessionStorage.getItem($route.current.params._g);
|
||||
}else{
|
||||
gParameter = $route.current.params._g;
|
||||
}
|
||||
}
|
||||
else{
|
||||
gParameter="()";
|
||||
}
|
||||
if (gParameter == "()"){
|
||||
timefilter.time.from = "now-24h";
|
||||
timefilter.time.to = "now";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user