Progress 14 for the dashboards
This commit is contained in:
@@ -53,6 +53,18 @@ class PMDashlet extends DashletInstance implements DashletInterface {
|
|||||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$dataset->next();
|
$dataset->next();
|
||||||
while ($row = $dataset->getRow()) {
|
while ($row = $dataset->getRow()) {
|
||||||
|
$row['DAS_INS_STATUS_LABEL'] = ($row['DAS_INS_STATUS'] == '1' ? G::LoadTranslation('ID_ACTIVE') : G::LoadTranslation('ID_INACTIVE'));
|
||||||
|
switch ($row['DAS_INS_OWNER_TYPE']) {
|
||||||
|
case 'DEPARTMENT':
|
||||||
|
require_once 'classes/model/Department.php';
|
||||||
|
$departmentInstance = new Department();
|
||||||
|
$department = $departmentInstance->load($row['DAS_INS_OWNER_UID']);
|
||||||
|
$row['DAS_INS_OWNER_TITLE'] = $department['DEPO_TITLE'];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$row['DAS_INS_OWNER_TITLE'] = $row['DAS_INS_OWNER_TYPE'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
$dashletsInstances[] = $row;
|
$dashletsInstances[] = $row;
|
||||||
$dataset->next();
|
$dataset->next();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Dashboard extends Controller {
|
|||||||
$width = 300;
|
$width = 300;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$width = $_REQUEST['w']-10;
|
$width = $_REQUEST['w'];
|
||||||
}
|
}
|
||||||
$this->pmDashlet->render( $width);
|
$this->pmDashlet->render( $width);
|
||||||
}
|
}
|
||||||
@@ -119,6 +119,7 @@ class Dashboard extends Controller {
|
|||||||
}
|
}
|
||||||
catch (Exception $error) {
|
catch (Exception $error) {
|
||||||
//ToDo: Display a error message
|
//ToDo: Display a error message
|
||||||
|
error_log($error->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -151,41 +151,39 @@ Ext.onReady(function(){
|
|||||||
totalProperty: 'totalDashletsInstances',
|
totalProperty: 'totalDashletsInstances',
|
||||||
fields : [
|
fields : [
|
||||||
{name : 'DAS_INS_UID'},
|
{name : 'DAS_INS_UID'},
|
||||||
{name : 'AUTH_SOURCE_NAME'},
|
{name : 'DAS_TITLE'},
|
||||||
{name : 'AUTH_SOURCE_PROVIDER'},
|
{name : 'DAS_VERSION'},
|
||||||
{name : 'AUTH_SOURCE_SERVER_NAME'},
|
{name : 'DAS_INS_TYPE'},
|
||||||
{name : 'AUTH_SOURCE_PORT'},
|
{name : 'DAS_INS_CONTEXT_TIME'},
|
||||||
{name : 'AUTH_SOURCE_ENABLED_TLS'},
|
{name : 'DAS_INS_OWNER_TITLE'},
|
||||||
{name : 'AUTH_SOURCE_VERSION'},
|
{name : 'DAS_INS_UPDATE_DATE'},
|
||||||
{name : 'AUTH_SOURCE_BASE_DN'},
|
{name : 'DAS_INS_STATUS_LABEL'}
|
||||||
{name : 'AUTH_ANONYMOUS'},
|
|
||||||
{name : 'AUTH_SOURCE_SEARCH_USER'},
|
|
||||||
{name : 'AUTH_SOURCE_ATTRIBUTES'},
|
|
||||||
{name : 'AUTH_SOURCE_OBJECT_CLASSES'},
|
|
||||||
{name : 'CURRENT_USERS', type:'int'}
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
cmodel = new Ext.grid.ColumnModel({
|
cmodel = new Ext.grid.ColumnModel({
|
||||||
defaults: {
|
defaults: {
|
||||||
width: 50,
|
width: 50,
|
||||||
sortable: true
|
sortable: true
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{id:'DAS_INS_UID', dataIndex: 'DAS_INS_UID', hidden:true, hideable:false},
|
{id:'DAS_INS_UID', dataIndex: 'DAS_INS_UID', hidden:true, hideable:false},
|
||||||
{header: _('ID_NAME'), dataIndex: 'AUTH_SOURCE_NAME', width: 200, hidden:false, align:'left'},
|
{header: _('ID_NAME'), dataIndex: 'DAS_TITLE', width: 200, hidden:false, align:'left'},
|
||||||
{header: _('ID_PROVIDER'), dataIndex: 'AUTH_SOURCE_PROVIDER', width: 120, hidden: false, align: 'center'},
|
{header: _('ID_VERSION'), dataIndex: 'DAS_VERSION', width: 60, hidden: false, align: 'center'},
|
||||||
{header: _('ID_SERVER_NAME'), dataIndex: 'AUTH_SOURCE_SERVER_NAME', width: 180, hidden: false, align: 'center'},
|
{header: _('ID_TYPE'), dataIndex: 'DAS_INS_TYPE', width: 100, hidden: false, align: 'center'},
|
||||||
{header: _('ID_PORT'), dataIndex: 'AUTH_SOURCE_PORT', width: 60, hidden: false, align: 'center'},
|
//{header: _('ID_PERIOD'), dataIndex: 'DAS_INS_CONTEXT_TIME', width: 100, hidden: false, align: 'center'},
|
||||||
{header: _('ID_ACTIVE_USERS'), dataIndex: 'CURRENT_USERS', width: 90, hidden: false, align: 'center'}
|
{header: 'Period', dataIndex: 'DAS_INS_CONTEXT_TIME', width: 100, hidden: false, align: 'center'},
|
||||||
]
|
{header: _('ID_OWNER'), dataIndex: 'DAS_INS_OWNER_TITLE', width: 200, hidden: false, align: 'center'},
|
||||||
|
{header: _('ID_UPDATE_DATE'), dataIndex: 'DAS_INS_UPDATE_DATE', width: 80, hidden: false, align: 'center'},
|
||||||
|
{header: _('ID_STATUS'), dataIndex: 'DAS_INS_STATUS_LABEL', width: 60, hidden: false, align: 'center'}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
storePageSize = new Ext.data.SimpleStore({
|
storePageSize = new Ext.data.SimpleStore({
|
||||||
fields: ['size'],
|
fields: ['size'],
|
||||||
data: [['20'],['30'],['40'],['50'],['100']],
|
data: [['20'],['30'],['40'],['50'],['100']],
|
||||||
autoLoad: true
|
autoLoad: true
|
||||||
});
|
});
|
||||||
|
|
||||||
comboPageSize = new Ext.form.ComboBox({
|
comboPageSize = new Ext.form.ComboBox({
|
||||||
|
|||||||
Reference in New Issue
Block a user