Add Widget Script Indicator
Download: Script Indicator
Introduction
This article explains how to add an icon to indicate if a custom script exists for the widget. The icon can also act as a shortcut button to open the Script Editor page and the Widget Editor page.
Purpose/Benefits
JavaScript scripts can be added to widgets in Sisense to extend and customize functionality. Dashboard designers may find it hard to identify at a glance which widgets have a custom script attached.
This plugin adds an icon indicating that a script is present.
Steps
The following steps will walk you through the process of adding the plugin and the indicator icon.
Step 1 – Add the Plugin
Download the attachment and unzip the contents into your C:\Program Files\Sisense\PrismWeb\plugins\ folder. If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder. If the plugins folder doesn't exist, just create it.
Step 2 – Configure Settings (optional)
Open the config.js file located in the plugins folder in a text editor such as Notepad++ where you can edit the options to your liking.
The available options are:
widget_indicator_on | true, false | Display or hide the indicator icon |
open_on_click_enabled | 0,1,2 | Specify the button’s action: 0 – no action |
Notes
- The script indicator icon will only be visible to Designer and Admin roles.
Updates:
** 23/08/2017 - Console error has been found and fixed.
** 01/07/2018 - Adjust to version 7
-
Very nice!
But nowadays the Text widget does not have an edit button, but it is possible to add script into it. So we need to discover it´s widgetId in order to chenge the script. It would be very nice if scriptIconIndicator works with Text Widgets.
-
Hi David, I was debugging another plugin with Lidor Rosencovich and he realized that the Widget Script Indicator plugin was generating some unwanted errors in the console when buttonObj is undefined. He added a condition to check if buttonObj is defined to get rid of all the errors. So it's fixed on our version, but would you mind to fix the official plugin also? Thanks
-
@Aviv, if you look at the plugin script (scriptIndicator.js), here are lines 29-30:
// Check if the widget has a script and that the user is not a viewer
if (args.widget.script && !args.widget.dashboard.userAuth.base.isConsumer){You would need to remove the first condition, save the file, and restart IIS.
-
This plugin would be so handy if it worked for Version 8! We are trying to review all of our version 7 scripts in version 8 to fix/remove them and we have to go through each widget script which is multiple clicks. Very painful, but this would have made that process much more efficient.
-
Hi Everyone,
We will be launching soon an officialy supproted plugin (hosted by Paldi Solutions of course) to this plugin.
It will be compleltly free as this one is so usefull that anyone should have it.
The plugin will be supported on both Linux & windows versions that were released in the past 12 months.
Feel free to reach out to get notified once it's out.Cheers,
Ravid
Paldi Solutions - Gold Certified Partner
Please sign in to leave a comment.
Comments
16 comments