Search in sources :

Example 1 with OperationStatsType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType in project midpoint by Evolveum.

the class StatisticsDtoModel method getStatisticsFromTaskType.

protected StatisticsDto getStatisticsFromTaskType(TaskType task) {
    OperationStatsType operationStats = task.getOperationStats();
    if (operationStats == null) {
        LOGGER.warn("No operational information in task");
        return null;
    }
    EnvironmentalPerformanceInformationType envInfo = operationStats.getEnvironmentalPerformanceInformation();
    if (envInfo == null) {
        LOGGER.warn("No environmental performance information in task");
        return null;
    }
    StatisticsDto dto = new StatisticsDto(envInfo);
    return dto;
}
Also used : EnvironmentalPerformanceInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType) OperationStatsType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType)

Example 2 with OperationStatsType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType in project midpoint by Evolveum.

the class StatisticsDtoModel method getStatisticsFromTask.

protected StatisticsDto getStatisticsFromTask(Task task) {
    OperationStatsType operationStats = task.getAggregatedLiveOperationStats();
    if (operationStats == null) {
        LOGGER.warn("No operational information in task");
        return null;
    }
    EnvironmentalPerformanceInformationType envInfo = operationStats.getEnvironmentalPerformanceInformation();
    if (envInfo == null) {
        LOGGER.warn("No environmental performance information in task");
        return null;
    }
    StatisticsDto dto = new StatisticsDto(envInfo);
    return dto;
}
Also used : EnvironmentalPerformanceInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType) OperationStatsType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType)

Example 3 with OperationStatsType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType in project midpoint by Evolveum.

the class TaskTabsVisibility method computeProgressVisible.

public boolean computeProgressVisible(PageTaskEdit parentPage) {
    final OperationStatsType operationStats = parentPage.getTaskDto().getTaskType().getOperationStats();
    progressVisible = !parentPage.isEdit() && operationStats != null && // readability is maybe not required, as the corresponding data would be null if not readable
    parentPage.isReadable(new ItemPath(TaskType.F_OPERATION_STATS)) && (operationStats.getIterativeTaskInformation() != null || operationStats.getSynchronizationInformation() != null || operationStats.getActionsExecutedInformation() != null);
    return progressVisible;
}
Also used : OperationStatsType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType) ItemPath(com.evolveum.midpoint.prism.path.ItemPath)

Example 4 with OperationStatsType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType in project midpoint by Evolveum.

the class TaskTabsVisibility method computeEnvironmentalPerformanceVisible.

public boolean computeEnvironmentalPerformanceVisible(PageTaskEdit parentPage) {
    final OperationStatsType operationStats = parentPage.getTaskDto().getTaskType().getOperationStats();
    environmentalPerformanceVisible = !parentPage.isEdit() && parentPage.isReadable(new ItemPath(TaskType.F_OPERATION_STATS)) && operationStats != null && !StatisticsUtil.isEmpty(operationStats.getEnvironmentalPerformanceInformation());
    return environmentalPerformanceVisible;
}
Also used : OperationStatsType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType) ItemPath(com.evolveum.midpoint.prism.path.ItemPath)

Aggregations

OperationStatsType (com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType)4 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)2 EnvironmentalPerformanceInformationType (com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType)2