Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/breadcrumbs
Browse files Browse the repository at this point in the history
Conflicts:
	gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/page/PageBase.java
  • Loading branch information
1azyman committed Mar 1, 2016
2 parents 774cdd7 + f71f924 commit d43d29a
Show file tree
Hide file tree
Showing 208 changed files with 23,146 additions and 18,385 deletions.
8 changes: 6 additions & 2 deletions build-system/pom.xml
Expand Up @@ -41,6 +41,10 @@
<ansi.color>true</ansi.color>
<verbose.jaxb2>false</verbose.jaxb2>
<verbose.jaxws>false</verbose.jaxws>

<git.describe>${describe}</git.describe>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>EEE, d MMM yyyy HH:mm:ss Z</maven.build.timestamp.format>
<!-- Dependencies global versions -->
<aspectj.version>1.7.3</aspectj.version>
<commons.io.version>2.0.1</commons.io.version>
Expand Down Expand Up @@ -1017,7 +1021,7 @@
<archive>
<manifestEntries>
<Version-Number>${project.version}</Version-Number>
<SCM-Revision>${describe}</SCM-Revision>
<SCM-Revision>${git.describe}</SCM-Revision>
<Organization>Evolveum</Organization>
<Organization-URL>http://www.evolveum.com</Organization-URL>
<Bugtracking-System>http://jira.evolveum.com</Bugtracking-System>
Expand All @@ -1035,7 +1039,7 @@
<archive>
<manifestEntries>
<Version-Number>${project.version}</Version-Number>
<SCM-Revision>${describe}</SCM-Revision>
<SCM-Revision>${git.describe}</SCM-Revision>
<Organization>Evolveum</Organization>
<Organization-URL>http://www.evolveum.com</Organization-URL>
<Bugtracking-System>http://jira.evolveum.com</Bugtracking-System>
Expand Down
9 changes: 6 additions & 3 deletions config/sql/midpoint/3.4/h2/h2-3.4.sql
@@ -1,7 +1,10 @@
CREATE TABLE m_abstract_role (
approvalProcess VARCHAR(255),
requestable BOOLEAN,
oid VARCHAR(36) NOT NULL,
approvalProcess VARCHAR(255),
ownerRef_relation VARCHAR(157),
ownerRef_targetOid VARCHAR(36),
ownerRef_type INTEGER,
requestable BOOLEAN,
oid VARCHAR(36) NOT NULL,
PRIMARY KEY (oid)
);

Expand Down
4 changes: 4 additions & 0 deletions config/sql/midpoint/3.4/h2/h2-upgrade-3.3-3.4.sql
@@ -1,3 +1,7 @@
ALTER TABLE m_abstract_role ADD ownerRef_relation VARCHAR(157);
ALTER TABLE m_abstract_role ADD ownerRef_targetOid VARCHAR(36);
ALTER TABLE m_abstract_role ADD ownerRef_type INTEGER;

ALTER TABLE m_acc_cert_campaign ADD endTimestamp TIMESTAMP;
ALTER TABLE m_acc_cert_campaign ADD handlerUri VARCHAR(255);
ALTER TABLE m_acc_cert_campaign ADD ownerRef_relation VARCHAR(157);
Expand Down
4 changes: 4 additions & 0 deletions config/sql/midpoint/3.4/h2/h2-upgrade-3.4-SNAPSHOT-2.sql
@@ -0,0 +1,4 @@
ALTER TABLE m_abstract_role ADD ownerRef_relation VARCHAR(157);
ALTER TABLE m_abstract_role ADD ownerRef_targetOid VARCHAR(36);
ALTER TABLE m_abstract_role ADD ownerRef_type INTEGER;

9 changes: 6 additions & 3 deletions config/sql/midpoint/3.4/mysql/mysql-3.4.sql
Expand Up @@ -12,9 +12,12 @@
# remove iAncestor and iDescendant index, they are the same as FK for that fields

CREATE TABLE m_abstract_role (
approvalProcess VARCHAR(255),
requestable BIT,
oid VARCHAR(36) NOT NULL,
approvalProcess VARCHAR(255),
ownerRef_relation VARCHAR(157),
ownerRef_targetOid VARCHAR(36),
ownerRef_type INTEGER,
requestable BIT,
oid VARCHAR(36) NOT NULL,
PRIMARY KEY (oid)
)
DEFAULT CHARACTER SET utf8
Expand Down
5 changes: 5 additions & 0 deletions config/sql/midpoint/3.4/mysql/mysql-upgrade-3.3-3.4.sql
@@ -1,3 +1,8 @@
ALTER TABLE m_abstract_role
ADD ownerRef_relation VARCHAR(157),
ADD ownerRef_targetOid VARCHAR(36),
ADD ownerRef_type INTEGER;

