mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 18:05:20 +00:00
Linter and prettier fixes
This commit is contained in:
parent
6fe9016445
commit
23b85a0c19
@ -466,6 +466,7 @@ export class DevToolsController {
|
|||||||
|
|
||||||
const dynamicHeight = () => {
|
const dynamicHeight = () => {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
const window = this.$window;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
const windows = $(window).height();
|
const windows = $(window).height();
|
||||||
$('#wz-dev-left-column').height(
|
$('#wz-dev-left-column').height(
|
||||||
|
@ -30,7 +30,8 @@ class WzConfigViewer {
|
|||||||
this.template = template;
|
this.template = template;
|
||||||
}
|
}
|
||||||
|
|
||||||
controller($scope, $document) {
|
controller($scope, $document, $window) {
|
||||||
|
const window = $window;
|
||||||
const setJsonBox = () => {
|
const setJsonBox = () => {
|
||||||
$scope.jsonCodeBox = CodeMirror.fromTextArea(
|
$scope.jsonCodeBox = CodeMirror.fromTextArea(
|
||||||
$document[0].getElementById('viewer_json_box'),
|
$document[0].getElementById('viewer_json_box'),
|
||||||
@ -92,7 +93,7 @@ class WzConfigViewer {
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$scope.jsonCodeBox.refresh();
|
$scope.jsonCodeBox.refresh();
|
||||||
$scope.$applyAsync();
|
$scope.$applyAsync();
|
||||||
window.dispatchEvent(new Event('resize'));
|
window.dispatchEvent(new Event('resize')); // eslint-disable-line
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -110,7 +111,7 @@ class WzConfigViewer {
|
|||||||
$scope.$applyAsync();
|
$scope.$applyAsync();
|
||||||
$scope.isLogs
|
$scope.isLogs
|
||||||
? dynamicHeight()
|
? dynamicHeight()
|
||||||
: window.dispatchEvent(new Event('resize'));
|
: window.dispatchEvent(new Event('resize')); // eslint-disable-line
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -37,8 +37,10 @@ app.directive('wzXmlFileEditor', function() {
|
|||||||
rulesetHandler,
|
rulesetHandler,
|
||||||
configHandler,
|
configHandler,
|
||||||
apiReq,
|
apiReq,
|
||||||
$rootScope
|
$rootScope,
|
||||||
|
$window
|
||||||
) {
|
) {
|
||||||
|
const window = $window;
|
||||||
$scope.targetNameShown = $scope.targetName;
|
$scope.targetNameShown = $scope.targetName;
|
||||||
$scope.configError = false;
|
$scope.configError = false;
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Wazuh app - Stylesheets loader
|
* Wazuh app - Stylesheets loader
|
||||||
|
* Copyright (C) 2015-2019 Wazuh, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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 './dark_theme/wz_theme_dark.css';
|
||||||
import chrome from 'ui/chrome';
|
import chrome from 'ui/chrome';
|
||||||
const IS_DARK_THEME = chrome.getUiSettingsClient().get('theme:darkMode');
|
const IS_DARK_THEME = chrome.getUiSettingsClient().get('theme:darkMode');
|
||||||
|
/* eslint-disable no-undef */
|
||||||
if (IS_DARK_THEME) {
|
if (IS_DARK_THEME) {
|
||||||
var newSS = document.createElement('link');
|
let newSS = document.createElement('link');
|
||||||
newSS.rel = 'stylesheet';
|
newSS.rel = 'stylesheet';
|
||||||
newSS.href = '../plugins/wazuh/less/dark_theme/wz_theme_dark.css';
|
newSS.href = '../plugins/wazuh/less/dark_theme/wz_theme_dark.css';
|
||||||
document.getElementsByTagName('head')[0].appendChild(newSS);
|
document.getElementsByTagName('head')[0].appendChild(newSS);
|
||||||
@ -42,3 +43,4 @@ if (IS_DARK_THEME) {
|
|||||||
newSS.href = '../plugins/wazuh/less/dark_theme/kui_light.css';
|
newSS.href = '../plugins/wazuh/less/dark_theme/kui_light.css';
|
||||||
document.getElementsByTagName('head')[0].appendChild(newSS);
|
document.getElementsByTagName('head')[0].appendChild(newSS);
|
||||||
}
|
}
|
||||||
|
/* eslint-enable no-undef */
|
||||||
|
@ -44,7 +44,7 @@ export class ErrorHandler {
|
|||||||
origin.includes('/api/csv') ||
|
origin.includes('/api/csv') ||
|
||||||
origin.includes('/api/agents-unique');
|
origin.includes('/api/agents-unique');
|
||||||
return isFromAPI
|
return isFromAPI
|
||||||
? "Wazuh API is not reachable. Reason: timeout."
|
? 'Wazuh API is not reachable. Reason: timeout.'
|
||||||
: 'Server did not respond';
|
: 'Server did not respond';
|
||||||
}
|
}
|
||||||
if ((((error || {}).data || {}).errorData || {}).message)
|
if ((((error || {}).data || {}).errorData || {}).message)
|
||||||
|
12
public/utils/jquery-ui.js
vendored
12
public/utils/jquery-ui.js
vendored
@ -12017,13 +12017,11 @@
|
|||||||
this._setOptionDisabled(this.options.disabled),
|
this._setOptionDisabled(this.options.disabled),
|
||||||
this._setupEvents(this.options.event),
|
this._setupEvents(this.options.event),
|
||||||
this._setupHeightStyle(this.options.heightStyle),
|
this._setupHeightStyle(this.options.heightStyle),
|
||||||
this.tabs
|
this.tabs.not(this.active).attr({
|
||||||
.not(this.active)
|
'aria-selected': 'false',
|
||||||
.attr({
|
'aria-expanded': 'false',
|
||||||
'aria-selected': 'false',
|
tabIndex: -1
|
||||||
'aria-expanded': 'false',
|
}),
|
||||||
tabIndex: -1
|
|
||||||
}),
|
|
||||||
this.panels
|
this.panels
|
||||||
.not(this._getPanelForTab(this.active))
|
.not(this._getPanelForTab(this.active))
|
||||||
.hide()
|
.hide()
|
||||||
|
Loading…
Reference in New Issue
Block a user