Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional timeline filters #8642

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Conversation

MelsHyrule
Copy link
Member

@MelsHyrule MelsHyrule commented Feb 13, 2023

Below we list a series of quality of life improvements made to the Timelines page. This PR is dependent on ManageIQ/manageiq#22361

BEFORE

Screen Shot 2023-02-16 at 2 44 05 PM

AFTER

Screen Shot 2023-02-16 at 2 47 32 PM

  1. Links in the table to their respective providers / source hosts
    Screen Shot 2023-02-16 at 11 41 14 AM

  2. Date range validation
    Screen Shot 2023-02-16 at 11 38 29 AM

  3. Policy Events Result Levels changed
    Screen Shot 2023-02-16 at 11 39 21 AM

  4. Implements event_stream_filters from Fix event stream filtering so we can filter by ems event or miq event (policy) manageiq#22361 for more in depth filtering

  5. Removes the "Abandon Changes" pop-up

@miq-bot
Copy link
Member

miq-bot commented Feb 16, 2023

Checked commit MelsHyrule@585ad48 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
1 file checked, 2 offenses detected

app/views/layouts/_tl_show.html.haml

  • ⚠️ - Line 4 - Avoid using instance variables in partials views
  • ⚠️ - Line 4 - Layout/TrailingEmptyLines: Final newline missing.

// TODO: Different timeline show different data, ensure all necesary data is pulled
let url = `/api/event_streams?limit=5000&offset=0&expand=resources`;
url += `&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source`;
url += `&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source,message`;
url += `,vm,ext_management_system`; // TODO heavy stuff to call in, but needed to be displayed in table
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have host_id already, so I need to expose name as a virtual column so you don't have to check if it's there.

Same for ext_management_system and vm. We can do that in a followup.

@MelsHyrule MelsHyrule changed the title [WIP] Additional timeline filters Additional timeline filters Feb 17, 2023
@MelsHyrule
Copy link
Member Author

@miq-bot add-reviewer @DavidResende0
@miq-bot add-reviewer @akhilkr128
@miq-bot add-reviewer @jeffibm
@miq-bot add-reviewer @Fryguy
@miq-bot add-reviewer @jrafanie
@miq-bot assign @jeffibm
@miq-bot add-label enhancement

Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just awaiting merge of ManageIQ/manageiq#22361

@MelsHyrule MelsHyrule removed the wip label Feb 20, 2023
Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this manually. I'm going to merge so we can get this proper filtering for the main pages.

@jrafanie jrafanie merged commit aa9d032 into ManageIQ:master Feb 23, 2023
@Fryguy
Copy link
Member

Fryguy commented Feb 28, 2023

Backported to petrosian in commit 2ff1e80.

commit 2ff1e808ce8ff773f7f05063ccc7789320f8e82c
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Thu Feb 23 09:23:10 2023 -0500

    Merge pull request #8642 from MelsHyrule/timeline-filters
    
    (cherry picked from commit aa9d03203a30a4ed3a7f41720988f03d3e9532a9)

Fryguy pushed a commit that referenced this pull request Feb 28, 2023
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Mar 9, 2023
See client UI code in:
ManageIQ/manageiq-ui-classic#8562
ManageIQ/manageiq-ui-classic#8642

Previously, the UI needed to run an API request including the vm, host, and ext
management system and all of their data because sometimes the event stream didn't
have a vm, host or ems so the UI code would need to add conditional logic as
vm.name, host.name and ext_mangement_system would be empty for some entries and
exist for others. See [1].

We can add virtual columns to always return a name or null if the relationship
doesn't exist or the name is null.  This saves us lots of data if we're only
using a single column from each relationship.

For a specific API call with proper timestamp filtering so we only return tens
of thousands of event_streams:

"name": "event_streams",
"count": 299925,
"subcount": 1000,
"subquery_count": 39487,
"pages": 40,

Before:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source,message,vm,ext_management_system&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

20.07 s
2.59 MB
```

After:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host_name,source,message,vm_or_template_name,ext_management_system_name&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

(replacing ext_management_system, host, and vm with ext_management_system_name,
host_name, and vm_or_template_name)

20.10 s
375.04 KB
```

