0.0.2 • Published 3 years ago
yh-integrate-dashboard-manager v0.0.2
YHIntegrateDashboard
The YHIntegrateDashboard is used to integrate dashboard.
API
- init
- open
- dispose
init
Init the integrate dashboard manager.
open
Open dashboard.
dispose
Dispose the integrate dashboard manager.
================================================================================
Installation
Requires Node.js v6+ to run.
$ npm i yh-integrate-dashboard-manager
================================================================================
Demo
import YHIntegrateDashboard
- from /es/YHIntegrateDashboard
import YHIntegrateDashboard from '../es/YHIntegrateDashboard';
- from /lib/YHIntegrateDashboard.min.js
<script type="text/javascript" src="../lib/YHIntegrateDashboard.min.js"></script>
init dom and open dashboard
// the dom element used to mount the report
var div = document.getElementById('root');
YHIntegrateDashboard.init(div, 'http://localhost:8080/bi/Viewer?proc=1&action=viewer&hback=true&isAir=true&platform=WAP&browserType=chrome',
'', '400px', '599px', {style: {border: 'none', display: 'none'}});
// open the report
setTimeout(() => {
YHIntegrateDashboard.open(div, {
db: '001', // db path
dbType: 16640 + ''
});
}, 6000);
dipose dom if hide dashboard
// the dom used to mount the report
var div = document.getElementById('root');
YHIntegrateDashboard.dispose(div);
================================================================================
Todos
- Write MORE Tests
License
MIT