In this document, we have covered how we can hide or show certain functionalities of Helical Insight based on certain condition. In this specific case however we are hiding the few functions in the top band in Helical-Report module based on logged session’s condition. So that an hiadmin should be always be able to create reports, but any other user should only be able to use the adhoc features but will never be able to save it since we will disable the save kind of option

NOTE : All these changes we have to made in a file “loginBody.jsp” within a script tag at the end of the file, located at ../hi/apache-tomcat-9/webapps/hi-ee/WEB-INF/jsp/login”

Below are step by step guide so that you can change the code/condition based on your own requirement.

Step 1:

Write a function to get the value of the hash using (window.location.hash) now check whether the hash value is equal to ‘#helical-report’ or not. #helical-report is the report designer module. If it is equal, then trigger a function that hides the save functionality.

  function handleHashChange() {
      let hash = window.location.hash;
      if (hash === '#/helical-report') {
        fetching()
      }
    }

    // Add an event listener for the hashchange event
    window.addEventListener("hashchange", handleHashChange);

Above mentioned line will trigger the handleHashChange function every time there is a change in the hash value.

Step 2:

This part of the code will help you get all the session variable details of the user who is currently logged in (like username, role, org, profle) etc Based on that you can write the condition like below.

Steps To Hide certain Functionality in Helical Insight Based On certain condition

const fetching = () => {
      const stores = new Set();
      const traverse = (element) => {
        let store =
          element?.memoizedState?.element?.props?.store
          || element?.pendingProps?.store
          || element?.stateNode?.store;

        if (store) {
          stores.add(store);
        }

        if (element.child) {
          traverse(element.child);
        }
      };
      const reactRoot = Array.from(document.querySelectorAll("*[id]")).find((el) => el?._reactRootContainer?._internalRoot?.current);
      const internalRoot = reactRoot._reactRootContainer._internalRoot.current;
      traverse(internalRoot);


      let loggedInUser = [...stores][0].getState().app.applicationSettingsData.userData.user.name
}

Here in the loggedInUser variable we are storing the username of the user who logged in and writing the condition. But you can extract any details from the data and write conditions based on that variable.
To get all the details not just the username the code is as below, so based on that if you would like to change the condition to hide/show thing based on role, organization etc the code can be changed :

[…stores][0].getState().app.applicationSettingsData.userData

Step 3: Now write a condition based on the loggedInUser and display the save option or hide the save option. 
Steps To Hide certain Functionality in Helical Insight Based On certain condition

      if (loggedInUser != 'hiadmin') {
        var divsToHide = document.getElementsByClassName("taskbar-item"); //divsToHide is an array
        for (var i = 0; i < divsToHide.length; i++) {
          divsToHide[i].style.visibility = "hidden"; // or
          divsToHide[i].style.display = "none"; // depending on what you're doing
        }
      }

Here we are checking whether the loggedInUser is hiadmin or not if he is hiadmin then we are not hiding the save and all other options but if he is not then we are collecting all the elements with the class name (‘taskbar-item’) and storing in the divsToHide and from that we are iterating and hiding the elements.

The above JSP file can be downloaded from here as well for your reference. This document is created for version 5.0 Helical Insight Enterprise edition.

Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered