Skip to content

Commit

Permalink
fix(frontend): Date format in FIM table and file/registry detail (#2975)
Browse files Browse the repository at this point in the history
* fix(frontend): Date format in FIM table and file/registry detail

* fix(frontend): Date format in SCA policies table and detail date stat

* fix(changelog): Added PR to changelog

* fix(frontend): Added a missing semicolon

- Added a missing semicolon in an import statement in the `sca/inventory.tsx` file
  • Loading branch information
Desvelao authored Feb 18, 2021
1 parent 512061d commit 2cdf55c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to the Wazuh app project will be documented in this file.

- Fix the statusCode error message [#2971](https://github.com/wazuh/wazuh-kibana-app/pull/2971)
- Fix the SCA policy stats didn't refresh [#2973](https://github.com/wazuh/wazuh-kibana-app/pull/2973)
- Fixed some date fields format in FIM and SCA modules [#2975](https://github.com/wazuh/wazuh-kibana-app/pull/2975)

## Wazuh v4.1.0 - Kibana 7.10.0 , 7.10.2 - Revision 4101

Expand Down
4 changes: 4 additions & 0 deletions public/components/agents/fim/inventory/fileDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { AppNavigate } from '../../../../react-services/app-navigate';
import { TruncateHorizontalComponents } from '../../../common/util';
import { getDataPlugin } from '../../../../kibana-services';
import { RegistryValues } from './registryValues';
import { TimeService } from '../../../../react-services/time-service';

export class FileDetails extends Component {
props!: {
Expand Down Expand Up @@ -89,13 +90,15 @@ export class FileDetails extends Component {
grow: 2,
icon: 'clock',
link: true,
transformValue: TimeService.offset
},
{
field: 'mtime',
name: 'Last modified',
grow: 2,
icon: 'clock',
link: true,
transformValue: TimeService.offset
},
{
field: 'uname',
Expand Down Expand Up @@ -175,6 +178,7 @@ export class FileDetails extends Component {
name: 'Last analysis',
grow: 2,
icon: 'clock',
transformValue: TimeService.offset
},
{
field: 'mtime',
Expand Down
4 changes: 3 additions & 1 deletion public/components/agents/fim/inventory/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import { WzRequest } from '../../../../react-services/wz-request';
import { FlyoutDetail } from './flyout';
import { filtersToObject, IFilter } from '../../../wz-search-bar';
import { TimeService } from '../../../../react-services/time-service';

export class InventoryTable extends Component {
state: {
Expand Down Expand Up @@ -180,7 +181,8 @@ export class InventoryTable extends Component {
field: 'mtime',
name: 'Last Modified',
sortable: true,
width: '100px'
width: '100px',
render: TimeService.offset
},
{
field: 'uname',
Expand Down
5 changes: 2 additions & 3 deletions public/components/agents/sca/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Inventory extends Component {
field: 'end_scan',
name: 'End scan',
dataType: 'date',
render: value => TimeService.offset(value)
render: TimeService.offset
},
{
field: 'pass',
Expand Down Expand Up @@ -178,7 +178,6 @@ export class Inventory extends Component {
this._isMount = false;
}


addHealthResultRender(result) {
const color = result => {
if (result.toLowerCase() === 'passed') {
Expand Down Expand Up @@ -574,4 +573,4 @@ export class Inventory extends Component {
</Fragment>
);
}
}
}

0 comments on commit 2cdf55c

Please sign in to comment.