use of org.netxms.client.dashboards.DashboardElement in project netxms by netxms.
the class DashboardControl method saveDashboard.
/**
* Save dashboard layout
*
* @param viewPart
*/
public void saveDashboard(IViewPart viewPart) {
final NXCObjectModificationData md = new NXCObjectModificationData(dashboard.getObjectId());
md.setDashboardElements(new ArrayList<DashboardElement>(elements));
final NXCSession session = (NXCSession) ConsoleSharedData.getSession();
new ConsoleJob(Messages.get().DashboardControl_SaveLayout, viewPart, Activator.PLUGIN_ID, null) {
@Override
protected void runInternal(IProgressMonitor monitor) throws Exception {
session.modifyObject(md);
runInUIThread(new Runnable() {
@Override
public void run() {
if (isDisposed())
return;
modified = false;
if (modifyListener != null)
modifyListener.save();
}
});
}
@Override
protected String getErrorMessage() {
return Messages.get().DashboardControl_SaveError + dashboard.getObjectName();
}
}.start();
}
use of org.netxms.client.dashboards.DashboardElement in project netxms by netxms.
the class DashboardControl method addTubeChart.
/**
* Add tube chart widget to dashboard
*/
public void addTubeChart() {
DashboardElement e = new DashboardElement(DashboardElement.TUBE_CHART, DEFAULT_CHART_CONFIG);
addElement(e);
}
use of org.netxms.client.dashboards.DashboardElement in project netxms by netxms.
the class DashboardControl method createContent.
/**
* Create dashboard's content
*/
private void createContent() {
setBackground(SharedColors.getColor(SharedColors.DASHBOARD_BACKGROUND, getDisplay()));
DashboardLayout layout = new DashboardLayout();
layout.numColumns = dashboard.getNumColumns();
layout.marginWidth = embedded ? 0 : 15;
layout.marginHeight = embedded ? 0 : 15;
layout.horizontalSpacing = 10;
layout.verticalSpacing = 10;
setLayout(layout);
for (final DashboardElement e : elements) {
createElementWidget(e);
}
}
use of org.netxms.client.dashboards.DashboardElement in project netxms by netxms.
the class DashboardControl method addEmbeddedDashboard.
/**
* Add embedded dashboard widget to dashboard
*/
public void addEmbeddedDashboard() {
DashboardElement e = new DashboardElement(DashboardElement.DASHBOARD, DEFAULT_OBJECT_REFERENCE_CONFIG);
addElement(e);
}
use of org.netxms.client.dashboards.DashboardElement in project netxms by netxms.
the class DashboardControl method addSnmpTrapMonitor.
public void addSnmpTrapMonitor() {
DashboardElement e = new DashboardElement(DashboardElement.SNMP_TRAP_MONITOR, DEFAULT_OBJECT_REFERENCE_CONFIG);
addElement(e);
}
Aggregations