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
KaterynaHonchar committed May 9, 2016
2 parents 114d4f4 + 4efd43e commit 104de2b
Show file tree
Hide file tree
Showing 21 changed files with 111 additions and 245 deletions.
Expand Up @@ -79,6 +79,7 @@ public class GuiStyleConstants {
public static final String CLASS_ICON_STYLE_WARNING = "icon-style-warning";
public static final String CLASS_ICON_STYLE_UP = "icon-style-up";
public static final String CLASS_ICON_STYLE_DOWN = "icon-style-down";
public static final String CLASS_ICON_STYLE_BROKEN = "icon-style-broken";

public static final String CLASS_SHADOW_ICON_ACCOUNT = "fa fa-male";
public static final String CLASS_SHADOW_ICON_ENTITLEMENT = "fa fa-group";
Expand Down
Expand Up @@ -1052,6 +1052,11 @@ public static String createResourceIcon(PrismObject<ResourceType> object) {
return GuiStyleConstants.CLASS_OBJECT_RESOURCE_ICON + " "
+ GuiStyleConstants.CLASS_ICON_STYLE_DOWN;
}

if (lastAvailabilityStatus == AvailabilityStatusType.BROKEN) {
return GuiStyleConstants.CLASS_OBJECT_RESOURCE_ICON + " "
+ GuiStyleConstants.CLASS_ICON_STYLE_BROKEN;
}
}
return GuiStyleConstants.CLASS_OBJECT_RESOURCE_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE_NORMAL;
}
Expand Down
Expand Up @@ -145,17 +145,15 @@ public Iterator<SelectableBean<O>> internalIterator(long first, long count) {
for (PrismObject<O> object : list) {
getAvailableData().add(createDataObjectWrapper(object.asObjectable()));
}
// result.recordSuccess();
} catch (Exception ex) {
result.recordFatalError("Couldn't list objects.", ex);
LoggingUtils.logException(LOGGER, "Couldn't list objects", ex);
return handleNotSuccessOrHandledErrorInIterator(result);
} finally {
result.computeStatusIfUnknown();
}

if (result.isFatalError()) {
return handleNotSuccessOrHandledErrorInIterator(result);
}

LOGGER.trace("end::iterator() {}", result);
return getAvailableData().iterator();
}
Expand Down
Expand Up @@ -264,6 +264,10 @@ private InfoBoxPanel createLastAvailabilityStatusInfo(ResourceType resource) {
backgroundColor = "bg-red";
messageKey = "PageResource.resource.down";
icon = "fa-ban";
} else if (lastAvailabilityStatus == AvailabilityStatusType.BROKEN) {
backgroundColor = "bg-yellow";
messageKey = "PageResource.resource.broken";
icon = "fa-warning";
}
}
}
Expand Down

This file was deleted.

This file was deleted.

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2015 Evolveum
* Copyright (c) 2010-2016 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

45 changes: 45 additions & 0 deletions gui/admin-gui/src/main/resources/ctx-overlay.xml
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright (c) 2016 Evolveum
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:ssec="http://cxf.apache.org/spring-security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/spring-security
http://cxf-spring-security.googlecode.com/svn/trunk/cxf-spring-security/src/main/resources/schemas/spring-security.xsd"
default-lazy-init="false"
default-autowire="byName">

<!-- Empty.
This file is meant to be overwritten by overlay projects to include
additional spring contexts as needed. -->

</beans>
Expand Up @@ -1806,6 +1806,7 @@ PageResource.resource.noMappings=No mappings
PageResource.resource.sync=Synchronization defined
PageResource.resource.up=Resource is UP
PageResource.resource.down=Resource is DOWN
PageResource.resource.broken=Resource is BROKEN
PageResource.resource.availabilityUnknown=Resource state is unknown
PageResource.resource.objectTypes=object types
PageResource.resource.schemaDefinitions=schema definitions
Expand Down
1 change: 1 addition & 0 deletions gui/admin-gui/src/main/webapp/WEB-INF/web.xml
Expand Up @@ -38,6 +38,7 @@
classpath*:ctx-notifications.xml,
classpath:ctx-certification.xml,
classpath:ctx-interceptor.xml,
classpath*:ctx-overlay.xml,
<!-- classpath:ctx-camel-imports.xml, -->
/WEB-INF/ctx-webapp.xml,
/WEB-INF/ctx-web-security.xml,
Expand Down
4 changes: 4 additions & 0 deletions gui/admin-gui/src/main/webapp/less/midpoint-theme.less
Expand Up @@ -191,6 +191,10 @@ th.cog, td.cog {
color: #a94442;
}

.icon-style-broken {
color: #f39c12;
}

// Classes that can be added to color icons, info boxes and other widgets for particular object types

.object-user-color {
Expand Down
Expand Up @@ -3290,6 +3290,13 @@
<jaxb:typesafeEnumMember name="UP"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="broken">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="BROKEN"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
Expand Down
Expand Up @@ -251,6 +251,11 @@ private ExecuteScriptsResponseType doExecuteScripts(List<JAXBElement<?>> scripts

try {
for (JAXBElement<?> script : scriptsToExecute) {

Object scriptValue = script.getValue();
if (!(scriptValue instanceof ScriptingExpressionType)) {
throw new SchemaException("Expected that scripts will be of type ScriptingExpressionType, but it was "+scriptValue.getClass().getName());
}

ScriptExecutionResult executionResult = scriptingService.evaluateExpression((ScriptingExpressionType) script.getValue(), task, result);

Expand Down

0 comments on commit 104de2b

Please sign in to comment.