BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: No events within the next 45 days.

Custom elements NODEJS NPM War file


 
Search this topic... | Search SDK (VBA/ASP/JSP)... | Search Box
Register or Login to Post    Forum Index -> SDK (VBA/ASP/JSP)  Previous TopicPrint TopicNext Topic
Author Message
Macroman
Principal Member
Principal Member



Joined: 13 Nov 2002

Posts: 263


flag
PostPosted: Fri Jul 12, 2019 4:57 pm 
Post subject: Custom elements NODEJS NPM War file

Hopefully this is the right place to post my question which would be aimed at those of you whom are Java and/or Javascript experts.

I myself have played around with each and not that good at it, I can look at a piece of code in a file and adapt it to suit my needs. It is a bit like knowing how to drive a car, fill it will petrol, top up water and oil but no idea on how to take apart the engine and put it back together again.

What I have done is create my own custom element visualisations which is using Leaflet maps, it works really well, I have done both heatmap and markers, and can place upto 2500 markers on the map and for heatmap total is not yet known, have not managed to break it yet. Needs a bit more work on cosmetics and making it more user freindly. Exciting for me as I am now able to enhance our customers experience within BI Launchpad.

Problem I have is the single JS file is executed and processed with nodejs, I enter pm2 start "myfile.js" and it runs on my local machine, The js file was the sample provided for Google visualisations such as Google guage in which I removed all the parts I did not need and re-coded most of it. http://locahost:8090 is entered as the custom element URL in Web Intelligence application and I am good to go.

What I would like to do is somehow extract all required bits and bobs out of nodejs and create either a WAR file or create a folder structure so I can place it within our existing BI Tomcat server under webapps folder or place on another server our team can access in a tomcat\webapps folder. I cannot install nodejs on these servers and our IT team will not allow me another server or virtual machine where I can install nodejs and npm etc.

Is it going to be possible to somehow translate/convert what is happening with my single js file processed/run within nodejs over to tomcat\webapps\mycustomelements\ folder and have it working just as it is within nodejs.

Hopefully if possible the method to do this is simple, remember I can drive the car but have no idea how to take the engine apart and re-build.

Many thanks

Macroman


Update : I have successfully created Markers and a Heatmap selection within the same file, working really well, once I upped the max Mb within my file I can add upto 30,000 map points, rendering is really quick, quicker than say Galigeo. Once I become more familiar with the Javascript I will do what any programmer should do and add comments in the code, write supporting documentation and place in here for FREE so anyone can use it in there environment. Whoohoo I now have ability to write custom elements, just the issue listed above to deal with, I may bite the bullet and install NodeJS on a spare server at work, if I can find one.
Back to top
Hayden_Gill
Forum Associate
Forum Associate



Joined: 15 Aug 2002

Posts: 620
Location: Brisbane, Australia


flag
PostPosted: Mon Jul 29, 2019 10:23 pm 
Post subject: Re: Custom elements NODEJS NPM War file

node.js relies on its own built-in webserver.

You either need a server to run node.js, or you need to rewrite your extension to run as a java jsp webapp.

There are on-line programming services that will do contract work. It may not cost that much to convert it.

_________________
Hayden Gill
Associate Director, BI
The University of Queensland
Brisbane, Australia
http://pbi.uq.edu.au
Back to top
Seagrass
Senior Member
Senior Member



Joined: 18 Nov 2014

Posts: 31



PostPosted: Thu Sep 05, 2019 3:24 pm 
Post subject: Re: Custom elements NODEJS NPM War file

Just checking to see if you've posted this for download yet. I am quite curious...
Back to top
Macroman
Principal Member
Principal Member



Joined: 13 Nov 2002

Posts: 263


flag
PostPosted: Fri Sep 06, 2019 3:42 am 
Post subject: Re: Custom elements NODEJS NPM War file

This is my first upload and hopefully approved by administrators and consumed by those out there that have a need and to understand custom elements design and implementation within the BI world. Here I am sharing my experience with you and an end product that I have managed to get working. I am by no means an expert in certain areas required to get this working, and for want of a better word, I dabble and as an Administrator of our own BI environment at work I have certain powers technically to undertake project testing. Creation of a custom element to consume leaflet maps is one such project which after a certain time I got working. I am not an expert in Javascript and I am not a technical expert in any of the SAP application designs (such as all the code and scripts that exist in a SAP BI deployment) so I may not be able to answer any high level technical questions. There are 3 files in the attachment, the CE_Maps.js file to be consumed within a NodeJS setup and as best I could instructions for those whom are technical to install NodeJS and configuration, plus an instruction for your customer on how to consume the CE_Maps. I am treating this as open source and my appreciation goes out firstly to this magnificent forum in which over the years has guided me in many areas of BI and secondly to all those that exist on the internet under the name of "open source" whom not only provide us with samples to test but also with there high level technical expertise and even guidance. As mentioned I am not an expert in certain fields and I welcome a version 2 or even version 10000 of the attachment to be re-coded by someone more qualified in certain fields than I am and uploaded here to share with others as I am doing now.
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> SDK (VBA/ASP/JSP)  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0280 seconds using 17 queries. (SQL 0.0026 Parse 0.0009 Other 0.0245)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo