Coder Social home page Coder Social logo

Comments (6)

aminoz007 avatar aminoz007 commented on June 4, 2024

There is an example here: https://github.com/newrelic-experimental/nr1-rssreader

from nr1-status-pages.

nr-opensource-bot avatar nr-opensource-bot commented on June 4, 2024

🎉 This issue has been resolved in version 0.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from nr1-status-pages.

aminoz007 avatar aminoz007 commented on June 4, 2024

@norbertsuski I tested the rss parser with New Relic status page and it returned the list of incident as expected. My only problem is with the iframe.

from nr1-status-pages.

aminoz007 avatar aminoz007 commented on June 4, 2024

Another remark: the CORS proxy should be configurable since some people may use their own internal proxy. https://cors-anywhere.herokuapp.com/ can be selected by default but we should be able to change it. Currently, https://cors-anywhere.herokuapp.com/ has a limit of 100 request per referrer per hour, so a customer will need to use his own proxy server to avoid this limitation. Ideally, by default https://cors-anywhere.herokuapp.com/ is used, however this URL should be configurable.

from nr1-status-pages.

aminoz007 avatar aminoz007 commented on June 4, 2024

I spent a lot of time trying to get the Iframe to work for the RSS feed but it seems very hard to implement.

The "connexion refused" and "refused to display" errors are all because some sites like "Slack" don't allow CORS.

I tried to use the Proxy to get the html and then pass it as srcDoc for the iframe, that actually worked, it returned the HTML in the stacked nerdlet, however the CSS and images were not loaded because the HTML I got back from the proxy has relative paths (example: <link rel="stylesheet" href="/css/v2/averta-font.css">).

To get the CSS and Images/Fonts, I manipulated the HTML returned by the proxy and added the absolute URL with the proxy url (<link rel="stylesheet" href="https://api.allorigins.win/raw?url=https://status.slack.com//css/v2/averta-font.css">), I have used this snippet:

const url = "https://api.allorigins.win/raw?url="+this.props.src;
const networkResponse = await axios.get(url);
let updatedHtml = networkResponse.data.replace(/src="(.?)"/g, src="${url}$1");
updatedHtml = updatedHtml.replace(/href="(.
?)"/g, href="${url}$1");


That actually worked and added the styles properly, however when I clicked on anything in the Iframe the style was gone.
I think I might be able to fix that as well but it seems like a lot of work for a small thing.
Besides, we can't guarantee that it will work properly for all external status pages.
I will let you take a look, but if you share my opinion it would be probably easier to change the "See status page button" into a link and open the page in a different window (see screenshot below).


Screen Shot 2020-07-18 at 1 09 02 AM

from nr1-status-pages.

tangollama avatar tangollama commented on June 4, 2024

@aminoz007 I'm inclined to close this again based on #82. Please confirm.

from nr1-status-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.