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

Hyperlink to source system incident details is broken #125

Closed
lunkwill42 opened this issue Sep 17, 2020 · 1 comment · Fixed by #144
Closed

Hyperlink to source system incident details is broken #125

lunkwill42 opened this issue Sep 17, 2020 · 1 comment · Fixed by #144
Labels
bug Something is not working as expected task
Milestone

Comments

@lunkwill42
Copy link
Member

As mentioned in #93 (comment), the hyperlink to the source system's incident details on the incident details model is broken.

The Incident record itself may contain relative URLs. If a URL is not a fully qualified URL, the hyperlink should be constructed using the base_url present in the source system definition as a prefix. Example output from the Incident endpoint:

[
  {
    "pk": 18,
    "start_time": "2020-09-14T17:06:49.983721+02:00",
    "end_time": "infinity",
    "source": {
      "pk": 1,
      "name": "testnav",
      "type": {
        "name": "nav"
      },
      "user": 2,
      "base_url": "http://localhost:9080/"
    },
    "source_incident_id": "199420",
    "details_url": "/search/event/199420",
    "description": "Link DOWN on A1 at example-sw.example.org (4.kx042)",
    "ticket_url": "",
    "tags": []
  }
]

The URL may also be a fully qualified URL, in which case it is ok to use it unchanged.

@lunkwill42 lunkwill42 added bug Something is not working as expected task labels Sep 17, 2020
@lunkwill42 lunkwill42 added this to To do in Argus Sprint #3 via automation Sep 22, 2020
@hmpf hmpf added this to the Version 1 milestone Sep 23, 2020
@hmpf
Copy link
Contributor

hmpf commented Sep 25, 2020

See Uninett/Argus#161 and Uninett/Argus#50.

Once Uninett/Argus#161 is merged, the filterable incident endpoints will send three different types of details_urls:

  • Empty string
  • Relative url, because the source system does not have base_url set, and the source sends relative urls
  • Absolute url

I don't thin linkifying relative urls is a good idea. I'll make a polish-ticket for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected task
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants