mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 18:05:20 +00:00
Merge branch 'fixes-3.9' of https://github.com/wazuh/wazuh-kibana-app into 3.9-6.6
This commit is contained in:
commit
b2ebe5086f
@ -29,6 +29,7 @@ All notable changes to the Wazuh app project will be documented in this file.
|
||||
- New design for agent header view ([#1186](https://github.com/wazuh/wazuh-kibana-app/pull/1186)).
|
||||
- Not fetching data the very first time the Dev Tools are opened ([#1185](https://github.com/wazuh/wazuh-kibana-app/pull/1185)).
|
||||
- Refresh all known fields for all valid index patterns on every parent state ([ff88df6f](https://github.com/wazuh/wazuh-kibana-app/commit/ff88df6f0ca5590d14b3bc71b7ad63d4484d6bb9)).
|
||||
- Refresh all known fields for all valid index patterns if `kbn-vis` detects a broken index pattern ([ecd7c8f](https://github.com/wazuh/wazuh-kibana-app/commit/ecd7c8f98c187a350f81261d13b0d45dcec6dc5d)).
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -301,18 +301,12 @@ export function GroupsController(
|
||||
};
|
||||
|
||||
$scope.doSaveGroupAgentConfig = () => {
|
||||
$scope.editingFile = false;
|
||||
$scope.$broadcast('saveXmlFile', {
|
||||
group: $scope.currentGroup.name,
|
||||
type: 'group'
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on('configurationSuccess', () => {
|
||||
$scope.editingFile = false;
|
||||
if (!$scope.$$phase) $scope.$digest();
|
||||
});
|
||||
|
||||
$scope.reload = async (element, searchTerm, addOffset, start) => {
|
||||
if (element === 'left') {
|
||||
if (!$scope.availableAgents.loadedAll) {
|
||||
|
@ -230,7 +230,6 @@ app.directive('wzXmlFileEditor', function () {
|
||||
? showRestartDialog(msg, params.showRestartManager)
|
||||
: errorHandler.handle(warnMsg, '', true)
|
||||
: errorHandler.info(msg, '');
|
||||
$scope.$emit('configurationSuccess');
|
||||
} else if (params.rule) {
|
||||
await rulesetHandler.sendRuleConfiguration(params.rule, xml);
|
||||
try {
|
||||
|
@ -15,8 +15,8 @@ import { getVisualizeLoader } from './loader';
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
const app = uiModules.get('apps/webinar_app', []);
|
||||
|
||||
app.directive('kbnVis', function() {
|
||||
let lockFields = false;
|
||||
app.directive('kbnVis', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
@ -32,7 +32,8 @@ app.directive('kbnVis', function() {
|
||||
loadedVisualizations,
|
||||
tabVisualizations,
|
||||
discoverPendingUpdates,
|
||||
visHandlers
|
||||
visHandlers,
|
||||
genericReq
|
||||
) {
|
||||
let implicitFilter = '';
|
||||
let rawFilters = [];
|
||||
@ -130,16 +131,21 @@ app.directive('kbnVis', function() {
|
||||
}
|
||||
} catch (error) {
|
||||
if (
|
||||
error &&
|
||||
error.message &&
|
||||
error.message.includes('not locate that index-pattern-field')
|
||||
((error || {}).message || '').includes('not locate that index-pattern-field')
|
||||
) {
|
||||
errorHandler.handle(
|
||||
`${
|
||||
error.message
|
||||
}, please restart Kibana and refresh this page once done`,
|
||||
'Visualize'
|
||||
);
|
||||
if (!lockFields) {
|
||||
try {
|
||||
lockFields = true;
|
||||
errorHandler.info('Detected an incomplete index pattern, refreshing all its known fields...');
|
||||
await genericReq.request('GET', '/elastic/known-fields/all', {});
|
||||
lockFields = false;
|
||||
errorHandler.info('Success');
|
||||
return myRender(raw);
|
||||
} catch (error) {
|
||||
lockFields = false;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
errorHandler.handle(error, 'Visualize');
|
||||
}
|
||||
@ -161,10 +167,10 @@ app.directive('kbnVis', function() {
|
||||
updateVisWatcher();
|
||||
try {
|
||||
visualization.destroy();
|
||||
} catch (error) {} // eslint-disable-line
|
||||
} catch (error) { } // eslint-disable-line
|
||||
try {
|
||||
visHandler.destroy();
|
||||
} catch (error) {} // eslint-disable-line
|
||||
} catch (error) { } // eslint-disable-line
|
||||
});
|
||||
|
||||
const renderComplete = () => {
|
||||
@ -173,11 +179,11 @@ app.directive('kbnVis', function() {
|
||||
const currentCompleted = Math.round(
|
||||
(loadedVisualizations.getList().length /
|
||||
tabVisualizations.getItem(tabVisualizations.getTab())) *
|
||||
100
|
||||
100
|
||||
);
|
||||
$rootScope.loadingStatus = `Rendering visualizations... ${
|
||||
currentCompleted > 100 ? 100 : currentCompleted
|
||||
} %`;
|
||||
} %`;
|
||||
|
||||
if (currentCompleted >= 100) {
|
||||
$rootScope.rendered = true;
|
||||
|
@ -39,115 +39,140 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- End headline -->
|
||||
|
||||
<div layout="row" layout-padding class="wz-padding-top-0 wz-padding-bottom-0">
|
||||
<md-card flex class="wz-md-card">
|
||||
<div layout="row" layout-padding>
|
||||
<md-card flex class="wz-md-card wz-padding-top-0 wz-padding-bottom-0">
|
||||
<md-card-content>
|
||||
<div layout="row" layout-padding>
|
||||
<div layout="column" flex>
|
||||
<div layout="row">
|
||||
<span class="font-size-16">Details</span>
|
||||
</div>
|
||||
<md-divider class="wz-margin-top-10"></md-divider>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="25">Name</span>
|
||||
<span class="wz-text-right color-grey">{{ agent.name || '-' }}</span>
|
||||
</div>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="25">IP</span>
|
||||
<span class="wz-text-right color-grey">{{ agent.ip || '-'}}</span>
|
||||
</div>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="25">Version</span>
|
||||
<span class="wz-text-right color-grey">{{ agent.version || '-'}}</span>
|
||||
</div>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="25">OS</span>
|
||||
<span class="wz-text-right wz-text-truncatable color-grey">{{ agentOS || '-'}}</span>
|
||||
<md-tooltip ng-if="agentOS.length > 25" md-direction="bottom" class="wz-tooltip">
|
||||
Full OS name: {{ agentOS || '-'}}
|
||||
</md-tooltip>
|
||||
</div>
|
||||
<div layout="row" ng-if="agent.group" class="wz-margin-top-10 wz-padding-top-5">
|
||||
<span class="font-size-16">Groups <i ng-if='adminMode' tooltip="Add group" ng-click="switchGroupEdit()"
|
||||
class="wz-text-bold wz-text-link fa fa-fw" ng-class="!addingGroupToAgent ? 'fa-plus-circle' : 'fa-minus-circle'"></i></span>
|
||||
</div>
|
||||
<md-divider ng-if="agent.group" class="wz-margin-top-10"></md-divider>
|
||||
<div layout="row" class="wz-margin-top-10" ng-if="agent.group && editGroup && !addingGroupToAgent">
|
||||
<div class="wz-word-break" flex ng-if="groups && groups.length">
|
||||
Available groups:
|
||||
<div class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--justifyContentSpaceBetween euiFlexGroup--directionRow euiFlexGroup--responsive">
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>ID</p>
|
||||
</div>
|
||||
<div class="wz-word-break" flex ng-if="!groups || !groups.length">
|
||||
No more groups available. Create a new group at <a ng-href="#/manager//?_g=()&tab=groups">Configuration
|
||||
> Groups</a>.
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="agent.group && editGroup && !addingGroupToAgent && groups && groups.length" class="wz-margin-top-4">
|
||||
<span ng-repeat="group in groups" class="wz-text-bold wz-text-link" ng-click="showConfirmAddGroup(group)">{{
|
||||
group }} </span>
|
||||
</div>
|
||||
|
||||
<div class="wz-margin-top-10 confirmEmbedBubble" ng-if="agent.group && editGroup && addingGroupToAgent">
|
||||
<div layout="row">
|
||||
<span class="font-size-12 wz-padding-left-8">Group {{addingGroupToAgent}} will be
|
||||
added to agent {{agent.id}}</span>
|
||||
</div>
|
||||
<div layout="row">
|
||||
<md-button class="cancelBtn" type="button" ng-click="cancelAddGroup()">Cancel</md-button>
|
||||
<md-button class="agreeBtn" type="button" ng-click="confirmAddGroup(addingGroupToAgent)"><i
|
||||
aria-hidden='true' class='fa fa-fw fa-check'></i> Confirm</md-button>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="row" ng-if="agent.group" class="wz-word-break wz-padding-top-10">
|
||||
<span ng-repeat="group in agent.group" class="wz-text-bold wz-text-link" ng-click="goGroups(agent,$index)">{{
|
||||
group
|
||||
}} </span>
|
||||
<p class="euiTitle euiTitle--small euiStat__title">{{ agent.id || '-' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="column" flex>
|
||||
<div layout="row">
|
||||
<span class="font-size-16">Info</span>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>IP</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title">{{ agent.ip || '-'}}</p>
|
||||
</div>
|
||||
<md-divider class="wz-margin-top-10"></md-divider>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="20">Last keep alive </span>
|
||||
<span class="wz-text-right color-grey">{{agent.lastKeepAlive || '-' }}</span>
|
||||
</div>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>Version</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title">{{ agent.version || '-'}}</p>
|
||||
</div>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="20">Registration date </span>
|
||||
<span class="wz-text-right color-grey">{{agent.dateAdd
|
||||
|| '-'}}</span>
|
||||
</div>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>OS</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title">{{ agentOS || '-'}}</p>
|
||||
</div>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="20">Last syscheck scan </span>
|
||||
<span class="wz-text-right color-grey" ng-if="agent.syscheck.inProgress">Scan in
|
||||
progress</span>
|
||||
<span class="wz-text-right color-grey" ng-if="!agent.syscheck.inProgress">{{agent.syscheck.end
|
||||
</div>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>Registration date</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title">{{agent.dateAdd || '-'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>Last keep alive</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title">{{agent.lastKeepAlive || '-' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>Last syscheck scan</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title" ng-if="agent.syscheck.inProgress">Scan
|
||||
in progress</p>
|
||||
<p class="euiTitle euiTitle--small euiStat__title" ng-if="!agent.syscheck.inProgress">{{agent.syscheck.end
|
||||
|| '-'}} <md-tooltip ng-if="!agent.syscheck.inProgress && agent.syscheck.start && agent.syscheck.end"
|
||||
md-direction="bottom" class="wz-tooltip">
|
||||
Start time: {{ agent.syscheck.start || '-'}} <br>
|
||||
End time: {{ agent.syscheck.end || '-'}} <br>
|
||||
Duration time: {{ agent.syscheck.duration +' minutes' || '-'}}
|
||||
</md-tooltip></span>
|
||||
</md-tooltip>
|
||||
</p>
|
||||
</div>
|
||||
<div layout="row" class="wz-padding-top-10">
|
||||
<span flex="20">Last rootcheck scan </span>
|
||||
<span class="wz-text-right color-grey" ng-if="agent.rootcheck.inProgress">Scan in
|
||||
progress</span>
|
||||
<span class="wz-text-right color-grey" ng-if="!agent.rootcheck.inProgress">{{agent.rootcheck.end
|
||||
</div>
|
||||
<div class="euiFlexItem euiFlexItem--flexGrowZero">
|
||||
<div class="euiStat euiStat--leftAligned">
|
||||
<div class="euiText euiText--small euiStat__description">
|
||||
<p>Last rootcheck scan</p>
|
||||
</div>
|
||||
<p class="euiTitle euiTitle--small euiStat__title" ng-if="agent.rootcheck.inProgress">Scan
|
||||
in progress</p>
|
||||
<p class="euiTitle euiTitle--small euiStat__title" ng-if="!agent.rootcheck.inProgress">{{agent.rootcheck.end
|
||||
|| '-'}}
|
||||
<md-tooltip ng-if="!agent.rootcheck.inProgress && agent.rootcheck.start && agent.rootcheck.end"
|
||||
md-direction="bottom" class="wz-tooltip">
|
||||
Start time: {{ agent.rootcheck.start || '-'}} <br>
|
||||
End time: {{ agent.rootcheck.end || '-'}} <br>
|
||||
Duration time: {{ agent.rootcheck.duration +' minutes' || '-'}}
|
||||
</md-tooltip></span>
|
||||
</md-tooltip>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
</div>
|
||||
<div layout="row" layout-padding>
|
||||
<md-card flex class="wz-md-card wz-padding-top-0 wz-padding-bottom-0">
|
||||
<md-card-content>
|
||||
|
||||
<div layout="row" ng-if="agent.group">
|
||||
<span class="font-size-16">Groups <i ng-if='adminMode' tooltip="Add group" ng-click="switchGroupEdit()"
|
||||
class="wz-text-bold wz-text-link-add fa fa-fw" ng-class="!addingGroupToAgent ? 'fa-plus-circle' : 'fa-minus-circle'"></i></span>
|
||||
</div>
|
||||
<md-divider ng-if="agent.group" class="wz-margin-top-10"></md-divider>
|
||||
<div layout="row" class="wz-margin-top-10" ng-if="agent.group && editGroup && !addingGroupToAgent">
|
||||
<div class="wz-word-break" flex ng-if="groups && groups.length">
|
||||
Available groups:
|
||||
</div>
|
||||
<div class="wz-word-break" flex ng-if="!groups || !groups.length">
|
||||
No more groups available. Create a new group at <a ng-href="#/manager//?_g=()&tab=groups">Configuration
|
||||
> Groups</a>.
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="agent.group && editGroup && !addingGroupToAgent && groups && groups.length" class="wz-margin-top-4">
|
||||
<span ng-repeat="group in groups" class="wz-text-bold wz-text-link" ng-click="showConfirmAddGroup(group)">{{
|
||||
group }} </span>
|
||||
</div>
|
||||
|
||||
<div class="wz-margin-top-10 confirmEmbedBubble" ng-if="agent.group && editGroup && addingGroupToAgent">
|
||||
<div layout="row">
|
||||
<span class="font-size-12 wz-padding-left-8">Group {{addingGroupToAgent}} will be
|
||||
added to agent {{agent.id}}</span>
|
||||
</div>
|
||||
<div layout="row">
|
||||
<md-button class="cancelBtn" type="button" ng-click="cancelAddGroup()">Cancel</md-button>
|
||||
<md-button class="agreeBtn" type="button" ng-click="confirmAddGroup(addingGroupToAgent)"><i
|
||||
aria-hidden='true' class='fa fa-fw fa-check'></i> Confirm</md-button>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="row" ng-if="agent.group" class="wz-word-break wz-padding-top-10">
|
||||
<span ng-repeat="group in agent.group" class="wz-text-bold wz-text-link" ng-click="goGroups(agent,$index)">{{
|
||||
group
|
||||
}} </span>
|
||||
</div>
|
||||
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
</div>
|
||||
|
||||
|
||||
<div layout="row" layout-padding>
|
||||
|
Loading…
Reference in New Issue
Block a user