MODERN JAVASCRIPT IN OPENNMS Benjamin Reed OUCE 2018 ABOUT ME

• Worked with OpenNMS since almost the beginning • …for 3 different companies ;)

email: [email protected] twitter: @RangerRick IN THE BEGINNING…

• Oh no, is that a JSP!? • Simple JS for validation • Most business logic in & JSPs NEXT: JAVASCRIPT “INTEGRATION”

• “better” • I guess NOW: HOW DOES IT FIND THE JAVASCRIPT?

Magic! HOW DOES IT FIND THE JAVASCRIPT?

Web assets! WHAT IS AN ASSET?

• Compiled with • CSS & JavaScript • ES6, TypeScript, SASS LOCATING ASSETS

• AssetLocator API in Java • JSP include LOCATING ASSETS

• AssetLocator API in Java • JSP include LOCATING ASSETS

• AssetLocator API in Java • JSP include LOCATING ASSETS: CSS

• AssetLocator API in Java • JSP include LOCATING ASSETS: CSS

• AssetLocator API in Java • JSP include PARAMETERS

• asset: the asset’s name • asset-type: “”, “js” • asset-media: the “media” property for style links • asset-defer: adds “defer” to