HPE Morpheus Enterprise Software
1856418 Members
29929 Online
104112 Solutions
New Discussion

JavaScript Snippets Plugin

 
Ollie-Phillips
HPE Pro

JavaScript Snippets Plugin

This experimental Plugin project supports the addition of JavaScript snippets which can be enabled and disabled individually in the plugin’s settings.

Just the one use case currently - stripping leading and trailing whitespace from the instance name field in the Morpheus UI standard persona.

The plugin only runs JavaScript included as part of the JAR build. It is possible to read from a remote URL and maintain the JavaScript outside of the plugin, by referencing and including a remote script, but with the approach here, each snippet which comprises the JavaScript payload can be enabled/disabled in the plugin settings.

i.e If you don’t want to strip whitespace in your instance names, you simply do not enable it in the settings.

The plugin could be extended to do much more, but this is an example plugin project intended to help community members approach and get started with plugin development.

That said, if you have suggestions and ideas please post up. If you want to contribute directly via pull request, then please do :+1:

Plugin repository: https://github.com/spoonboy-io/javascript-snippets-plugin

Tested on Morpheus 6.1.0



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo