protected void setNode(JmxInstance currentNode) { statisticsDs.clear(); startTime = System.currentTimeMillis(); statisticsDs.refresh(ParamsMap.of("node", currentNode, "refreshPeriod", timerDelay)); statisticsDs.groupBy(new Object[]{new MetaPropertyPath(parameterClass, parameterClass.getPropertyNN("parameterGroup"))}); paramsTable.expandAll(); }
@Override public List<E> getChildItems(GroupInfo groupId) { return getGroupDatasource().getChildItems(groupId); }
public List<Parameter> getParameters() { return new ArrayList<>(parametersDs.getItems()); }
.buildGroupDatasource(); entitiesDs.setQuery("select e from " + metaClass.getName() + " e " + "where e.deleteTs is not null order by e.deleteTs"); entitiesDs.setSoftDeletion(false); entitiesDs.refresh(); entitiesTable.setDatasource(entitiesDs);
scope = getDatasource().getItems(); } else if (context instanceof GroupAggregationInputValueChangeContext) { Object groupId = ((GroupAggregationInputValueChangeContext) context).getGroupInfo(); groupInfo = (GroupInfo) groupId; scope = getDatasource().getChildItems(groupInfo);
@SuppressWarnings("unused") public void onRefresh(Timer timer) { statisticsDs.refresh(); StatisticsDatasource.DurationFormatter formatter = new StatisticsDatasource.DurationFormatter(); String dur = formatter.apply((double) (System.currentTimeMillis() - startTime)); paramsTable.setColumnCaption("recentStringValue", formatMessage("recentAverage", dur)); }
protected void initDs(Map<String, Object> params) { List<Parameter> parameters = (List<Parameter>) params.get(PARAMETERS); if (parameters == null) { parameters = new ArrayList<>(); } for (Parameter param : parameters) { parametersDs.includeItem(param); } parametersDs.addCollectionChangeListener(event -> { if (REFRESH != event.getOperation()) { if (dashboard != null) {//if edit dashboard params dashboard.setParameters(new ArrayList<>(event.getDs().getItems())); } ((AbstractDatasource) parametersDs).setModified(true); } }); ((AbstractDatasource) parametersDs).setModified(false); }
public void viewDashboard() { PersistentDashboard item = persistentDashboardsDs.getItem(); if (item != null) { openWindow("dashboard$PersistentDashboard.view", NEW_WINDOW, ParamsMap.of( DashboardView.CODE, item.getCode(), DashboardView.DISPLAY_NAME, item.getName())); } }
@Override public void groupBy(Object[] properties) { getGroupDatasource().groupBy(properties); }
protected void initPropertyTable() { propertyDs.addCollectionChangeListener(e -> { PivotTableDescription description = getPivotTableDescription(); description.getAggregationProperties().clear();
@Override public List<GroupInfo> getChildren(GroupInfo groupId) { return getGroupDatasource().getChildren(groupId); }
@Override public boolean containsGroup(GroupInfo groupId) { return getGroupDatasource().containsGroup(groupId); } }
if (report != null) { reportService.copyReport(report); reportsTable.getDatasource().refresh(); } else { showNotification(getMessage("notification.selectReport"), NotificationType.HUMANIZED); .addCloseListener(actionId -> { if (COMMIT_ACTION_ID.equals(actionId)) { reportsTable.getDatasource().refresh();
protected void showRestoreDialog() { final Set<Entity> entityList = entitiesTable.getSelected(); Entity entity = entitiesDs.getItem(); if (entityList != null && entity != null && entityList.size() > 0) { if (entity instanceof SoftDelete) { showOptionDialog( getMessage("dialogs.Confirmation"), getMessage("dialogs.Message"), MessageType.CONFIRMATION, new Action[]{ new DialogAction(Type.OK).withHandler(event -> { restoreService.restoreEntities(entityList); entitiesTable.refresh(); entitiesTable.focus(); }), new DialogAction(Type.CANCEL, Status.PRIMARY).withHandler(event -> { entitiesTable.focus(); }) } ); } } else { showNotification(getMessage("entityRestore.restoreMsg")); } }