mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Preventing blinking when loading
This commit is contained in:
parent
2d627cfeb8
commit
88be410b0e
@ -14,7 +14,7 @@ app.controller('agentsController', function ($scope, $q, DataFactory, Notifier,
|
||||
$scope._os = 'all';
|
||||
$scope.defaultManager = $scope.state.getDefaultManager().name;
|
||||
$scope.extensions = $scope.state.getExtensions().extensions;
|
||||
$scope.results = false;
|
||||
$scope.results = true;
|
||||
$scope.hideRing = function(items){
|
||||
if($(".vis-editor-content" ).length >= items)
|
||||
return true;
|
||||
@ -51,11 +51,11 @@ app.controller('agentsController', function ($scope, $q, DataFactory, Notifier,
|
||||
$scope.submenuNavItem = tab;
|
||||
$location.search('tab', $scope.submenuNavItem);
|
||||
if($scope.submenuNavItem != "preview"){
|
||||
$scope.presentData($scope._agent.name).then(function (data) {$scope.results = data;});
|
||||
$scope.presentData($scope._agent.name).then(function (data) {$scope.results = data;}, function() { $scope.results = false; });
|
||||
}
|
||||
}else{
|
||||
$rootScope.$broadcast('fetchVisualization');
|
||||
$scope.presentData($scope._agent.name).then(function (data) {$scope.results = data;});
|
||||
$scope.presentData($scope._agent.name).then(function (data) {$scope.results = data;}, function() { $scope.results = false; });
|
||||
}
|
||||
};
|
||||
|
||||
@ -164,7 +164,7 @@ app.controller('agentsController', function ($scope, $q, DataFactory, Notifier,
|
||||
$scope.search = data.data.name;
|
||||
$location.search('id', $scope._agent.id);
|
||||
$scope.presentData($scope._agent.name).then(function (data) {
|
||||
$scope.results = data;
|
||||
$scope.results = data;
|
||||
$scope.load = false;
|
||||
});
|
||||
|
||||
@ -238,7 +238,7 @@ app.controller('agentsController', function ($scope, $q, DataFactory, Notifier,
|
||||
|
||||
//Check for present data for the selected tab
|
||||
if($scope.submenuNavItem != "preview"){
|
||||
$scope.presentData($scope._agent.name).then(function (data) {$scope.results = data;});
|
||||
$scope.presentData($scope._agent.name).then(function (data) {$scope.results = data;}, function() { $scope.results = false; });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ app.controller('overviewController', function ($scope, appState, $window, generi
|
||||
$scope.extensions = $scope.state.getExtensions().extensions;
|
||||
$scope.submenuNavItem = "general";
|
||||
$scope.tabView = "panels";
|
||||
$scope.results = false;
|
||||
$scope.loadedBoxes = false;
|
||||
$scope.results = true;
|
||||
$scope.hideRing = function(items){
|
||||
if($(".vis-editor-content" ).length >= items)
|
||||
return true;
|
||||
@ -56,9 +55,9 @@ app.controller('overviewController', function ($scope, appState, $window, generi
|
||||
$scope.submenuNavItem = tab;
|
||||
$location.search('tab', $scope.submenuNavItem);
|
||||
|
||||
$scope.presentData().then(function (data) {$scope.results = data;});
|
||||
$scope.presentData().then(function (data) {$scope.results = data;}, function(){ $scope.results = false;});
|
||||
}else{
|
||||
$scope.presentData().then(function (data) {$scope.results = data;});
|
||||
$scope.presentData().then(function (data) {$scope.results = data;}, function(){ $scope.results = false;});
|
||||
$rootScope.$broadcast('fetchVisualization');
|
||||
}
|
||||
};
|
||||
@ -116,13 +115,13 @@ app.controller('overviewController', function ($scope, appState, $window, generi
|
||||
$scope.timeLT = currentTimeFilter.time.to;
|
||||
|
||||
//Check for present data for the selected tab
|
||||
$scope.presentData().then(function (data) {$scope.results = data;});
|
||||
$scope.presentData().then(function (data) {$scope.results = data;}, function(){ $scope.results = false;});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Load
|
||||
$scope.presentData().then(function (data) {$scope.results = data;});
|
||||
$scope.presentData().then(function (data) {$scope.results = data;}, function(){ $scope.results = false;});
|
||||
|
||||
});
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(15)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(15)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(15)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(8)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(8)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(8)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(13)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(13)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(13)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- Kibana search bar -->
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(7)'><div></div></div>
|
||||
<div ng-show='hideRing(7)' ng-if="tabView == 'panels'">
|
||||
<div ng-show='hideRing(7) && results' ng-if="tabView == 'panels'">
|
||||
<md-content layout="row">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
@ -70,7 +70,7 @@
|
||||
</div>
|
||||
|
||||
<!-- No results message -->
|
||||
<md-content id="prueba" flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(7)">
|
||||
<md-content id="prueba" flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(7)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(3)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(3)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(3)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(4)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(4)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(4)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(16)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(16)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(16)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(17)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(17)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(17)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(15)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(15)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(15)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(14)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(14)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(14)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(5)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(5)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(5)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -4,7 +4,7 @@
|
||||
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(5)'><div></div></div>
|
||||
<!-- No results message -->
|
||||
<md-content flex layout="row" layout-align="start start" ng-if="!results && tabView == 'panels' && hideRing(5)">
|
||||
<md-content flex layout="row" layout-align="start start" ng-show="!results" ng-if="tabView == 'panels' && hideRing(5)">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
No results for selected time interval
|
||||
|
@ -576,5 +576,5 @@ module.exports = function (server, options) {
|
||||
path: '/api/wazuh-api/updateApiHostname/{id}',
|
||||
handler: updateApiHostname
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user