Modified blank screen controller to use scope directly

This commit is contained in:
Jesús Ángel González 2018-03-11 12:16:50 +01:00
parent 1a21504b36
commit eee3c24215

View File

@ -1,11 +1,13 @@
const app = require('ui/modules').get('app/wazuh', []);
import $ from 'jquery';
// Logs controller
app.controller('blankScreenController', function ($scope, $rootScope, errorHandler) {
app.controller('blankScreenController', function ($scope, $rootScope, errorHandler,$location) {
if($rootScope.blankScreenError) {
$('#result').html(errorHandler.handle($rootScope.blankScreenError,'',false,true));
$scope.errorToShow = $rootScope.blankScreenError;
delete $rootScope.blankScreenError;
} else {
$('#result').html('Something went wrong')
if(!$scope.$$phase) $scope.$digest();
}
$scope.goOverview = () => {
$location.path('/overview');
}
});