Sisense Community logo
     
    • Community Feedback
    • Chapters
    • Events
    • Forums
      • Help and How To
      • Product Feedback Forum
      • Strategy & Use Cases
    • Blogs
    • KB Docs
      • KB Docs
      • Add-Ons & Plug-Ins
      • APIs
      • Best Practices
      • Blox
      • CDT
      • Cloud Managed Service
      • Data Models
      • Data Sources
      • Embedding Analytics
      • How-Tos & FAQs
      • Onboarding
      • PySisense
      • Security
      • Sisense Administration
      • Sisense Intelligence & AI
      • Troubleshooting
      • Widget & Dashboard Scripts
    • Support
    • Learning
      • Sisense Academy: Free Courses and Certifications
      • Official Developer Documentation
      • Official Product Documentation
      • Official Sisense Youtube Channel
      • Sisense Compose SDK Playground
      • Official Sisense Discord
    • Use Case Gallery
    •      
    Discussions
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    Discussions
    • TagsChevronRightIcon
    Cloud Managed Services
      • Product Feedback ForumChevronRightIcon
      Allow Multiple Providers for Sisense Intelligence
                                               
      Fred Ortmann
      Fred OrtmannPosted 1 week ago
               
      0
               
      • Sisense AdministrationChevronRightIcon

      GIT Instruction How To

                                               

      GIT Instruction How To In order to migrate Sisense assets between environments, please follow the below steps: Step to add your assets to the GIT repository:   1. Create a project by adding a project name along with a default branch name (such as master, POC, or any meaningful name)   2. Add your GIT repository which could be remote or local.  Below screenshot shows remote repository:      3. When you execute the test to GIT, the system will show connection was successful.       4.  You can either choose the option to create and continue or create and close buttons     5.  You can either share your project with others or continue to the next step:     6. At this point, you have two options to add Assets.  You can add one in below screen and add it to your project:    7.  Or you can save the project close, and add asset by clicking “managing asset”     8. After adding your assets, we should choose the project:   9. Then select all uncommitted changes;  add a comment for your added assets and commit the new changes.     10.  Now you push the assets so the newly added objects will be sent to the repository. 11. The Sisense application will need your GIT application credentials to proceed: Steps to add assets from GIT to another instance: 1. You will need to create a project in the second instance:   Click create project and continue 2. At this step, you can share the new project with other team members if needed: Save and close the project.   3. Then choose pull from your GIT repository and make sure you add the correct branch as seen in below screenshot:   4. The system again will ask for credentials: Where the pull action, will ask for credentials:       5. And it will update the project: 6.  You will then need to pull your added Assets and add your note; and commit afterward: You should then see your assets in the prod instance.  In our ex ample, map elasticube was added. For more information, you can check out the following Articles: https://docs.sisense.com/main/SisenseLinux/introduction-to-sisense-git-integration.htm https://www.sisense.com/platform/git-integration/ https://community.sisense.com/t5/knowledge/elevate-your-data-product-s-quality-with-streamlined-version/ta-p/15131

      Vicki786
      Vicki786Posted 1 year ago • Last reply 1 year ago
      3
               
      • Widget & Dashboard ScriptsChevronRightIcon

      How to rename the Jump to Dashboard (JTD) name in the right-click menu

                                                       

      How to rename the Jump to Dashboard (JTD) name in the right-click menu This article provides guidance on how to customize the name displayed in the right-click menu for the Jump to Dashboard (JTD) feature in Sisense. This is particularly useful for making dashboard names more user-friendly and intuitive. Step-by-Step Guide Understanding the JTD Script The JTD feature allows users to navigate from one dashboard to another by right-clicking on a widget. By default, the dashboard name may appear as a cryptic identifier. To change this, you can use the prism.jumpToDashboard script with the dashboardIds and caption parameters. Implementing the Script Use the following script to rename the dashboard in the right-click menu:   prism.jumpToDashboard(widget, { dashboardIds: [ {id: "your_dashboard_id", caption: "Your Desired Name"} ] });     Replace "your_dashboard_id" with the actual ID of your dashboard. Replace "Your Desired Name" with the name you want to display. Troubleshooting Common Issues If the name does not update, ensure that: The dashboard ID is correct. The script is correctly implemented in the widget's script editor and doesn’t have syntax errors. The plugin is enabled and up-to-date. Ensure that no third-party plugins are conflicting with the JTD plugin. Conflicts can arise if unsupported plugins are installed, as they may interfere with the execution of JavaScript code. Conclusion By following the steps outlined above, you can successfully rename the JTD option in the right-click menu to a more user-friendly name. Ensure that all configurations are correct and that there are no conflicts with other plugins.

      Liliia Kislitsyna
      Liliia KislitsynaPosted 1 year ago
      0
               
      • BloxChevronRightIcon

      BloX: replicating action “send me the report now”

                                                                                       

      BloX: replicating action “send me the report now” This article explains how to develop an action to send a dashboard as a report to the end user. This action replicates the action “Send me the report now”. This action is available only to the dashboard’s owner, but we will develop a BloX action, which will be available for other users. To solve this challenge you will need to do the following: Create a widget of the type ‘BloX’ on the dashboard you want to have the ability to send reports to the end-users; Create a custom action with the following code:       const { widget } = payload; //Get widget’s object from the payload const internalHttp = prism.$injector.get('base.factories.internalHttp'); //Get internal factory to run API requests internalHttp({ url: '/api/v1/reporting', method: 'POST', contentType: 'application/json', data: JSON.stringify({ assetId: widget.dashboard.oid, assetType: "dashboard", recipients: [ { type: 'user', recipient: prism.user._id } ], preferences: { inline: true } }) }).then(res => console.log(res.data));     This action will have the following snippet:   { "type": "sendMeReport", "title": "Send me report" }   Use this snippet in the widget you have created:   { "style": "", "script": "", "title": "", "showCarousel": true, "body": [], "actions": [ { "type": "sendMeReport", "title": "Send me report" } ] }   Now, you have a button on the widget. After clicking this button, Sisense will send a report for the currently authenticated user. Please, note that there will be no indication of the running action. When the action is completed there will be a message in the browser’s console. Feel free to customize the logic of this action to show the end-user that the report is generating. Custom action is a powerful tool, which allows you to create custom interactions. Use this approach to create a new action easily. You can customize the proposed action by adding an indication of the running action or by using custom parameters to change format or size of the generated report (check the description of the endpoint /api/v1/reporting for additional information). Check out related content: Creating customer actions Reporting Send Reports

      OleksiiDemianyk
      OleksiiDemianykPosted 1 year ago
      0
               
    • tanu500

      Help and How-To

               
      tanu500
      Posted 2 years ago • Last reply 1 year ago
      API Rate Limiting Clarification
                       

      Hello, I'm currently working with your API and I wanted to clarify the rate limiting policy. The documentation mentions a rate limit of X requests per minute, but I'm not certain if this applies to all endpoints or if there are different limits for specific endpoints. Could you please provide clarification on whether there are different rate limits for different API endpoints, and if so, where I can find the specific limits for each endpoint? Thank you.

                                             
      5
               
      • Add-ons & Plug-InsChevronRightIcon

      Plugin - HideChartTypeByGroup

                                                                                       

      Plugin - Hide Widget Type in Chart Type Dropdown From User Groups   This plugin hides widget types from the widget selection dropdown menu, for user groups set in the config of the plugin. The widget types hidden are set in the config. Widgets of that type that are pre-existing in dashboards can still be viewed and edited by all users.   Installation To install this plugin, download and unzip the attachment. Then drop the HideChartTypeByGroup folder into your plugins folder (/opt/sisense/storage/plugins). Enable the plugin on the Add-ons tab in the Admin section, wait for the plugin to build, and the plugin will be enabled. Configure To configure this plugin, set the two parameters in the config.6.js file,  chartTypesToHide, and  userGroupToModify. chartTypesToHide is an array of strings of the chart names to hide in the dropdown menu,  userGroupToModify is an array of group OIDs for which users belonging to those groups the charts defined in chartTypesToHide will be hidden in the dropdown menu. Below is an example of a config.6.js file:   export const config = { // Chart types to hide in the dropdown, case sensitive, include full name chartTypesToHide: ["Bar Chart", "BloX"], // Members of these groups will have this plugin modify the dropdown // Group unique OID, can be copied from group API or from prism.user.groupNames userGroupToModify: ["6532f4a99760e6cbf6e18585", "3265f4a99760e3bbe3e18517"] }           Tip  - Include the full name of the Chart type exactly as it appears in the dropdown to avoid potentially hiding Charts that also include the string.   Below is an example of the plugin hiding the Bar Chart option in the widget selection dropdown for a user that is a member of one of the groups set in userGroupToModify.                                       How did the plugin work for you? What other type of plugin are you looking to learn more about? Let me know in the comments!

      Jeremy Friedel
      Jeremy FriedelPosted 2 years ago • Last reply 2 years ago
      2
               
    • Blog banner
      • Add-ons & Plug-InsChevronRightIcon

      Debugging Server Side External Sisense Plugins using HTTP Requests

                                                                                       

      Debugging Server Side External Sisense Plugins using HTTP Requests Sisense external plugins are server-side Sisense plugins that run on the Sisense server itself, rather than in the client-side browser like standard non-external Sisense plugins. These external plugins are stored in the "external-plugins" folder within the Sisense server file structure and are written in standard JavaScript. While most Sisense plugins can be developed using client-side JavaScript, there are cases where server-side code is necessary. When developing or debugging existing external Sisense plugins, it can be helpful to monitor the status of plugin variables at various points in the code. This can aid in understanding the current behavior or diagnosing errors. One way to achieve this type of debugging is to send HTTP requests containing the current variable state from the Sisense server. These requests contain the current value of one or more variables at a specific point in the plugin code. The target for these requests can either be a self-hosted server or a cloud-hosted HTTP logging service, such as Webhook.site, which provides a custom URL for logging and viewing HTTP requests through a browser. Any standard JavaScript HTTP request library can be used. For example, Axios can be used to log the current state of a variable using code like this:     const debugHTTPRequestFunction = (variableToDebug) => { axios.post('https://webhook.site/your-Unique-Webhook-URL-or-any-server-with-viewable-logs', { data: [args] }) }     One common issue when sending  Sisense JS API objects such as the prism object, or a dashboard or widget object in the payload of a HTTP request, is that the object can be self-referential, making it challenging to convert to JSON in the usual manner. The following code can be used to remove circular references in JSON:     function refReplacer() { let m = new Map(), v = new Map(), init = null; return function (field, value) { let p = m.get(this) + (Array.isArray(this) ? `[${field}]` : '.' + field); let isComplex = value === Object(value) if (isComplex) m.set(value, p); let pp = v.get(value) || ''; let path = p.replace(/undefined\.\.?/, ''); let val = pp ? `#REF:${pp[0] == '[' ? '$' : '$.'}${pp}` : value; !init ? (init = value) : (val === init ? val = "#REF:$" : 0); if (!pp && isComplex) v.set(value, path); return val; } }     To convert the JSON form of an object with circular references removed back into the object's original state, you can use the following function:     function parseRefJSON(json) { let objToPath = new Map(); let pathToObj = new Map(); let o = JSON.parse(json); let traverse = (parent, field) => { let obj = parent; let path = '#REF:$'; if (field !== undefined) { obj = parent[field]; path = objToPath.get(parent) + (Array.isArray(parent) ? `[${field}]` : `${field?'.'+field:''}`); } objToPath.set(obj, path); pathToObj.set(path, obj); let ref = pathToObj.get(obj); if (ref) parent[field] = ref; for (let f in obj) if (obj === Object(obj)) traverse(obj, f); } traverse(o); return o; }     Below is an example of sending a variable with circular references removed:     const debugHTTPRequestFunction = (variableToDebug) => { axios.post('https://webhook.site/c25d8caa-4cc7-4876-b595-33625c449a45', { data: [JSON.parse(JSON.stringify(args, refReplacer())) ] }) }     You can define this function once and use it in multiple parts of your code for debugging. Another example, incorporating the functions mentioned above, is shown below, where jQuery Ajax functionality is used, and circular references to a Sisense dashboard variable are removed:     let debugVariable = [JSON.parse(JSON.stringify(prism.activeDashboard, refReplacer()))] $.ajax({ type: "POST", url: "https://webhook.site/your-Unique-Webhook-URL-or-any-server-with-viewable-logs", crossDomain: true, data: JSON.stringify({ debugVariable: debugVariable }), success: function (data) { }, error: function (err) { } });       Comment your experience with this, we'd love to start this discussion! 

      Jeremy Friedel
      Jeremy FriedelPosted 2 years ago
      0
               
      • Cloud Managed ServiceChevronRightIcon

      An universal way on how to collect logs in EKS clusters

                                       

      Introduction This guide provides step-by-step instructions on how to collect logs in EKS clusters. By following these steps, logs will be copied to a storage location accessible through the Sisense web UI. This approach avoids the need to explain the process to customers, making it more convenient to request logs for troubleshooting and analysis. Prerequisites Access to the control plane to execute kubectl commands. Appropriate permissions to access Sisense web UI. Steps 1. Connect to the Control Plane Before executing any kubectl commands, ensure that you are connected to the Kubernetes control plane. 2. Copy the .log file to a Temporary Location Execute the following command to copy the desired *.log file to a temporary location:      kubectl exec -it -n sisense $(kubectl get po -n sisense -l k8s-app=fluentd -o custom-columns=":metadata.name") -- cp /var/log/sisense/sisense/identity.log /tmp/identity.log     3. Copy the .log File from the Temporary Location to the Current Directory.  After copying the log file to the temporary location, use the following command to copy it from the temporary location to the current directory:      kubectl cp -n sisense $(kubectl get po -n sisense -l k8s-app=fluentd -o custom-columns=":metadata.name"):/tmp/identity.log ./identity.log     4. Copy the .log File to the Storage Folder Now, copy the *.log file from the current directory to the storage folder, which is accessible from the Sisense web UI:     kubectl cp -n sisense ./identity.log sisense/$(kubectl get pod -n sisense -l app=management -o jsonpath='{.items[0].metadata.name}'):/opt/sisense/storage/identity0930.log     Note: In the above command, replace /var/log/sisense/sisense/identity.log in the first step with the desired log file name, and change identity0930.log in the latest step with the desired log file name.  5. Access Logs from Sisense Web UI The identity0930.log file is now copied to the storage location and can be accessed and downloaded from the Sisense web UI. Follow these steps to access it: Log in to the Sisense web UI. Navigate to the "Admin" tab. Select "System Management" from the options. Click on "File Management." Look for the identity0930.log file and access or download it as needed. Additional Notes In the steps above, we copied the identity.log file and named it identity0930.log in the last step. You can adjust the naming convention as required. Remember to replace the filename in the commands with the desired log file name when working with different logs. Conclusion Following the steps outlined in this article, you can efficiently request logs from customers using Sisense without the need for them to find and access the logs manually. This streamlined process enhances troubleshooting and data analysis capabilities within Sisense for a more effective and seamless experience. Should you require further assistance, kindly reach out to Sisense Support.

      Vlad Solodkyi
      Vlad SolodkyiPosted 2 years ago
      0