Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Feb 23, 2017
2 parents 602548d + 0a42d31 commit ee6a45e
Show file tree
Hide file tree
Showing 72 changed files with 1,446 additions and 917 deletions.
2 changes: 1 addition & 1 deletion build-system/pom.xml
Expand Up @@ -1161,7 +1161,7 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>html5shiv</artifactId>
<version>3.7.2</version>
<version>3.7.3</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
Expand Down
Expand Up @@ -40,7 +40,7 @@
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="../../../../../../webjars/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="../../../../../../webjars/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="../../../../../../webjars/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</wicket:link>
Expand Down Expand Up @@ -145,7 +145,7 @@
<wicket:link>
<script src="../../../../../../webjars/adminlte/2.3.11/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../../../../../webjars/adminlte/2.3.11/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src='../../../../../../webjars/adminlte/2.3.11/plugins/fastclick/fastclick.min.js'></script>
<script src='../../../../../../webjars/adminlte/2.3.11/plugins/fastclick/fastclick.js'></script>
<script src="../../../../../../webjars/adminlte/2.3.11/dist/js/app.min.js" type="text/javascript"></script>
</wicket:link>

Expand Down
Expand Up @@ -36,7 +36,7 @@
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="../../../../../webjars/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="../../../../../webjars/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="../../../../../webjars/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</wicket:link>
Expand All @@ -57,7 +57,7 @@
<wicket:link>
<script src="../../../../../webjars/adminlte/2.3.11/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../../../../webjars/adminlte/2.3.11/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src='../../../../../webjars/adminlte/2.3.11/plugins/fastclick/fastclick.min.js'></script>
<script src='../../../../../webjars/adminlte/2.3.11/plugins/fastclick/fastclick.js'></script>
<script src="../../../../../webjars/adminlte/2.3.11/dist/js/app.min.js" type="text/javascript"></script>
</wicket:link>

