Skip to content

Commit

Permalink
MID-6177 Cleaning task operational stats
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Apr 6, 2020
1 parent 343de27 commit 08f177f
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -3,6 +3,7 @@
import java.io.InputStream;
import java.util.Collection;
import java.util.Collections;
import com.evolveum.midpoint.web.component.prism.ValueStatus;

import org.apache.wicket.Page;
import org.apache.wicket.ajax.AjaxRequestTarget;
Expand Down Expand Up @@ -350,12 +351,12 @@ private void createCleanupPerformanceButton(RepeatingView repeatingView) {
@Override
public void onClick(AjaxRequestTarget target) {
try {
getObjectWrapper().findProperty(ItemPath.create(TaskType.F_OPERATION_STATS,
OperationStatsType.F_ENVIRONMENTAL_PERFORMANCE_INFORMATION)).getValue().setRealValue(null);
getObjectWrapper().findContainer(TaskType.F_OPERATION_STATS).getValue().setStatus(ValueStatus.DELETED);
} catch (SchemaException e){
LOGGER.error("Cannot clear task results: {}", e.getMessage());
}
saveTaskChanges(target);
refresh(target);
}
};
cleanupPerformance.add(AttributeAppender.append("class", "btn btn-default btn-margin-left btn-sm"));
Expand Down

0 comments on commit 08f177f

Please sign in to comment.