ALTER TABLE m_acc_cert_campaign
ADD endTimestamp DATETIME(6),
ADD handlerUri VARCHAR(255),
Expand Down
@@ -0,0 +1,5 @@
ALTER TABLE m_abstract_role
ADD ownerRef_relation VARCHAR(157),
ADD ownerRef_targetOid VARCHAR(36),
ADD ownerRef_type INTEGER;

9 changes: 6 additions & 3 deletions config/sql/midpoint/3.4/oracle/oracle-3.4.sql
Expand Up @@ -2,9 +2,12 @@
-- replace ");" with ") INITRANS 30;"

CREATE TABLE m_abstract_role (
approvalProcess VARCHAR2(255 CHAR),
requestable NUMBER(1, 0),
oid VARCHAR2(36 CHAR) NOT NULL,
approvalProcess VARCHAR2(255 CHAR),
ownerRef_relation VARCHAR2(157 CHAR),
ownerRef_targetOid VARCHAR2(36 CHAR),
ownerRef_type NUMBER(10, 0),
requestable NUMBER(1, 0),
oid VARCHAR2(36 CHAR) NOT NULL,
PRIMARY KEY (oid)
) INITRANS 30;

Expand Down
6 changes: 6 additions & 0 deletions config/sql/midpoint/3.4/oracle/oracle-upgrade-3.3-3.4.sql
@@ -1,3 +1,9 @@
ALTER TABLE m_abstract_role ADD (
ownerRef_relation VARCHAR2(157 CHAR),
ownerRef_targetOid VARCHAR2(36 CHAR),
ownerRef_type NUMBER(10, 0)
);

