Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Mar 25, 2020
2 parents 3637a3f + 0571481 commit eaf2d12
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
Expand Up @@ -218,6 +218,8 @@ public class GuiStyleConstants {
public static final String CLASS_ICON_TEXT = "fa fa-text-width";

public static final String CLASS_ICON_TRASH = "fa fa-trash-o";
public static final String CLASS_ICON_PERFORMANCE = "fa fa-area-chart";
public static final String CLASS_ICON_TASK_RESULTS = "fa fa-list-alt";


}
Expand Up @@ -4,6 +4,11 @@
import java.util.Collection;
import java.util.Collections;

import com.evolveum.midpoint.gui.impl.component.AjaxCompositedIconButton;
import com.evolveum.midpoint.gui.impl.component.data.column.CompositedIconPanel;
import com.evolveum.midpoint.gui.impl.component.icon.CompositedIcon;
import com.evolveum.midpoint.gui.impl.component.icon.CompositedIconBuilder;
import com.evolveum.midpoint.gui.impl.component.icon.IconCssStyle;
import com.evolveum.midpoint.gui.impl.prism.PrismPropertyValueWrapper;
import com.evolveum.midpoint.gui.impl.prism.PrismReferenceValueWrapperImpl;
import com.evolveum.midpoint.gui.impl.prism.PrismReferenceWrapper;
Expand Down Expand Up @@ -344,7 +349,7 @@ public void onClick(AjaxRequestTarget target) {
}

private void createCleanupPerformanceButton(RepeatingView repeatingView) {
AjaxIconButton cleanupPerformance = new AjaxIconButton(repeatingView.newChildId(), new Model<>(GuiStyleConstants.CLASS_ICON_TRASH),
AjaxCompositedIconButton cleanupPerformance = new AjaxCompositedIconButton(repeatingView.newChildId(), getTaskCleanupCompositedIcon(GuiStyleConstants.CLASS_ICON_PERFORMANCE),
createStringResource("operationalButtonsPanel.cleanupEnvironmentalPerformance")) {

@Override
Expand All @@ -364,7 +369,7 @@ public void onClick(AjaxRequestTarget target) {
}

private void createCleanupResultsButton(RepeatingView repeatingView) {
AjaxIconButton cleanupResults = new AjaxIconButton(repeatingView.newChildId(), new Model<>(GuiStyleConstants.CLASS_ICON_TRASH),
AjaxCompositedIconButton cleanupResults = new AjaxCompositedIconButton(repeatingView.newChildId(), getTaskCleanupCompositedIcon(GuiStyleConstants.CLASS_ICON_TASK_RESULTS),
createStringResource("operationalButtonsPanel.cleanupResults")) {

@Override
Expand Down Expand Up @@ -416,6 +421,15 @@ private void saveTaskChanges(AjaxRequestTarget target, ObjectDelta<TaskType> tas
afterOperation(target, result);
}

private CompositedIcon getTaskCleanupCompositedIcon(String basicIconClass){
CompositedIconBuilder iconBuilder = new CompositedIconBuilder();
CompositedIcon icon = iconBuilder
.setBasicIcon(basicIconClass, IconCssStyle.IN_ROW_STYLE)
.appendLayerIcon(WebComponentUtil.createIconType(GuiStyleConstants.CLASS_ICON_TRASH), IconCssStyle.BOTTOM_RIGHT_STYLE)
.build();
return icon;
}

private void afterOperation(AjaxRequestTarget target, OperationResult result) {
showResult(result);
getObjectModel().reset();
Expand Down
Expand Up @@ -2592,12 +2592,13 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ownerRef" type="tns:ObjectReferenceType">
<xsd:element name="ownerRef" type="tns:ObjectReferenceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
The user that owns this task. It usually means the user that started the task
or a system user that is used to execute the task. The owner will be used to
determine access rights of the task, will be used for auditing, etc.
determine access rights of the task, will be used for auditing, etc. If owner
isn't set, currently logged in user is used.
</xsd:documentation>
<xsd:appinfo>
<a:objectReferenceTargetType>tns:UserType</a:objectReferenceTargetType>
Expand Down Expand Up @@ -2647,7 +2648,7 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="executionStatus" type="tns:TaskExecutionStatusType">
<xsd:element name="executionStatus" type="tns:TaskExecutionStatusType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Execution status provides information about the task overall high-level execution state.
Expand Down Expand Up @@ -2888,11 +2889,12 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="recurrence" type="tns:TaskRecurrenceType">
<xsd:element name="recurrence" type="tns:TaskRecurrenceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Whether the task activity is to be executed only once (single-run tasks)
or periodically (recurring tasks).
or periodically (recurring tasks). If nothing set explicitly, single-run
task is created.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
Expand Down

0 comments on commit eaf2d12

Please sign in to comment.