ondemand icon indicating copy to clipboard operation
ondemand copied to clipboard

Add ability to provide arbitrary customizations to the Active Jobs node details view

Open ericfranz opened this issue 5 years ago • 2 comments

Currently we render an erb partial for each node of a job, if a node list is available: https://github.com/OSC/ondemand/blob/f430f36fcef67bbec82ec969a2a045aa0aaa6f98/apps/activejobs/app/views/jobs/_ganglia_graphs_table.html.erb#L8-L12

and

https://github.com/OSC/ondemand/blob/f430f36fcef67bbec82ec969a2a045aa0aaa6f98/apps/activejobs/app/views/jobs/_job_details_node_view.html.erb#L1-L26

One of the issues is that the details node view only displays if this expression is true:

<% if has_ganglia(data.cluster) || has_grafana(data.cluster) %>

The ganglia assumes you will provide 4 reports as images for each node (cpu_report, load_report, mem_report, network_report), and the ganglia assumes you will provide two reports (cpu, memory) in embedded iframes.

There are several use cases were sites would want to vary this:

  • sites might want to display gpu graphs for jobs that have a gpu available
  • sites might want to display grafana graphs as images instead of iframes if they have access to that
  • sites might want to display graphs from another source besides grafana or ganglia

Currently, we can override the _job_details_node_view.html.erb by adding an /etc/ood/config/apps/dashboard/views/jobs/_job_details_node_view.html.erb file which will then be used in place of the above. If we are okay with maintaining a single partial like this long term, that would be an option and we would document this with examples.

We also might consider an alternative default implementation of _job_details_node_view.html.erb and the corresponding cluster config required that offers some of the flexibility above without coding your own erb.

┆Issue is synchronized with this Asana task by Unito

ericfranz avatar Aug 11 '20 13:08 ericfranz

https://github.com/OSC/ood-documentation/issues/235#issuecomment-589894975 may be relevant

ericfranz avatar Oct 27 '20 16:10 ericfranz