Boilerplate to Pentaho BIServer using Angular and Community Dashboard Framework (CDF).
- Run
npm install
andbower install
to install dependencies - Open
gulp > import-conf.js
and change the paths betweenSTART
andEND
comments to your project paths.
/* START: change these paths */
// bi-server import-export file path
var bi_server_command_path = '../../repositories/biserver-ce/import-export.sh';
// Dev (default) environment
var petaho_URL = 'http://localhost:8080/pentaho',
pentaho_username = 'Admin',
pentaho_password = 'password';
// Set homologation environment and run with -e flag (ex.: gulp -e hom)
if(argv.e === 'hom') {
petaho_URL = '',
pentaho_username = '',
pentaho_password = '';
}
// Set production environment and run with -e flag (ex.: gulp -e prod)
else if(argv.e === 'prod') {
petaho_URL = '',
pentaho_username = '',
pentaho_password = '';
}
// Pentaho project path. This will generate the root folder of your
// project in pentaho bi-server
var project_path = 'myDashboard',
// Pentaho source path. This path will be used to generate a development
// folder in pentaho bi-server
pentaho_path = '/' + project_path,
// Pentaho dist path. This path will be used to generate a dist (production)
// folder in pentaho bi-server
pentaho_dist_path = '/',
// User file path. NOTE: this path should be relative to your bi-server
zipfile_path = '../../seed/pentaho/zip/';
/* END: change these paths */
- bi_server_command_path - path of pentaho import-export{.sh|.bat} file
- petaho_URL - pentaho server url
- pentaho_username - pentaho username
- pentaho_password - pentaho password
- pentaho_import - command to import zip files to pentaho biserver
- pentaho_path - default pentaho path
- pentaho_dist_path - default pentaho dist path
- zipfile_path - user zip file path used in import command
Open the index.run.js
and see how to add new pentaho components.
To create cda files, you must use the folder assets/cdas
. These files will be used in the components.service.js
, you need change the _cdasPath
present in the file to your dashboard pentaho path.
gulp import:bower
gulp import:cda
gulp serve
A index.xcdf will be imported in pentaho and you will use it to open your dashboard.
- Dev environment
gulp
- Hom environment (the -e flag can be used in all tasks)
gulp -e hom
- Prod environment (the -e flag can be used in all tasks)
gulp -e prod
gulp test
This command will watch the tests files like gulp serve
command. A test.xcdf will be imported in pentaho and you will use it to open your test dashboard.
-
The command
gulp import:bower
sometimes don't import all files. When this happens, you need run this command more times until all files be imported. -
When you install some bower component with
bower install
and an error withdefine
expression appear, you should open the file imported inbower_components
and remove alldefine(...)
present in the archive. This error is some incompatibility with pentaho requirejs.