ALTER TABLE m_acc_cert_campaign ADD (
endTimestamp TIMESTAMP,
handlerUri VARCHAR2(255 CHAR),
Expand Down
@@ -0,0 +1,6 @@
ALTER TABLE m_abstract_role ADD (
ownerRef_relation VARCHAR2(157 CHAR),
ownerRef_targetOid VARCHAR2(36 CHAR),
ownerRef_type NUMBER(10, 0)
);

9 changes: 6 additions & 3 deletions config/sql/midpoint/3.4/postgresql/postgresql-3.4.sql
@@ -1,7 +1,10 @@
CREATE TABLE m_abstract_role (
approvalProcess VARCHAR(255),
requestable BOOLEAN,
oid VARCHAR(36) NOT NULL,
approvalProcess VARCHAR(255),
ownerRef_relation VARCHAR(157),
ownerRef_targetOid VARCHAR(36),
ownerRef_type INT4,
requestable BOOLEAN,
oid VARCHAR(36) NOT NULL,
PRIMARY KEY (oid)
);

Expand Down
@@ -1,3 +1,8 @@
ALTER TABLE m_abstract_role
ADD ownerRef_relation VARCHAR(157),
ADD ownerRef_targetOid VARCHAR(36),
ADD ownerRef_type INT4;

ALTER TABLE m_acc_cert_campaign
ADD endTimestamp TIMESTAMP,
ADD handlerUri VARCHAR(255),
Expand Down
@@ -0,0 +1,5 @@
ALTER TABLE m_abstract_role
ADD ownerRef_relation VARCHAR(157),
ADD ownerRef_targetOid VARCHAR(36),
ADD ownerRef_type INT4;

9 changes: 6 additions & 3 deletions config/sql/midpoint/3.4/sqlserver/sqlserver-3.4.sql
@@ -1,7 +1,10 @@
CREATE TABLE m_abstract_role (
approvalProcess NVARCHAR(255) COLLATE database_default,
requestable BIT,
oid NVARCHAR(36) COLLATE database_default NOT NULL,
approvalProcess NVARCHAR(255) COLLATE database_default,
ownerRef_relation NVARCHAR(157) COLLATE database_default,
ownerRef_targetOid NVARCHAR(36) COLLATE database_default,
ownerRef_type INT,
requestable BIT,
oid NVARCHAR(36) COLLATE database_default NOT NULL,
PRIMARY KEY (oid)
);

Expand Down
@@ -1,3 +1,8 @@
ALTER TABLE m_abstract_role ADD
ownerRef_relation NVARCHAR(157) COLLATE database_default,
ownerRef_targetOid NVARCHAR(36) COLLATE database_default,
ownerRef_type INT;

ALTER TABLE m_acc_cert_campaign ADD
endTimestamp DATETIME2,
handlerUri NVARCHAR(255) COLLATE database_default,
Expand Down
@@ -0,0 +1,5 @@
ALTER TABLE m_abstract_role ADD
ownerRef_relation NVARCHAR(157) COLLATE database_default,
ownerRef_targetOid NVARCHAR(36) COLLATE database_default,
ownerRef_type INT;

5 changes: 3 additions & 2 deletions dist/pom.xml
Expand Up @@ -78,6 +78,7 @@
<!-- Used to pull XSD files from the JAR -->
<groupId>com.evolveum.midpoint.tools</groupId>
<artifactId>schema-dist-maven-plugin</artifactId>
<version>3.4-SNAPSHOT</version>
<executions>
<execution>
<id>schemadist-prism</id>
Expand All @@ -92,14 +93,14 @@
<artifactId>prism</artifactId>
<version>${project.version}</version>
<type>jar</type>
<catalog>META-INF/catalog-runtime.xml</catalog>
<!-- no catalog (the one in schema suffices) -->
</artifactItem>
<artifactItem>
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>schema</artifactId>
<version>${project.version}</version>
<type>jar</type>
<catalog>META-INF/jax-ws-catalog.xml</catalog>
<catalog>META-INF/catalog-schema-dist.xml</catalog>
</artifactItem>
</artifactItems>
<includes>**/*.xsd,**/*.dtd,**/*.wsdl,META-INF/*</includes>
Expand Down
@@ -0,0 +1,32 @@
<!--
~ Copyright (c) 2010-2014 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.
-->
<html xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:panel>
<div class="feedback-message box box-solid" wicket:id="detailsBox">
<div class="box-header with-border">
<i class="icon fa " wicket:id="iconType"></i>
<b class="box-title" wicket:id="message">
</b>
<div class="box-tools pull-right">
<div wicket:id="close" data-widget="remove" class="btn btn-box-tool fa fa-times"></div>
</div>
</div>

</div>
</wicket:panel>
</body>
</html>
@@ -0,0 +1,132 @@
package com.evolveum.midpoint.gui.api.component.result;

import java.io.Serializable;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;

import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;

public class ValidationErrorPanel extends BasePanel<FeedbackMessage> {

private static final String ID_MESSAGE = "message";

static final String OPERATION_RESOURCE_KEY_PREFIX = "operation.";

private static final Trace LOGGER = TraceManager.getTrace(OperationResultPanel.class);

public ValidationErrorPanel(String id, IModel<FeedbackMessage> model) {
super(id, model);

initLayout();
}

public void initLayout() {

WebMarkupContainer detailsBox = new WebMarkupContainer("detailsBox");
detailsBox.setOutputMarkupId(true);
detailsBox.add(AttributeModifier.append("class", createHeaderCss()));
add(detailsBox);

initHeader(detailsBox);

}

private IModel<String> createHeaderCss() {

return new AbstractReadOnlyModel<String>() {

@Override
public String getObject() {
FeedbackMessage result = getModelObject();

if (result == null) {
return " box-warning";
}

switch (result.getLevel()) {
case FeedbackMessage.INFO:
case FeedbackMessage.DEBUG:
return " box-info";
case FeedbackMessage.SUCCESS:
return " box-success";
case FeedbackMessage.ERROR:
case FeedbackMessage.FATAL:
return " box-danger";
case FeedbackMessage.UNDEFINED:
case FeedbackMessage.WARNING: // TODO:
default:
return " box-warning";
}
}

};
}

private void initHeader(WebMarkupContainer box) {
WebMarkupContainer iconType = new WebMarkupContainer("iconType");
iconType.setOutputMarkupId(true);
iconType.add(new AttributeAppender("class", new AbstractReadOnlyModel() {
@Override
public Object getObject() {

FeedbackMessage result = getModelObject();

if (result == null) {
return " fa-info";
}

switch (result.getLevel()) {
case FeedbackMessage.INFO:
case FeedbackMessage.DEBUG:
return " fa-info";
case FeedbackMessage.SUCCESS:
return " fa-check";
case FeedbackMessage.ERROR:
case FeedbackMessage.FATAL:
return " fa-ban";
case FeedbackMessage.UNDEFINED:
case FeedbackMessage.WARNING: // TODO:
default:
return " fa-warning";
}
}

}));

box.add(iconType);

Label message = new Label(ID_MESSAGE, new PropertyModel<Serializable>(getModel(), "message"));
box.add(message);

AjaxLink close = new AjaxLink("close") {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
close(target);

}
};

box.add(close);


}

public void close(AjaxRequestTarget target){
this.setVisible(false);
target.add(this);
}
}

0 comments on commit d43d29a

Please sign in to comment.