[1] If you use association.method format: vm_or_template.name, ext_management_system.name, host.name, you are missing sections if they're nil, leading to client code needing to have conditional logic:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template": {
        "name": "vm1"
    },
    "ext_management_system": {
        "name": "ems1"
    }
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "ext_management_system": {
        "name": "ems1"
    }
},
```

If you use virtual columns, it's flat and easy to use:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": "vm1",
    "ext_management_system_name": "ems1"
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": null,
    "ext_management_system_name": "ems1"
},
```
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Mar 9, 2023
See client UI code in:
ManageIQ/manageiq-ui-classic#8562
ManageIQ/manageiq-ui-classic#8642

Previously, the UI needed to run an API request including the `vm`, `host`, and
`ext management system` and all of their data because sometimes the event
stream didn't have a `vm`, `host` or `ems` so the UI code would need to add
conditional logic as `vm.name`, `host.name` and `ext_mangement_system.name`
would be empty for some entries and exist for others. See [1].

We can add virtual columns to always return a name or null if the relationship
doesn't exist or the name is null.  This saves us lots of data if we're only
using a single column from each relationship.

For a specific API call with proper timestamp filtering so we only return tens
of thousands of event_streams:

"name": "event_streams",
"count": 299925,
"subcount": 1000,
"subquery_count": 39487,
"pages": 40,

Before:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source,message,vm,ext_management_system&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

20.07 s
2.59 MB
```

After:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host_name,source,message,vm_or_template_name,ext_management_system_name&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

(replacing ext_management_system, host, and vm with ext_management_system_name,
host_name, and vm_or_template_name)

20.10 s
375.04 KB
```

[1] If you use association.method format: vm_or_template.name,
ext_management_system.name, host.name, you are missing sections if they're nil,
leading to client code needing to have conditional logic:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template": {
        "name": "vm1"
    },
    "ext_management_system": {
        "name": "ems1"
    }
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "ext_management_system": {
        "name": "ems1"
    }
},
```

If you use virtual columns, it's flat and easy to use:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": "vm1",
    "ext_management_system_name": "ems1"
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": null,
    "ext_management_system_name": "ems1"
},
```
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Mar 9, 2023
See client UI code in:
ManageIQ/manageiq-ui-classic#8562
ManageIQ/manageiq-ui-classic#8642

This is a followup to ManageIQ#22361

Previously, the UI needed to run an API request including the `vm`, `host`, and
`ext management system` and all of their data because sometimes the event
stream didn't have a `vm`, `host` or `ems` so the UI code would need to add
conditional logic as `vm.name`, `host.name` and `ext_mangement_system.name`
would be empty for some entries and exist for others. See [1].

We can add virtual columns to always return a name or null if the relationship
doesn't exist or the name is null.  This saves us lots of data if we're only
using a single column from each relationship.

For a specific API call with proper timestamp filtering so we only return tens
of thousands of event_streams:

"name": "event_streams",
"count": 299925,
"subcount": 1000,
"subquery_count": 39487,
"pages": 40,

Before:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source,message,vm,ext_management_system&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

20.07 s
2.59 MB
```

After:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host_name,source,message,vm_or_template_name,ext_management_system_name&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

(replacing ext_management_system, host, and vm with ext_management_system_name,
host_name, and vm_or_template_name)

20.10 s
375.04 KB
```

[1] If you use association.method format: vm_or_template.name,
ext_management_system.name, host.name, you are missing sections if they're nil,
leading to client code needing to have conditional logic:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template": {
        "name": "vm1"
    },
    "ext_management_system": {
        "name": "ems1"
    }
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "ext_management_system": {
        "name": "ems1"
    }
},
```

If you use virtual columns, it's flat and easy to use:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": "vm1",
    "ext_management_system_name": "ems1"
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": null,
    "ext_management_system_name": "ems1"
},
```
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Mar 13, 2023
See client UI code in:
ManageIQ/manageiq-ui-classic#8562
ManageIQ/manageiq-ui-classic#8642

This is a followup to ManageIQ#22361

Previously, the UI needed to run an API request including the `vm`, `host`, and
`ext management system` and all of their data because sometimes the event
stream didn't have a `vm`, `host` or `ems` so the UI code would need to add
conditional logic as `vm.name`, `host.name` and `ext_mangement_system.name`
would be empty for some entries and exist for others. See [1].

