Removed (at the moment) save tables status

This commit is contained in:
JuanCarlos 2019-03-26 10:13:54 +01:00 committed by Jesús González
parent 715a80f5d1
commit 3a12a6e58c
2 changed files with 400 additions and 465 deletions

View File

@ -170,7 +170,7 @@ app.directive('wzTable', function () {
if ($scope.customColumns) {
setTimeout(() => {
$scope.setColResizable();
}, 10);
}, 100);
}
return;
} catch (error) {
@ -268,8 +268,6 @@ app.directive('wzTable', function () {
* On controller loads
*/
const init = async (skipFetching = false) => {
if (!skipFetching)
$scope.wazuh_table_resizing = true;
await initTable(
$scope,
fetch,
@ -488,15 +486,11 @@ app.directive('wzTable', function () {
};
$scope.setColResizable = () => {
setTimeout(() => {
$scope.wazuh_table_resizing = false;
}, 1);
$(`#table${$scope.scapepath}`).colResizable({
liveDrag: true,
minWidth: 78,
partialRefresh: true,
draggingClass: false,
postbackSafe: true
draggingClass: false
});
$scope.$applyAsync();
};

View File

@ -1,15 +1,13 @@
<div layout="row" class="md-padding" ng-show="wazuh_table_loading || wazuh_table_resizing">
<div layout="row" class="md-padding" ng-show="wazuh_table_loading">
<!-- <div class='uil-ring-css'>
<div></div>
</div>
-->
<div flex class="euiProgress euiProgress--indeterminate euiProgress--xs euiProgress--primary"></div>
</div>
<div ng-style="wazuh_table_resizing && {'visibility': 'hidden', 'height': '0px'}">
<div ng-if="customColumns" layout="row" ng-show="!error && !wazuh_table_loading && items.length" class="columns-bar"
<div ng-if="customColumns" layout="row" ng-show="!error && !wazuh_table_loading && items.length" class="columns-bar"
ng-class="{'columns-bar-active': showColumns}" ng-style="!showColumns && {'margin-bottom': '-35px'}">
<div ng-if="showColumns" class="euiCheckbox wz-margin-right-8" ng-repeat="key in originalkeys"
ng-click="updateColumns(key)">
<div ng-if="showColumns" class="euiCheckbox wz-margin-right-8" ng-repeat="key in originalkeys" ng-click="updateColumns(key)">
<input class="euiCheckbox__input" type="checkbox" aria-label="Select all rows" ng-checked="exists(key)">
<div class="euiCheckbox__square"></div>
<span class="euiCheckbox__label">{{ keyEquivalence[key.key.value || key.key] }}</span>
@ -17,20 +15,18 @@
<span flex></span>
<span class="wz-text-link" style="line-height: 28px;" ng-click="showColumns = !showColumns" tooltip="Columns"><i
class="fa fa-fw fa-gear"></i></span>
</div>
</div>
<div ng-if="!wazuh_table_loading && !isPolicyMonitoring() && !isSyscheck()" ng-show="!error && items.length">
<table class="table table-striped table-condensed table-hover no-margin-bottom"
ng-class="customColumns ? 'table-resizable' : ''" style="table-layout: fixed !important"
id="table{{scapepath}}">
<div ng-if="!wazuh_table_loading && !isPolicyMonitoring() && !isSyscheck()" ng-show="!error && items.length">
<table class="table table-striped table-condensed table-hover no-margin-bottom" ng-class="customColumns ? 'table-resizable' : ''"
style="table-layout: fixed !important" id="table{{scapepath}}">
<thead class="wz-text-bold">
<th ng-repeat="key in keys" class="wz-text-left" ng-style="key.width && {'width':key.width}">
<span ng-class="{ 'cursor-pointer' : !key.nosortable}" ng-click="!key.nosortable && sort(key)">
{{ path === '/agents/groups' && (key.value || key) === 'count' ? 'Agents' :
keyEquivalence[key.value ||
key] || key.value || key }}
<i ng-if="!key.nosortable" class="fa wz-theader-sort-icon"
ng-class="sortValue === (key.value || key) ? (sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'"
<i ng-if="!key.nosortable" class="fa wz-theader-sort-icon" ng-class="sortValue === (key.value || key) ? (sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'"
aria-hidden="true"></i>
</span>
</th>
@ -41,10 +37,9 @@
</th>
</thead>
<tbody>
<tr ng-class="allowClick ? 'cursor-pointer' : ''" class="wz-word-wrap"
ng-repeat="item in pagedItems[currentPage] | filter:{item:'!'}" ng-click="clickAction(item)">
<td ng-repeat="key in keys" id="td-{{$parent.$index}}-{{$index}}"
ng-mouseover="showTooltip($parent.$index, $index, item)">
<tr ng-class="allowClick ? 'cursor-pointer' : ''" class="wz-word-wrap" ng-repeat="item in pagedItems[currentPage] | filter:{item:'!'}"
ng-click="clickAction(item)">
<td ng-repeat="key in keys" id="td-{{$parent.$index}}-{{$index}}" ng-mouseover="showTooltip($parent.$index, $index, item)">
<div class="wz-text-truncatable">
<span>
{{
@ -56,58 +51,46 @@
</md-tooltip>
</div>
</td>
<td ng-if="path === '/agents'" ng-click="$event.stopPropagation()"
class="cursor-default action-btn-td">
<span ng-click="clickAction(item, 'discover'); $event.stopPropagation()"
class="wz-margin-left-8 cursor-pointer" tooltip="Open Discover panel for this agent"
tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium" focusable="false" xmlns="http://www.w3.org/2000/svg"
width="32" height="32" viewBox="0 0 32 32">
<path class="euiIcon__fillSecondary"
d="M8.33 23.67l4.79-10.55 10.55-4.79-4.79 10.55-10.55 4.79zm6.3-9l-2.28 5 5-2.28 2.28-5-5 2.28z">
<td ng-if="path === '/agents'" ng-click="$event.stopPropagation()" class="cursor-default action-btn-td">
<span ng-click="clickAction(item, 'discover'); $event.stopPropagation()" class="wz-margin-left-8 cursor-pointer"
tooltip="Open Discover panel for this agent" tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium" focusable="false" xmlns="http://www.w3.org/2000/svg" width="32"
height="32" viewBox="0 0 32 32">
<path class="euiIcon__fillSecondary" d="M8.33 23.67l4.79-10.55 10.55-4.79-4.79 10.55-10.55 4.79zm6.3-9l-2.28 5 5-2.28 2.28-5-5 2.28z">
</path>
<path
d="M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16A16 16 0 0 0 16 0zm1 29.95V28h-2v1.95A14 14 0 0 1 2.05 17H4v-2H2.05A14 14 0 0 1 15 2.05V4h2V2.05A14 14 0 0 1 29.95 15H28v2h1.95A14 14 0 0 1 17 29.95z">
<path d="M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16A16 16 0 0 0 16 0zm1 29.95V28h-2v1.95A14 14 0 0 1 2.05 17H4v-2H2.05A14 14 0 0 1 15 2.05V4h2V2.05A14 14 0 0 1 29.95 15H28v2h1.95A14 14 0 0 1 17 29.95z">
</path>
</svg>
</span>
<span ng-click="clickAction(item, 'configuration'); $event.stopPropagation()"
class="cursor-pointer" tooltip="Open configuration for this agent" tooltip-placement="left"
aria-hidden="true">
<span ng-click="clickAction(item, 'configuration'); $event.stopPropagation()" class="cursor-pointer"
tooltip="Open configuration for this agent" tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium" focusable="false" xmlns="http://www.w3.org/2000/svg"
width="16" height="16" viewBox="0 0 16 16">
<path
d="M6.918 9.746l4.537 4.537a2 2 0 1 0 2.828-2.829l-3.157-3.156a.5.5 0 0 1 .708-.708l3.156 3.157a3 3 0 1 1-4.243 4.243l-4.949-4.95a5.001 5.001 0 0 1-5.22-7.106.5.5 0 0 1 .805-.138L3.676 5.09a1 1 0 1 0 1.415-1.414L2.797 1.382a.5.5 0 0 1 .138-.805 5.001 5.001 0 1 1 3.983 9.169zM1.226 4.054a4.002 4.002 0 0 0 6.693 3.865 4 4 0 0 0-3.865-6.693l1.744 1.743a2 2 0 1 1-2.829 2.828L1.226 4.054zm10.229 8.814a1 1 0 1 1 1.414-1.414 1 1 0 0 1-1.414 1.414z">
<svg class="euiIcon euiIcon--medium" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16"
height="16" viewBox="0 0 16 16">
<path d="M6.918 9.746l4.537 4.537a2 2 0 1 0 2.828-2.829l-3.157-3.156a.5.5 0 0 1 .708-.708l3.156 3.157a3 3 0 1 1-4.243 4.243l-4.949-4.95a5.001 5.001 0 0 1-5.22-7.106.5.5 0 0 1 .805-.138L3.676 5.09a1 1 0 1 0 1.415-1.414L2.797 1.382a.5.5 0 0 1 .138-.805 5.001 5.001 0 1 1 3.983 9.169zM1.226 4.054a4.002 4.002 0 0 0 6.693 3.865 4 4 0 0 0-3.865-6.693l1.744 1.743a2 2 0 1 1-2.829 2.828L1.226 4.054zm10.229 8.814a1 1 0 1 1 1.414-1.414 1 1 0 0 1-1.414 1.414z">
</path>
</svg>
</span>
</td>
<td ng-if="path === '/agents/groups' && adminMode" ng-click="$event.stopPropagation()"
class="cursor-default action-btn-td">
<span ng-if="removingGroup !== item.name && item.name !== 'default'"
ng-click="showConfirmRemoveGroup($event, item); $event.stopPropagation()"
ng-class="{'wz-margin-left-8': item.name !== 'default'}" class="cursor-pointer"
tooltip="Remove this group" tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium euiButton__icon" focusable="false" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16"
height="16" viewBox="0 0 16 16">
<td ng-if="path === '/agents/groups' && adminMode" ng-click="$event.stopPropagation()" class="cursor-default action-btn-td">
<span ng-if="removingGroup !== item.name && item.name !== 'default'" ng-click="showConfirmRemoveGroup($event, item); $event.stopPropagation()"
ng-class="{'wz-margin-left-8': item.name !== 'default'}" class="cursor-pointer" tooltip="Remove this group"
tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium euiButton__icon" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="trash-a"
d="M11 3h5v1H0V3h5V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2zm-7.056 8H7v1H4.1l.392 2.519c.042.269.254.458.493.458h6.03c.239 0 .451-.189.493-.458l1.498-9.576H14l-1.504 9.73c-.116.747-.74 1.304-1.481 1.304h-6.03c-.741 0-1.365-.557-1.481-1.304l-1.511-9.73H9V5.95H3.157L3.476 8H8v1H3.632l.312 2zM6 3h4V1H6v2z">
<path id="trash-a" d="M11 3h5v1H0V3h5V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2zm-7.056 8H7v1H4.1l.392 2.519c.042.269.254.458.493.458h6.03c.239 0 .451-.189.493-.458l1.498-9.576H14l-1.504 9.73c-.116.747-.74 1.304-1.481 1.304h-6.03c-.741 0-1.365-.557-1.481-1.304l-1.511-9.73H9V5.95H3.157L3.476 8H8v1H3.632l.312 2zM6 3h4V1H6v2z">
</path>
</defs>
<use xlink:href="#trash-a"></use>
</svg></span>
<span ng-if="removingGroup !== item.name" ng-click="editGroup(item); $event.stopPropagation()"
tooltip="Edit this group configuration" tooltip-placement="left"
ng-class="{'wz-margin-left-8': item.name === 'default'}">
tooltip="Edit this group configuration" tooltip-placement="left" ng-class="{'wz-margin-left-8': item.name === 'default'}">
<svg class="cursor-pointer euiIcon euiIcon--medium euiButtonIcon__icon" focusable="false"
aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
aria-hidden="true" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="pencil-a"
d="M12.148 3.148L11 2l-9 9v3h3l9-9-1.144-1.144-8.002 7.998a.502.502 0 0 1-.708 0 .502.502 0 0 1 0-.708l8.002-7.998zM11 1c.256 0 .512.098.707.293l3 3a.999.999 0 0 1 0 1.414l-9 9A.997.997 0 0 1 5 15H2a1 1 0 0 1-1-1v-3c0-.265.105-.52.293-.707l9-9A.997.997 0 0 1 11 1zM5 14H2v-3l3 3z">
<path id="pencil-a" d="M12.148 3.148L11 2l-9 9v3h3l9-9-1.144-1.144-8.002 7.998a.502.502 0 0 1-.708 0 .502.502 0 0 1 0-.708l8.002-7.998zM11 1c.256 0 .512.098.707.293l3 3a.999.999 0 0 1 0 1.414l-9 9A.997.997 0 0 1 5 15H2a1 1 0 0 1-1-1v-3c0-.265.105-.52.293-.707l9-9A.997.997 0 0 1 11 1zM5 14H2v-3l3 3z">
</path>
</defs>
<use xlink:href="#pencil-a"></use>
@ -120,26 +103,21 @@
removed</span>
</div>
<div layout="row">
<md-button class="cancelBtn" type="button" ng-click="cancelRemoveGroup()"><i
aria-hidden='true' class='fa fa-fw fa-close'></i> Cancel</md-button>
<md-button class="agreeBtn wz-button" type="button"
ng-click="confirmRemoveGroup(item.name)"><i aria-hidden='true'
class='fa fa-fw fa-check'></i> Confirm</md-button>
<md-button class="cancelBtn" type="button" ng-click="cancelRemoveGroup()"><i aria-hidden='true'
class='fa fa-fw fa-close'></i> Cancel</md-button>
<md-button class="agreeBtn wz-button" type="button" ng-click="confirmRemoveGroup(item.name)"><i
aria-hidden='true' class='fa fa-fw fa-check'></i> Confirm</md-button>
</div>
</div>
</td>
<td ng-if="isLookingGroup() && adminMode" ng-click="$event.stopPropagation()"
class="cursor-default action-btn-td">
<span ng-if="removingAgent !== item.id && adminMode"
ng-click="showConfirmRemoveAgentFromGroup($event, item); $event.stopPropagation()"
<td ng-if="isLookingGroup() && adminMode" ng-click="$event.stopPropagation()" class="cursor-default action-btn-td">
<span ng-if="removingAgent !== item.id && adminMode" ng-click="showConfirmRemoveAgentFromGroup($event, item); $event.stopPropagation()"
class="wz-margin-left-8 cursor-pointer" tooltip="Remove this agent from the group"
tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium euiButton__icon" focusable="false" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16"
height="16" viewBox="0 0 16 16">
<svg class="euiIcon euiIcon--medium euiButton__icon" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="trash-a"
d="M11 3h5v1H0V3h5V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2zm-7.056 8H7v1H4.1l.392 2.519c.042.269.254.458.493.458h6.03c.239 0 .451-.189.493-.458l1.498-9.576H14l-1.504 9.73c-.116.747-.74 1.304-1.481 1.304h-6.03c-.741 0-1.365-.557-1.481-1.304l-1.511-9.73H9V5.95H3.157L3.476 8H8v1H3.632l.312 2zM6 3h4V1H6v2z">
<path id="trash-a" d="M11 3h5v1H0V3h5V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2zm-7.056 8H7v1H4.1l.392 2.519c.042.269.254.458.493.458h6.03c.239 0 .451-.189.493-.458l1.498-9.576H14l-1.504 9.73c-.116.747-.74 1.304-1.481 1.304h-6.03c-.741 0-1.365-.557-1.481-1.304l-1.511-9.73H9V5.95H3.157L3.476 8H8v1H3.632l.312 2zM6 3h4V1H6v2z">
</path>
</defs>
<use xlink:href="#trash-a"></use>
@ -152,44 +130,37 @@
this group</span>
</div>
<div layout="row">
<md-button class="cancelBtn" type="button" ng-click="cancelRemoveAgent()"><i
aria-hidden='true' class='fa fa-fw fa-close'></i> Cancel</md-button>
<md-button class="agreeBtn wz-button" type="button"
ng-click="confirmRemoveAgent(item.id)">
<md-button class="cancelBtn" type="button" ng-click="cancelRemoveAgent()"><i aria-hidden='true'
class='fa fa-fw fa-close'></i> Cancel</md-button>
<md-button class="agreeBtn wz-button" type="button" ng-click="confirmRemoveAgent(item.id)">
<i aria-hidden='true' class='fa fa-fw fa-check'></i> Confirm</md-button>
</div>
</div>
</td>
<td ng-if="path === '/rules/files' || path === '/decoders/files' || path === '/lists/files'"
ng-click="$event.stopPropagation()" class="cursor-default action-btn-td">
<span
ng-if="((item.name && removingFile !== item.name) || (item.file && removingFile !== item.file)) && adminMode && path !== '/lists/files'"
ng-click="editFile(item, path); $event.stopPropagation()"
class="wz-margin-left-8 cursor-pointer" tooltip="Edit this file" tooltip-placement="left"
aria-hidden="true">
<td ng-if="path === '/rules/files' || path === '/decoders/files' || path === '/lists/files'" ng-click="$event.stopPropagation()"
class="cursor-default action-btn-td">
<span ng-if="((item.name && removingFile !== item.name) || (item.file && removingFile !== item.file)) && adminMode && path !== '/lists/files'"
ng-click="editFile(item, path); $event.stopPropagation()" class="wz-margin-left-8 cursor-pointer"
tooltip="Edit this file" tooltip-placement="left" aria-hidden="true">
<svg class="euiIcon euiIcon--medium euiButtonIcon__icon" focusable="false"
aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<svg class="euiIcon euiIcon--medium euiButtonIcon__icon" focusable="false" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16"
height="16" viewBox="0 0 16 16">
<defs>
<path id="pencil-a"
d="M12.148 3.148L11 2l-9 9v3h3l9-9-1.144-1.144-8.002 7.998a.502.502 0 0 1-.708 0 .502.502 0 0 1 0-.708l8.002-7.998zM11 1c.256 0 .512.098.707.293l3 3a.999.999 0 0 1 0 1.414l-9 9A.997.997 0 0 1 5 15H2a1 1 0 0 1-1-1v-3c0-.265.105-.52.293-.707l9-9A.997.997 0 0 1 11 1zM5 14H2v-3l3 3z">
<path id="pencil-a" d="M12.148 3.148L11 2l-9 9v3h3l9-9-1.144-1.144-8.002 7.998a.502.502 0 0 1-.708 0 .502.502 0 0 1 0-.708l8.002-7.998zM11 1c.256 0 .512.098.707.293l3 3a.999.999 0 0 1 0 1.414l-9 9A.997.997 0 0 1 5 15H2a1 1 0 0 1-1-1v-3c0-.265.105-.52.293-.707l9-9A.997.997 0 0 1 11 1zM5 14H2v-3l3 3z">
</path>
</defs>
<use xlink:href="#pencil-a"></use>
</svg>
</span>
<span
ng-if="((item.name && removingFile !== item.name) || (item.file && removingFile !== item.file)) && adminMode"
ng-click="showConfirmRemoveFile($event, item, path); $event.stopPropagation()"
class="cursor-pointer" ng-class="{'wz-margin-left-8': path === '/lists/files'}"
tooltip="Delete this file" tooltip-placement="right" aria-hidden="true">
<svg class="euiIcon euiIcon--medium euiButton__icon" focusable="false" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16"
height="16" viewBox="0 0 16 16">
<span ng-if="((item.name && removingFile !== item.name) || (item.file && removingFile !== item.file)) && adminMode"
ng-click="showConfirmRemoveFile($event, item, path); $event.stopPropagation()" class="cursor-pointer"
ng-class="{'wz-margin-left-8': path === '/lists/files'}" tooltip="Delete this file"
tooltip-placement="right" aria-hidden="true">
<svg class="euiIcon euiIcon--medium euiButton__icon" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="trash-a"
d="M11 3h5v1H0V3h5V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2zm-7.056 8H7v1H4.1l.392 2.519c.042.269.254.458.493.458h6.03c.239 0 .451-.189.493-.458l1.498-9.576H14l-1.504 9.73c-.116.747-.74 1.304-1.481 1.304h-6.03c-.741 0-1.365-.557-1.481-1.304l-1.511-9.73H9V5.95H3.157L3.476 8H8v1H3.632l.312 2zM6 3h4V1H6v2z">
<path id="trash-a" d="M11 3h5v1H0V3h5V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2zm-7.056 8H7v1H4.1l.392 2.519c.042.269.254.458.493.458h6.03c.239 0 .451-.189.493-.458l1.498-9.576H14l-1.504 9.73c-.116.747-.74 1.304-1.481 1.304h-6.03c-.741 0-1.365-.557-1.481-1.304l-1.511-9.73H9V5.95H3.157L3.476 8H8v1H3.632l.312 2zM6 3h4V1H6v2z">
</path>
</defs>
<use xlink:href="#trash-a"></use>
@ -203,31 +174,28 @@
: item.file}}</b> will be deleted</span>
</div>
<div layout="row">
<md-button class="cancelBtn" type="button" ng-click="cancelRemoveFile()"><i
aria-hidden='true' class='fa fa-fw fa-close'></i> Cancel</md-button>
<md-button class="agreeBtn wz-button" type="button"
ng-click="confirmRemoveFile(item, path)"><i aria-hidden='true'
class='fa fa-fw fa-check'></i> Confirm</md-button>
<md-button class="cancelBtn" type="button" ng-click="cancelRemoveFile()"><i aria-hidden='true'
class='fa fa-fw fa-close'></i> Cancel</md-button>
<md-button class="agreeBtn wz-button" type="button" ng-click="confirmRemoveFile(item, path)"><i
aria-hidden='true' class='fa fa-fw fa-check'></i> Confirm</md-button>
</div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<td
colspan="{{ (path === '/agents' || (path === '/agents/groups' && adminMode) || (isLookingGroup() && adminMode) ||
<td colspan="{{ (path === '/agents' || (path === '/agents/groups' && adminMode) || (isLookingGroup() && adminMode) ||
path === '/rules/files' || path === '/decoders/files' || path === '/lists/files') ? keys.length + 1 : keys.length}}">
<span ng-show="!wazuh_table_loading" class="color-grey">{{ totalItems }} items ({{time | number: 2}}
seconds)</span>
<div ng-show="items.length >= itemsPerPage" class="pagination pull-right"
style="margin:0 !important">
<div ng-show="items.length >= itemsPerPage" class="pagination pull-right" style="margin:0 !important">
<ul layout="row">
<li ng-show="currentPage" class="md-padding">
<a href ng-click="prevPage()">« Prev</a>
</li>
<li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) "
ng-class="{'wz-text-active': n == currentPage}" ng-click="setPage()" class="md-padding">
<li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) " ng-class="{'wz-text-active': n == currentPage}"
ng-click="setPage()" class="md-padding">
<a href ng-bind="n + 1">1</a>
</li>
@ -239,33 +207,28 @@
</td>
</tfoot>
</table>
</div>
</div>
<div ng-if="!wazuh_table_loading && isPolicyMonitoring()" ng-show="!error && items.length">
<table class="table table-striped table-striped-duo table-condensed table-hover no-margin-bottom"
ng-class="customColumns ? 'table-resizable' : ''" style="table-layout: fixed !important"
id="table{{scapepath}}">
<div ng-if="!wazuh_table_loading && isPolicyMonitoring()" ng-show="!error && items.length">
<table class="table table-striped table-striped-duo table-condensed table-hover no-margin-bottom" ng-class="customColumns ? 'table-resizable' : ''"
style="table-layout: fixed !important" id="table{{scapepath}}">
<thead class="wz-text-bold">
<th ng-repeat="key in keys" class="wz-text-left" ng-style="key.width && {'width':key.width}">
<span ng-class="{ 'cursor-pointer' : !key.nosortable }" ng-click="!key.nosortable && sort(key)">
{{ keyEquivalence[key.value || key] || key.value || key }}
<i ng-if="!key.nosortable" class="fa wz-theader-sort-icon"
ng-class="sortValue === (key.value || key) ? (sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'"
<i ng-if="!key.nosortable" class="fa wz-theader-sort-icon" ng-class="sortValue === (key.value || key) ? (sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'"
aria-hidden="true"></i>
</span>
</th>
</thead>
<tbody>
<tr class="wz-word-wrap cursor-pointer"
ng-repeat-start="item in pagedItems[currentPage] | filter:{item:'!'}"
<tr class="wz-word-wrap cursor-pointer" ng-repeat-start="item in pagedItems[currentPage] | filter:{item:'!'}"
ng-click="expandTableRow(item)" ng-class="{'selected': item.expanded}">
<td ng-repeat="key in keys" id="td-{{$parent.$index}}-{{$index}}"
ng-mouseover="showTooltip($parent.$index, $index, item)">
<td ng-repeat="key in keys" id="td-{{$parent.$index}}-{{$index}}" ng-mouseover="showTooltip($parent.$index, $index, item)">
<div class="wz-text-truncatable">
<span>
<span ng-show="key === 'result'" class="no-wrap">
<p class="round status little"
ng-class="(item.result === 'passed') ? 'teal' : 'red'">
<p class="round status little" ng-class="(item.result === 'passed') ? 'teal' : 'red'">
</p>&nbsp;&nbsp;
</span>
{{
@ -279,18 +242,15 @@
</td>
</tr>
<tr ng-if="item.rationale || item.remediation || item.directory || (item.compliance && item.compliance.length)"
class="wz-word-wrap cursor-pointer selected" ng-show="item.expanded" ng-repeat-end=""
ng-click="expandTableRow(item)">
class="wz-word-wrap cursor-pointer selected" ng-show="item.expanded" ng-repeat-end="" ng-click="expandTableRow(item)">
<td colspan="{{keys.length}}" style="border-top: none">
<div layout="row" layout-padding="" class="layout-padding layout-row">
<md-card flex=""
class="wz-md-card wz-padding-top-0 wz-padding-bottom-0 wz-no-margin _md flex">
<md-card flex="" class="wz-md-card wz-padding-top-0 wz-padding-bottom-0 wz-no-margin _md flex">
<md-card-content>
<div>
<div class="euiFlexItem euiFlexItem--flexGrowZero" ng-if="item.rationale">
<div class="euiStat euiStat--leftAligned">
<p class="euiTitle euiTitle--small euiStat__title ng-binding"
style="font-size: 1.15rem;">Rationale</p>
<p class="euiTitle euiTitle--small euiStat__title ng-binding" style="font-size: 1.15rem;">Rationale</p>
<div class="euiText euiText--small euiStat__description wz-text-gray">
<p>{{item.rationale}}</p>
</div>
@ -299,8 +259,7 @@
</div>
<div class="euiFlexItem euiFlexItem--flexGrowZero" ng-if="item.remediation">
<div class="euiStat euiStat--leftAligned">
<p class="euiTitle euiTitle--small euiStat__title ng-binding"
style="font-size: 1.15rem;">Remediation</p>
<p class="euiTitle euiTitle--small euiStat__title ng-binding" style="font-size: 1.15rem;">Remediation</p>
<div class="euiText euiText--small euiStat__description wz-text-gray">
<p>{{item.remediation}}</p>
</div>
@ -309,22 +268,18 @@
</div>
<div class="euiFlexItem euiFlexItem--flexGrowZero" ng-if="item.directory">
<div class="euiStat euiStat--leftAligned">
<p class="euiTitle euiTitle--small euiStat__title ng-binding"
style="font-size: 1.15rem;">Path(s)</p>
<p class="euiTitle euiTitle--small euiStat__title ng-binding" style="font-size: 1.15rem;">Path(s)</p>
<div class="euiText euiText--small euiStat__description wz-text-gray">
<p>{{item.directory}}</p>
</div>
</div>
<div layout="column" class="wz-margin-bottom-10"></div>
</div>
<div class="euiFlexItem euiFlexItem--flexGrowZero"
ng-if="item.compliance && item.compliance.length">
<div class="euiFlexItem euiFlexItem--flexGrowZero" ng-if="item.compliance && item.compliance.length">
<div class="euiStat euiStat--leftAligned">
<p class="euiTitle euiTitle--small euiStat__title ng-binding"
style="font-size: 1.15rem;">Compliance</p>
<p class="euiTitle euiTitle--small euiStat__title ng-binding" style="font-size: 1.15rem;">Compliance</p>
<div class="euiText euiText--small euiStat__description wz-text-gray">
<p><span class="wz-padding-right-8"
ng-repeat="c in item.compliance">{{c.key}}/{{c.value}}</span>
<p><span class="wz-padding-right-8" ng-repeat="c in item.compliance">{{c.key}}/{{c.value}}</span>
</p>
</div>
</div>
@ -341,15 +296,14 @@
<td colspan="{{keys.length}}">
<span ng-show="!wazuh_table_loading" class="color-grey">{{ totalItems }} items ({{time | number: 2}}
seconds)</span>
<div ng-show="items.length >= itemsPerPage" class="pagination pull-right"
style="margin:0 !important">
<div ng-show="items.length >= itemsPerPage" class="pagination pull-right" style="margin:0 !important">
<ul layout="row">
<li ng-show="currentPage" class="md-padding">
<a href ng-click="prevPage()">« Prev</a>
</li>
<li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) "
ng-class="{'wz-text-active': n == currentPage}" ng-click="setPage()" class="md-padding">
<li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) " ng-class="{'wz-text-active': n == currentPage}"
ng-click="setPage()" class="md-padding">
<a href ng-bind="n + 1">1</a>
</li>
@ -361,28 +315,24 @@
</td>
</tfoot>
</table>
</div>
</div>
<div ng-if="!wazuh_table_loading && isSyscheck()" ng-show="!error && items.length">
<table class="table table-striped table-striped-duo table-condensed table-hover no-margin-bottom"
ng-class="customColumns ? 'table-resizable' : ''" style="table-layout: fixed !important"
id="table{{scapepath}}">
<div ng-if="!wazuh_table_loading && isSyscheck()" ng-show="!error && items.length">
<table class="table table-striped table-striped-duo table-condensed table-hover no-margin-bottom" ng-class="customColumns ? 'table-resizable' : ''"
style="table-layout: fixed !important" id="table{{scapepath}}">
<thead class="wz-text-bold">
<th ng-repeat="key in keys" class="wz-text-left" ng-style="key.width && {'width':key.width}">
<span ng-class="{ 'cursor-pointer' : !key.nosortable }" ng-click="!key.nosortable && sort(key)">{{
keyEquivalence[key.value || key] || key.value || key }}
<i ng-if="!key.nosortable" class="fa wz-theader-sort-icon"
ng-class="sortValue === (key.value || key) ? (sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'"
<i ng-if="!key.nosortable" class="fa wz-theader-sort-icon" ng-class="sortValue === (key.value || key) ? (sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'"
aria-hidden="true"></i>
</span>
</th>
</thead>
<tbody>
<tr class="wz-word-wrap cursor-pointer"
ng-repeat-start="item in pagedItems[currentPage] | filter:{item:'!'}"
<tr class="wz-word-wrap cursor-pointer" ng-repeat-start="item in pagedItems[currentPage] | filter:{item:'!'}"
ng-click="expandTableRow(item)" ng-class="{'selected': item.expanded}">
<td ng-repeat="key in keys" id="td-{{$parent.$index}}-{{$index}}"
ng-mouseover="showTooltip($parent.$index, $index, item)">
<td ng-repeat="key in keys" id="td-{{$parent.$index}}-{{$index}}" ng-mouseover="showTooltip($parent.$index, $index, item)">
<div class="wz-text-truncatable">
<span>
{{
@ -395,18 +345,15 @@
</div>
</td>
</tr>
<tr class="wz-word-wrap cursor-pointer selected" ng-show="item.expanded" ng-repeat-end=""
ng-click="expandTableRow(item)">
<tr class="wz-word-wrap cursor-pointer selected" ng-show="item.expanded" ng-repeat-end="" ng-click="expandTableRow(item)">
<td colspan="{{keys.length}}" style="border-top: none">
<div layout="row" layout-padding="" class="layout-padding layout-row" ng-if="item.expanded">
<md-card flex=""
class="wz-md-card wz-padding-top-0 wz-padding-bottom-0 wz-no-margin _md flex">
<md-card flex="" class="wz-md-card wz-padding-top-0 wz-padding-bottom-0 wz-no-margin _md flex">
<md-card-content>
<div layout="row" class="wz-padding-top-10">
<table class="table table-striped table-condensed">
<tbody>
<tr ng-repeat="(key, value) in item"
ng-if="key !== 'expanded' && key !== 'showTooltip'"
<tr ng-repeat="(key, value) in item" ng-if="key !== 'expanded' && key !== 'showTooltip'"
ng-show="!isWindows() || (key !== 'inode' && key !== 'gid' && key !== 'gname')"
class="no-duo">
<td class="wz-word-break-rule">{{key}}</td>
@ -428,15 +375,14 @@
<td colspan="{{keys.length}}">
<span ng-show="!wazuh_table_loading" class="color-grey">{{ totalItems }} items ({{time | number: 2}}
seconds)</span>
<div ng-show="items.length >= itemsPerPage" class="pagination pull-right"
style="margin:0 !important">
<div ng-show="items.length >= itemsPerPage" class="pagination pull-right" style="margin:0 !important">
<ul layout="row">
<li ng-show="currentPage" class="md-padding">
<a href ng-click="prevPage()">« Prev</a>
</li>
<li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) "
ng-class="{'wz-text-active': n == currentPage}" ng-click="setPage()" class="md-padding">
<li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) " ng-class="{'wz-text-active': n == currentPage}"
ng-click="setPage()" class="md-padding">
<a href ng-bind="n + 1">1</a>
</li>
@ -448,17 +394,15 @@
</td>
</tfoot>
</table>
</div>
</div>
<div layout="row" ng-if="!error && !wazuh_table_loading && !totalItems">
<div layout="row" ng-if="!error && !wazuh_table_loading && !totalItems">
<div flex class="euiCallOut euiCallOut--warning">
<div class="euiCallOutHeader">
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"
viewBox="0 0 16 16">
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="help-a"
d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z">
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z">
</path>
</defs>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#help-a" fill-rule="evenodd"></use>
@ -466,17 +410,15 @@
<span class="euiCallOutHeader__title">{{customEmptyResults}}</span>
</div>
</div>
</div>
</div>
<div layout="row" ng-if="error" class="wz-margin-bottom-45">
<div layout="row" ng-if="error" class="wz-margin-bottom-45">
<div flex class="euiCallOut euiCallOut--warning">
<div class="euiCallOutHeader">
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"
viewBox="0 0 16 16">
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="help-a"
d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z">
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z">
</path>
</defs>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#help-a" fill-rule="evenodd"></use>
@ -484,10 +426,9 @@
<span class="euiCallOutHeader__title">{{error}}</span>
</div>
</div>
</div>
<div layout="row" ng-if="!wazuh_table_loading && !totalItems" class="wz-margin-top-10">
<span class="color-grey">0 items ({{time | number: 2}} seconds)</span>
</div>
</div>
<div layout="row" ng-if="!wazuh_table_loading && !totalItems" class="wz-margin-top-10">
<span class="color-grey">0 items ({{time | number: 2}} seconds)</span>
</div>