Skip to content

alerts() returns undefined for state #17

@cshields

Description

@cshields

First, thanks for the library, this is great!

I noticed when pulling prom.alerts() that our alert state is always coming back undefined (rather than 'firing' or 'pending').

I'm not confident enough to try a patch and PR but I think this is a mixed array call:

ResponseType[obj['state']],

You may have intended for that to reference TargetState?

export type TargetState = 'active' | 'dropped' | 'any';

and if so TargetState should also include 'firing' and 'pending'

cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions