JumpToDashboard - Troubleshooting the most common configuration issues
JumpToDashboard - Troubleshooting the most common configuration issues This article provides possible solutions to the most common configuration issues with the JumpToDashboard plugin. Please review the symptom of the issue first (what error/behavior you experience with the JumpToDashboard plugin) and then follow the solution instructions. If this doesn’t solve your issue, feel free to contact our Support Team describing your issue in detail. Symptoms: A target (usually with “_drill” in prefix) dashboard disappeared for non-owner users in the left-hand side panel. Solution: this behavior could be intended and is controlled by the JumpToDashboard parameter called “hideDrilledDashboards”. To make the dashboard visible for the non-owners, please check the following: 1. Log in as a dashboard owner and find the dashboard in question in the left-hand side panel. Click the 3-dots menu and make sure it’s not hidden: 2. If it’s not hidden by the owner intentionally, then navigate to the Admin tab > System Management (under Server & Hardware) > File Management > plugins > jumpToDashboard > js > config.js and check if hideDrilledDashboards set to true. If so, then change it to false and save the changes in the config file. 3. Wait until the JumpToDashboard plugin is rebuilt under the Admin tab > Server & Hardware > Add-ons page and ask your user to refresh the browser page to check if a drill dashboard appears on the left-hand side panel. Symptoms: No "Jump to dashboard" menu appears in a widget edit mode clicking the 3-dots menu. Solution: there could be different reasons for such behavior so check the most common cases below: Double-check if the JumpToDashboard plugin is enabled under the Admin tab > Server & Hardware > Add-ons page. Make sure that both dashboards (parent and target) are based on the same ElastiCube. By default, the JumpToDashboard plugin has sameCubeRestriction: true in the config.js file that prevents the ‘jump to’ menu from appearing when a drill dashboard uses a different data source. Check that the prefix you used for the drill dashboard creation is correct. It could be changed in the config.js file. By default, it uses “_drill”: Symptoms: when clicking on a widget that should open a drill dashboard, nothing happens. Solution: in such cases, we recommend opening your browser console (for example, F12 for Chrome > Console tab) to see if there are any errors that could indicate the issue. For example, a 403 error in the console indicates that the target dashboard is not shared with the user who is experiencing the issue. To fix it, login as an owner of the drill dashboard and share it with the relevant user or group. Symptoms: when clicking on a widget to get the drill dashboard you get a 404 error. Solution: This issue usually happens when the target/drill dashboard is removed from the system. In order to fix it, please follow the steps below: Log in to the system as an owner. Find the parent widget and open it in edit mode. Click the 3 dots menu > choose the ‘Jump to dashboard’ menu and select any other dashboard that exists in the system. Press Apply and publish the changes to other users. Note: if you need just to remove a drill dashboard that doesn’t exist from this widget and not substitute it with another one, try the following: after you choose a new drill dashboard, just unselect it after that and then save the changes. If the jump to dashboard menu doesn’t appear for this widget, try to create a new temporary dashboard with “_drill” in the prefix and do the same. Symptoms: The drill dashboard is not opening for some viewers. Solution: republish the drill dashboard to make sure the updated version is delivered to all end users. Additional Resources: JumpToDashboard Plugin - How to Use and Customize1.5KViews1like2CommentsChanging Grand Total Position
Question: In pivot tables, we would like to show column grand totals on top of the table and row grand totals at front. Please let us know how to alter positions. Asnwer: This script will move the grand total row to the top. widget.on('ready', function(sender, ev){ if ($(".p-grand-total-row-head", element).length > 0) { setTimeout(function(){ $('table#pivot_',element).prepend($('table#pivot_', element).find('tr:last')); $('div.table-container table', element).prepend($('div.table-container table', element).find('tr:last')); $('tbody',element).each(function(){ $(this).find('tr:first td').not('.phantom').css('border-bottom', '1px solid #ccc').find($('span, .p-value')).css('font-weight', 'bold'); }); $('.p-grand-total-row-head.p-first-data-col').css('border-left', 'none'); },500); } }); The below should work with Pivot 2.0. widget.on('ready', function(sender, ev){ //Define Variables var lastRowClass = $('tr.table-grid__row:contains(Grand Total)',element).last().attr('class') var firstClass = lastRowClass.split(' ')[0] var secondClass = lastRowClass.split(' ')[1] var firstRowClassBase = $('div.' + firstClass).first().attr('class').split(' ')[0] var firstRowClassNumber = $('div.' + firstClass).first().attr('class').split(' ')[1].match(/\d+/g) //If the first row class number does NOT equal zero... if(firstRowClassNumber[0] != 0){ $('div.' + firstRowClassBase + ' div.table-grid__cell').css({'border-top':'','font-weight':''}) $('tr.' + firstClass).first().insertAfter($('tr.table-grid__row-' + (firstRowClassNumber - 1))) $('div.' + firstClass).first().insertAfter($('div.table-grid__row-' + (firstRowClassNumber - 1))) } //Move Grand Total row to top $('div.' + secondClass).insertBefore($('div.' + firstClass).first()) $('tr.' + secondClass).insertBefore($('tr.' + firstClass).first()) $('div.' + secondClass + ' div.table-grid__cell').css({'border-bottom':'1px solid #ccc','border-top':'1px','font-weight':'bold'}) $('tr.' + secondClass + ' td').css({'border-bottom':'1px solid #ccc','border-top':'1px','font-weight':'bold'}) });1.6KViews0likes2CommentsHide Value From Tool-Tip
Question: I am looking for a way to hide the latitude/longitude from the tool-tip in a scatter map. It appears by default and I searched through other posts but couldn't find anything. I still want the tool tip to appear, just remove the lat/long. Answer: The lat/long are displayed because they are the marker's name - when a textual field is used (such as a country field) - that would be displayed in place of lat/long. There are two possible ways of achieving this: By clearing the value of the marker name By providing a custom HTML template without it In both cases, you would start with the widget event "beforedatapointtooltip" as described in the Sisense Javascript API Reference widget.on("beforedatapointtooltip", (event, params) => { // params contains: widget, context, template, cancel }); For approach #1 you can set the marker name to nothing: params.context.marker.name = ""; For approach #2 find the original template in the path: C:\Program Files\Sisense\PrismWeb\client\views\scattermap\scattermap-tooltip.html Then copy it into a plugin, edit to remove the HTML element referring to the "marker.name" property, and then change the "template" to point to your custom template: params.template = '<div data-ng-include="../plugins/myCustomTemplatePlugin/custom-scattermap-tooltip.html"></div>'; You could also simply paste the HTML itself as the "template" but that approach is less maintainable in the long run, so using a template file is preferable.947Views0likes0CommentsCreate A New Plugin
INTRODUCTION Sisense has a very rich and robust plugin framework that allows users to extend the core functionality beyond what is available with the out-of-the-box Widget. There are many ways to extend Sisense functionality; however, in this document will focus on creating a new plugin via the plugin framework. This document provides an overview on how to create a Custom Plugin using a JavaScript plugin framework. Plugin Location Folder Sisense stores all custom plugin in the following folder C:\Program Files\Sisense\PrismWeb\plugins . Each customer plugin will be placed in a separate directory that will include at minimum the following files: json js css Widget icon file in PNG format GETTING STARTED The best way to get started, is to copy the files from an existing custom plugin folder to a new directory and edit the properties of each file based on your custom requirements. Plugin.json This file acts as the main project file, which will have information file included within this project. Normally this will be widget.js, but other files can be added such as external libraries or third party code. This file will also include references to the plugin stylesheet file Widget.css. The below example shows what the Plugin.json file would look like. Notice that “widget.js” and “widget.css” must be there by default. The other files (liquidFillGauge.js, stylerController.js) are additional library that the plugin will reference. Widget.js This is the main plugin file where all the magic happens. The file has several sections that will need to be customized in order for the plugin to work. The sections that need to be customized are the following: Plugin general properties Plugin input parameters (also called Panels) Plugin Query Processing Results Render 1. Plugin General Properties Name - the internal name of the plugin within the Sisense framework to be used to register the plugin. There are 2 places that will need to be modified as seen below: Family - indicates the family type for this plugin and generally can be any text. Some examples for family types are : Indicator, tree, chart, pivot, etc. See below example: Title - displays the title of the plugin when user is making selection from the Dashboard designer. See below example: iconSmall - points to the location of the plugin icon. This should be a PNG file of size 24x48 to hold the 2 24x24 icons of the plugin (selected and unselected), see below examples of an iconSmall file: 2. Plugin Input Parameter The plugin input parameter, also known as panel, is where user selects which fields or formula to source the data from. The plugin has a “panel” object that is an array of all the input parameters. In the below example the plugin has implemented 3 parameters (Value, Min, and Max). The below illustrates the code for declaring the “Value” panel and what it would look like in the design mode: Panel Properties Name - name of the input parameter Type - should be set to “visible” itemAttributes - define the option the user will have to set any special formatting attribute to a specific panel such as number or color formatting Metadata - defines the type of value that is allowed for this parameter. It can be measures or dimensions. Visibility - set to true to make this parameter visible by default. 3. Plugin Query (buildQuery) This section will push all the plugin parameters, as well as any filters into the Plugin JAQL object. This query will be send to Sisense server for execution and will be returned in the ProcessResult event as described below. In general, the below function will create a query object, and will push all the panels values into it as seen below. The below code will work for most cases, and you just need to modify the panel name accordingly: 4. Processing Result (processResult) This event will get fired after the above query was executed by Sisense server allowing the user to process the results of the query and create the queryResult object that is more suitable for processing. Sisense will return a dataset that is in a tabular format based on the input parameter that is accessible via the $$rows object. Each row item will contain values corresponded to the input parameters. In the below example, the result set will only have one value (i.e. number of rows will always be 1), so we only need to loop through all the input parameters that have value and fetch the value from the first row accordingly: Once we have created our own result set, we must return this object before exiting the function. This will be saved to the widget.queryResult object and will used when rendering the plugin display. 5. Render This event is called after the processResult event (as described above). In this event we will have the chance to output any visual to the user on the plugin display panel. This can be a simple textbox or a table, or more advanced visualization using D3 as an example to plot the dataset. We would need to access the plugin output display and this is possible using the below code where we get access to the element property: Next, we would want to clear any previous display by calling the element.empty() method as seen below. This will result in having a blank canvas ready to be refreshed with our new dataset. We can also fetch some basic properties of our canvas such as height and width, that can be used to align our drawing to the plugin canvas size. In most cases we would need to add a new SVG element to our canvas using the element.append function as seen below: This will create a new container in the plugin canvas which we can use to draw any visualization as seen below: To summarize, this document covers the steps needed to create a basic custom plugin within Sisense. This document does not cover any of the advanced techniques, such as creating design options, custom queries, and other. Once you have a fully functional plugin, it’s time to share your work with others in the Sisense community.2.8KViews0likes0CommentsAdd Javascript To Every Dashboard
Question: Has anyone written a plugin to add some Javascript to every dashboard page or is there an easier way to do it? For example, we are going to start using SaleMove and I have been asked to add a Javascript on every dashboard. Rather than editing the script on each dashboard manually, I would like to just automatically have it generate on each page. Answer: In fact, any Sisense plugin runs in a global scope - it is executed once when the Sisense UI loads and can apply to the entire application, so code targeted at dashboards can apply to all dashboards. Next, to apply an operation to each dashboard that is opened by the user, you can use the global event "dashboardloaded" as is described in our developer documentation website / javascript API Using this event, I could for example implement a very simple plugin that reports to an external usage tracker every time a user opens a dashboard, like so: // registering the event handler prism.on("dashboardloaded", sendTrackingInfo); // handler implementation function sendTrackingInfo(dashboard){ var payload = { user: prism.user.email, dashboardId: dashboard.oid, dashboardName: dashboard.title }; $.post("https://myimaginarytracker.com/report/someImaginaryToken1234/", JSON.stringify(payload)); }1KViews0likes0Comments