Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

iframe.js: Update content in a more compatible way #263

Merged
merged 1 commit into from
Apr 28, 2021
Merged

iframe.js: Update content in a more compatible way #263

merged 1 commit into from
Apr 28, 2021

Conversation

nilmerg
Copy link
Contributor

@nilmerg nilmerg commented Mar 31, 2021

The previous implementation was very error prone as it relied on the exact location of the existing content and updated content. If there was any difference, the update from the behavior didn't work correctly and produced an incorrect HTML hierarchy.

This will fix this so that the behavior is more compatible with how the content it is rendering is structured. I've also included basic support for Icinga DB Web, though this might be still subject to change. I hope to remember to notify you if this is the case. 🙄

The behavior should now work fine, as long as the following is the case:

  • There's a .module-grafana iframe
  • .module-grafana is a direct child of .content (or .content > .host-detail in case of Icinga DB Web)
  • .content is a direct child of the content being rendered

@Mikesch-mp Mikesch-mp merged commit 94dc469 into Mikesch-mp:master Apr 28, 2021
@nilmerg nilmerg deleted the fix/incorrect-content-updates-if-iframe-is-present branch April 28, 2021 06:18
@Linuxfabrik
Copy link

it works, thank you both very much :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants