Skip to main content
Skip table of contents

The Spawner, YAML, and You

A screencast will be done to demonstrate writing YAML code to create UI elements with existing UI widgets as well as custom widget creation.

Summary

You want XNAT to store your data but you want to provide a custom UI to your users. By leveraging the power of XNAT's classic REST and new "XAPI" REST APIs, it's possible to create a custom front-end using JSP, or even just HTML, that interacts with XNAT with AJAX through REST.

We will walk through the YAML file currently used to render the new admin page and show how to modify existing elements and add new ones.

We might also attempt creating an entirely custom page using JSP and Spawner.

We can demonstrate how to achieve the same HTML output four different ways:

  • write HTML (boring)
  • write an object in JavaScript that's processed by the XNAT.spawner.spawn() method
  • write a YAML file that's parsed by the Spawner service on the server and fed to the JavaScript method as JSON
  • write a custom widget using JavaScript and reference it as a 'kind' of element in the Spawner YAML

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.