Fixed code from suggestions

This commit is contained in:
Juanjo Jiménez 2018-04-03 12:57:15 +02:00 committed by Jesús Ángel
parent 95dde00a28
commit f0e9694bbd
2 changed files with 1 additions and 5 deletions

View File

@ -43,8 +43,6 @@ app.controller('settingsController', function ($scope, $rootScope, $http, $route
$scope.indexPatterns = [];
$scope.apiEntries = [];
$scope.apiEntriesLoaded = false;
if ($routeParams.tab){
$scope.submenuNavItem = $routeParams.tab;
}
@ -143,8 +141,6 @@ app.controller('settingsController', function ($scope, $rootScope, $http, $route
$scope.apiEntries = data.data.length > 0 ? data.data : [];
$scope.apiEntries = $scope.apiEntries.sort(sortByTimestamp);
$scope.apiEntriesLoaded = true;
if (appState.getCurrentAPI() !== undefined && appState.getCurrentAPI() !== null)
$scope.currentDefault = JSON.parse(appState.getCurrentAPI()).id;
if(!$scope.$$phase) $scope.$digest();

View File

@ -15,7 +15,7 @@
<div layout="column" layout-align="start stretch">
<!-- First-time welcome card -->
<md-card class="wz-md-card" layout-padding layout-align="start stretch" ng-if="submenuNavItem == 'api' && apiEntriesLoaded && apiEntries.length == 0">
<md-card class="wz-md-card" layout-padding layout-align="start stretch" ng-if="submenuNavItem == 'api' && !load && apiEntries.length == 0">
<md-card-content>
<span class="wz-headline-title">Welcome to the Wazuh App for Kibana 6</span>
<md-divider class="wz-margin-top-10"></md-divider>