OSC / ondemand

Supercomputing. Seamlessly. Open, Interactive HPC Via the Web
https://openondemand.org/
MIT License
291 stars 107 forks source link

Dashboard: Provide "rss widget" ability to dashboard so we can show "known issue alerts" #237

Open ericfranz opened 7 years ago

ericfranz commented 7 years ago

This is related to https://github.com/OSC/ood-dashboard/issues/63

Earlier this week there was a problem with project space and a "known issue alert" was displayed on the front of www.osc.edu. However, this does not display on the dashboard.

Chris Spiker writes in an email:

Here’s a feed of current alerts for you: https://www.osc.edu/feeds/known-issues-alerts.xml

Currently there are no alerts, but the alert feed results will have the same structure as this feed of all unresolved issues: https://www.osc.edu/feeds/known-issues.xml

Here is an example of the structure:

<item>
    <title>Torque module on Oakley improperly setting environment variables</title>
    <link>https://www.osc.edu/supercomputing/known-issues/torque_module_on_oakley_improperly_setting_environment_variables</link>
    <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;Intel library paths are being added to the environment variable LD_LIBRARY_PATH incorrectly when loading torque.  Additionally the Intel paths remain when the torque module is unloaded.  This causes the LD_LIBRARY_PATH to be populated with paths that should not be there.&lt;/span&gt;&lt;/p&gt;

        &lt;p class=&quot;p1&quot;&gt;&lt;br /&gt;&lt;span class=&quot;s1&quot;&gt;Users should be cognizant of this error, as it can effect which dynamic libraries are linked against during run time.&lt;/span&gt;  
        &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
    </description>
    <pubDate>Thu, 19 Feb 2015 17:56:30 +0000</pubDate>
    <dc:creator>kschooley</dc:creator>
    <guid isPermaLink="false">4076 at https://www.osc.edu</guid>
</item>

Though I am not sure about the inline html in the description. It would be nice to filter this out if we were going to display an alert from a feed.

For example, the unescaped HTML description of message above looks like this:

<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p class="p1"><span class="s1">Intel library paths are being added to the environment variable LD_LIBRARY_PATH incorrectly when loading torque.  Additionally the Intel paths remain when the torque module is unloaded.  This causes the LD_LIBRARY_PATH to be populated with paths that should not be there.</span></p>

        <p class="p1"><br /><span class="s1">Users should be cognizant of this error, as it can effect which dynamic libraries are linked against during run time.</span>  
        </p></div></div></div>

And converted to plaintext, it looks like this:

Intel library paths are being added to the environment variable LD_LIBRARY_PATH incorrectly when loading torque. Additionally the Intel paths remain when the torque module is unloaded. This causes the LD_LIBRARY_PATH to be populated with paths that should not be there.

Users should be cognizant of this error, as it can effect which dynamic libraries are linked against during run time.

Sending this plain text through a markdown converter produces this:

<p>Intel library paths are being added to the environment variable LD_LIBRARY_PATH incorrectly when loading torque. Additionally the Intel paths remain when the torque module is unloaded. This causes the LD_LIBRARY_PATH to be populated with paths that should not be there.</p>
<p>Users should be cognizant of this error, as it can effect which dynamic libraries are linked against during run time.</p>

And placed inside a bootstrap alert, with the title in bold:

<div class="alert alert-warning" role="alert">
<p><strong>Torque module on Oakley improperly setting environment variables</strong></p>
<p>Intel library paths are being added to the environment variable LD_LIBRARY_PATH incorrectly when loading torque. Additionally the Intel paths remain when the torque module is unloaded. This causes the LD_LIBRARY_PATH to be populated with paths that should not be there.</p>
<p>Users should be cognizant of this error, as it can effect which dynamic libraries are linked against during run time.</p>
</div>

would produce in OSC OnDemand

screen shot 2016-12-29 at 1 56 49 pm

and in AweSim, if we place above the apps listing:

screen shot 2016-12-29 at 1 56 54 pm

or in AweSim, if we place above the MOTD - which might be easier because we would at least be consistent (always above the MOTD):

screen shot 2016-12-29 at 1 59 06 pm

Adding this feature to OOD could be beneficial to others as well. The message should probably link back to the location specified by the <link> tag.

If we do this, at OSC we would need to make Communications aware that whatever appears in this feed will auto-appear across all OOD instances at OSC.

┆Issue is synchronized with this Asana task by Unito

matt257 commented 6 months ago

reviewed, still a good idea