- Update and add new Highcharts modules for use in Sisense pluginsUpdate and add new Highcharts modules for use in Sisense plugins The JavaScript library framework Highcharts is natively included in Sisense and is utilized in many native Sisense widgets as well as in numerous Sisense plugins. Although Sisense typically does not alter the Sisense Highcharts library version with every release, the versions of Highcharts included in Sisense may change when upgrading to a new major version release. Highcharts can load additional chart types and other types of functionality via JS module files that contain code-adding features such as additional chart types, which can be used within plugins along with additional code to create additional widget types. If a plugin utilizes a Highcharts module, you can source the module directly in the "plugin.json" file's source parameter, as shown in this example: "source": [ "HighchartModule.js", ], To determine the current Highcharts version being used in your Sisense version, you can use the "Highcharts" command in the web console while viewing any page on your Sisense server. After identifying the current Highcharts version, you can find the corresponding module hosted on the Highcharts code hosting website using the following URL format: https://code.highcharts.com/${Highcharts_Version}/modules/${module_name}.js For example: https://code.highcharts.com/6.0.4/modules/heatmap.js You can save this module and upload it to the plugin folder or replace the older module JS file simply by copying and pasting the code directly. Be sure to update the "plugin.json" file to point to the new module file if the file name has changed or if this is the first time the module is included. Simply sourcing the module file in the "plugin.json" file is sufficient to load the module into Highcharts; no further code is required to load the module.1.4KViews2likes2Comments
- Python 3 Script to Import Many ElastiCubesIntroduction The attached script is intended to loop through all ElastiCube folders in your ElastiCubeData folder and import them. Business Case This solution has a couple of possible use cases. The first is to facilitate migrating a Sisense environment with a large number of ElastiCubes. The second would be in the case of disaster recovery, where a number of ElastiCubes must be reattached. Requirements Python 3 must be installed. There should be at least one ElastiCube folder in your ElastiCubeData folder that is intended to be imported. Step 1 Download the attached Python3 Script to your ElastiCubeData folder(usually C:\ProgramData\Sisense\PrismServer\ElastiCubeData). Step 2 Open a IDLE (Python Editor) window as an Administrator. Note: You will get a prompt to allow changes for each ElastiCube unless you run as an Administrator. Step 3 Load the script into IDLE and run. This can take some time to import all ElastiCubes depending on how many you have and the size. Enjoy! Script: import os import subprocess def ImportEC(ECube): cmdline = ["cmd", "/q", "/k", "echo off"] cmd = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE) batch = b"""\ cd C:\Program Files\Sisense\Prism psm ecube attach path="C:\ProgramData\Sisense\PrismServer\ElastiCubeData\ElasticubeToImport" set /p exit """ ECubeBytes = bytes(ECube, 'utf-8') batch = batch.replace(rb'ElasticubeToImport', ECubeBytes) print(batch) cmd.stdin.write(batch) cmd.stdin.flush() result = cmd.stdout.read() EC_List = next(os.walk('.'))[1] for EC in EC_List: print('Python appending EC: ' + EC) ImportEC(EC)659Views0likes0Comments