We can add virtual delegates to always return a name or null if the relationship
doesn't exist or the name is null.  This saves us lots of data if we're only
using a single column from each relationship.

For a specific API call with proper timestamp filtering so we only return tens
of thousands of event_streams:

"name": "event_streams",
"count": 299925,
"subcount": 1000,
"subquery_count": 39487,
"pages": 40,

Before:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source,message,vm,ext_management_system&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

20.07 s
2.59 MB
```

After:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host_name,source,message,vm_or_template_name,ext_management_system_name&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

(replacing ext_management_system, host, and vm with ext_management_system_name,
host_name, and vm_or_template_name)

15.89 s
391 KB
```

[1] If you use association.method format: vm_or_template.name,
ext_management_system.name, host.name, you are missing sections if they're nil,
leading to client code needing to have conditional logic:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template": {
        "name": "vm1"
    },
    "ext_management_system": {
        "name": "ems1"
    }
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "ext_management_system": {
        "name": "ems1"
    }
},
```

If you use virtual columns, it's flat and easy to use:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": "vm1",
    "ext_management_system_name": "ems1"
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": null,
    "ext_management_system_name": "ems1"
},
```
GilbertCherrie pushed a commit to GilbertCherrie/manageiq that referenced this pull request Jul 7, 2023
See client UI code in:
ManageIQ/manageiq-ui-classic#8562
ManageIQ/manageiq-ui-classic#8642

This is a followup to ManageIQ#22361

Previously, the UI needed to run an API request including the `vm`, `host`, and
`ext management system` and all of their data because sometimes the event
stream didn't have a `vm`, `host` or `ems` so the UI code would need to add
conditional logic as `vm.name`, `host.name` and `ext_mangement_system.name`
would be empty for some entries and exist for others. See [1].

We can add virtual delegates to always return a name or null if the relationship
doesn't exist or the name is null.  This saves us lots of data if we're only
using a single column from each relationship.

For a specific API call with proper timestamp filtering so we only return tens
of thousands of event_streams:

"name": "event_streams",
"count": 299925,
"subcount": 1000,
"subquery_count": 39487,
"pages": 40,

Before:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host,source,message,vm,ext_management_system&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

20.07 s
2.59 MB
```

After:

```
http://localhost:3000/api/event_streams?limit=5000&offset=0&expand=resources&attributes=group,group_level,group_name,id,event_type,ems_id,type,timestamp,created_on,host_name,source,message,vm_or_template_name,ext_management_system_name&filter[]=ems_id=2&filter[]=type=EmsEvent&filter[]=group=[configuration,other]&filter[]=group_level=[warning,detail,critical]&filter[]=timestamp%3E2022-10-01T22:19:39.148Z&filter[]=timestamp%3C2022-10-5T22:19:39.148Z

(replacing ext_management_system, host, and vm with ext_management_system_name,
host_name, and vm_or_template_name)

15.89 s
391 KB
```

[1] If you use association.method format: vm_or_template.name,
ext_management_system.name, host.name, you are missing sections if they're nil,
leading to client code needing to have conditional logic:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template": {
        "name": "vm1"
    },
    "ext_management_system": {
        "name": "ems1"
    }
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "ext_management_system": {
        "name": "ems1"
    }
},
```

If you use virtual columns, it's flat and easy to use:

```
{
    "href": "http://localhost:3000/api/event_streams/20409",
    "id": "20409",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:31Z",
    "created_on": "2022-10-03T12:35:09Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": "vm1",
    "ext_management_system_name": "ems1"
},
{
    "href": "http://localhost:3000/api/event_streams/20410",
    "id": "20410",
    "event_type": "INVALID_URI",
    "ems_id": "2",
    "type": "EmsEvent",
    "timestamp": "2022-10-03T13:05:51Z",
    "created_on": "2022-10-03T12:35:24Z",
    "host_name": null,
    "source": "IBM_POWER_HMC",
    "message": null,
    "group": "other",
    "group_level": "detail",
    "group_name": "Other",
    "vm_or_template_name": null,
    "ext_management_system_name": "ems1"
},
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants