Hosting SAP Analytics Cloud Custom Widgets into GitHub
Custom widget consists mainly of two types of files: the custom widget JSON file (explained in more detail in previous blog) and the resource files.
The custom widget JSON file contains the metadata of a custom widget. It defines all the ingredients of a custom widget and references its resource files by their URLs.
To host a custom widget, you need two locations on which these files are distributed:
An SAP Analytics Cloud instance, on which you upload the custom widget JSON file of the custom widget (see help: Upload a Custom Widget to Analytics Designer).
An HTTP Web server with HTTPS enabled, on which you upload the resource files. The Web server acts as a simple repository of the resource files. The resource files are static, they aren’t processed or executed on the Web server. Recall that the custom widget JSON contains URL references that point to these resource files.
In this blog I will show you how you can host your Custom Widgets into the GitHub.
GitHub Account Setup
Before you start uploading your Custom Widgets into the GitHub, you must first create an account in case if you don’t have one.
We will use this feature that GitHub is offering to host our Custom Widget’s resource files.
Below you will find a Demo where I highlighted the different steps that you need to know for hosting your Custom Widget into the GitHub:
- Create GitHub Account.
- Create new public repository.
- Activating the feature “Pages”.
- Testing the repository by uploading an HTML file.
- Uploading the Custom Widget’s resource files into the repository.
- Testing the Custom Widget with SAP Analytics Cloud.
You can visit the GitHub Docs in order to know more about Pages, naming, the different type of repositories and Custom domains.
Please consult the GitHub Pages documentation on their Usage limits before implementation/going to production.
You can visit as well our new GitHub repository where you can find several Custom Widget Samples ready to use.
If you are interested in other hosting options, I invite you to read my blog: how to host your Custom Widgets into the SAP BTP
See you soon for new blogs !