Linter and prettier fixes

This commit is contained in:
Jesús Ángel 2019-05-09 12:45:11 +02:00
parent 6fe9016445
commit 23b85a0c19
6 changed files with 18 additions and 14 deletions

View File

@ -466,6 +466,7 @@ export class DevToolsController {
const dynamicHeight = () => {
const self = this;
const window = this.$window;
setTimeout(function() {
const windows = $(window).height();
$('#wz-dev-left-column').height(

View File

@ -30,7 +30,8 @@ class WzConfigViewer {
this.template = template;
}
controller($scope, $document) {
controller($scope, $document, $window) {
const window = $window;
const setJsonBox = () => {
$scope.jsonCodeBox = CodeMirror.fromTextArea(
$document[0].getElementById('viewer_json_box'),
@ -92,7 +93,7 @@ class WzConfigViewer {
setTimeout(function() {
$scope.jsonCodeBox.refresh();
$scope.$applyAsync();
window.dispatchEvent(new Event('resize'));
window.dispatchEvent(new Event('resize')); // eslint-disable-line
}, 200);
}
};
@ -110,7 +111,7 @@ class WzConfigViewer {
$scope.$applyAsync();
$scope.isLogs
? dynamicHeight()
: window.dispatchEvent(new Event('resize'));
: window.dispatchEvent(new Event('resize')); // eslint-disable-line
}, 200);
}
};

View File

@ -37,8 +37,10 @@ app.directive('wzXmlFileEditor', function() {
rulesetHandler,
configHandler,
apiReq,
$rootScope
$rootScope,
$window
) {
const window = $window;
$scope.targetNameShown = $scope.targetName;
$scope.configError = false;
/**

View File

@ -1,5 +1,6 @@
/*
* Wazuh app - Stylesheets loader
* Copyright (C) 2015-2019 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,9 +26,9 @@ import './jquery-ui.css';
//import './dark_theme/wz_theme_dark.css';
import chrome from 'ui/chrome';
const IS_DARK_THEME = chrome.getUiSettingsClient().get('theme:darkMode');
/* eslint-disable no-undef */
if (IS_DARK_THEME) {
var newSS = document.createElement('link');
let newSS = document.createElement('link');
newSS.rel = 'stylesheet';
newSS.href = '../plugins/wazuh/less/dark_theme/wz_theme_dark.css';
document.getElementsByTagName('head')[0].appendChild(newSS);
@ -42,3 +43,4 @@ if (IS_DARK_THEME) {
newSS.href = '../plugins/wazuh/less/dark_theme/kui_light.css';
document.getElementsByTagName('head')[0].appendChild(newSS);
}
/* eslint-enable no-undef */

View File

@ -44,7 +44,7 @@ export class ErrorHandler {
origin.includes('/api/csv') ||
origin.includes('/api/agents-unique');
return isFromAPI
? "Wazuh API is not reachable. Reason: timeout."
? 'Wazuh API is not reachable. Reason: timeout.'
: 'Server did not respond';
}
if ((((error || {}).data || {}).errorData || {}).message)

View File

@ -12017,13 +12017,11 @@
this._setOptionDisabled(this.options.disabled),
this._setupEvents(this.options.event),
this._setupHeightStyle(this.options.heightStyle),
this.tabs
.not(this.active)
.attr({
'aria-selected': 'false',
'aria-expanded': 'false',
tabIndex: -1
}),
this.tabs.not(this.active).attr({
'aria-selected': 'false',
'aria-expanded': 'false',
tabIndex: -1
}),
this.panels
.not(this._getPanelForTab(this.active))
.hide()