Expand Down
Expand Up @@ -310,7 +310,7 @@ private List<AssignmentEditorDto> addAssignmentsToUser(){
}
List<AssignmentEditorDto> assignmentsList = new ArrayList<>();
for (AssignmentType assignment : userAssignments){
if (assignmentsToRemove.contains(assignment.getTargetRef().getOid())){
if (assignment.getTargetRef() != null && assignmentsToRemove.contains(assignment.getTargetRef().getOid())){
assignmentsList.add(new AssignmentEditorDto(UserDtoStatus.DELETE, assignment, this));
} else {
assignmentsList.add(new AssignmentEditorDto(UserDtoStatus.MODIFY, assignment, this));
Expand Down Expand Up @@ -356,10 +356,36 @@ private List<AssignmentConflictDto> getAssignmentConflicts(){
if (PolicyConstraintKindType.EXCLUSION.equals(trigger.getConstraintKind()) &&
trigger instanceof EvaluatedExclusionTrigger) {
PrismObject<F> addedAssignmentTargetObj = (PrismObject<F>)evaluatedAssignment.getTarget();
PrismObject<F> exclusionTargetObj = (PrismObject<F>)((EvaluatedExclusionTrigger) trigger).getConflictingAssignment().getTarget();
EvaluatedAssignment<F> conflictingAssignment = ((EvaluatedExclusionTrigger) trigger).getConflictingAssignment();
PrismObject<F> exclusionTargetObj = (PrismObject<F>)conflictingAssignment.getTarget();
String exclusionOid = exclusionTargetObj.getOid();
if (userAssignmentsOidsList.contains(exclusionOid)) {
AssignmentConflictDto dto = new AssignmentConflictDto(exclusionTargetObj, addedAssignmentTargetObj);

//TODO very, very strange piece of code. but it works... leave it
//until more beautiful solution is found
PolicyActionsType actions = policyRule.getActions();
boolean isPolicyActionExist = actions != null && actions.getApproval() != null;
if (!isPolicyActionExist
&& conflictingAssignment.getTargetPolicyRules() != null) {
for (EvaluatedPolicyRule conflictAssignmentRules : conflictingAssignment.getTargetPolicyRules()) {
for (EvaluatedPolicyRuleTrigger conflictAssignmentTrigger : conflictAssignmentRules.getTriggers()) {
if (conflictAssignmentTrigger instanceof EvaluatedExclusionTrigger
&& ((EvaluatedExclusionTrigger) conflictAssignmentTrigger).getConflictingAssignment() != null
&& ((EvaluatedExclusionTrigger) conflictAssignmentTrigger).getConflictingAssignment().getTargetPolicyRules() != null){
for (EvaluatedPolicyRule r : ((EvaluatedExclusionTrigger) conflictAssignmentTrigger).getConflictingAssignment().getTargetPolicyRules()){
PolicyActionsType pat = r.getActions();
if (pat != null && r.getActions().getApproval() != null){
isPolicyActionExist = true;
}
}
}
}
}
}

boolean isError = !isPolicyActionExist;
dto.setError(isError);
conflictsList.add(dto);
}
}
Expand All @@ -377,6 +403,9 @@ private List<AssignmentConflictDto> getAssignmentConflicts(){
private boolean areConflictsResolved(){
List<AssignmentConflictDto> list = getSessionStorage().getRoleCatalog().getConflictsList();
for (AssignmentConflictDto dto : list){
if (!dto.isError()){
continue;
}
if (!dto.isSolved()){
return false;
}
Expand Down
Expand Up @@ -28,6 +28,7 @@ public class AssignmentConflictPanel extends BasePanel<AssignmentConflictDto> {
private static final String ID_PANEL_CONTAINER = "panelContainer";

private static final String STATUS_FIXED = GuiStyleConstants.CLASS_OP_RESULT_STATUS_ICON_SUCCESS_COLORED + " fa-lg";
private static final String STATUS_WARNING = GuiStyleConstants.CLASS_OP_RESULT_STATUS_ICON_WARNING_COLORED + " fa-lg";
private static final String STATUS_ERROR = GuiStyleConstants.CLASS_OP_RESULT_STATUS_ICON_FATAL_ERROR_COLORED + " fa-lg";

public AssignmentConflictPanel(String id, IModel<AssignmentConflictDto> model) {
Expand All @@ -48,7 +49,9 @@ private void initLayout() {

@Override
public String getObject() {
return getModelObject() != null ? (getModelObject().isSolved() ? STATUS_FIXED : STATUS_ERROR) : STATUS_ERROR;
return getModelObject() != null ?
(getModelObject().isSolved() ? STATUS_FIXED :
(getModelObject().isError() ? STATUS_ERROR : STATUS_WARNING)) : STATUS_ERROR;
}
}));
container.add(statusIconLabel);
Expand Down
Expand Up @@ -30,6 +30,7 @@ public class AssignmentConflictDto<F extends FocusType> implements Serializable
PrismObject<F> addedAssignmentTargetObj;
boolean isRemovedOld = false;
boolean isUnassignedNew = false;
boolean isError = true;

public AssignmentConflictDto(){
}
Expand Down Expand Up @@ -75,4 +76,12 @@ public boolean isUnassignedNew() {
public void setUnassignedNew(boolean unassignedNew) {
isUnassignedNew = unassignedNew;
}

public boolean isError() {
return isError;
}

public void setError(boolean error) {
isError = error;
}
}
@@ -1,6 +1,5 @@
// Mixins
// --------------------------------------------------

// Utilities
@import "mixins/hide-text.less";
@import "mixins/opacity.less";
Expand All @@ -11,10 +10,10 @@
@import "mixins/responsive-visibility.less";
@import "mixins/size.less";
@import "mixins/tab-focus.less";
@import "mixins/reset-text.less";
@import "mixins/text-emphasis.less";
@import "mixins/text-overflow.less";
@import "mixins/vendor-prefixes.less";

// Components
@import "mixins/alerts.less";
@import "mixins/buttons.less";
Expand All @@ -25,12 +24,10 @@
@import "mixins/forms.less";
@import "mixins/progress-bar.less";
@import "mixins/table-row.less";

// Skins
@import "mixins/background-variant.less";
@import "mixins/border-radius.less";
@import "mixins/gradients.less";

// Layout
@import "mixins/clearfix.less";
@import "mixins/center-block.less";
Expand Down
Expand Up @@ -2,7 +2,8 @@

.bg-variant(@color) {
background-color: @color;
a&:hover {
a&:hover,
a&:focus {
background-color: darken(@color, 10%);
}
}
Expand Up @@ -2,17 +2,20 @@

.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
border-top-left-radius: @radius;
}

.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
border-top-right-radius: @radius;
}

.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
border-bottom-left-radius: @radius;
}

.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
border-top-left-radius: @radius;
}
Expand Up @@ -8,15 +8,31 @@
background-color: @background;
border-color: @border;

&:hover,
&:focus,
&.focus,
&.focus {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 25%);
}
&:hover {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
}
&:active,
&.active,
.open > .dropdown-toggle& {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
border-color: darken(@border, 12%);

&:hover,
&:focus,
&.focus {
color: @color;
background-color: darken(@background, 17%);
border-color: darken(@border, 25%);
}
}
&:active,
&.active,
Expand All @@ -33,7 +49,7 @@
&:active,
&.active {
background-color: @background;
border-color: @border;
border-color: @border;
}
}

Expand Down
Expand Up @@ -14,16 +14,16 @@
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label {
&.checkbox-inline label {
color: @text-color;
}
// Set the border and box shadow on specific inputs to match
.form-control {
border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
.box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); // Redeclare so transitions work
&:focus {
border-color: darken(@border-color, 10%);
@shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
@shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten(@border-color, 20%);
.box-shadow(@shadow);
}
}
Expand All @@ -39,7 +39,6 @@
}
}


// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
Expand Down Expand Up @@ -79,7 +78,7 @@
}

textarea&,
select[multiple]& {
select[multiple] & {
height: auto;
}
}
Expand Up @@ -11,19 +11,19 @@
background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", argb(@start-color), argb(@end-color))); // IE9 and down
}

// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@start-color), argb(@end-color))); // IE9 and down
}

.directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
Expand All @@ -37,14 +37,14 @@
background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", argb(@start-color), argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@start-color), argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.radial(@inner-color: #555; @outer-color: #333) {
background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
Expand Down

0 comments on commit ee6a45e

Please sign in to comment.