working in dashboards

This commit is contained in:
Fernando Ontiveros
2011-10-31 16:43:29 -04:00
parent c35d4aba46
commit 32bc0379a3
3 changed files with 9 additions and 8 deletions

View File

@@ -50,11 +50,12 @@ class dashletOpenVSCompleted implements DashletInterface {
} }
function render () { function render () {
/*G::LoadClass('gauge'); print "hola"; die;
G::LoadClass('gauge');
$g = new Gauge(); $g = new Gauge();
$g->w = $w; //$g->w = $w;
//others //others
$g->render();*/ $g->render();
} }
} }

View File

@@ -32,13 +32,13 @@ class Dashboard extends Controller {
public function renderDashletInstance($data) { public function renderDashletInstance($data) {
try { try {
if (!isset($data['DAS_INS_UID'])) { if (!isset($data->DAS_INS_UID)) {
$data['DAS_INS_UID'] = ''; $data->DAS_INS_UID = '';
} }
if ($data['DAS_INS_UID'] == '') { if ($data->DAS_INS_UID == '') {
throw new Exception('Parameter "DAS_INS_UID" is empty.'); throw new Exception('Parameter "DAS_INS_UID" is empty.');
} }
$this->pmDashlet->setup($data['DAS_INS_UID']); $this->pmDashlet->setup($data->DAS_INS_UID);
$this->pmDashlet->render(); $this->pmDashlet->render();
} }
catch (Exception $error) { catch (Exception $error) {

View File

@@ -76,7 +76,7 @@ Ext.onReady(function(){
}, },
'resize' : function(p,w,h){ 'resize' : function(p,w,h){
var randomnumber=Math.floor(Math.random()*1000000) var randomnumber=Math.floor(Math.random()*1000000)
var img = new Ext.XTemplate("<img src='{page}?w={width}&r={random}&id={id}'>").apply({ var img = new Ext.XTemplate("<img src='{page}?w={width}&r={random}&DAS_INS_UID={id}'>").apply({
page: 'dashboard/renderDashletInstance', width:w, random: randomnumber, id:'123456ABCDEF' }) page: 'dashboard/renderDashletInstance', width:w, random: randomnumber, id:'123456ABCDEF' })
p.update(img ); p.update(img );